squib 0.15.0 → 0.15.1

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 +387 -382
  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 +121 -121
  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 +46 -46
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b077243c2c4f5a02c6078f083718a80a1891b8c00b96aa74e2153febef85dd1
4
- data.tar.gz: 63ae0b6ad0887bfb3b00eae08896a67e74f479de195f9555052e7827bc1c7552
3
+ metadata.gz: 4e8ef7a999a732035f02c3b01563b1e6c31203beda4b9f12ef795e9996c91967
4
+ data.tar.gz: a4549988eeb2b74240fe31ec2ca54b661043853b75cd86e98d6ee04ddc0b80a8
5
5
  SHA512:
6
- metadata.gz: f2da10c5460d33005f5cd4fbef365021d51901fdd11ab32712f1a30653880f1ae1bc86727e8c70b065a64d752b4e3c3052382827504c7e6088811afa1d0d073f
7
- data.tar.gz: 849c32f5a2d9704d81aea759a5c921b2d5fb5eaf3bc2ddd76b3fa1e2e37c4083d3bdd9ba502138d2bc03c839fee5c5c16367ddfd32e6206317ee19f4757d1d74
6
+ metadata.gz: 5ffd6be0c7de15360ce956f42e8775a18e632faf915cc947cc729f5d3ba9e53c709efdb25066bc54d14939230c577f7d3ea005ed43f1f190a690317fe2e148f8
7
+ data.tar.gz: 0eb7d62f128d89a5700c4b1970454ed287dacc5fb7b51a325a1ef968dff2a1d24d27a97180096bc31d394a9f824c35d281a29bf2f381b7a77bf5514c57b98ffe
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,382 +1,387 @@
1
- # Squib CHANGELOG
2
- Squib follows [semantic versioning](http://semver.org).
3
-
4
- ## v0.15.0 / Unreleased
5
-
6
- Features:
7
- * Added check for malformed PNG files (#250, #218)
8
- * Sprues: you can now flip individual cards (#251)
9
-
10
- Bugs
11
- * `trim_radius` now defaults to 0 on `save_pdf`, not 38. (#270)
12
- * `explode` on `xlsx` and `csv` now defaults to `qty`, not `Qty` (#262)
13
-
14
- Docs:
15
- * Documented the n-sided-ness of polygons and stars
16
- * svg: document rasterization on mask (#192)
17
- * Document how to run the code (#186)
18
- * Document some ways of using `prefix` in `save_png` (#268)
19
- * `showcase` option `trim_radius` defaults to 38, not 0
20
- * Add sample for color switch in colors docs (#274)
21
-
22
- Chores:
23
- * Bumped deps: Pango et al. to 3.3.6, Cairo to 1.16.4, Nokogiri to 1.10.3, Highline to 2.0.2
24
-
25
- Compatibility:
26
- * 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.
27
- * Dropped support for EOL'd Rubies. Minimum support is 2.4
28
-
29
- Special thanks to @lcarlsen, @Karneades
30
-
31
- ## v0.14.2 / 2018-08-01
32
-
33
- Features:
34
- * Sprues for DriveThruCards and printandplaygames!! (#247, from @blinks)
35
-
36
- Bugs:
37
- * Fixed bug on circle and other shapes that had an extra stroke from a previous text call (#248)
38
- * Fixed extra page on all sprue saves (#246)
39
- * Fixed layout parsing issue with multiple inheritance (#244)
40
-
41
- Chores:
42
- * Bumped deps: Pango et al. to 3.2.7, Cairo to 1.15.13, Nokogiri to 1.8.4
43
-
44
- Special thanks to @blinks
45
-
46
- ## v0.14.1 / 2018-03-15
47
-
48
- Chores:
49
- * Bumped deps: Pango et al. to 3.2.1, Cairo to 1.15.12. (Fixes an issue with Ruby 2.5 and Windows)
50
-
51
- ## v0.14.0 / 2017-11-06
52
-
53
- Features:
54
- * `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!
55
- * `circle` method now supports various `arc` options, so you can draw partial circles (#211) by @sparr
56
- * `save_sheet` method now supports `rtl` or "right-to-left", for easier duplex printing of backs (#204, #208) by @sparr
57
- * `yaml` method for reading in data, much like `csv` and `xlsx` by @blinks
58
- * Layouts now support `*=` and `/=` operators in addition to `+=` and `-=` (#200).
59
- * `save_pdf` method also supports `rtl` by @vador
60
- * New DSL methods `safe_zone` and `cut_zone` will draw a rectangle inset from the margins for quick proof checking
61
- * New "advanced" option for creating new projects, if you do `squib new --advanced yourgame` (@andymeneely).
62
- * New built-in layout: `party.yml`. (@andymeneely)
63
-
64
- Compatibility:
65
- * 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
66
-
67
- Docs:
68
- * Command-line is better documented now
69
- * Some more examples included in various places
70
-
71
- Bugs:
72
- * fix save_sheet to calculate rows correctly based on range (#207) by @sparr
73
-
74
- Chores:
75
- * Going back to our policy of locking in our dependencies so that we don't have new gems breaking things.
76
- * Bumped deps, Cairo to 1.15.10 and Pango et al. to 3.1.9
77
-
78
- Special thanks to @sparr, @felixleong, @blinks, @vador for all of their work!!
79
-
80
- ## v0.13.4 / 2017-07-17
81
-
82
- Bugs:
83
- * 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.
84
-
85
- ## v0.13.3 / 2017-07-15
86
-
87
- Bugs:
88
- * Fix `undefined method [] for nil:NilClass` error on `svg` (was a regression error in librsvg that we worked around.)
89
- * Bump dependencies to latest stable versions. Pango et al. to 3.1.7 and Cairo to 1.15.9. This fixes some compatibility issues.
90
- * Fixed some deprecation warnings on `text`
91
-
92
- 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
93
-
94
- ## v0.13.2 / 2017-01-27
95
-
96
- Bugs:
97
- * 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.
98
-
99
- ## v0.13.1 / 2017-01-06
100
-
101
- Bugs:
102
- * 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.
103
-
104
- ## v0.13.0 / 2017-01-04
105
-
106
- Features:
107
- * `save_pdf`'s `crop marks` have a `:full` option that draw lines across the entire page.
108
-
109
- Bugs
110
- * Fix `Squib::DataFrame#to_pretty_text` modification issue (#191)
111
- * Downgraded Pango et al. back to 3.0.9 from 3.1.0 because there are bugs in the new gobject-introspection library.
112
-
113
- Chores:
114
- * Shrank the gem itself by ignoring test data. From about 5mb to 64kb - yay!
115
- * Bump roo to newest version (2.7.0).
116
- * Bumped Nokogiri to latest version (1.7.0).
117
- * Re-organized the samples folder for better regression and sanity testing prior to release.
118
-
119
- ## v0.12.0 / 2016-12-02
120
-
121
- Features:
122
- * `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)
123
- * `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.
124
- * `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.
125
- * 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)
126
-
127
- Bugs:
128
- * `showcase` works as expected when using `backend: svg` (#179)
129
- * Graphics will get flushed upon exit, so working under Guard with `backend: svg` is more reliable (#180)
130
-
131
- Docs:
132
- * Wrote out documentation for [Squib and GameIcons](http://squib.readthedocs.io/en/latest/guides/game_icons.html)
133
- * Wrote out documentation for Hello World! Dissected
134
- * 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
135
- * 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!!
136
-
137
- Chores:
138
- * Bumped dependency roo to 2.5.1. Nothing that affects Squib users (probably).
139
- * 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.
140
-
141
- ## v0.11.0 / 2016-09-05
142
-
143
- Features:
144
- * Unit conversion supports mm (#161)
145
- * `rect` and `ellipse` support the `angle` option (#162)
146
-
147
- Docs:
148
- * Provide previews of each built-in template on the docs (#163)
149
- * Documented lack of `:scale` behavior on text embedding. (#160)
150
-
151
- Bugs:
152
- * Fresh installs of Squib were broken due to two hidden dependencies, gio2 and gobject-introspection. (#172)
153
- * 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.
154
- * With #177, the `:native` option for image width and height text embedding should work ().
155
- * Unit conversion is supported when using `extends` in layouts, as promised in the docs (#173)
156
-
157
- Compatibility:
158
- * 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.
159
-
160
- Special thanks to everyone who tested, reported, suggested, and helped for this release! bcompter, rhyok, temetherian, rpond-pa, Nibodhika, briant-spindance, lcarlsen, spilth
161
-
162
- ## v0.10.0 / 2016-05-06
163
-
164
- Features:
165
- * 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).
166
- * 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)
167
- * The `csv` method now supports a `data` option to read CSV data directly. When set, it overrides the `file` option.
168
- * 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).
169
- * 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).
170
- * Rewrote the entire API doc and placed it on [squib.readthedocs.io](http://squib.readthedocs.io). :tada:
171
-
172
- Bugs:
173
- * The `save_pdf` method will flush to file upon exit so that the PDF is available immediately. (#150, thanks for the bug report Qgel!)
174
- * 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).
175
-
176
- Chores:
177
- * Switched to `require_relative` internally throughout the codebase to be more pry-friendly (#130)
178
- * Bumped dependency ruby-progressbar to 1.8.
179
-
180
- Compatibility:
181
- * Upgraded Cairo from 1.14.3 to 1.15.2. With this change, Squib no longer supports Ruby <= 2.1.
182
-
183
- ## v0.9.0 / 2016-01-10
184
-
185
- Features:
186
- * 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)
187
- * Flip your PNGs and SVGs! Set `flip_horizontal: true` or `flip_vertical: true` (or both!) to flip the image about it's center. (#11)
188
- * Added a `grid` shape that fills the whole card with a grid of your choosing. (#68)
189
- * Added `warn_png_scale` configuration option to suppress the PNG scale warning. Also: warning only occurs on upscale, not on downscaling (#121)
190
- * `save_png` now supports `trim` and `trim_radius`, which means you can now render your cards individually and bleedlessly! (#122)
191
-
192
- Bug fixes:
193
- * Radial Gradients when using a Mask does not work as anticipated (#127)
194
-
195
- Chores:
196
- * Ripped out a lot of old constants used from the old way we handled arguments. Yay negative churn!
197
- * Emit a warning when a `config.yml` option is not recognized
198
- * Upgrade roo (xlsx parser) to latest 2.3 version. Nothing exciting for us in this release.
199
- * Force upgrade of nokogiri to latest 1.6.7 version. This should fix the Windows+Ruby2.2 problem.
200
-
201
- Docs:
202
- * [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!
203
- * Added new files to the project template for `squib new`: `IDEAS.md`, `RULES.md`, and `PLAYTESTING.md`
204
- * 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)
205
-
206
- Community:
207
- * 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
208
-
209
- Special thanks to testing and bug reporting from programmingisgoo and bcompter!
210
-
211
- ## v0.8.0 / 2015-10-26
212
- Features
213
- * 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)
214
- * 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)
215
- * 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)
216
- * Layout file for TheGameCrafter tuck boxes (#113). Thanks @alexgorski!
217
-
218
- Compatibility change:
219
- * Stripping leading and trailing whitespace of xlsx and csv values by default might change how your data gets parsed.
220
-
221
- Bugs fixes:
222
- * The `range` option everywhere doesn't fail on `[]` (#107)
223
-
224
- ## v0.7.0 / 2015-09-11
225
-
226
- Features
227
- * Added `cap` option to `line` and `curve` to define how ends of lines are drawn (#42)
228
- * Added `join` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) to define how corners are drawn. (#42)
229
- * 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)
230
- * 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.
231
- * 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.
232
- * 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)
233
- * 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)
234
- * 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)
235
- * New built-in layouts: `fantasy.yml` and `economy.yml`. Demonstrated in new sample `layouts_builtin.rb` (#97)
236
- * 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)
237
- * Upgraded cairo dependency to 1.14.3, which silences some warnings on Macs and upgrades a lot of Windows dependencies.
238
- * Upgraded pango, librsvg dependencies to 3.0.0, which focused mainly on upgrading Windows dependencies.
239
-
240
- Compatibility:
241
- * 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.
242
- * 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.
243
- * 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.
244
-
245
- Bugs:
246
- * Fixed a `Cairo::WriteError` on `save_sheet` (#56, PR #96 thank you @meltheadorable!)
247
- * Investigated a NoMemoryError on Macs. Solution: upgrade to Ruby 2.2. (#88)
248
-
249
- Chores:
250
- * 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.
251
- * Better testing and general flexibility around the `range` option.
252
-
253
- ## v0.6.0 / 2015-05-26
254
-
255
- Features:
256
- * 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)
257
- * Added `stroke_width` and `stroke_color` to the `text` method to outlines text. (#51)
258
- * Added `hand` method that draws cards around a circle. See hand.rb samples (#64)
259
- * Added an `ellipse` method to (you guessed it) draw ellipses. See the draw_shapes.rb sample (#66)
260
- * Added a `star` method to (you guessed it) draw stars. See the draw_shapes.rb sample (#72)
261
- * Added a `polygon` method to (you guessed it) draw polygons. See the draw_shapes.rb sample (#67)
262
- * Upgraded roo (Excel parsing) to 2.0.0. Nothing major for Squib users, just keeping up with the times.
263
-
264
- Bugs:
265
- * Text embed svg and png commands default to integer so the README example works (#73).
266
- * Fixed global text hinting (#63)
267
- * Fixed a broken promise about fill_color in `showcase` (#71)
268
-
269
- Compatbility:
270
- * 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.
271
- * dpi is currently removed from `config.yml` and is ONLY available in `Squib::Deck.new`. This may change in the future, however.
272
-
273
- Chores:
274
- * 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.
275
- * Added `rake sanity` as a visual regression test to ensure the samples don't break
276
- * Lots of automated test refactoring
277
-
278
- Thanks to [pickfifteen](https://github.com/pickfifteen), and [Brian Cronin](http://www.boardgamegeek.com/user/MurphyIdiot) for the bug reports!
279
-
280
- ## v0.5.1 / 2015-04-13
281
-
282
- Bugs:
283
- * Fixed a PDF scaling issue, so now page width and height is properly calculated from DPI (#62)
284
-
285
- Thanks to [Brian Cronin](http://www.boardgamegeek.com/user/MurphyIdiot) for the bug report.
286
-
287
- ## v0.5.0 / 2015-04-13
288
- Features:
289
- * 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)
290
- * Curves! We can now do Bezier curves. Documented, and added to the sample `draw_shapes.rb` (#37).
291
- * 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)
292
- * Font-level antialiasing is inherited from global antialiasing setting (workaround until we get a better solution for #59).
293
-
294
- Known issues
295
- * 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.
296
-
297
- Special thanks to [pickfifteen](https://github.com/pickfifteen) for testing, feedback, and pull requests!!
298
-
299
- ## v0.4.0 / 2015-04-28
300
-
301
- Features:
302
- * 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.
303
- * 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.
304
-
305
- Bugs:
306
- * Stray stroke on circles after text (#35)
307
- * Progress bar increment error (#34)
308
-
309
- Known issues
310
- * Masking SVGs onto an SVG backend will rasterize as an intermediate step. (#43)
311
- * 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.
312
-
313
- ## v0.3.0 / 2015-02-02
314
-
315
- Features:
316
- * 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.
317
- * Gradients! Can now specify linear or radial gradients anywhere you specify colors. See README and `samples/gradients.rb` for more details.
318
- * 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.
319
- * Added unit conversion to `Squib::New` and `save_pdf`
320
- * Added arbitrary paper sizes to `save_pdf`
321
- * Added new sample table for color viewing constants in `samples/colors.rb`
322
-
323
- Special thanks to [Shalom Craimer](https://github.com/scraimer) for the idea and proof-of-concept on gradient and mask features!
324
-
325
- ## v0.2.0 / 2015-01-12
326
-
327
- Features:
328
- * Added `showcase` feature to create a fancy-looking 3D reflection to showcase your cards. Documented, tested, and added a sample for it.
329
- * Added a basic Rakefile, documented in README.
330
- * Some internal refactoring, better testing, and more documentation with layouts
331
-
332
- ## v0.1.0 / 2014-12-31
333
-
334
- Features:
335
- * 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.
336
- * Unit conversion! Now you can write "2in" and it will convert based on the current dpi. `save_pdf` not supported (yet).
337
- * `png` now supports resizing, but warns you about it since it's non-ideal. Documented in yard, tested.
338
- * Added sample `unicode.rb` to show lots of game-related unicode characters
339
-
340
- Chores:
341
- * More obsessive automated testing and continuous integration work.
342
-
343
- ## v0.0.6 / 2014-12-08
344
-
345
- Features:
346
- * Added a `csv` command that works just like `xslx`. Uses Ruby's CSV inside, with some extra checking and warnings.
347
- * Custom layouts now support loading & merging multiple Yaml files! Updated README, docs, and sample to document it.
348
- * Built-in layouts! Currently we support `hand.yml` and `playing-card.yml`. Documented in the `layouts.rb` sample.
349
- * `text` now returns the ink extent rectangle of the rendered text. Updated docs and sample to document it.
350
- * Samples now show that you can use text instead of symbols for things like `center`
351
-
352
- Chores:
353
- * Improved logging, and documentation on increasing logger verboseness
354
- * Better regression testing technique that tracks when a sample has changed.
355
- * Bumped version of Cairo to ~> 1.14
356
-
357
- ## v0.0.5 / 2014-11-03
358
- * Image rotation for png and svg via `angle`
359
- * New sample for demonstrating direct cairo access
360
- * README now includes a snazzy screencast of the Sublime snippets
361
- * Rotation of text works more conventionally now, and works with text hints
362
- * Better code styles thanks to RuboCop
363
- * Better unit testing, now with mocking!
364
- * Various version bumps: rspec, yard
365
-
366
- ## v0.0.4 / 2014-10-17
367
- * Added a font size override so you can vary the font size with the same style across strings more easily
368
- * Added text autoscale sample
369
- * Added `extends` to custom layouts, allowing ways to modify parent data instead of just overriding it.
370
- * Upgraded ruby-progressbar version
371
- * Added text rotation (thanks novalis!)
372
- * Fixed a mapping problem with triangles (thanks novalis!)
373
- * Fixed global hint togglability
374
-
375
- ## v0.0.3 / 2014-08-30
376
- * Redesigned the dynamic options system to make adding new commands much easier
377
- * Singleton expansion
378
- * Better documentation in README and throughout
379
- * Implemented Junk Land in this version
380
-
381
- ## v0.0.1-v0.0.2 / 2014-07-29
382
- * Primordial era - base functionality
1
+ # Squib CHANGELOG
2
+ Squib follows [semantic versioning](http://semver.org).
3
+
4
+ ## v0.15.1 / 2019-08-27
5
+
6
+ Chores:
7
+ * Bumped Pango et al. to 3.3.7 (#286)
8
+
9
+ ## v0.15.0 / 2019-08-06
10
+
11
+ Features:
12
+ * Added check for malformed PNG files (#250, #218)
13
+ * Sprues: you can now flip individual cards (#251)
14
+
15
+ Bugs
16
+ * `trim_radius` now defaults to 0 on `save_pdf`, not 38. (#270)
17
+ * `explode` on `xlsx` and `csv` now defaults to `qty`, not `Qty` (#262)
18
+
19
+ Docs:
20
+ * Documented the n-sided-ness of polygons and stars
21
+ * svg: document rasterization on mask (#192)
22
+ * Document how to run the code (#186)
23
+ * Document some ways of using `prefix` in `save_png` (#268)
24
+ * `showcase` option `trim_radius` defaults to 38, not 0
25
+ * Add sample for color switch in colors docs (#274)
26
+
27
+ Chores:
28
+ * Bumped deps: Pango et al. to 3.3.6, Cairo to 1.16.4, Nokogiri to 1.10.3, Highline to 2.0.2
29
+
30
+ Compatibility:
31
+ * 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.
32
+ * Dropped support for EOL'd Rubies. Minimum support is 2.4
33
+
34
+ Special thanks to @lcarlsen, @Karneades
35
+
36
+ ## v0.14.2 / 2018-08-01
37
+
38
+ Features:
39
+ * Sprues for DriveThruCards and printandplaygames!! (#247, from @blinks)
40
+
41
+ Bugs:
42
+ * Fixed bug on circle and other shapes that had an extra stroke from a previous text call (#248)
43
+ * Fixed extra page on all sprue saves (#246)
44
+ * Fixed layout parsing issue with multiple inheritance (#244)
45
+
46
+ Chores:
47
+ * Bumped deps: Pango et al. to 3.2.7, Cairo to 1.15.13, Nokogiri to 1.8.4
48
+
49
+ Special thanks to @blinks
50
+
51
+ ## v0.14.1 / 2018-03-15
52
+
53
+ Chores:
54
+ * Bumped deps: Pango et al. to 3.2.1, Cairo to 1.15.12. (Fixes an issue with Ruby 2.5 and Windows)
55
+
56
+ ## v0.14.0 / 2017-11-06
57
+
58
+ Features:
59
+ * `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!
60
+ * `circle` method now supports various `arc` options, so you can draw partial circles (#211) by @sparr
61
+ * `save_sheet` method now supports `rtl` or "right-to-left", for easier duplex printing of backs (#204, #208) by @sparr
62
+ * `yaml` method for reading in data, much like `csv` and `xlsx` by @blinks
63
+ * Layouts now support `*=` and `/=` operators in addition to `+=` and `-=` (#200).
64
+ * `save_pdf` method also supports `rtl` by @vador
65
+ * New DSL methods `safe_zone` and `cut_zone` will draw a rectangle inset from the margins for quick proof checking
66
+ * New "advanced" option for creating new projects, if you do `squib new --advanced yourgame` (@andymeneely).
67
+ * New built-in layout: `party.yml`. (@andymeneely)
68
+
69
+ Compatibility:
70
+ * 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
71
+
72
+ Docs:
73
+ * Command-line is better documented now
74
+ * Some more examples included in various places
75
+
76
+ Bugs:
77
+ * fix save_sheet to calculate rows correctly based on range (#207) by @sparr
78
+
79
+ Chores:
80
+ * Going back to our policy of locking in our dependencies so that we don't have new gems breaking things.
81
+ * Bumped deps, Cairo to 1.15.10 and Pango et al. to 3.1.9
82
+
83
+ Special thanks to @sparr, @felixleong, @blinks, @vador for all of their work!!
84
+
85
+ ## v0.13.4 / 2017-07-17
86
+
87
+ Bugs:
88
+ * 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.
89
+
90
+ ## v0.13.3 / 2017-07-15
91
+
92
+ Bugs:
93
+ * Fix `undefined method [] for nil:NilClass` error on `svg` (was a regression error in librsvg that we worked around.)
94
+ * Bump dependencies to latest stable versions. Pango et al. to 3.1.7 and Cairo to 1.15.9. This fixes some compatibility issues.
95
+ * Fixed some deprecation warnings on `text`
96
+
97
+ 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
98
+
99
+ ## v0.13.2 / 2017-01-27
100
+
101
+ Bugs:
102
+ * 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.
103
+
104
+ ## v0.13.1 / 2017-01-06
105
+
106
+ Bugs:
107
+ * 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.
108
+
109
+ ## v0.13.0 / 2017-01-04
110
+
111
+ Features:
112
+ * `save_pdf`'s `crop marks` have a `:full` option that draw lines across the entire page.
113
+
114
+ Bugs
115
+ * Fix `Squib::DataFrame#to_pretty_text` modification issue (#191)
116
+ * Downgraded Pango et al. back to 3.0.9 from 3.1.0 because there are bugs in the new gobject-introspection library.
117
+
118
+ Chores:
119
+ * Shrank the gem itself by ignoring test data. From about 5mb to 64kb - yay!
120
+ * Bump roo to newest version (2.7.0).
121
+ * Bumped Nokogiri to latest version (1.7.0).
122
+ * Re-organized the samples folder for better regression and sanity testing prior to release.
123
+
124
+ ## v0.12.0 / 2016-12-02
125
+
126
+ Features:
127
+ * `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)
128
+ * `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.
129
+ * `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.
130
+ * 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)
131
+
132
+ Bugs:
133
+ * `showcase` works as expected when using `backend: svg` (#179)
134
+ * Graphics will get flushed upon exit, so working under Guard with `backend: svg` is more reliable (#180)
135
+
136
+ Docs:
137
+ * Wrote out documentation for [Squib and GameIcons](http://squib.readthedocs.io/en/latest/guides/game_icons.html)
138
+ * Wrote out documentation for Hello World! Dissected
139
+ * 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
140
+ * 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!!
141
+
142
+ Chores:
143
+ * Bumped dependency roo to 2.5.1. Nothing that affects Squib users (probably).
144
+ * 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.
145
+
146
+ ## v0.11.0 / 2016-09-05
147
+
148
+ Features:
149
+ * Unit conversion supports mm (#161)
150
+ * `rect` and `ellipse` support the `angle` option (#162)
151
+
152
+ Docs:
153
+ * Provide previews of each built-in template on the docs (#163)
154
+ * Documented lack of `:scale` behavior on text embedding. (#160)
155
+
156
+ Bugs:
157
+ * Fresh installs of Squib were broken due to two hidden dependencies, gio2 and gobject-introspection. (#172)
158
+ * 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.
159
+ * With #177, the `:native` option for image width and height text embedding should work ().
160
+ * Unit conversion is supported when using `extends` in layouts, as promised in the docs (#173)
161
+
162
+ Compatibility:
163
+ * 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.
164
+
165
+ Special thanks to everyone who tested, reported, suggested, and helped for this release! bcompter, rhyok, temetherian, rpond-pa, Nibodhika, briant-spindance, lcarlsen, spilth
166
+
167
+ ## v0.10.0 / 2016-05-06
168
+
169
+ Features:
170
+ * 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).
171
+ * 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)
172
+ * The `csv` method now supports a `data` option to read CSV data directly. When set, it overrides the `file` option.
173
+ * 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).
174
+ * 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).
175
+ * Rewrote the entire API doc and placed it on [squib.readthedocs.io](http://squib.readthedocs.io). :tada:
176
+
177
+ Bugs:
178
+ * The `save_pdf` method will flush to file upon exit so that the PDF is available immediately. (#150, thanks for the bug report Qgel!)
179
+ * 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).
180
+
181
+ Chores:
182
+ * Switched to `require_relative` internally throughout the codebase to be more pry-friendly (#130)
183
+ * Bumped dependency ruby-progressbar to 1.8.
184
+
185
+ Compatibility:
186
+ * Upgraded Cairo from 1.14.3 to 1.15.2. With this change, Squib no longer supports Ruby <= 2.1.
187
+
188
+ ## v0.9.0 / 2016-01-10
189
+
190
+ Features:
191
+ * 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)
192
+ * Flip your PNGs and SVGs! Set `flip_horizontal: true` or `flip_vertical: true` (or both!) to flip the image about it's center. (#11)
193
+ * Added a `grid` shape that fills the whole card with a grid of your choosing. (#68)
194
+ * Added `warn_png_scale` configuration option to suppress the PNG scale warning. Also: warning only occurs on upscale, not on downscaling (#121)
195
+ * `save_png` now supports `trim` and `trim_radius`, which means you can now render your cards individually and bleedlessly! (#122)
196
+
197
+ Bug fixes:
198
+ * Radial Gradients when using a Mask does not work as anticipated (#127)
199
+
200
+ Chores:
201
+ * Ripped out a lot of old constants used from the old way we handled arguments. Yay negative churn!
202
+ * Emit a warning when a `config.yml` option is not recognized
203
+ * Upgrade roo (xlsx parser) to latest 2.3 version. Nothing exciting for us in this release.
204
+ * Force upgrade of nokogiri to latest 1.6.7 version. This should fix the Windows+Ruby2.2 problem.
205
+
206
+ Docs:
207
+ * [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!
208
+ * Added new files to the project template for `squib new`: `IDEAS.md`, `RULES.md`, and `PLAYTESTING.md`
209
+ * 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)
210
+
211
+ Community:
212
+ * 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
213
+
214
+ Special thanks to testing and bug reporting from programmingisgoo and bcompter!
215
+
216
+ ## v0.8.0 / 2015-10-26
217
+ Features
218
+ * 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)
219
+ * 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)
220
+ * 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)
221
+ * Layout file for TheGameCrafter tuck boxes (#113). Thanks @alexgorski!
222
+
223
+ Compatibility change:
224
+ * Stripping leading and trailing whitespace of xlsx and csv values by default might change how your data gets parsed.
225
+
226
+ Bugs fixes:
227
+ * The `range` option everywhere doesn't fail on `[]` (#107)
228
+
229
+ ## v0.7.0 / 2015-09-11
230
+
231
+ Features
232
+ * Added `cap` option to `line` and `curve` to define how ends of lines are drawn (#42)
233
+ * Added `join` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) to define how corners are drawn. (#42)
234
+ * 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)
235
+ * 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.
236
+ * 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.
237
+ * 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)
238
+ * 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)
239
+ * 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)
240
+ * New built-in layouts: `fantasy.yml` and `economy.yml`. Demonstrated in new sample `layouts_builtin.rb` (#97)
241
+ * 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)
242
+ * Upgraded cairo dependency to 1.14.3, which silences some warnings on Macs and upgrades a lot of Windows dependencies.
243
+ * Upgraded pango, librsvg dependencies to 3.0.0, which focused mainly on upgrading Windows dependencies.
244
+
245
+ Compatibility:
246
+ * 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.
247
+ * 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.
248
+ * 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.
249
+
250
+ Bugs:
251
+ * Fixed a `Cairo::WriteError` on `save_sheet` (#56, PR #96 thank you @meltheadorable!)
252
+ * Investigated a NoMemoryError on Macs. Solution: upgrade to Ruby 2.2. (#88)
253
+
254
+ Chores:
255
+ * 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.
256
+ * Better testing and general flexibility around the `range` option.
257
+
258
+ ## v0.6.0 / 2015-05-26
259
+
260
+ Features:
261
+ * 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)
262
+ * Added `stroke_width` and `stroke_color` to the `text` method to outlines text. (#51)
263
+ * Added `hand` method that draws cards around a circle. See hand.rb samples (#64)
264
+ * Added an `ellipse` method to (you guessed it) draw ellipses. See the draw_shapes.rb sample (#66)
265
+ * Added a `star` method to (you guessed it) draw stars. See the draw_shapes.rb sample (#72)
266
+ * Added a `polygon` method to (you guessed it) draw polygons. See the draw_shapes.rb sample (#67)
267
+ * Upgraded roo (Excel parsing) to 2.0.0. Nothing major for Squib users, just keeping up with the times.
268
+
269
+ Bugs:
270
+ * Text embed svg and png commands default to integer so the README example works (#73).
271
+ * Fixed global text hinting (#63)
272
+ * Fixed a broken promise about fill_color in `showcase` (#71)
273
+
274
+ Compatbility:
275
+ * 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.
276
+ * dpi is currently removed from `config.yml` and is ONLY available in `Squib::Deck.new`. This may change in the future, however.
277
+
278
+ Chores:
279
+ * 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.
280
+ * Added `rake sanity` as a visual regression test to ensure the samples don't break
281
+ * Lots of automated test refactoring
282
+
283
+ Thanks to [pickfifteen](https://github.com/pickfifteen), and [Brian Cronin](http://www.boardgamegeek.com/user/MurphyIdiot) for the bug reports!
284
+
285
+ ## v0.5.1 / 2015-04-13
286
+
287
+ Bugs:
288
+ * Fixed a PDF scaling issue, so now page width and height is properly calculated from DPI (#62)
289
+
290
+ Thanks to [Brian Cronin](http://www.boardgamegeek.com/user/MurphyIdiot) for the bug report.
291
+
292
+ ## v0.5.0 / 2015-04-13
293
+ Features:
294
+ * 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)
295
+ * Curves! We can now do Bezier curves. Documented, and added to the sample `draw_shapes.rb` (#37).
296
+ * 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)
297
+ * Font-level antialiasing is inherited from global antialiasing setting (workaround until we get a better solution for #59).
298
+
299
+ Known issues
300
+ * 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.
301
+
302
+ Special thanks to [pickfifteen](https://github.com/pickfifteen) for testing, feedback, and pull requests!!
303
+
304
+ ## v0.4.0 / 2015-04-28
305
+
306
+ Features:
307
+ * 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.
308
+ * 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.
309
+
310
+ Bugs:
311
+ * Stray stroke on circles after text (#35)
312
+ * Progress bar increment error (#34)
313
+
314
+ Known issues
315
+ * Masking SVGs onto an SVG backend will rasterize as an intermediate step. (#43)
316
+ * 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.
317
+
318
+ ## v0.3.0 / 2015-02-02
319
+
320
+ Features:
321
+ * 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.
322
+ * Gradients! Can now specify linear or radial gradients anywhere you specify colors. See README and `samples/gradients.rb` for more details.
323
+ * 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.
324
+ * Added unit conversion to `Squib::New` and `save_pdf`
325
+ * Added arbitrary paper sizes to `save_pdf`
326
+ * Added new sample table for color viewing constants in `samples/colors.rb`
327
+
328
+ Special thanks to [Shalom Craimer](https://github.com/scraimer) for the idea and proof-of-concept on gradient and mask features!
329
+
330
+ ## v0.2.0 / 2015-01-12
331
+
332
+ Features:
333
+ * Added `showcase` feature to create a fancy-looking 3D reflection to showcase your cards. Documented, tested, and added a sample for it.
334
+ * Added a basic Rakefile, documented in README.
335
+ * Some internal refactoring, better testing, and more documentation with layouts
336
+
337
+ ## v0.1.0 / 2014-12-31
338
+
339
+ Features:
340
+ * 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.
341
+ * Unit conversion! Now you can write "2in" and it will convert based on the current dpi. `save_pdf` not supported (yet).
342
+ * `png` now supports resizing, but warns you about it since it's non-ideal. Documented in yard, tested.
343
+ * Added sample `unicode.rb` to show lots of game-related unicode characters
344
+
345
+ Chores:
346
+ * More obsessive automated testing and continuous integration work.
347
+
348
+ ## v0.0.6 / 2014-12-08
349
+
350
+ Features:
351
+ * Added a `csv` command that works just like `xslx`. Uses Ruby's CSV inside, with some extra checking and warnings.
352
+ * Custom layouts now support loading & merging multiple Yaml files! Updated README, docs, and sample to document it.
353
+ * Built-in layouts! Currently we support `hand.yml` and `playing-card.yml`. Documented in the `layouts.rb` sample.
354
+ * `text` now returns the ink extent rectangle of the rendered text. Updated docs and sample to document it.
355
+ * Samples now show that you can use text instead of symbols for things like `center`
356
+
357
+ Chores:
358
+ * Improved logging, and documentation on increasing logger verboseness
359
+ * Better regression testing technique that tracks when a sample has changed.
360
+ * Bumped version of Cairo to ~> 1.14
361
+
362
+ ## v0.0.5 / 2014-11-03
363
+ * Image rotation for png and svg via `angle`
364
+ * New sample for demonstrating direct cairo access
365
+ * README now includes a snazzy screencast of the Sublime snippets
366
+ * Rotation of text works more conventionally now, and works with text hints
367
+ * Better code styles thanks to RuboCop
368
+ * Better unit testing, now with mocking!
369
+ * Various version bumps: rspec, yard
370
+
371
+ ## v0.0.4 / 2014-10-17
372
+ * Added a font size override so you can vary the font size with the same style across strings more easily
373
+ * Added text autoscale sample
374
+ * Added `extends` to custom layouts, allowing ways to modify parent data instead of just overriding it.
375
+ * Upgraded ruby-progressbar version
376
+ * Added text rotation (thanks novalis!)
377
+ * Fixed a mapping problem with triangles (thanks novalis!)
378
+ * Fixed global hint togglability
379
+
380
+ ## v0.0.3 / 2014-08-30
381
+ * Redesigned the dynamic options system to make adding new commands much easier
382
+ * Singleton expansion
383
+ * Better documentation in README and throughout
384
+ * Implemented Junk Land in this version
385
+
386
+ ## v0.0.1-v0.0.2 / 2014-07-29
387
+ * Primordial era - base functionality