squib 0.15.2 → 0.15.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +41 -41
  3. data/.travis.yml +17 -17
  4. data/CHANGELOG.md +400 -395
  5. data/CONTRIBUTING.md +40 -40
  6. data/Dockerfile +25 -25
  7. data/Gemfile +2 -2
  8. data/LICENSE.txt +22 -22
  9. data/README.md +145 -145
  10. data/RELEASE TODO.md +21 -21
  11. data/Rakefile +48 -48
  12. data/appveyor.yml +25 -25
  13. data/bin/squib +4 -4
  14. data/lib/squib.rb +32 -32
  15. data/lib/squib/api/background.rb +15 -15
  16. data/lib/squib/api/data.rb +137 -137
  17. data/lib/squib/api/groups.rb +54 -54
  18. data/lib/squib/api/image.rb +49 -49
  19. data/lib/squib/api/save.rb +83 -83
  20. data/lib/squib/api/settings.rb +21 -21
  21. data/lib/squib/api/shapes.rb +124 -124
  22. data/lib/squib/api/text.rb +25 -25
  23. data/lib/squib/api/text_embed.rb +71 -71
  24. data/lib/squib/api/units.rb +27 -27
  25. data/lib/squib/args/arg_loader.rb +126 -126
  26. data/lib/squib/args/box.rb +55 -55
  27. data/lib/squib/args/card_range.rb +32 -32
  28. data/lib/squib/args/color_validator.rb +12 -12
  29. data/lib/squib/args/coords.rb +35 -35
  30. data/lib/squib/args/csv_opts.rb +25 -25
  31. data/lib/squib/args/dir_validator.rb +16 -16
  32. data/lib/squib/args/draw.rb +92 -92
  33. data/lib/squib/args/embed_adjust.rb +25 -25
  34. data/lib/squib/args/embed_key.rb +17 -17
  35. data/lib/squib/args/hand_special.rb +37 -37
  36. data/lib/squib/args/import.rb +40 -40
  37. data/lib/squib/args/input_file.rb +37 -37
  38. data/lib/squib/args/paint.rb +44 -44
  39. data/lib/squib/args/paragraph.rb +116 -116
  40. data/lib/squib/args/save_batch.rb +63 -63
  41. data/lib/squib/args/scale_box.rb +53 -53
  42. data/lib/squib/args/sheet.rb +172 -172
  43. data/lib/squib/args/showcase_special.rb +41 -41
  44. data/lib/squib/args/sprue_file.rb +44 -44
  45. data/lib/squib/args/svg_special.rb +37 -37
  46. data/lib/squib/args/transform.rb +61 -61
  47. data/lib/squib/args/typographer.rb +119 -119
  48. data/lib/squib/args/unit_conversion.rb +29 -29
  49. data/lib/squib/builtin/layouts/economy.yml +85 -85
  50. data/lib/squib/builtin/layouts/fantasy.yml +101 -101
  51. data/lib/squib/builtin/layouts/hand.yml +62 -62
  52. data/lib/squib/builtin/layouts/party.yml +94 -94
  53. data/lib/squib/builtin/layouts/playing-card.yml +35 -35
  54. data/lib/squib/builtin/layouts/tuck_box.yml +46 -46
  55. data/lib/squib/builtin/projects/advanced/.gitignore +4 -4
  56. data/lib/squib/builtin/projects/advanced/ABOUT.md +19 -19
  57. data/lib/squib/builtin/projects/advanced/Gemfile +11 -11
  58. data/lib/squib/builtin/projects/advanced/Guardfile +21 -21
  59. data/lib/squib/builtin/projects/advanced/IDEAS.md +22 -22
  60. data/lib/squib/builtin/projects/advanced/PLAYTESTING.md +26 -26
  61. data/lib/squib/builtin/projects/advanced/Rakefile +27 -27
  62. data/lib/squib/builtin/projects/advanced/config.yml +49 -49
  63. data/lib/squib/builtin/projects/advanced/docs/PNP NOTES.md +3 -3
  64. data/lib/squib/builtin/projects/advanced/docs/RULES.md +21 -21
  65. data/lib/squib/builtin/projects/advanced/img/example.svg +60 -60
  66. data/lib/squib/builtin/projects/advanced/layouts/deck.yml +27 -27
  67. data/lib/squib/builtin/projects/advanced/src/deck.rb +34 -34
  68. data/lib/squib/builtin/projects/advanced/src/version.rb +3 -3
  69. data/lib/squib/builtin/projects/basic/.gitignore +4 -4
  70. data/lib/squib/builtin/projects/basic/ABOUT.md +19 -19
  71. data/lib/squib/builtin/projects/basic/Gemfile +3 -3
  72. data/lib/squib/builtin/projects/basic/IDEAS.md +22 -22
  73. data/lib/squib/builtin/projects/basic/PLAYTESTING.md +26 -26
  74. data/lib/squib/builtin/projects/basic/PNP NOTES.md +3 -3
  75. data/lib/squib/builtin/projects/basic/RULES.md +21 -21
  76. data/lib/squib/builtin/projects/basic/Rakefile +7 -7
  77. data/lib/squib/builtin/projects/basic/config.yml +49 -49
  78. data/lib/squib/builtin/projects/basic/deck.rb +6 -6
  79. data/lib/squib/builtin/sprues/a4_euro_card.yml +42 -42
  80. data/lib/squib/builtin/sprues/a4_poker_card_8up.yml +40 -40
  81. data/lib/squib/builtin/sprues/a4_poker_card_9up.yml +42 -42
  82. data/lib/squib/builtin/sprues/a4_usa_card.yml +42 -42
  83. data/lib/squib/builtin/sprues/drivethrucards_1up.yml +10 -10
  84. data/lib/squib/builtin/sprues/letter_poker_card_9up.yml +25 -25
  85. data/lib/squib/builtin/sprues/letter_poker_foldable_8up.yml +52 -52
  86. data/lib/squib/builtin/sprues/printplaygames_18up.yml +68 -68
  87. data/lib/squib/card.rb +75 -75
  88. data/lib/squib/commands/cli.rb +39 -39
  89. data/lib/squib/commands/data/template_option.rb +109 -109
  90. data/lib/squib/commands/make_sprue.rb +277 -277
  91. data/lib/squib/commands/new.rb +77 -77
  92. data/lib/squib/conf.rb +139 -139
  93. data/lib/squib/constants.rb +17 -17
  94. data/lib/squib/deck.rb +116 -116
  95. data/lib/squib/graphics/background.rb +14 -14
  96. data/lib/squib/graphics/cairo_context_wrapper.rb +113 -113
  97. data/lib/squib/graphics/embedding_utils.rb +28 -28
  98. data/lib/squib/graphics/gradient_regex.rb +47 -47
  99. data/lib/squib/graphics/hand.rb +42 -42
  100. data/lib/squib/graphics/image.rb +123 -123
  101. data/lib/squib/graphics/save_doc.rb +61 -61
  102. data/lib/squib/graphics/save_images.rb +52 -52
  103. data/lib/squib/graphics/save_pdf.rb +90 -90
  104. data/lib/squib/graphics/save_sprue.rb +219 -219
  105. data/lib/squib/graphics/shapes.rb +143 -143
  106. data/lib/squib/graphics/showcase.rb +85 -85
  107. data/lib/squib/graphics/text.rb +174 -174
  108. data/lib/squib/import/data_frame.rb +108 -108
  109. data/lib/squib/layout_parser.rb +138 -138
  110. data/lib/squib/progress.rb +38 -38
  111. data/lib/squib/sample_helpers.rb +34 -34
  112. data/lib/squib/sprues/crop_line.rb +28 -28
  113. data/lib/squib/sprues/crop_line_dash.rb +35 -35
  114. data/lib/squib/sprues/invalid_sprue_definition.rb +9 -9
  115. data/lib/squib/sprues/sprue.rb +206 -206
  116. data/lib/squib/sprues/sprue_schema.rb +50 -50
  117. data/lib/squib/version.rb +10 -10
  118. data/samples/autoscale_font/_autoscale_font.rb +29 -29
  119. data/samples/backend/_backend.rb +26 -26
  120. data/samples/basic.rb +19 -19
  121. data/samples/build_groups/build_groups.rb +36 -36
  122. data/samples/colors/_colors.rb +44 -44
  123. data/samples/colors/_gradients.rb +34 -34
  124. data/samples/colors/_switch_color.rb +33 -33
  125. data/samples/config/config_text_markup.rb +20 -20
  126. data/samples/config/custom_config.rb +18 -18
  127. data/samples/data/_csv.rb +33 -33
  128. data/samples/data/_excel.rb +55 -55
  129. data/samples/data/_yaml.rb +12 -12
  130. data/samples/hello_world.rb +6 -6
  131. data/samples/images/_cairo_access.rb +39 -39
  132. data/samples/images/_images.rb +104 -104
  133. data/samples/images/_more_load_images.rb +102 -102
  134. data/samples/intro/01_hello.rb +8 -8
  135. data/samples/intro/02_options.rb +14 -14
  136. data/samples/intro/03_layout.rb +11 -11
  137. data/samples/intro/04_arrays.rb +15 -15
  138. data/samples/intro/05_excel.rb +14 -14
  139. data/samples/layouts/builtin_layouts.rb +97 -97
  140. data/samples/layouts/layouts.rb +71 -71
  141. data/samples/project/src/characters.rb +8 -8
  142. data/samples/project/src/skills.rb +7 -7
  143. data/samples/proofs/_tgc_proofs.rb +16 -16
  144. data/samples/ranges/_ranges.rb +64 -64
  145. data/samples/saves/_hand.rb +23 -23
  146. data/samples/saves/_portrait_landscape.rb +23 -23
  147. data/samples/saves/_save_filenames.rb +24 -24
  148. data/samples/saves/_save_pdf.rb +29 -29
  149. data/samples/saves/_saves.rb +51 -51
  150. data/samples/saves/_showcase.rb +25 -25
  151. data/samples/shapes/_draw_shapes.rb +60 -60
  152. data/samples/shapes/_proofs.rb +22 -22
  153. data/samples/sprues/_advanced_sprues.rb +25 -25
  154. data/samples/sprues/_builtin_sprues.rb +21 -21
  155. data/samples/sprues/_fold_sheet.rb +27 -27
  156. data/samples/sprues/_hex_tiles.rb +15 -15
  157. data/samples/sprues/_mints.rb +11 -11
  158. data/samples/sprues/_sprue_example.rb +11 -11
  159. data/samples/text/_embed_text.rb +128 -128
  160. data/samples/text/_text.rb +47 -47
  161. data/samples/text/_text_options.rb +102 -102
  162. data/samples/text/bug134.rb +14 -14
  163. data/samples/units/_units.rb +32 -32
  164. data/squib.gemspec +52 -52
  165. metadata +62 -63
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45afafe1126181434ad14f0c2dad4373e385b595736c32717f322555d1bb4c65
4
- data.tar.gz: 6b4de732b8bfad3fddc9a2954857d9ce5a8ca90bf140fae9afa44f076dea3f1a
3
+ metadata.gz: 8e9214c505f044e2a2c495c56f8561791a19cbbf92100f17b9b2c558e353b279
4
+ data.tar.gz: d85206902341999fd4c0f4cdcb2cb3f2f6e649a4d6031369af4f747302826d30
5
5
  SHA512:
