Andy Meneely
94a35f6028
Update expected images for sanity test
2015-08-16 00:31:53 -04:00
Andy Meneely
5042ee8edc
Ripping out the notorious input_helpers.rb
2015-08-15 14:59:08 -04:00
Andy Meneely
82a2538180
Removing dependency on ill-fated input_helpers.rb
2015-08-15 00:32:44 -04:00
Andy Meneely
4d1661ac0b
Convert hand method to args classes
2015-08-15 00:17:29 -04:00
Andy Meneely
3f2b057466
Convert save_sheet and save_pdf to args classes
2015-08-14 23:56:03 -04:00
Andy Meneely
bcc6d355d2
Convert showcase to args classes
2015-08-14 21:08:11 -04:00
Andy Meneely
f8a18cdbce
Finished porting of save_png over to args classes
2015-08-12 23:41:15 -04:00
Andy Meneely
4aee48dada
Working on save args
2015-08-12 15:57:58 -04:00
Andy Meneely
354a97f100
Add validation to text embed key
2015-08-09 22:15:10 -04:00
Andy Meneely
40ac6d2b6b
Expanding the Working With Text section
...
[skip ci]
2015-07-29 12:20:35 -04:00
Andy Meneely
7de39618fe
Update regression tests for text
2015-07-28 09:39:21 -04:00
Andy Meneely
19767c54c4
Implement stroke_strategy option for all drawing operations
...
Fixes #102
2015-07-27 22:55:49 -04:00
Andy Meneely
5bbde3a259
Fix compatibility with rspec 3.3
2015-07-27 13:38:43 -04:00
Andy Meneely
e03a97ce7e
Add :scale shortcut to width/height of png and svg
...
Allows scaling while keeping the aspect ratio
Closes #91
2015-07-27 13:25:12 -04:00
Andy Meneely
7c756e468d
Remove dead code
2015-07-26 23:34:02 -04:00
Andy Meneely
8f977f5956
Update text_options.rb sample, and expected output
2015-07-26 23:25:43 -04:00
Andy Meneely
9d475995e8
Pango scaling of "spacing" in text is done once
...
Spacing also defaults to nil, not zero, as before
Fixes #98
2015-07-26 22:26:42 -04:00
Andy Meneely
54185fe9eb
Warn on non-existing layout
...
Fix #99 and refactor args_loader a bit
2015-07-26 21:50:43 -04:00
Andy Meneely
cddea47ba5
Upgrade Roo to 2.1.x
...
Looks like the main difference is that xlsm is now supported, so I added test for it.
2015-07-21 21:47:50 -04:00
Andy Meneely
70a5f48bda
Add nil check for colors, just in case
...
Probably not possible, but provides a more descriptive error than before anyway.
Fixes #84 .
2015-07-21 21:37:54 -04:00
Andy Meneely
f21e9448e1
Warn when text is ellipsized
...
Closes #80
2015-07-21 21:31:50 -04:00
Andy Meneely
92d866548c
Cleanup of img_dir and testing of input_file.rb
2015-07-21 21:04:23 -04:00
Andy Meneely
04ac3f730a
Fix mock object tests
2015-07-21 20:44:08 -04:00
Andy Meneely
336c43069a
Removing an over-engineered test
2015-07-21 20:27:26 -04:00
Andy Meneely
e20c644a9a
Implemented new args design for svg and png
...
As part of that implementation, text_embed now supports singleton expansion. Closes #54
2015-07-21 20:27:15 -04:00
Andy Meneely
ff3d057d49
Add a force_id: true example to load_images
2015-07-21 20:17:08 -04:00
Andy Meneely
25b13fd592
Better ability to handle per-dsl-method defaults
2015-07-12 00:52:34 -04:00
Andy Meneely
08d0ac2b60
Starting paint args class - not integrated yet.
...
Draw args also now requires custom_colors from Deck. (Can't trust caller to override the default.)
2015-07-12 00:06:27 -04:00
Andy Meneely
37a7210751
New spec for validating line caps
...
Because I'm obsessed with code coverage.
2015-07-10 13:03:22 -04:00
Andy Meneely
c66c6bc4f0
Removed img_dir from set method, added specs
2015-07-10 12:43:56 -04:00
Melody
8674d8d946
updates rowify specs to merge default options and cover new test case
2015-07-08 23:47:49 -04:00
Andy Meneely
e43f68d323
Ported text command over to the new args classes
...
* Involved a big rewrite of arg_loader to accomodate nil and false better. Sadly this meant dumping ||= for if-statements. Blech, but works.
* Updates to regression tests are pretty trivial.
* Removed graphics_text_spec because, even though it looks useful, with rake sanity it really isn't.
* Exposed font on deck as well
Cleaned up graphics/text.rb too!
2015-07-07 23:59:23 -04:00
Andy Meneely
cc5c540be8
Updated regression specs
...
Mostly from changing colorify to always converting to a string
New ranges example for the idiom
New text options example for dotted
[skip ci]
2015-07-03 20:16:18 -04:00
Andy Meneely
2dd3fc3365
Documented a range idiom
...
In reaction to #90
[skip ci]
2015-07-03 16:01:44 -04:00
Andy Meneely
6aecdbbb4a
Adding custom colors to the draw arg
2015-07-03 00:47:46 -04:00
Andy Meneely
f16f285a0a
Update expected draw_shapes.rb PNG for sanity test
2015-06-16 21:20:06 -04:00
Andy Meneely
b5903293d7
Layouts use strings as keys, so that must be realistic
2015-06-11 17:20:02 -04:00
Andy Meneely
c5e00f1877
Employing the new args refactoring on all shapes
2015-06-11 16:16:08 -04:00
Andy Meneely
8a7841d64f
Add dash option to drawing operations
...
Currently only impacts rect, but it will impact others with the new design shortly
2015-06-08 15:26:33 -04:00
Andy Meneely
12c5cd675b
Added line cap and join settings for rect and curve
...
More forthcoming - these are proof-of-concept
2015-06-08 14:17:46 -04:00
Andy Meneely
c1e410fe72
First foray into args class refactoring: rect
...
So far, I really like this approach. It allows us to push validation logic out of the Card class and into its own set of classes that can be more easily tested.
Fixes #75 , but we've got a lot more work to do in getting this full scale
2015-06-08 13:36:23 -04:00
Andy Meneely
6c60f21bb0
Refactored drawing to get fill_n_stroke
...
Contributes to #75
2015-06-04 16:40:55 -04:00
Andy Meneely
9801188b47
Update expected png for star
2015-05-26 21:09:19 -04:00
Andy Meneely
d957addfc3
Enabling regression tests again
2015-05-26 20:56:58 -04:00
Andy Meneely
3bbc787025
Add polygon method to dsl
...
Testing and documentation too.
Closes #67
2015-05-22 06:12:48 -04:00
Andy Meneely
0853b6a708
Finish regression testing of star
2015-05-21 18:29:38 -04:00
Andy Meneely
b8536bcabe
Regression and sanity testing for star
...
Closes #72
2015-05-21 09:29:01 -04:00
Andy Meneely
a86974d5b8
Regression and sanity testing
2015-05-19 15:02:54 -04:00
Andy Meneely
dab544a53b
Add ellipse method
...
Also experimenting with using stroke_preserve, which in turn may make the other methods less repetitive.
Closes #66
2015-04-30 11:48:21 -04:00
Andy Meneely
ac7769237c
Fix the csv_import.rb sample to function properly
2015-04-30 10:05:34 -04:00
Andy Meneely
71defb9e33
Fix color handling with text outline stroking
...
Needed to set squibcolor prior to translating the coordinate system so that gradients are relative to the card (as is documented). This also means stroking is done AFTER drawing the text, which looks better anyway.
2015-04-30 09:54:41 -04:00
Andy Meneely
2e84cf4e6a
Update load_images expected png for sanity testing
2015-04-30 09:37:57 -04:00
Andy Meneely
e974880e03
Add 'data' field to svg method for loading XML directly
...
Implements #65
2015-04-29 16:49:38 -04:00
Andy Meneely
b03dbb54da
Fix unit test breakage
2015-04-28 22:31:15 -04:00
Andy Meneely
7c69cad506
Text: outline a string with a color or gradient
...
Fill color is still the same with 'color' (i.e. can be overridden by markup still), but now there's a stroke_width and a stroke_color option that, when stroke_width > 0, will draw an outline below the text. Since this isn't a Pango feature, we can't do markup for outlines. (Maybe make that a feature request to Pango if you want it.)
Implements #51
2015-04-28 22:27:26 -04:00
Andy Meneely
1dc89ae76a
Port global text hints to the new conf
2015-04-28 21:01:49 -04:00
Andy Meneely
923f346575
Redesigning how config files are read, stored, and delegated
...
With the new design, we take the load off of deck.rb and simply delegate methods over to the new conf.rb. This means that things like `antialias` is now available as a method to the normal Squib scripts for easy checking (without being mutable). Squib::Conf also handles parsing and defaults, and any potential input validation we need to do in the future.
Typographer is also set up now as a deck-wide configuration. This may change in the future if we want typography customization per-command, although that seems like a strange use case.
Lots of tests for this one, and lots of cross-cutting concerns in this commit.
This commit also includes some tweaks to rspec tests, including tagging of slow tests for a `rake spec_fastonly`
Conflicts:
spec/samples/samples_regression_spec.rb
spec/spec_helper.rb
squib.sublime-project
2015-04-28 20:31:53 -04:00
Andy Meneely
74865cb10f
Sanity test: pixel-by-pixel comparison
2015-04-28 16:07:40 -04:00
Andy Meneely
5ea9ce619f
Basic visual sanity test for better regression testing
2015-04-27 11:15:31 -04:00
Andy Meneely
bed94e47ba
Changing rspec sample regressions to one-at-a-time
2015-04-27 09:58:25 -04:00
Andy Meneely
0aa5c500c0
Fix broken test
2015-04-27 09:26:46 -04:00
Andy Meneely
25773a8ee5
Better regression tests for roo
2015-04-27 08:50:03 -04:00
Andy Meneely
035cd6259e
Fix global hinting logic
...
Fixes #63
2015-04-16 21:24:21 -04:00
Andy Meneely
4a0c5e78b6
Fix PDF scaling issue
...
Properly compute the size of the PDF based on DPI and PDF-specific resolution (i.e. 72dpi).
Closes #62
2015-04-13 22:59:34 -04:00
Andy Meneely
0185f2dfcf
Fixing up regression tests for release
2015-04-13 21:33:55 -04:00
Andy Meneely
0616512bd6
Set font antialiasing from global antialiasing
...
This is a workaround until we get a proper solution in #59
2015-04-13 21:26:41 -04:00
Andy Meneely
063d5156d6
Allow configuration of typographical replacements, e.g. smart quotes
...
If you're living in a non-UTF-8 character set, then you can configure what quotes are smartly changed.
If my regexes are messing things up, you can also turn this off with smart_quotes: false
Also updated docs.
This closes #50
2015-04-07 21:21:00 -04:00
Andy Meneely
beb46a9e1c
Place embedded icons based on byte offset
...
Fixes #57
2015-04-07 19:43:16 -04:00
Andy Meneely
211e7c13b3
Fix typography replacements with embeds
...
Enable embedded icons tests again
2015-04-07 12:20:40 -04:00
Andy Meneely
a5d1cb60f2
Complete overhaul of smart quotes to "typographer"
...
See README for details
Contributes to #50
2015-04-07 00:16:06 -04:00
Andy Meneely
674397c005
Smart quotes!
...
Closes #50
2015-04-04 16:02:20 -04:00
Andy Meneely
19cad2cdb8
Using a platform-specific fix for zero-width letters on embedding icons
...
Contributes to #30 and our zero-width letter woes.
2015-04-04 09:15:21 -04:00
Andy Meneely
91ba48f80b
Explicitly saving and restoring the matrix
2015-04-02 10:14:08 -04:00
Andy Meneely
c9f9235be7
Attempting travis fix by saving and restoring the matrix
2015-04-02 10:00:26 -04:00
Andy Meneely
784a0dcb90
Updating the regression test
2015-03-31 21:24:28 -04:00
Andy Meneely
574b76873e
Updating regression tests, renamed bezier curve params
2015-03-26 19:50:12 -04:00
Andy Meneely
2cc9cc8e93
Initial implementation of curves
...
Contributes to #37
2015-03-19 18:15:24 -04:00
Andy Meneely
cb33e8a40e
Updating unit tests
2015-03-19 00:24:52 -04:00
Andy Meneely
3a57380959
Updated and corrected regression tests
2015-03-19 00:24:51 -04:00
Andy Meneely
2caacaeece
Fixing compatibility with linux os
...
Thank you, Travis! Turns out the cairo gem isn't perfectly the same in Linux...
2015-02-28 21:39:26 -05:00
Andy Meneely
499050c4ee
Requiring squib in more places on specs
...
Trying to fix unit tests on travis
2015-02-28 21:09:56 -05:00
Andy Meneely
f49bff2388
Add antialias config option
...
Closes #41
2015-02-28 19:34:46 -05:00
Andy Meneely
612c042d52
SVG backend: PDF implemented, tests passing
...
Wrapping up the svg backend work
Still some bugs to stamp out, but this is getting close to release ready.
2015-02-24 22:33:32 -05:00
Andy Meneely
8876b27473
Merging in svg back end work. All but save_doc is done.
2015-02-20 22:56:07 -05:00
Andy Meneely
d030bdd7f9
Adding specs for formatify
2015-02-13 13:45:14 -05:00
Andy Meneely
a9d6ffda75
Refactoring specs, now with less leakage!
2015-02-13 13:35:38 -05:00
Andy Meneely
578c3cb6a0
Upgrading rspec, fixing mock objects bug
2015-02-13 13:26:22 -05:00
Andy Meneely
d2543473c7
Fix a leftover x,y stroke on circles
...
Fixes #35
2015-02-13 12:54:19 -05:00
Andy Meneely
086fd5fad9
Unit conversion on save_pdf, and arbitrary paper sizes
...
Closes #21 and #20
2015-02-02 00:20:25 -05:00
Andy Meneely
d848178bfe
Unit conversion on Squib::Deck.new
...
Contributes to #21
2015-02-01 23:55:01 -05:00
Andy Meneely
1896689614
Refactoring out the unit conversion to its own place
2015-02-01 23:48:09 -05:00
Andy Meneely
4ecbaa4e31
Implementing format strings for filename counts on multisaves
2015-02-01 23:25:57 -05:00
Andy Meneely
7a53f68393
Implementing mask feature for images
...
Fixes #32 .
2015-02-01 23:04:39 -05:00
Andy Meneely
b0b69186e7
Don't need these regression logs
2015-01-28 15:07:57 -05:00
Andy Meneely
22866777bd
Regression logs for new hex scrub
2015-01-28 10:14:14 -05:00
Andy Meneely
181fe9942a
Scrubbing hex for regression testing
2015-01-26 22:54:48 -05:00
Andy Meneely
bfbf7a7eba
Added support for linear and radial gradients
...
Closes #29
2015-01-26 22:22:09 -05:00
Andy Meneely
bde7fe018e
Added a a sample table for showing the built-in color constants
2015-01-26 12:03:07 -05:00
Andy Meneely
407b0e9b71
Still fixing showcase regression test
2015-01-06 00:18:39 -05:00
Andy Meneely
ea598043bb
Still fixing hex scrub for showcase
2015-01-06 00:13:32 -05:00
Andy Meneely
4d3c676cf6
Fixing hex scrub for showcase
2015-01-06 00:09:34 -05:00
Andy Meneely
73d6eb992b
Extending a non-existent parent yells at you now
...
Fixes #24
2015-01-05 23:59:09 -05:00
Andy Meneely
c0556153b7
Achievement Unlocked: true 100% coverage.
2015-01-05 23:26:13 -05:00
Andy Meneely
31e5d75f59
Refactoring out LayoutParser
2015-01-05 23:07:46 -05:00
Andy Meneely
f3e3082f0e
Implement showcase feature
...
#Closes 26
2015-01-05 21:09:35 -05:00
Andy Meneely
574f99af12
Unit conversion handles trailing whitespace
2014-12-31 00:57:19 -05:00
Andy Meneely
fd217294c5
Implemented sheet command
2014-12-31 00:47:02 -05:00
Andy Meneely
c287e6137c
Unit conversion feature added, tested, documented
2014-12-30 13:35:28 -05:00
Andy Meneely
979cd701e6
Added a unicode sample
...
Removed the unicode from the text_options.rb sample so the regression test can be back online.
2014-12-30 11:53:55 -05:00
Andy Meneely
19808c6464
Better parsing of layout files
...
Handles empty rules and empty files better now.
Fixes #14
2014-12-09 23:14:21 -05:00
Andy Meneely
f8f65f3de7
Support png scaling, but warns on use.
2014-12-09 22:59:49 -05:00
Andy Meneely
04b55d8b32
Finished CSV feature
2014-12-08 00:05:18 -05:00
Andy Meneely
f60e3721c8
Half-finished csv command
2014-11-26 00:13:45 -05:00
Andy Meneely
0330937b99
More hex scrubbing for OS X
2014-11-26 00:08:17 -05:00
Andy Meneely
d5181302ad
Implementing ink extent return values
2014-11-25 00:30:28 -05:00
Andy Meneely
ba54d5c2fa
Fix unit test for stubbing out ImageSurface
2014-11-24 17:13:22 -05:00
Andy Meneely
44fd5ca745
Disabling the correct test this time
2014-11-24 09:56:45 -05:00
Andy Meneely
4ab9b3f5d5
Clarify cairo_access
2014-11-24 09:52:12 -05:00
Andy Meneely
a3e3b592fb
Back to disabling these tests until I get answers
2014-11-24 09:43:39 -05:00
Andy Meneely
cb63f94ac2
Attempting to re-enable old tests with new change
2014-11-20 03:41:18 -05:00
Andy Meneely
9e45726bdf
Being more specific about encoding
2014-11-20 03:20:23 -05:00
Andy Meneely
996fab90bd
Disabling the two regression test that fail, for now
2014-11-19 23:09:36 -05:00
Andy Meneely
99ab80fb51
Rewriting and refactoring Squib sample test
2014-11-19 22:49:12 -05:00
Andy Meneely
8050501b15
Sample logs don't need headers anymore
2014-11-19 22:48:35 -05:00
Andy Meneely
4c4c96b8b9
Disabling AGAIN for fixing the public broken build
2014-11-19 03:50:58 -05:00
Andy Meneely
550bb80d29
Test stability: scrubbing pango font description differently
2014-11-19 03:41:07 -05:00
Andy Meneely
4389c6d5d2
Disabling this test until it's more stable
2014-11-18 21:15:31 -05:00
Andy Meneely
993bc06176
Making tests more stable for travis
2014-11-18 21:05:01 -05:00
Andy Meneely
163c34c2ea
Making the hex scrub EVEN more flexible...
2014-11-18 20:45:43 -05:00
Andy Meneely
dd8197b91d
Updating layouts regression log for new layouts
2014-11-18 09:48:51 -05:00
Andy Meneely
0f7f8acefa
Making the hex scrubbing more flexible for when pointers round weirdly
2014-11-18 09:48:28 -05:00
Andy Meneely
fc63087b8f
Just need one card for this example
2014-11-18 09:47:49 -05:00
Andy Meneely
069f8edb02
Don't need this anymore
2014-11-18 01:55:46 -05:00
Andy Meneely
99ac612b8a
Regression testing: cairo mock object stores graphics calls
...
So the idea behind this is maintain an "expected value" for the sample runs. We store the graphics calls and their arguments as a readable text file. Any change in the samples will break this, but the idea is to make sure this doesn't get broken unexpectedly.
Rearranged the data files in specs
2014-11-18 01:53:00 -05:00
Andy Meneely
75ab0b565f
Added support for merging multiple layout files
2014-11-17 21:08:57 -05:00
Andy Meneely
dbc1b6eab3
Added unit test for image api
2014-11-09 22:41:16 -05:00
Andy Meneely
8898d7cbf5
Unit testing rotate and angle
2014-11-03 22:57:31 -05:00
Andy Meneely
d4f0105785
Image rotation support for png and svg commands
...
With unit tests and other refactorings
2014-11-03 22:47:06 -05:00
Andy Meneely
20600a97e6
Rotation works better now!!
2014-11-03 21:51:28 -05:00
Andy Meneely
4bdf37e4dc
Some more tests to round out the coverage
2014-11-03 09:08:12 -05:00
Andy Meneely
c52c22ddb5
New mock specs for shapes and save
2014-11-02 20:55:23 -05:00
Andy Meneely
4965df175c
Fixing overzealous coverage issue
2014-11-02 19:13:35 -05:00
Andy Meneely
c6e85b0e46
Refactoring to use case more, fixed build
2014-11-02 18:43:11 -05:00
Andy Meneely
f4d2d759c1
Allowing strings for some inputs on text
...
Also writing mock object tests
2014-10-31 15:55:12 -04:00
Andy Meneely
2a58323bd4
Another unit test for dirify
2014-10-29 15:37:45 -04:00
Andy Meneely
aad7180c8b
Refactored spec with the splat operator
2014-10-29 15:10:10 -04:00
Andy Meneely
bf91190b3b
Rubocop: TrailingBlankLines
2014-10-29 12:10:37 -04:00
Andy Meneely
e115135d51
Rubocop: Using single-quotes properly
2014-10-29 12:04:33 -04:00
Andy Meneely
37fd4e7733
Rubocop: Trailing Whitespace
2014-10-29 12:04:32 -04:00
David Turner
91e7adafd5
Add text rotation
2014-10-17 08:17:07 -04:00