6
- metadata.gz: fa5863d24b7a19b3ddf0fd58aca9cf99196ddc69fd07e13297b7971d1fd8e9556b09237271636279638d138a774e788e4c9fd439227f97ceb9d5104a7bc93c86
7
- data.tar.gz: 60beaac538b3133c781915864d37462d9b05eb0a42118e4e093883f6fb9c025b34b27a32e568dd1c3410894b1dd4ef745ecc3662714e9e455904ada3a206ecee
6
+ metadata.gz: aae369ed29a073c2469ea665e1ecd249d29b555a7c2c3d45c30a610d515779beea46c0438f9bca4541c0ab46c0745f1948c27995163be1cf40fa99f006cfa9b8
7
+ data.tar.gz: '0392fbf16c9078aa8f477fc521724a1c9f3b0903ae2317f2543e4cf05d3fa16d981e8ac789abe391952281c8483789dcc828c3a9627571ae6ec9a840720d89d9'
data/.gitignore CHANGED
@@ -1,41 +1,41 @@
1
- .DS_Store
2
- *.gem
3
- *.rbc
4
- .bundle
5
- .config
6
- .yardoc
7
- .inch
8
- Gemfile.lock
9
- InstalledFiles
10
- _yardoc
11
- coverage
12
- docs/_build*
13
- doc/
14
- docs/_build
15
- lib/bundler/man
16
- pkg
17
- rdoc
18
- spec/reports
19
- test/tmp
20
- test/version_tmp
21
- tmp
22
- *.bundle
23
- *.so
24
- *.o
25
- *.a
26
- mkmf.log
27
- _img
28
- samples/_img
29
- samples/_output/*.png
30
- samples/_output/*.pdf
31
- samples/_output/foo
32
- samples/**/_output/*
33
- rubocop.txt
34
- benchmarks/_output/*.png
35
- benchmarks/_output/*.pdf
36
- benchmarks/_output/
37
- samples/_output/*.svg
38
- *.sublime-workspace
39
- spec/samples/sanity.html
40
- spec/samples/_diffs/*.png
41
- .byebug_history
1
+ .DS_Store
2
+ *.gem
3
+ *.rbc
4
+ .bundle
5
+ .config
6
+ .yardoc
7
+ .inch
8
+ Gemfile.lock
9
+ InstalledFiles
10
+ _yardoc
11
+ coverage
12
+ docs/_build*
13
+ doc/
14
+ docs/_build
15
+ lib/bundler/man
16
+ pkg
17
+ rdoc
18
+ spec/reports
19
+ test/tmp
20
+ test/version_tmp
21
+ tmp
22
+ *.bundle
23
+ *.so
24
+ *.o
25
+ *.a
26
+ mkmf.log
27
+ _img
28
+ samples/_img
29
+ samples/_output/*.png
30
+ samples/_output/*.pdf
31
+ samples/_output/foo
32
+ samples/**/_output/*
33
+ rubocop.txt
34
+ benchmarks/_output/*.png
35
+ benchmarks/_output/*.pdf
36
+ benchmarks/_output/
37
+ samples/_output/*.svg
38
+ *.sublime-workspace
39
+ spec/samples/sanity.html
40
+ spec/samples/_diffs/*.png
41
+ .byebug_history
@@ -1,17 +1,17 @@
1
- language: ruby
2
- sudo: true # need this for libgirepository1.0-dev
3
- addons:
4
- apt:
5
- packages:
6
- - libgirepository1.0-dev # for gobject-introspection
7
- rvm:
8
- - 2.4.2
9
- - 2.5.3
10
- - 2.6.3
11
- - ruby-head
12
- before_install:
13
- - gem update --system
14
- - gem install bundler
15
- matrix:
16
- allow_failures:
17
- - rvm: ruby-head
1
+ language: ruby
2
+ sudo: true # need this for libgirepository1.0-dev
3
+ addons:
4
+ apt:
5
+ packages:
6
+ - libgirepository1.0-dev # for gobject-introspection
7
+ rvm:
8
+ - 2.4.2
9
+ - 2.5.3
10
+ - 2.6.3
11
+ - ruby-head
12
+ before_install:
13
+ - gem update --system
14
+ - gem install bundler
15
+ matrix:
16
+ allow_failures:
17
+ - rvm: ruby-head
@@ -1,395 +1,400 @@
1
- # Squib CHANGELOG
2
- Squib follows [semantic versioning](http://semver.org).
3
-
4
- ## v0.16.0 / Unreleased
5
-
6
- ## v0.15.2 / 2019-09-26
7
-
8
- Chores:
9
- * Bump nokogiri to 1.10.4
10
-
11
-
12
- ## v0.15.1 / 2019-08-27
13
-
14
- Chores:
15
- * Bumped Pango et al. to 3.3.7 (#286)
16
-
17
- ## v0.15.0 / 2019-08-06
18
-
19
- Features:
20
- * Added check for malformed PNG files (#250, #218)
21
- * Sprues: you can now flip individual cards (#251)
22
-
23
- Bugs
24
- * `trim_radius` now defaults to 0 on `save_pdf`, not 38. (#270)
25
- * `explode` on `xlsx` and `csv` now defaults to `qty`, not `Qty` (#262)
26
-
27
- Docs:
28
- * Documented the n-sided-ness of polygons and stars
29
- * svg: document rasterization on mask (#192)
30
- * Document how to run the code (#186)
31
- * Document some ways of using `prefix` in `save_png` (#268)
32
- * `showcase` option `trim_radius` defaults to 38, not 0
33
- * Add sample for color switch in colors docs (#274)
34
-
35
- Chores:
36
- * Bumped deps: Pango et al. to 3.3.6, Cairo to 1.16.4, Nokogiri to 1.10.3, Highline to 2.0.2
37
-
38
- Compatibility:
39
- * A LOT more pre-defined colors built into Cairo. Some of the named colors got redefined with the upgrade to the latest Cairo. This means that named colors like `:gray` and `:green` may look slightly different.
40
- * Dropped support for EOL'd Rubies. Minimum support is 2.4
41
-
42
- Special thanks to @lcarlsen, @Karneades
43
-
44
- ## v0.14.2 / 2018-08-01
45
-
46
- Features:
47
- * Sprues for DriveThruCards and printandplaygames!! (#247, from @blinks)
48
-
49
- Bugs:
50
- * Fixed bug on circle and other shapes that had an extra stroke from a previous text call (#248)
51
- * Fixed extra page on all sprue saves (#246)
52
- * Fixed layout parsing issue with multiple inheritance (#244)
53
-
54
- Chores:
55
- * Bumped deps: Pango et al. to 3.2.7, Cairo to 1.15.13, Nokogiri to 1.8.4
56
-
57
- Special thanks to @blinks
58
-
59
- ## v0.14.1 / 2018-03-15
60
-
61
- Chores:
62
- * Bumped deps: Pango et al. to 3.2.1, Cairo to 1.15.12. (Fixes an issue with Ruby 2.5 and Windows)
63
-
64
- ## v0.14.0 / 2017-11-06
65
-
66
- Features:
67
- * `save_pdf/save_sheet` method now supports `sprue`, which allows you to define templated layouts and position your cards freely (#217) by @felixleong. See docs for how to use this _very_ powerful feature!
68
- * `circle` method now supports various `arc` options, so you can draw partial circles (#211) by @sparr
69
- * `save_sheet` method now supports `rtl` or "right-to-left", for easier duplex printing of backs (#204, #208) by @sparr
70
- * `yaml` method for reading in data, much like `csv` and `xlsx` by @blinks
71
- * Layouts now support `*=` and `/=` operators in addition to `+=` and `-=` (#200).
72
- * `save_pdf` method also supports `rtl` by @vador
73
- * New DSL methods `safe_zone` and `cut_zone` will draw a rectangle inset from the margins for quick proof checking
74
- * New "advanced" option for creating new projects, if you do `squib new --advanced yourgame` (@andymeneely).
75
- * New built-in layout: `party.yml`. (@andymeneely)
76
-
77
- Compatibility:
78
- * DPI is correctly respected with font sizes now. To convert to Squib v0.14+, divide your old font sizes by 3 (precisely, 300/96=3.125). By @felixleong
79
-
80
- Docs:
81
- * Command-line is better documented now
82
- * Some more examples included in various places
83
-
84
- Bugs:
85
- * fix save_sheet to calculate rows correctly based on range (#207) by @sparr
86
-
87
- Chores:
88
- * Going back to our policy of locking in our dependencies so that we don't have new gems breaking things.
89
- * Bumped deps, Cairo to 1.15.10 and Pango et al. to 3.1.9
90
-
91
- Special thanks to @sparr, @felixleong, @blinks, @vador for all of their work!!
92
-
93
- ## v0.13.4 / 2017-07-17
94
-
95
- Bugs:
96
- * Bumped Pango et al. to 3.1.8 to fix the Homebrew/Mac compatibility issue in Squib v0.13.3. Install should be clean on Macs now.
97
-
98
- ## v0.13.3 / 2017-07-15
99
-
100
- Bugs:
101
- * Fix `undefined method [] for nil:NilClass` error on `svg` (was a regression error in librsvg that we worked around.)
102
- * Bump dependencies to latest stable versions. Pango et al. to 3.1.7 and Cairo to 1.15.9. This fixes some compatibility issues.
103
- * Fixed some deprecation warnings on `text`
104
-
105
- Compatibility known issue: if you are using Homebrew on Mac, you may need to set an environment variable for this version. This should be fixed in the upcoming 3.1.8 version of Pango that is forthcoming. See this: https://github.com/ruby-gnome2/ruby-gnome2/issues/1058
106
-
107
- ## v0.13.2 / 2017-01-27
108
-
109
- Bugs:
110
- * Bump dependencies to latest stable versions. Pango et al. to 3.1.1 and Cairo to 1.15.5. This fixes some compatibility issues we noticed on Linux and Macs.
111
-
112
- ## v0.13.1 / 2017-01-06
113
-
114
- Bugs:
115
- * New Windows installations break because Rubygems looks for 1.15.4 and it's not there (yet). Locking into Cairo 1.15.3 and being more conservative from now on.
116
-
117
- ## v0.13.0 / 2017-01-04
118
-
119
- Features:
120
- * `save_pdf`'s `crop marks` have a `:full` option that draw lines across the entire page.
121
-
122
- Bugs
123
- * Fix `Squib::DataFrame#to_pretty_text` modification issue (#191)
124
- * Downgraded Pango et al. back to 3.0.9 from 3.1.0 because there are bugs in the new gobject-introspection library.
125
-
126
- Chores:
127
- * Shrank the gem itself by ignoring test data. From about 5mb to 64kb - yay!
128
- * Bump roo to newest version (2.7.0).
129
- * Bumped Nokogiri to latest version (1.7.0).
130
- * Re-organized the samples folder for better regression and sanity testing prior to release.
131
-
132
- ## v0.12.0 / 2016-12-02
133
-
134
- Features:
135
- * `save_pdf` now supports crop marks! These are lines drawn in the margins of a PDF file to help you cut. These can be enabled by setting `crop_marks: true` in your `save_pdf` call. Can be further customized with `crop_margin_bottom`, `crop_margin_left`, `crop_margin_right`, `crop_margin_top`, `crop_marks`, `crop_stroke_color`, `crop_stroke_dash`, and `crop_stroke_width` (#123)
136
- * `Squib.configure` allows you to set options programmatically, overriding your config.yml. This is useful for Rakefiles, and will be documented in my upcoming tutorial on workflows.
137
- * `Squib.enable_build_globally` and `Squib.disable_build_globally` are new convenience methods for working with the `SQUIB_BUILD` environment variable. Handy for Rakefiles and Guard sessions for turning certain builds on an off. Also will be documented in upcoming workflow tutorial.
138
- * The import methods `csv` and `xlsx` now return `Squib::DataFrame`, which behaves exactly as before - but has more cool features like being able to do `data.name` instead of `data['name']`. Also: check out `data.to_pretty_text`. Check out the docs. (#156)
139
-
140
- Bugs:
141
- * `showcase` works as expected when using `backend: svg` (#179)
142
- * Graphics will get flushed upon exit, so working under Guard with `backend: svg` is more reliable (#180)
143
-
144
- Docs:
145
- * Wrote out documentation for [Squib and GameIcons](http://squib.readthedocs.io/en/latest/guides/game_icons.html)
146
- * Wrote out documentation for Hello World! Dissected
147
- * Un-submoduled our samples and simply embedded them into the docs (e.g. [Squib Thinks in Arrays](http://squib.readthedocs.io/en/latest/arrays.html)). Lots of cleanup there
148
- * Wrote up [Squib in Action](http://squib.readthedocs.io/en/latest/guides/projects.html), which documents other Squib projects. Ask for yours to be put there!!
149
-
150
- Chores:
151
- * Bumped dependency roo to 2.5.1. Nothing that affects Squib users (probably).
152
- * Bumped graphics and text dependencies (cairo to 1.15.3, pango+rsvg et al. to 3.1.0). No new features for us, but some stability improvements.
153
-
154
- ## v0.11.0 / 2016-09-05
155
-
156
- Features:
157
- * Unit conversion supports mm (#161)
158
- * `rect` and `ellipse` support the `angle` option (#162)
159
-
160
- Docs:
161
- * Provide previews of each built-in template on the docs (#163)
162
- * Documented lack of `:scale` behavior on text embedding. (#160)
163
-
164
- Bugs:
165
- * Fresh installs of Squib were broken due to two hidden dependencies, gio2 and gobject-introspection. (#172)
166
- * Embedding icons in text show unicode placeholders on some OSs. Actually, all of icon embedding was one giant bug waiting to be squashed. I finally implemented this functionality using the proper API calls. See #177 for the feature, and then the bugs were #170, #171, #158, and #176. For that matter, see #103, #153, and #30 if you really want the whole story.
167
- * With #177, the `:native` option for image width and height text embedding should work ().
168
- * Unit conversion is supported when using `extends` in layouts, as promised in the docs (#173)
169
-
170
- Compatibility:
171
- * I reworked the way icons are embedded, and that was a big change internally (#177). We're now using Pango's API in the expected way and not dealing with "undefined behavior" situations with zero-sized fonts and obscure UTF-8 characters as we were before. But, as a result, Pango handles custom shapes acd little differently than before. Wrapping doesn't render exactly the same way as before, although it's acceptable in most cases. If you still find problems, please file a bug.
172
-
173
- Special thanks to everyone who tested, reported, suggested, and helped for this release! bcompter, rhyok, temetherian, rpond-pa, Nibodhika, briant-spindance, lcarlsen, spilth
174
-
175
- ## v0.10.0 / 2016-05-06
176
-
177
- Features:
178
- * Build groups! Simplify the process of building your deck different ways (e.g. one for color, one for PNP). Can be enabled explicitly or via command line. [See our shiny new docs for how these work](http://squib.readthedocs.io/en/latest/build_groups.html).
179
- * New `use_layout` method will allow you to load a layout file as a DSL method instead of in the constructor. Useful in conjunction with build groups! (#141)
180
- * The `csv` method now supports a `data` option to read CSV data directly. When set, it overrides the `file` option.
181
- * The `csv` method now supports all of the Ruby CSV options (e.g. `col_sep`, `quote_char`). These options simply get passed through to Ruby, so as they change in Ruby, so the support changes in Squib (#149). Special thanks to Qgel's initial pull request (#146).
182
- * The `csv` method now supports a block that it yields to for each element for pre-processing data (#145). Oh and `xlsx` has had that functionality for a while now, and now it's actually documented (#151).
183
- * Rewrote the entire API doc and placed it on [squib.readthedocs.io](http://squib.readthedocs.io). :tada:
184
-
185
- Bugs:
186
- * The `save_pdf` method will flush to file upon exit so that the PDF is available immediately. (#150, thanks for the bug report Qgel!)
187
- * The `text` embedding now supports both stroke-n-fill operations AND embedded images (#103 - aka "andy's nemesis"). Also: no more bizzare zero-sized fonts that made your OS secretly cry in the corner every time you embedded an image (#153).
188
-
189
- Chores:
190
- * Switched to `require_relative` internally throughout the codebase to be more pry-friendly (#130)
191
- * Bumped dependency ruby-progressbar to 1.8.
192
-
193
- Compatibility:
194
- * Upgraded Cairo from 1.14.3 to 1.15.2. With this change, Squib no longer supports Ruby <= 2.1.
195
-
196
- ## v0.9.0 / 2016-01-10
197
-
198
- Features:
199
- * Crop your PNGs and SVGs! This means you can work from spritesheets if you want. New options to `png` and `svg` are documented in the API docs and demonstrated in the `load_images.rb` sample. (#11)
200
- * Flip your PNGs and SVGs! Set `flip_horizontal: true` or `flip_vertical: true` (or both!) to flip the image about it's center. (#11)
201
- * Added a `grid` shape that fills the whole card with a grid of your choosing. (#68)
202
- * Added `warn_png_scale` configuration option to suppress the PNG scale warning. Also: warning only occurs on upscale, not on downscaling (#121)
203
- * `save_png` now supports `trim` and `trim_radius`, which means you can now render your cards individually and bleedlessly! (#122)
204
-
205
- Bug fixes:
206
- * Radial Gradients when using a Mask does not work as anticipated (#127)
207
-
208
- Chores:
209
- * Ripped out a lot of old constants used from the old way we handled arguments. Yay negative churn!
210
- * Emit a warning when a `config.yml` option is not recognized
211
- * Upgrade roo (xlsx parser) to latest 2.3 version. Nothing exciting for us in this release.
212
- * Force upgrade of nokogiri to latest 1.6.7 version. This should fix the Windows+Ruby2.2 problem.
213
-
214
- Docs:
215
- * [Squib's Wiki](https://github.com/andymeneely/squib/wiki) has started! We've begun the long process of developing more longform types of documentation, as well as organizing our documentation around workflows and recipes instead of features. Go check out and feel free to contribute. Help make the mega README be a relic of the past!
216
- * Added new files to the project template for `squib new`: `IDEAS.md`, `RULES.md`, and `PLAYTESTING.md`
217
- * Wrote up new samples that are more web-friendly where you see the output right next to the code on GitHub gist: [images](https://gist.github.com/andymeneely/00ba7eb0aa1d82140503/514af49430797daf7a69c31118b6056dc4abaf20), [text](https://gist.github.com/andymeneely/52d7b8e332194946bc69/d1ebe078102b1eb6631ac9b1228a588395dc4bb5), [intro](https://gist.github.com/andymeneely/5026392a419124312cb7/fef084df3dbdfbdb749f418994e2b77124e49418)
218
-
219
- Community:
220
- * Beta testers needed!! Want to test pre-release of Squib? Join the mailing list for announcements. Go ahead and join our Google Group: https://groups.google.com/forum/#!forum/squib-testers
221
-
222
- Special thanks to testing and bug reporting from programmingisgoo and bcompter!
223
-
224
- ## v0.8.0 / 2015-10-26
225
- Features
226
- * The `xlsx` and `csv` support quantity explosion! Just use the column name 'Qty' and put integers in your sheet and you'll produce copies of the entire row. See README and the csv sample for more info. (#78)
227
- * The `xlsx` and `csv` methods will now strip leading and trailing whitespace by default where applicable. This is now turned on by default, but can be turned off with `strip: false`. (#79)
228
- * The `xlsx` and `csv` methods will now yield to a block (if given) for each cell so you can do some extra processing if you like. See samples/excel.rb for an example. (#108)
229
- * Layout file for TheGameCrafter tuck boxes (#113). Thanks @alexgorski!
230
-
231
- Compatibility change:
232
- * Stripping leading and trailing whitespace of xlsx and csv values by default might change how your data gets parsed.
233
-
234
- Bugs fixes:
235
- * The `range` option everywhere doesn't fail on `[]` (#107)
236
-
237
- ## v0.7.0 / 2015-09-11
238
-
239
- Features
240
- * Added `cap` option to `line` and `curve` to define how ends of lines are drawn (#42)
241
- * Added `join` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) to define how corners are drawn. (#42)
242
- * Added `dash` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) so you can specify your own dash pattern. Just specify a string with space-separated numbers to specify the on-and-off alternating pattern (e.g. `dash: '2 2'` with a stroke width of `2` is evenly spaced dots). Supports unit conversion (e.g. `dash: '0.02in 0.02in'`) (#42)
243
- * Added an idiom to the `ranges.rb` sample for drawing a different number of images based on the column in a table (e.g. 2 arrows to indicate 2 actions). Based on question #90. There are probably even cleaner, Ruby-ish ways to do this too - pull requests are welcome.
244
- * The `text` method and several other methods will throw errors on invalid input. This means your scripts will be more likely to break if you provide bad input. Please report bugs if you thinkg this unfairly breaks your code.
245
- * The `text` embedding icon now allows singleton expansion, which means that you can have icons have different sizes on different cards. The sample `embed_text.rb` demonstrates this. (#54)
246
- * The `text` method will throw a warning when it needs to ellipsize text (i.e. too much text for a fixed-size text box). Can be turned off in `config.yml`. (#80)
247
- * Upgraded roo (Excel parsing) to 2.1.0. Macro-enabled Excel files can be parsed now (i.e. `xlsm`), although I've only mildly tested this. (cddea47ba56add286639e493d5cc0146245eca68)
248
- * New built-in layouts: `fantasy.yml` and `economy.yml`. Demonstrated in new sample `layouts_builtin.rb` (#97)
249
- * Added `:scale` shortcut to `width` and `height` options for `png` and `svg`. Allows you to set the width and the image will scale while keeping its aspect ratio. (e.g. `svg width: 500, height: :scale`) (#91)
250
- * Upgraded cairo dependency to 1.14.3, which silences some warnings on Macs and upgrades a lot of Windows dependencies.
251
- * Upgraded pango, librsvg dependencies to 3.0.0, which focused mainly on upgrading Windows dependencies.
252
-
253
- Compatibility:
254
- * All drawn shapes (e.g. circle, triangle, star) will now draw their stroke on top of the fill. This was not consistent before, and now it is (because Squib is more DRY about it!). This means that your `stroke_width` might render wider than before. If you want the other behavior, specify `stroke_strategy: :stroke_first`. Also applies to `text` when `stroke_width` is specified.
255
- * The `width` and `height` options for `text` have changed their defaults from `:native` to `:auto`. This is to differentiate them from `:native` widths that default elsewhere. Additionally, `width` and `height` for shapes now default to `:deck`, and get interpreted as the deck width and height. The `:native` options are interpreted for SVG and PNG images as their original values. The behavior is all the same, just with more specific names.
256
- * Removed `img_dir` from the `set` method. You can still set `img_dir` in the configuration file (e.g. `config.yml`). Added a deprecation error.
257
-
258
- Bugs:
259
- * Fixed a `Cairo::WriteError` on `save_sheet` (#56, PR #96 thank you @meltheadorable!)
260
- * Investigated a NoMemoryError on Macs. Solution: upgrade to Ruby 2.2. (#88)
261
-
262
- Chores:
263
- * Refactoring to make internal drawing code more DRY (#75, and much more). This is a big re-design that will help ease future features that involve manipulating arguments. Trust me. This was worth the wait and all the hard work.
264
- * Better testing and general flexibility around the `range` option.
265
-
266
- ## v0.6.0 / 2015-05-26
267
-
268
- Features:
269
- * Added `data` field to `svg` to allow for manipulating SVG XML data directly. Works nicely with my new `game_icons` [gem](https://github.com/andymeneely/game_icons) (#65)
270
- * Added `stroke_width` and `stroke_color` to the `text` method to outlines text. (#51)
271
- * Added `hand` method that draws cards around a circle. See hand.rb samples (#64)
272
- * Added an `ellipse` method to (you guessed it) draw ellipses. See the draw_shapes.rb sample (#66)
273
- * Added a `star` method to (you guessed it) draw stars. See the draw_shapes.rb sample (#72)
274
- * Added a `polygon` method to (you guessed it) draw polygons. See the draw_shapes.rb sample (#67)
275
- * Upgraded roo (Excel parsing) to 2.0.0. Nothing major for Squib users, just keeping up with the times.
276
-
277
- Bugs:
278
- * Text embed svg and png commands default to integer so the README example works (#73).
279
- * Fixed global text hinting (#63)
280
- * Fixed a broken promise about fill_color in `showcase` (#71)
281
-
282
- Compatbility:
283
- * rsvg2 and pango updated to v2.2.5. Squib follows 2.2.x of both of those. If you run `bundle` you will automatically be upgraded. They appear to be mostly bugfix releases.
284
- * dpi is currently removed from `config.yml` and is ONLY available in `Squib::Deck.new`. This may change in the future, however.
285
-
286
- Chores:
287
- * Massive internal redesigning of the way configuration options are parsed, stored, handled. No real changes are visible to the user, but this code will be more maintainable and open up the door for more flexible configuration options in the future.
288
- * Added `rake sanity` as a visual regression test to ensure the samples don't break
289
- * Lots of automated test refactoring
290
-
291
- Thanks to [pickfifteen](https://github.com/pickfifteen), and [Brian Cronin](http://www.boardgamegeek.com/user/MurphyIdiot) for the bug reports!
292
-
293
- ## v0.5.1 / 2015-04-13
294
-
295
- Bugs:
296
- * Fixed a PDF scaling issue, so now page width and height is properly calculated from DPI (#62)
297
-
298
- Thanks to [Brian Cronin](http://www.boardgamegeek.com/user/MurphyIdiot) for the bug report.
299
-
300
- ## v0.5.0 / 2015-04-13
301
- Features:
302
- * Embedding of SVGs and PNGs into text! See README, `text_options.rb`, and `embed_text.rb`, and API documentation. This was a finnicky feature, so feedback and bug reports are welcome. (#30)
303
- * Curves! We can now do Bezier curves. Documented, and added to the sample `draw_shapes.rb` (#37).
304
- * Smart Quotes! The `text` rule now has a `quotes: 'smart'` option where straight quotes get converted to curly quotes. Assumes UTF-8, or you can specify your own quote characters if you're not in UTF-8. (#50)
305
- * Font-level antialiasing is inherited from global antialiasing setting (workaround until we get a better solution for #59).
306
-
307
- Known issues
308
- * OSX Yosemite will show this warning: `<Error>: The function ‘CGFontGetGlyphPath’ is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance.` This warning will go away when the Ruby Cairo bindings upgrades from 1.14.1 to 1.14.2.
309
-
310
- Special thanks to [pickfifteen](https://github.com/pickfifteen) for testing, feedback, and pull requests!!
311
-
312
- ## v0.4.0 / 2015-04-28
313
-
314
- Features:
315
- * SVG backend support! You can now set the deck's back end to work with SVGs instead of images, making the resulting PDFs vectorized. (You can still save to PNGs too.) This was a big change for Squib, and it's got at least one known issue and probably a few more here and there. See discussion on the README for more details.
316
- * Added config option for antialiasing method. My benchmarks showed that 'best' is only 10% slower than 'fast' on extremely alias-intensive tasks, so 'best' is the Squib default now.
317
-
318
- Bugs:
319
- * Stray stroke on circles after text (#35)
320
- * Progress bar increment error (#34)
321
-
322
- Known issues
323
- * Masking SVGs onto an SVG backend will rasterize as an intermediate step. (#43)
324
- * Compatibility change: gradient coordinates for the `mask` option in `svg` and `png` commands are relative to the given x,y - NOT to card as it was before.
325
-
326
- ## v0.3.0 / 2015-02-02
327
-
328
- Features:
329
- * Masks! The `png` and `svg` commands can be used as if they are a mask, so you can color the icon with any color you like. Can be handy for switching to black-and-white, or for reusing the same image but different colors across cards.
330
- * Gradients! Can now specify linear or radial gradients anywhere you specify colors. See README and `samples/gradients.rb` for more details.
331
- * Number padding! `save_png` will now pad zeros on the filenames for friendlier sorting. You can also specify your own with `count_format` using the classical format string from Ruby's `Kernel::sprintf` (mostly just C-style format strings). Default: `'%02d'. The `prefix:` option is still there too.
332
- * Added unit conversion to `Squib::New` and `save_pdf`
333
- * Added arbitrary paper sizes to `save_pdf`
334
- * Added new sample table for color viewing constants in `samples/colors.rb`
335
-
336
- Special thanks to [Shalom Craimer](https://github.com/scraimer) for the idea and proof-of-concept on gradient and mask features!
337
-
338
- ## v0.2.0 / 2015-01-12
339
-
340
- Features:
341
- * Added `showcase` feature to create a fancy-looking 3D reflection to showcase your cards. Documented, tested, and added a sample for it.
342
- * Added a basic Rakefile, documented in README.
343
- * Some internal refactoring, better testing, and more documentation with layouts
344
-
345
- ## v0.1.0 / 2014-12-31
346
-
347
- Features:
348
- * Added `save_sheet` command that saves a range into PNG sheets, complete with trim, gap, margin, columns, and sometimes automagically computed rows. See samples/saves.rb.
349
- * Unit conversion! Now you can write "2in" and it will convert based on the current dpi. `save_pdf` not supported (yet).
350
- * `png` now supports resizing, but warns you about it since it's non-ideal. Documented in yard, tested.
351
- * Added sample `unicode.rb` to show lots of game-related unicode characters
352
-
353
- Chores:
354
- * More obsessive automated testing and continuous integration work.
355
-
356
- ## v0.0.6 / 2014-12-08
357
-
358
- Features:
359
- * Added a `csv` command that works just like `xslx`. Uses Ruby's CSV inside, with some extra checking and warnings.
360
- * Custom layouts now support loading & merging multiple Yaml files! Updated README, docs, and sample to document it.
361
- * Built-in layouts! Currently we support `hand.yml` and `playing-card.yml`. Documented in the `layouts.rb` sample.
362
- * `text` now returns the ink extent rectangle of the rendered text. Updated docs and sample to document it.
363
- * Samples now show that you can use text instead of symbols for things like `center`
364
-
365
- Chores:
366
- * Improved logging, and documentation on increasing logger verboseness
367
- * Better regression testing technique that tracks when a sample has changed.
368
- * Bumped version of Cairo to ~> 1.14
369
-
370
- ## v0.0.5 / 2014-11-03
371
- * Image rotation for png and svg via `angle`
372
- * New sample for demonstrating direct cairo access
373
- * README now includes a snazzy screencast of the Sublime snippets
374
- * Rotation of text works more conventionally now, and works with text hints
375
- * Better code styles thanks to RuboCop
376
- * Better unit testing, now with mocking!
377
- * Various version bumps: rspec, yard
378
-
379
- ## v0.0.4 / 2014-10-17
380
- * Added a font size override so you can vary the font size with the same style across strings more easily
381
- * Added text autoscale sample
382
- * Added `extends` to custom layouts, allowing ways to modify parent data instead of just overriding it.
383
- * Upgraded ruby-progressbar version
384
- * Added text rotation (thanks novalis!)
385
- * Fixed a mapping problem with triangles (thanks novalis!)
386
- * Fixed global hint togglability
387
-
388
- ## v0.0.3 / 2014-08-30
389
- * Redesigned the dynamic options system to make adding new commands much easier
390
- * Singleton expansion
391
- * Better documentation in README and throughout
392
- * Implemented Junk Land in this version
393
-
394
- ## v0.0.1-v0.0.2 / 2014-07-29
395
- * Primordial era - base functionality
1
+ # Squib CHANGELOG
2
+ Squib follows [semantic versioning](http://semver.org).
3
+
4
+ ## v0.16.0 / Unreleased
5
+
6
+ ## v0.15.3 / 2019-10-17
7
+
8
+ Chores:
9
+ * Bump pango et al to `~> 3.4`, cairo to `~ 1.16`. Fixes Ruby 2.6 Windows install issues (#287)
10
+
11
+ ## v0.15.2 / 2019-09-26
12
+
13
+ Chores:
14
+ * Bump nokogiri to 1.10.4
15
+
16
+
17
+ ## v0.15.1 / 2019-08-27
18
+
19
+ Chores:
20
+ * Bumped Pango et al. to 3.3.7 (#286)
21
+
22
+ ## v0.15.0 / 2019-08-06
23
+
24
+ Features:
25
+ * Added check for malformed PNG files (#250, #218)
26
+ * Sprues: you can now flip individual cards (#251)
27
+
28
+ Bugs
29
+ * `trim_radius` now defaults to 0 on `save_pdf`, not 38. (#270)
30
+ * `explode` on `xlsx` and `csv` now defaults to `qty`, not `Qty` (#262)
31
+
32
+ Docs:
33
+ * Documented the n-sided-ness of polygons and stars
34
+ * svg: document rasterization on mask (#192)
35
+ * Document how to run the code (#186)
36
+ * Document some ways of using `prefix` in `save_png` (#268)
37
+ * `showcase` option `trim_radius` defaults to 38, not 0
38
+ * Add sample for color switch in colors docs (#274)
39
+
40
+ Chores:
41
+ * Bumped deps: Pango et al. to 3.3.6, Cairo to 1.16.4, Nokogiri to 1.10.3, Highline to 2.0.2
42
+
43
+ Compatibility:
44
+ * A LOT more pre-defined colors built into Cairo. Some of the named colors got redefined with the upgrade to the latest Cairo. This means that named colors like `:gray` and `:green` may look slightly different.
45
+ * Dropped support for EOL'd Rubies. Minimum support is 2.4
46
+
47
+ Special thanks to @lcarlsen, @Karneades
48
+
49
+ ## v0.14.2 / 2018-08-01
50
+
51
+ Features:
52
+ * Sprues for DriveThruCards and printandplaygames!! (#247, from @blinks)
53
+
54
+ Bugs:
55
+ * Fixed bug on circle and other shapes that had an extra stroke from a previous text call (#248)
56
+ * Fixed extra page on all sprue saves (#246)
57
+ * Fixed layout parsing issue with multiple inheritance (#244)
58
+
59
+ Chores:
60
+ * Bumped deps: Pango et al. to 3.2.7, Cairo to 1.15.13, Nokogiri to 1.8.4
61
+
62
+ Special thanks to @blinks
63
+
64
+ ## v0.14.1 / 2018-03-15
65
+
66
+ Chores:
67
+ * Bumped deps: Pango et al. to 3.2.1, Cairo to 1.15.12. (Fixes an issue with Ruby 2.5 and Windows)
68
+
69
+ ## v0.14.0 / 2017-11-06
70
+
71
+ Features:
72
+ * `save_pdf/save_sheet` method now supports `sprue`, which allows you to define templated layouts and position your cards freely (#217) by @felixleong. See docs for how to use this _very_ powerful feature!
73
+ * `circle` method now supports various `arc` options, so you can draw partial circles (#211) by @sparr
74
+ * `save_sheet` method now supports `rtl` or "right-to-left", for easier duplex printing of backs (#204, #208) by @sparr
75
+ * `yaml` method for reading in data, much like `csv` and `xlsx` by @blinks
76
+ * Layouts now support `*=` and `/=` operators in addition to `+=` and `-=` (#200).
77
+ * `save_pdf` method also supports `rtl` by @vador
78
+ * New DSL methods `safe_zone` and `cut_zone` will draw a rectangle inset from the margins for quick proof checking
79
+ * New "advanced" option for creating new projects, if you do `squib new --advanced yourgame` (@andymeneely).
80
+ * New built-in layout: `party.yml`. (@andymeneely)
81
+
82
+ Compatibility:
83
+ * DPI is correctly respected with font sizes now. To convert to Squib v0.14+, divide your old font sizes by 3 (precisely, 300/96=3.125). By @felixleong
84
+
85
+ Docs:
86
+ * Command-line is better documented now
87
+ * Some more examples included in various places
88
+
89
+ Bugs:
90
+ * fix save_sheet to calculate rows correctly based on range (#207) by @sparr
91
+
92
+ Chores:
93
+ * Going back to our policy of locking in our dependencies so that we don't have new gems breaking things.
94
+ * Bumped deps, Cairo to 1.15.10 and Pango et al. to 3.1.9
95
+
96
+ Special thanks to @sparr, @felixleong, @blinks, @vador for all of their work!!
97
+
98
+ ## v0.13.4 / 2017-07-17
99
+
100
+ Bugs:
101
+ * Bumped Pango et al. to 3.1.8 to fix the Homebrew/Mac compatibility issue in Squib v0.13.3. Install should be clean on Macs now.
102
+
103
+ ## v0.13.3 / 2017-07-15
104
+
105
+ Bugs:
106
+ * Fix `undefined method [] for nil:NilClass` error on `svg` (was a regression error in librsvg that we worked around.)
107
+ * Bump dependencies to latest stable versions. Pango et al. to 3.1.7 and Cairo to 1.15.9. This fixes some compatibility issues.
108
+ * Fixed some deprecation warnings on `text`
109
+
110
+ Compatibility known issue: if you are using Homebrew on Mac, you may need to set an environment variable for this version. This should be fixed in the upcoming 3.1.8 version of Pango that is forthcoming. See this: https://github.com/ruby-gnome2/ruby-gnome2/issues/1058
111
+
112
+ ## v0.13.2 / 2017-01-27
113
+
114
+ Bugs:
115
+ * Bump dependencies to latest stable versions. Pango et al. to 3.1.1 and Cairo to 1.15.5. This fixes some compatibility issues we noticed on Linux and Macs.
116
+
117
+ ## v0.13.1 / 2017-01-06
118
+
119
+ Bugs:
120
+ * New Windows installations break because Rubygems looks for 1.15.4 and it's not there (yet). Locking into Cairo 1.15.3 and being more conservative from now on.
121
+
122
+ ## v0.13.0 / 2017-01-04
123
+
124
+ Features:
125
+ * `save_pdf`'s `crop marks` have a `:full` option that draw lines across the entire page.
126
+
127
+ Bugs
128
+ * Fix `Squib::DataFrame#to_pretty_text` modification issue (#191)
129
+ * Downgraded Pango et al. back to 3.0.9 from 3.1.0 because there are bugs in the new gobject-introspection library.
130
+
131
+ Chores:
132
+ * Shrank the gem itself by ignoring test data. From about 5mb to 64kb - yay!
133
+ * Bump roo to newest version (2.7.0).
134
+ * Bumped Nokogiri to latest version (1.7.0).
135
+ * Re-organized the samples folder for better regression and sanity testing prior to release.
136
+
137
+ ## v0.12.0 / 2016-12-02
138
+
139
+ Features:
140
+ * `save_pdf` now supports crop marks! These are lines drawn in the margins of a PDF file to help you cut. These can be enabled by setting `crop_marks: true` in your `save_pdf` call. Can be further customized with `crop_margin_bottom`, `crop_margin_left`, `crop_margin_right`, `crop_margin_top`, `crop_marks`, `crop_stroke_color`, `crop_stroke_dash`, and `crop_stroke_width` (#123)
141
+ * `Squib.configure` allows you to set options programmatically, overriding your config.yml. This is useful for Rakefiles, and will be documented in my upcoming tutorial on workflows.
142
+ * `Squib.enable_build_globally` and `Squib.disable_build_globally` are new convenience methods for working with the `SQUIB_BUILD` environment variable. Handy for Rakefiles and Guard sessions for turning certain builds on an off. Also will be documented in upcoming workflow tutorial.
143
+ * The import methods `csv` and `xlsx` now return `Squib::DataFrame`, which behaves exactly as before - but has more cool features like being able to do `data.name` instead of `data['name']`. Also: check out `data.to_pretty_text`. Check out the docs. (#156)
144
+
145
+ Bugs:
146
+ * `showcase` works as expected when using `backend: svg` (#179)
147
+ * Graphics will get flushed upon exit, so working under Guard with `backend: svg` is more reliable (#180)
148
+
149
+ Docs:
150
+ * Wrote out documentation for [Squib and GameIcons](http://squib.readthedocs.io/en/latest/guides/game_icons.html)
151
+ * Wrote out documentation for Hello World! Dissected
152
+ * Un-submoduled our samples and simply embedded them into the docs (e.g. [Squib Thinks in Arrays](http://squib.readthedocs.io/en/latest/arrays.html)). Lots of cleanup there
153
+ * Wrote up [Squib in Action](http://squib.readthedocs.io/en/latest/guides/projects.html), which documents other Squib projects. Ask for yours to be put there!!
154
+
155
+ Chores:
156
+ * Bumped dependency roo to 2.5.1. Nothing that affects Squib users (probably).
157
+ * Bumped graphics and text dependencies (cairo to 1.15.3, pango+rsvg et al. to 3.1.0). No new features for us, but some stability improvements.
158
+
159
+ ## v0.11.0 / 2016-09-05
160
+
161
+ Features:
162
+ * Unit conversion supports mm (#161)
163
+ * `rect` and `ellipse` support the `angle` option (#162)
164
+
165
+ Docs:
166
+ * Provide previews of each built-in template on the docs (#163)
167
+ * Documented lack of `:scale` behavior on text embedding. (#160)
168
+
169
+ Bugs:
170
+ * Fresh installs of Squib were broken due to two hidden dependencies, gio2 and gobject-introspection. (#172)
171
+ * Embedding icons in text show unicode placeholders on some OSs. Actually, all of icon embedding was one giant bug waiting to be squashed. I finally implemented this functionality using the proper API calls. See #177 for the feature, and then the bugs were #170, #171, #158, and #176. For that matter, see #103, #153, and #30 if you really want the whole story.
172
+ * With #177, the `:native` option for image width and height text embedding should work ().
173
+ * Unit conversion is supported when using `extends` in layouts, as promised in the docs (#173)
174
+
175
+ Compatibility:
176
+ * I reworked the way icons are embedded, and that was a big change internally (#177). We're now using Pango's API in the expected way and not dealing with "undefined behavior" situations with zero-sized fonts and obscure UTF-8 characters as we were before. But, as a result, Pango handles custom shapes acd little differently than before. Wrapping doesn't render exactly the same way as before, although it's acceptable in most cases. If you still find problems, please file a bug.
177
+
178
+ Special thanks to everyone who tested, reported, suggested, and helped for this release! bcompter, rhyok, temetherian, rpond-pa, Nibodhika, briant-spindance, lcarlsen, spilth
179
+
180
+ ## v0.10.0 / 2016-05-06
181
+
182
+ Features:
183
+ * Build groups! Simplify the process of building your deck different ways (e.g. one for color, one for PNP). Can be enabled explicitly or via command line. [See our shiny new docs for how these work](http://squib.readthedocs.io/en/latest/build_groups.html).
184
+ * New `use_layout` method will allow you to load a layout file as a DSL method instead of in the constructor. Useful in conjunction with build groups! (#141)
185
+ * The `csv` method now supports a `data` option to read CSV data directly. When set, it overrides the `file` option.
186
+ * The `csv` method now supports all of the Ruby CSV options (e.g. `col_sep`, `quote_char`). These options simply get passed through to Ruby, so as they change in Ruby, so the support changes in Squib (#149). Special thanks to Qgel's initial pull request (#146).
187
+ * The `csv` method now supports a block that it yields to for each element for pre-processing data (#145). Oh and `xlsx` has had that functionality for a while now, and now it's actually documented (#151).
188
+ * Rewrote the entire API doc and placed it on [squib.readthedocs.io](http://squib.readthedocs.io). :tada:
189
+
190
+ Bugs:
191
+ * The `save_pdf` method will flush to file upon exit so that the PDF is available immediately. (#150, thanks for the bug report Qgel!)
192
+ * The `text` embedding now supports both stroke-n-fill operations AND embedded images (#103 - aka "andy's nemesis"). Also: no more bizzare zero-sized fonts that made your OS secretly cry in the corner every time you embedded an image (#153).
193
+
194
+ Chores:
195
+ * Switched to `require_relative` internally throughout the codebase to be more pry-friendly (#130)
196
+ * Bumped dependency ruby-progressbar to 1.8.
197
+
198
+ Compatibility:
199
+ * Upgraded Cairo from 1.14.3 to 1.15.2. With this change, Squib no longer supports Ruby <= 2.1.
200
+
201
+ ## v0.9.0 / 2016-01-10
202
+
203
+ Features:
204
+ * Crop your PNGs and SVGs! This means you can work from spritesheets if you want. New options to `png` and `svg` are documented in the API docs and demonstrated in the `load_images.rb` sample. (#11)
205
+ * Flip your PNGs and SVGs! Set `flip_horizontal: true` or `flip_vertical: true` (or both!) to flip the image about it's center. (#11)
206
+ * Added a `grid` shape that fills the whole card with a grid of your choosing. (#68)
207
+ * Added `warn_png_scale` configuration option to suppress the PNG scale warning. Also: warning only occurs on upscale, not on downscaling (#121)
208
+ * `save_png` now supports `trim` and `trim_radius`, which means you can now render your cards individually and bleedlessly! (#122)
209
+
210
+ Bug fixes:
211
+ * Radial Gradients when using a Mask does not work as anticipated (#127)
212
+
213
+ Chores:
214
+ * Ripped out a lot of old constants used from the old way we handled arguments. Yay negative churn!
215
+ * Emit a warning when a `config.yml` option is not recognized
216
+ * Upgrade roo (xlsx parser) to latest 2.3 version. Nothing exciting for us in this release.
217
+ * Force upgrade of nokogiri to latest 1.6.7 version. This should fix the Windows+Ruby2.2 problem.
218
+
219
+ Docs:
220
+ * [Squib's Wiki](https://github.com/andymeneely/squib/wiki) has started! We've begun the long process of developing more longform types of documentation, as well as organizing our documentation around workflows and recipes instead of features. Go check out and feel free to contribute. Help make the mega README be a relic of the past!
221
+ * Added new files to the project template for `squib new`: `IDEAS.md`, `RULES.md`, and `PLAYTESTING.md`
222
+ * Wrote up new samples that are more web-friendly where you see the output right next to the code on GitHub gist: [images](https://gist.github.com/andymeneely/00ba7eb0aa1d82140503/514af49430797daf7a69c31118b6056dc4abaf20), [text](https://gist.github.com/andymeneely/52d7b8e332194946bc69/d1ebe078102b1eb6631ac9b1228a588395dc4bb5), [intro](https://gist.github.com/andymeneely/5026392a419124312cb7/fef084df3dbdfbdb749f418994e2b77124e49418)
223
+
224
+ Community:
225
+ * Beta testers needed!! Want to test pre-release of Squib? Join the mailing list for announcements. Go ahead and join our Google Group: https://groups.google.com/forum/#!forum/squib-testers
226
+
227
+ Special thanks to testing and bug reporting from programmingisgoo and bcompter!
228
+
229
+ ## v0.8.0 / 2015-10-26
230
+ Features
231
+ * The `xlsx` and `csv` support quantity explosion! Just use the column name 'Qty' and put integers in your sheet and you'll produce copies of the entire row. See README and the csv sample for more info. (#78)
232
+ * The `xlsx` and `csv` methods will now strip leading and trailing whitespace by default where applicable. This is now turned on by default, but can be turned off with `strip: false`. (#79)
233
+ * The `xlsx` and `csv` methods will now yield to a block (if given) for each cell so you can do some extra processing if you like. See samples/excel.rb for an example. (#108)
234
+ * Layout file for TheGameCrafter tuck boxes (#113). Thanks @alexgorski!
235
+
236
+ Compatibility change:
237
+ * Stripping leading and trailing whitespace of xlsx and csv values by default might change how your data gets parsed.
238
+
239
+ Bugs fixes:
240
+ * The `range` option everywhere doesn't fail on `[]` (#107)
241
+
242
+ ## v0.7.0 / 2015-09-11
243
+
244
+ Features
245
+ * Added `cap` option to `line` and `curve` to define how ends of lines are drawn (#42)
246
+ * Added `join` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) to define how corners are drawn. (#42)
247
+ * Added `dash` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) so you can specify your own dash pattern. Just specify a string with space-separated numbers to specify the on-and-off alternating pattern (e.g. `dash: '2 2'` with a stroke width of `2` is evenly spaced dots). Supports unit conversion (e.g. `dash: '0.02in 0.02in'`) (#42)
248
+ * Added an idiom to the `ranges.rb` sample for drawing a different number of images based on the column in a table (e.g. 2 arrows to indicate 2 actions). Based on question #90. There are probably even cleaner, Ruby-ish ways to do this too - pull requests are welcome.
249
+ * The `text` method and several other methods will throw errors on invalid input. This means your scripts will be more likely to break if you provide bad input. Please report bugs if you thinkg this unfairly breaks your code.
250
+ * The `text` embedding icon now allows singleton expansion, which means that you can have icons have different sizes on different cards. The sample `embed_text.rb` demonstrates this. (#54)
251
+ * The `text` method will throw a warning when it needs to ellipsize text (i.e. too much text for a fixed-size text box). Can be turned off in `config.yml`. (#80)
252
+ * Upgraded roo (Excel parsing) to 2.1.0. Macro-enabled Excel files can be parsed now (i.e. `xlsm`), although I've only mildly tested this. (cddea47ba56add286639e493d5cc0146245eca68)
253
+ * New built-in layouts: `fantasy.yml` and `economy.yml`. Demonstrated in new sample `layouts_builtin.rb` (#97)
254
+ * Added `:scale` shortcut to `width` and `height` options for `png` and `svg`. Allows you to set the width and the image will scale while keeping its aspect ratio. (e.g. `svg width: 500, height: :scale`) (#91)
255
+ * Upgraded cairo dependency to 1.14.3, which silences some warnings on Macs and upgrades a lot of Windows dependencies.
256
+ * Upgraded pango, librsvg dependencies to 3.0.0, which focused mainly on upgrading Windows dependencies.
257
+
258
+ Compatibility:
259
+ * All drawn shapes (e.g. circle, triangle, star) will now draw their stroke on top of the fill. This was not consistent before, and now it is (because Squib is more DRY about it!). This means that your `stroke_width` might render wider than before. If you want the other behavior, specify `stroke_strategy: :stroke_first`. Also applies to `text` when `stroke_width` is specified.
260
+ * The `width` and `height` options for `text` have changed their defaults from `:native` to `:auto`. This is to differentiate them from `:native` widths that default elsewhere. Additionally, `width` and `height` for shapes now default to `:deck`, and get interpreted as the deck width and height. The `:native` options are interpreted for SVG and PNG images as their original values. The behavior is all the same, just with more specific names.
261
+ * Removed `img_dir` from the `set` method. You can still set `img_dir` in the configuration file (e.g. `config.yml`). Added a deprecation error.
262
+
263
+ Bugs:
264
+ * Fixed a `Cairo::WriteError` on `save_sheet` (#56, PR #96 thank you @meltheadorable!)
265
+ * Investigated a NoMemoryError on Macs. Solution: upgrade to Ruby 2.2. (#88)
266
+
267
+ Chores:
268
+ * Refactoring to make internal drawing code more DRY (#75, and much more). This is a big re-design that will help ease future features that involve manipulating arguments. Trust me. This was worth the wait and all the hard work.
269
+ * Better testing and general flexibility around the `range` option.
270
+
271
+ ## v0.6.0 / 2015-05-26
272
+
273
+ Features:
274
+ * Added `data` field to `svg` to allow for manipulating SVG XML data directly. Works nicely with my new `game_icons` [gem](https://github.com/andymeneely/game_icons) (#65)
275
+ * Added `stroke_width` and `stroke_color` to the `text` method to outlines text. (#51)
276
+ * Added `hand` method that draws cards around a circle. See hand.rb samples (#64)
277
+ * Added an `ellipse` method to (you guessed it) draw ellipses. See the draw_shapes.rb sample (#66)
278
+ * Added a `star` method to (you guessed it) draw stars. See the draw_shapes.rb sample (#72)
279
+ * Added a `polygon` method to (you guessed it) draw polygons. See the draw_shapes.rb sample (#67)
280
+ * Upgraded roo (Excel parsing) to 2.0.0. Nothing major for Squib users, just keeping up with the times.
281
+
282
+ Bugs:
283
+ * Text embed svg and png commands default to integer so the README example works (#73).
284
+ * Fixed global text hinting (#63)
285
+ * Fixed a broken promise about fill_color in `showcase` (#71)
286
+
287
+ Compatbility:
288
+ * rsvg2 and pango updated to v2.2.5. Squib follows 2.2.x of both of those. If you run `bundle` you will automatically be upgraded. They appear to be mostly bugfix releases.
289
+ * dpi is currently removed from `config.yml` and is ONLY available in `Squib::Deck.new`. This may change in the future, however.
290
+
291
+ Chores:
292
+ * Massive internal redesigning of the way configuration options are parsed, stored, handled. No real changes are visible to the user, but this code will be more maintainable and open up the door for more flexible configuration options in the future.
293
+ * Added `rake sanity` as a visual regression test to ensure the samples don't break
294
+ * Lots of automated test refactoring
295
+
296
+ Thanks to [pickfifteen](https://github.com/pickfifteen), and [Brian Cronin](http://www.boardgamegeek.com/user/MurphyIdiot) for the bug reports!
297
+
298
+ ## v0.5.1 / 2015-04-13
299
+
300
+ Bugs:
301
+ * Fixed a PDF scaling issue, so now page width and height is properly calculated from DPI (#62)
302
+
303
+ Thanks to [Brian Cronin](http://www.boardgamegeek.com/user/MurphyIdiot) for the bug report.
304
+
305
+ ## v0.5.0 / 2015-04-13
306
+ Features:
307
+ * Embedding of SVGs and PNGs into text! See README, `text_options.rb`, and `embed_text.rb`, and API documentation. This was a finnicky feature, so feedback and bug reports are welcome. (#30)
308
+ * Curves! We can now do Bezier curves. Documented, and added to the sample `draw_shapes.rb` (#37).
309
+ * Smart Quotes! The `text` rule now has a `quotes: 'smart'` option where straight quotes get converted to curly quotes. Assumes UTF-8, or you can specify your own quote characters if you're not in UTF-8. (#50)
310
+ * Font-level antialiasing is inherited from global antialiasing setting (workaround until we get a better solution for #59).
311
+
312
+ Known issues
313
+ * OSX Yosemite will show this warning: `<Error>: The function ‘CGFontGetGlyphPath’ is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance.` This warning will go away when the Ruby Cairo bindings upgrades from 1.14.1 to 1.14.2.
314
+
315
+ Special thanks to [pickfifteen](https://github.com/pickfifteen) for testing, feedback, and pull requests!!
316
+
317
+ ## v0.4.0 / 2015-04-28
318
+
319
+ Features:
320
+ * SVG backend support! You can now set the deck's back end to work with SVGs instead of images, making the resulting PDFs vectorized. (You can still save to PNGs too.) This was a big change for Squib, and it's got at least one known issue and probably a few more here and there. See discussion on the README for more details.
321
+ * Added config option for antialiasing method. My benchmarks showed that 'best' is only 10% slower than 'fast' on extremely alias-intensive tasks, so 'best' is the Squib default now.
322
+
323
+ Bugs:
324
+ * Stray stroke on circles after text (#35)
325
+ * Progress bar increment error (#34)
326
+
327
+ Known issues
328
+ * Masking SVGs onto an SVG backend will rasterize as an intermediate step. (#43)
329
+ * Compatibility change: gradient coordinates for the `mask` option in `svg` and `png` commands are relative to the given x,y - NOT to card as it was before.
330
+
331
+ ## v0.3.0 / 2015-02-02
332
+
333
+ Features:
334
+ * Masks! The `png` and `svg` commands can be used as if they are a mask, so you can color the icon with any color you like. Can be handy for switching to black-and-white, or for reusing the same image but different colors across cards.
335
+ * Gradients! Can now specify linear or radial gradients anywhere you specify colors. See README and `samples/gradients.rb` for more details.
336
+ * Number padding! `save_png` will now pad zeros on the filenames for friendlier sorting. You can also specify your own with `count_format` using the classical format string from Ruby's `Kernel::sprintf` (mostly just C-style format strings). Default: `'%02d'. The `prefix:` option is still there too.
337
+ * Added unit conversion to `Squib::New` and `save_pdf`
338
+ * Added arbitrary paper sizes to `save_pdf`
339
+ * Added new sample table for color viewing constants in `samples/colors.rb`
340
+
341
+ Special thanks to [Shalom Craimer](https://github.com/scraimer) for the idea and proof-of-concept on gradient and mask features!
342
+
343
+ ## v0.2.0 / 2015-01-12
344
+
345
+ Features:
346
+ * Added `showcase` feature to create a fancy-looking 3D reflection to showcase your cards. Documented, tested, and added a sample for it.
347
+ * Added a basic Rakefile, documented in README.
348
+ * Some internal refactoring, better testing, and more documentation with layouts
349
+
350
+ ## v0.1.0 / 2014-12-31
351
+
352
+ Features:
353
+ * Added `save_sheet` command that saves a range into PNG sheets, complete with trim, gap, margin, columns, and sometimes automagically computed rows. See samples/saves.rb.
354
+ * Unit conversion! Now you can write "2in" and it will convert based on the current dpi. `save_pdf` not supported (yet).
355
+ * `png` now supports resizing, but warns you about it since it's non-ideal. Documented in yard, tested.
356
+ * Added sample `unicode.rb` to show lots of game-related unicode characters
357
+
358
+ Chores:
359
+ * More obsessive automated testing and continuous integration work.
360
+
361
+ ## v0.0.6 / 2014-12-08
362
+
363
+ Features:
364
+ * Added a `csv` command that works just like `xslx`. Uses Ruby's CSV inside, with some extra checking and warnings.
365
+ * Custom layouts now support loading & merging multiple Yaml files! Updated README, docs, and sample to document it.
366
+ * Built-in layouts! Currently we support `hand.yml` and `playing-card.yml`. Documented in the `layouts.rb` sample.
367
+ * `text` now returns the ink extent rectangle of the rendered text. Updated docs and sample to document it.
368
+ * Samples now show that you can use text instead of symbols for things like `center`
369
+
370
+ Chores:
371
+ * Improved logging, and documentation on increasing logger verboseness
372
+ * Better regression testing technique that tracks when a sample has changed.
373
+ * Bumped version of Cairo to ~> 1.14
374
+
375
+ ## v0.0.5 / 2014-11-03
376
+ * Image rotation for png and svg via `angle`
377
+ * New sample for demonstrating direct cairo access
378
+ * README now includes a snazzy screencast of the Sublime snippets
379
+ * Rotation of text works more conventionally now, and works with text hints
380
+ * Better code styles thanks to RuboCop
381
+ * Better unit testing, now with mocking!
382
+ * Various version bumps: rspec, yard
383
+
384
+ ## v0.0.4 / 2014-10-17
385
+ * Added a font size override so you can vary the font size with the same style across strings more easily
386
+ * Added text autoscale sample
387
+ * Added `extends` to custom layouts, allowing ways to modify parent data instead of just overriding it.
388
+ * Upgraded ruby-progressbar version
389
+ * Added text rotation (thanks novalis!)
390
+ * Fixed a mapping problem with triangles (thanks novalis!)
391
+ * Fixed global hint togglability
392
+
393
+ ## v0.0.3 / 2014-08-30
394
+ * Redesigned the dynamic options system to make adding new commands much easier
395
+ * Singleton expansion
396
+ * Better documentation in README and throughout
397
+ * Implemented Junk Land in this version
398
+
399
+ ## v0.0.1-v0.0.2 / 2014-07-29
400
+ * Primordial era - base functionality