squib 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -0
  3. data/CHANGELOG.md +24 -3
  4. data/README.md +4 -3
  5. data/RELEASE TODO.md +3 -1
  6. data/docs/_static/css/squibdocs.css +5 -0
  7. data/docs/conf.py +2 -2
  8. data/docs/config.rst +5 -0
  9. data/docs/dsl/ellipse.rst +6 -0
  10. data/docs/dsl/mm.rst +19 -0
  11. data/docs/dsl/rect.rst +4 -0
  12. data/docs/dsl/text.rst +2 -2
  13. data/docs/dsl/triangle.rst +20 -8
  14. data/docs/guides/game_icons.rst +4 -0
  15. data/docs/layouts.rst +55 -0
  16. data/docs/units.rst +1 -1
  17. data/lib/squib/api/background.rb +1 -1
  18. data/lib/squib/api/data.rb +4 -4
  19. data/lib/squib/api/groups.rb +4 -4
  20. data/lib/squib/api/image.rb +2 -2
  21. data/lib/squib/api/save.rb +6 -6
  22. data/lib/squib/api/settings.rb +4 -4
  23. data/lib/squib/api/shapes.rb +13 -11
  24. data/lib/squib/api/text.rb +1 -1
  25. data/lib/squib/api/text_embed.rb +4 -29
  26. data/lib/squib/api/units.rb +7 -2
  27. data/lib/squib/args/arg_loader.rb +2 -14
  28. data/lib/squib/args/draw.rb +1 -1
  29. data/lib/squib/args/hand_special.rb +37 -37
  30. data/lib/squib/args/unit_conversion.rb +2 -0
  31. data/lib/squib/deck.rb +1 -1
  32. data/lib/squib/graphics/embedding_utils.rb +28 -0
  33. data/lib/squib/graphics/shapes.rb +6 -3
  34. data/lib/squib/graphics/text.rb +49 -52
  35. data/lib/squib/layout_parser.rb +28 -9
  36. data/lib/squib/layouts/economy.yml +85 -85
  37. data/lib/squib/layouts/fantasy.yml +101 -101
  38. data/lib/squib/layouts/hand.yml +62 -62
  39. data/lib/squib/layouts/playing-card.yml +35 -35
  40. data/lib/squib/layouts/tuck_box.yml +45 -45
  41. data/lib/squib/version.rb +1 -1
  42. data/samples/custom-config.yml +5 -5
  43. data/samples/custom_config.rb +18 -18
  44. data/samples/embed_text.rb +27 -9
  45. data/samples/layouts/_output/.gitignore +2 -0
  46. data/samples/{layouts_builtin.rb → layouts/builtin_layouts.rb} +74 -51
  47. data/samples/{custom-layout.yml → layouts/custom-layout.yml} +0 -0
  48. data/samples/{custom-layout2.yml → layouts/custom-layout2.yml} +0 -0
  49. data/samples/layouts/expected_layouts_builtin_economy_00.png +0 -0
  50. data/samples/layouts/expected_layouts_builtin_fantasy_00.png +0 -0
  51. data/samples/layouts/expected_layouts_builtin_hand_00.png +0 -0
  52. data/samples/layouts/expected_layouts_builtin_playing_card_00.png +0 -0
  53. data/samples/layouts/expected_layouts_builtin_tuck_box_00.png +0 -0
  54. data/samples/{layouts.rb → layouts/layouts.rb} +0 -1
  55. data/samples/layouts/shiny-purse.png +0 -0
  56. data/samples/layouts/spanner.svg +91 -0
  57. data/samples/offset.svg +71 -71
  58. data/samples/shapes/_draw_shapes.rb +8 -2
  59. data/spec/api/api_units_spec.rb +37 -0
  60. data/spec/args/embed_key_spec.rb +13 -13
  61. data/spec/args/showcase_special_spec.rb +15 -15
  62. data/spec/args/unit_conversion_spec.rb +8 -1
  63. data/spec/data/csv/qty.csv +2 -2
  64. data/spec/data/csv/qty_named.csv +2 -2
  65. data/spec/data/csv/with_spaces.csv +2 -2
  66. data/spec/data/layouts/extends-units-mixed.yml +8 -0
  67. data/spec/data/layouts/extends-units.yml +8 -0
  68. data/spec/data/samples/autoscale_font/_autoscale_font.rb.txt +9 -0
  69. data/spec/data/samples/basic.rb.txt +18 -0
  70. data/spec/data/samples/cairo_access.rb.txt +6 -0
  71. data/spec/data/samples/colors/_gradients.rb.txt +6 -0
  72. data/spec/data/samples/config_text_markup.rb.txt +72 -72
  73. data/spec/data/samples/data/_csv.rb.txt +12 -0
  74. data/spec/data/samples/data/_excel.rb.txt +30 -0
  75. data/spec/data/samples/embed_text.rb.txt +70 -5
  76. data/spec/data/samples/hello_world.rb.txt +36 -36
  77. data/spec/data/samples/images/_more_load_images.rb.txt +3 -0
  78. data/spec/data/samples/ranges.rb.txt +9 -0
  79. data/spec/data/samples/saves/_hand.rb.txt +48 -0
  80. data/spec/data/samples/saves/_saves.rb.txt +48 -0
  81. data/spec/data/samples/saves/_showcase.rb.txt +12 -0
  82. data/spec/data/samples/shapes/_draw_shapes.rb.txt +41 -0
  83. data/spec/data/samples/text_options.rb.txt +1155 -1125
  84. data/spec/data/samples/tgc_proofs.rb.txt +6 -0
  85. data/spec/data/samples/units.rb.txt +9 -0
  86. data/spec/graphics/embedding_utils_spec.rb +73 -0
  87. data/spec/layout_parser_spec.rb +42 -17
  88. data/spec/spec_helper.rb +5 -1
  89. data/squib.gemspec +5 -3
  90. metadata +61 -15
@@ -4,6 +4,9 @@ cairo: set_source_color(["white"])
4
4
  cairo: paint([])
5
5
  cairo: restore([])
6
6
  cairo: save([])
7
+ cairo: translate([38, 38])
8
+ cairo: rotate([0])
9
+ cairo: translate([-38, -38])
7
10
  cairo: rounded_rectangle([38, 38, 750, 1050, 38, 38])
8
11
  cairo: set_source_color(["#0000"])
9
12
  cairo: fill_preserve([])
@@ -15,6 +18,9 @@ cairo: set_dash([[]])
15
18
  cairo: stroke([])
16
19
  cairo: restore([])
17
20
  cairo: save([])
21
+ cairo: translate([75, 75])
22
+ cairo: rotate([0])
23
+ cairo: translate([-75, -75])
18
24
  cairo: rounded_rectangle([75, 75, 128, 128, 25, 25])
19
25
  cairo: set_source_color(["#0000"])
20
26
  cairo: fill_preserve([])
@@ -4,6 +4,9 @@ cairo: set_source_color(["#ddd"])
4
4
  cairo: paint([])
5
5
  cairo: restore([])
6
6
  cairo: save([])
7
+ cairo: translate([37.5, 37.5])
8
+ cairo: rotate([0])
9
+ cairo: translate([-37.5, -37.5])
7
10
  cairo: rounded_rectangle([37.5, 37.5, 750.0, 1050.0, 25, 25])
8
11
  cairo: set_source_color(["#0000"])
9
12
  cairo: fill_preserve([])
@@ -15,6 +18,9 @@ cairo: set_dash([[]])
15
18
  cairo: stroke([])
16
19
  cairo: restore([])
17
20
  cairo: save([])
21
+ cairo: translate([75.0, 75.0])
22
+ cairo: rotate([0])
23
+ cairo: translate([-75.0, -75.0])
18
24
  cairo: rounded_rectangle([75.0, 75.0, 675.0, 975.0, 25, 25])
19
25
  cairo: set_source_color(["#0000"])
20
26
  cairo: fill_preserve([])
@@ -26,6 +32,9 @@ cairo: set_dash([[]])
26
32
  cairo: stroke([])
27
33
  cairo: restore([])
28
34
  cairo: save([])
35
+ cairo: translate([472.4409444, 472.4409444])
36
+ cairo: rotate([0])
37
+ cairo: translate([-472.4409444, -472.4409444])
29
38
  cairo: rounded_rectangle([472.4409444, 472.4409444, 100, 100, 0, 0])
30
39
  cairo: set_source_color(["#0000"])
31
40
  cairo: fill_preserve([])
@@ -0,0 +1,73 @@
1
+ require 'spec_helper'
2
+ require 'squib/graphics/embedding_utils'
3
+
4
+ describe Squib::EmbeddingUtils do
5
+
6
+ context(:indices) do
7
+ it 'returns nothing when given nothing' do
8
+ expect(Squib::EmbeddingUtils.indices('just some text', [])).to eq({})
9
+ end
10
+
11
+ it 'returns emptiness for given keys that are not in the string' do
12
+ str = 'just some text'
13
+ keys = [':tool:']
14
+ expect(Squib::EmbeddingUtils.indices(str, keys)).to eq({
15
+ ':tool:' => []
16
+ })
17
+ end
18
+
19
+ it 'returns correctly for one key, one time' do
20
+ str = 'some :tool: text'
21
+ keys = [':tool:']
22
+ expect(Squib::EmbeddingUtils.indices(str, keys)).to eq({
23
+ ':tool:' => [5..11]
24
+ })
25
+ end
26
+
27
+ it 'handles one key, multiple times' do
28
+ str = 'some :tool: text :tool:'
29
+ keys = [':tool:']
30
+ expect(Squib::EmbeddingUtils.indices(str, keys)).to eq({
31
+ ':tool:' => [5..11, 17..23]
32
+ })
33
+ end
34
+
35
+ it 'handles one key, multiple times next to each other' do
36
+ str = 'some :tool::tool: text'
37
+ keys = [':tool:']
38
+ expect(Squib::EmbeddingUtils.indices(str, keys)).to eq({
39
+ ':tool:' => [5..11, 11..17]
40
+ })
41
+ end
42
+
43
+ it 'handles multiple keys, one time each' do
44
+ str = 'some :tool: heart text'
45
+ keys = %w(:tool: heart)
46
+ expect(Squib::EmbeddingUtils.indices(str, keys)).to eq({
47
+ ':tool:' => [5..11],
48
+ 'heart' => [12..17]
49
+ })
50
+ end
51
+
52
+ it 'handles multiple keys, multiple times each' do
53
+ str = ':tool:some :tool: heart text heart tool'
54
+ keys = %w(:tool: heart)
55
+ expect(Squib::EmbeddingUtils.indices(str, keys)).to eq({
56
+ ':tool:' => [0..6, 11..17],
57
+ 'heart' => [18..23, 29..34]
58
+ })
59
+ end
60
+
61
+ it 'handles multibyte properly' do
62
+ str = '💡 📷 :tool: heart text'
63
+ keys = %w(:tool: heart 💡)
64
+ expect(Squib::EmbeddingUtils.indices(str, keys)).to eq({
65
+ ':tool:' => [10..16],
66
+ 'heart' => [17..22],
67
+ '💡' => [3..4]
68
+ })
69
+ end
70
+
71
+
72
+ end
73
+ end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Squib::LayoutParser do
4
4
 
5
5
  it 'loads a normal layout with no extends' do
6
- layout = Squib::LayoutParser.load_layout(layout_file('no-extends.yml'))
6
+ layout = subject.load_layout(layout_file('no-extends.yml'))
7
7
  expect(layout).to eq({ 'frame' => {
8
8
  'x' => 38,
9
9
  'valign' => :middle,
@@ -15,7 +15,7 @@ describe Squib::LayoutParser do
15
15
  end
16
16
 
17
17
  it 'loads with a single extends' do
18
- layout = Squib::LayoutParser.load_layout(layout_file('single-extends.yml'))
18
+ layout = subject.load_layout(layout_file('single-extends.yml'))
19
19
  expect(layout).to eq({ 'frame' => {
20
20
  'x' => 38,
21
21
  'y' => 38,
@@ -31,7 +31,7 @@ describe Squib::LayoutParser do
31
31
  end
32
32
 
33
33
  it 'applies the extends regardless of order' do
34
- layout = Squib::LayoutParser.load_layout(layout_file('pre-extends.yml'))
34
+ layout = subject.load_layout(layout_file('pre-extends.yml'))
35
35
  expect(layout).to eq({ 'frame' => {
36
36
  'x' => 38,
37
37
  'y' => 38,
@@ -47,7 +47,7 @@ describe Squib::LayoutParser do
47
47
  end
48
48
 
49
49
  it 'applies the single-level extends multiple times' do
50
- layout = Squib::LayoutParser.load_layout(layout_file('single-level-multi-extends.yml'))
50
+ layout = subject.load_layout(layout_file('single-level-multi-extends.yml'))
51
51
  expect(layout).to eq({ 'frame' => {
52
52
  'x' => 38,
53
53
  'y' => 38,
@@ -69,7 +69,7 @@ describe Squib::LayoutParser do
69
69
  end
70
70
 
71
71
  it 'applies multiple extends in a single rule' do
72
- layout = Squib::LayoutParser.load_layout(layout_file('multi-extends-single-entry.yml'))
72
+ layout = subject.load_layout(layout_file('multi-extends-single-entry.yml'))
73
73
  expect(layout).to eq({ 'aunt' => {
74
74
  'a' => 101,
75
75
  'b' => 102,
@@ -93,7 +93,7 @@ describe Squib::LayoutParser do
93
93
  end
94
94
 
95
95
  it 'applies multi-level extends' do
96
- layout = Squib::LayoutParser.load_layout(layout_file('multi-level-extends.yml'))
96
+ layout = subject.load_layout(layout_file('multi-level-extends.yml'))
97
97
  expect(layout).to eq({ 'frame' => {
98
98
  'x' => 38,
99
99
  'y' => 38,
@@ -116,26 +116,26 @@ describe Squib::LayoutParser do
116
116
 
117
117
  it 'fails on a self-circular extends' do
118
118
  file = layout_file('self-circular-extends.yml')
119
- expect { Squib::LayoutParser.load_layout(file) }
119
+ expect { subject.load_layout(file)}
120
120
  .to raise_error(RuntimeError, 'Invalid layout: circular extends with \'a\'')
121
121
  end
122
122
 
123
123
  it 'fails on a easy-circular extends' do
124
124
  file = layout_file('easy-circular-extends.yml')
125
- expect { Squib::LayoutParser.load_layout(file) }
125
+ expect { subject.load_layout(file)}
126
126
  .to raise_error(RuntimeError, 'Invalid layout: circular extends with \'a\'')
127
127
  end
128
128
 
129
129
  it 'hard on a easy-circular extends' do
130
130
  file = layout_file('hard-circular-extends.yml')
131
- expect { Squib::LayoutParser.load_layout(file) }
131
+ expect { subject.load_layout(file)}
132
132
  .to raise_error(RuntimeError, 'Invalid layout: circular extends with \'a\'')
133
133
  end
134
134
 
135
135
  it 'redefines keys on multiple layouts' do
136
136
  a = layout_file('multifile-a.yml')
137
137
  b = layout_file('multifile-b.yml')
138
- layout = Squib::LayoutParser.load_layout([a, b])
138
+ layout = subject.load_layout([a, b])
139
139
  expect(layout).to eq({
140
140
  'title' => { 'x' => 300 },
141
141
  'subtitle' => { 'x' => 200 },
@@ -146,7 +146,7 @@ describe Squib::LayoutParser do
146
146
  it 'evaluates extends on each file first' do
147
147
  a = layout_file('multifile-extends-a.yml')
148
148
  b = layout_file('multifile-extends-b.yml')
149
- layout = Squib::LayoutParser.load_layout([a, b])
149
+ layout = subject.load_layout([a, b])
150
150
  expect(layout).to eq({
151
151
  'grandparent' => { 'x' => 100 },
152
152
  'parent_a' => { 'x' => 110, 'extends' => 'grandparent' },
@@ -157,12 +157,12 @@ describe Squib::LayoutParser do
157
157
  end
158
158
 
159
159
  it 'loads nothing on an empty layout file' do
160
- layout = Squib::LayoutParser.load_layout(layout_file('empty.yml'))
160
+ layout = subject.load_layout(layout_file('empty.yml'))
161
161
  expect(layout).to eq({})
162
162
  end
163
163
 
164
164
  it 'handles extends on a rule with no args' do
165
- layout = Squib::LayoutParser.load_layout(layout_file('empty-rule.yml'))
165
+ layout = subject.load_layout(layout_file('empty-rule.yml'))
166
166
  expect(layout).to eq({
167
167
  'empty' => nil
168
168
  })
@@ -170,14 +170,14 @@ describe Squib::LayoutParser do
170
170
 
171
171
  it 'logs an error when a file is not found' do
172
172
  expect(Squib.logger).to receive(:error).once
173
- Squib::LayoutParser.load_layout('yeti')
173
+ subject.load_layout('yeti')
174
174
  end
175
175
 
176
176
  it 'freaks out if you extend something doesn\'t exist' do
177
177
  expect(Squib.logger)
178
178
  .to receive(:error)
179
179
  .with("Processing layout: 'verbal' attempts to extend a missing 'kaisersoze'")
180
- layout = Squib::LayoutParser.load_layout(layout_file('extends-nonexists.yml'))
180
+ layout = subject.load_layout(layout_file('extends-nonexists.yml'))
181
181
  expect(layout).to eq({
182
182
  'verbal' => {
183
183
  'font_size' => 25,
@@ -186,11 +186,36 @@ describe Squib::LayoutParser do
186
186
  })
187
187
  end
188
188
 
189
+ it 'does unit conversion when extending' do
190
+ layout = subject.load_layout(layout_file('extends-units.yml'))
191
+ expect(layout).to eq({
192
+ 'parent' => { 'x' => '0.5in', 'y' => '1in'},
193
+ 'child' => { 'x' => 450.0, 'y' => 150.0, 'extends' => 'parent' },
194
+ })
195
+ end
196
+
197
+ it 'does unit conversion on non-300 dpis' do
198
+ parser = Squib::LayoutParser.new(100)
199
+ layout = parser.load_layout(layout_file('extends-units.yml'))
200
+ expect(layout).to eq({
201
+ 'parent' => { 'x' => '0.5in', 'y' => '1in'},
202
+ 'child' => { 'x' => 150.0, 'y' => 50.0, 'extends' => 'parent' },
203
+ })
204
+ end
205
+
206
+ it 'does mixed unit conversion when extending' do
207
+ layout = subject.load_layout(layout_file('extends-units-mixed.yml'))
208
+ expect(layout).to eq({
209
+ 'parent' => { 'x' => '0.5in', 'y' => '1in'},
210
+ 'child' => { 'x' => 450.0, 'y' => 150.0, 'extends' => 'parent' },
211
+ })
212
+ end
213
+
189
214
  it 'loads progressively on multiple calls' do
190
215
  a = layout_file('multifile-a.yml')
191
216
  b = layout_file('multifile-b.yml')
192
- layout = Squib::LayoutParser.load_layout(a)
193
- layout = Squib::LayoutParser.load_layout(b, layout)
217
+ layout = subject.load_layout(a)
218
+ layout = subject.load_layout(b, layout)
194
219
  expect(layout).to eq({
195
220
  'title' => { 'x' => 300 },
196
221
  'subtitle' => { 'x' => 200 },
data/spec/spec_helper.rb CHANGED
@@ -65,6 +65,7 @@ def scrub_hex(str)
65
65
  str.gsub(/0x\w{1,8}/, '')
66
66
  .gsub(/ptr=\w{1,8}/, '')
67
67
  .gsub(/#<Pango::FontDescription:.*>/, '')
68
+ .gsub(/#<Pango::AttrList:.*>/, 'Pango::AttrList')
68
69
  .gsub(/#<Cairo::ImageSurface:.*>/, 'ImageSurface')
69
70
  .gsub(/#<Cairo::LinearPattern:.*>/, 'LinearPattern')
70
71
  .gsub(/#<Cairo::RadialPattern:.*>/, 'RadialPattern')
@@ -103,6 +104,8 @@ def mock_cairo(strio)
103
104
  allow(pango).to receive(:alignment).and_return(Pango::Layout::Alignment::LEFT)
104
105
  allow(pango).to receive(:text).and_return('foo')
105
106
  allow(pango).to receive(:context).and_return(pango_cxt)
107
+ allow(pango).to receive(:attributes).and_return(nil)
108
+ allow(pango_cxt).to receive(:set_shape_renderer)
106
109
  allow(pango_cxt).to receive(:font_options=)
107
110
  allow(iter).to receive(:next_char!).and_return(false)
108
111
  allow(iter).to receive(:char_extents).and_return(Pango::Rectangle.new(5, 5, 5, 5))
@@ -120,7 +123,8 @@ def mock_cairo(strio)
120
123
  end
121
124
 
122
125
  %w(font_description= text= width= height= wrap= ellipsize= alignment=
123
- justify= spacing= markup= ellipsized?).each do |m|
126
+ justify= spacing= markup= ellipsized? attributes=
127
+ set_shape_renderer).each do |m|
124
128
  allow(pango).to receive(m) {|*args| strio << scrub_hex("pango: #{m}(#{args})\n") }
125
129
  end
126
130
 
data/squib.gemspec CHANGED
@@ -28,12 +28,14 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ['lib']
29
29
 
30
30
  spec.add_runtime_dependency 'cairo', '~> 1.15.2'
31
- spec.add_runtime_dependency 'pango', '~> 3.0.1'
31
+ spec.add_runtime_dependency 'pango', '~> 3.0.9'
32
32
  spec.add_runtime_dependency 'nokogiri', '~> 1.6.7'
33
- spec.add_runtime_dependency 'roo', '~> 2.3.0'
34
- spec.add_runtime_dependency 'rsvg2', '~> 3.0.0'
33
+ spec.add_runtime_dependency 'roo', '~> 2.4.0'
34
+ spec.add_runtime_dependency 'rsvg2', '~> 3.0.9'
35
35
  spec.add_runtime_dependency 'mercenary', '~> 0.3.4'
36
36
  spec.add_runtime_dependency 'ruby-progressbar', '~> 1.8'
37
+ spec.add_runtime_dependency 'gobject-introspection', '~> 3.0.9' # for bug 172
38
+ spec.add_runtime_dependency 'gio2', '~> 3.0.9' # for bug 172
37
39
 
38
40
  spec.add_development_dependency 'bundler', '~> 1.6'
39
41
  spec.add_development_dependency 'rake'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Meneely
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-06 00:00:00.000000000 Z
11
+ date: 2016-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cairo
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.1
33
+ version: 3.0.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.0.1
40
+ version: 3.0.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.3.0
61
+ version: 2.4.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.3.0
68
+ version: 2.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rsvg2
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 3.0.0
75
+ version: 3.0.9
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 3.0.0
82
+ version: 3.0.9
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mercenary
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +108,34 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.8'
111
+ - !ruby/object:Gem::Dependency
112
+ name: gobject-introspection
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 3.0.9
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 3.0.9
125
+ - !ruby/object:Gem::Dependency
126
+ name: gio2
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 3.0.9
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 3.0.9
111
139
  - !ruby/object:Gem::Dependency
112
140
  name: bundler
113
141
  requirement: !ruby/object:Gem::Requirement
@@ -248,8 +276,8 @@ extra_rdoc_files:
248
276
  - samples/intro/03_layout.rb
249
277
  - samples/intro/04_arrays.rb
250
278
  - samples/intro/05_excel.rb
251
- - samples/layouts.rb
252
- - samples/layouts_builtin.rb
279
+ - samples/layouts/builtin_layouts.rb
280
+ - samples/layouts/layouts.rb
253
281
  - samples/ranges.rb
254
282
  - samples/saves/_hand.rb
255
283
  - samples/saves/_portrait_landscape.rb
@@ -322,6 +350,7 @@ files:
322
350
  - docs/dsl/inches.rst
323
351
  - docs/dsl/index.rst
324
352
  - docs/dsl/line.rst
353
+ - docs/dsl/mm.rst
325
354
  - docs/dsl/png.rst
326
355
  - docs/dsl/polygon.rst
327
356
  - docs/dsl/rect.rst
@@ -395,6 +424,7 @@ files:
395
424
  - lib/squib/deck.rb
396
425
  - lib/squib/graphics/background.rb
397
426
  - lib/squib/graphics/cairo_context_wrapper.rb
427
+ - lib/squib/graphics/embedding_utils.rb
398
428
  - lib/squib/graphics/gradient_regex.rb
399
429
  - lib/squib/graphics/hand.rb
400
430
  - lib/squib/graphics/image.rb
@@ -438,8 +468,6 @@ files:
438
468
  - samples/config_text_markup.rb
439
469
  - samples/config_text_markup.yml
440
470
  - samples/custom-config.yml
441
- - samples/custom-layout.yml
442
- - samples/custom-layout2.yml
443
471
  - samples/custom_config.rb
444
472
  - samples/customconfig-imgdir/shiny-purse2.png
445
473
  - samples/customconfig-imgdir/spanner2.svg
@@ -456,8 +484,18 @@ files:
456
484
  - samples/intro/03_layout.rb
457
485
  - samples/intro/04_arrays.rb
458
486
  - samples/intro/05_excel.rb
459
- - samples/layouts.rb
460
- - samples/layouts_builtin.rb
487
+ - samples/layouts/_output/.gitignore
488
+ - samples/layouts/builtin_layouts.rb
489
+ - samples/layouts/custom-layout.yml
490
+ - samples/layouts/custom-layout2.yml
491
+ - samples/layouts/expected_layouts_builtin_economy_00.png
492
+ - samples/layouts/expected_layouts_builtin_fantasy_00.png
493
+ - samples/layouts/expected_layouts_builtin_hand_00.png
494
+ - samples/layouts/expected_layouts_builtin_playing_card_00.png
495
+ - samples/layouts/expected_layouts_builtin_tuck_box_00.png
496
+ - samples/layouts/layouts.rb
497
+ - samples/layouts/shiny-purse.png
498
+ - samples/layouts/spanner.svg
461
499
  - samples/load_images_config.yml
462
500
  - samples/offset.svg
463
501
  - samples/pokercard.png
@@ -477,6 +515,7 @@ files:
477
515
  - samples/units.rb
478
516
  - spec/api/api_data_spec.rb
479
517
  - spec/api/api_settings_spec.rb
518
+ - spec/api/api_units_spec.rb
480
519
  - spec/args/box_spec.rb
481
520
  - spec/args/draw_spec.rb
482
521
  - spec/args/embed_key_spec.rb
@@ -509,6 +548,8 @@ files:
509
548
  - spec/data/layouts/empty-rule.yml
510
549
  - spec/data/layouts/empty.yml
511
550
  - spec/data/layouts/extends-nonexists.yml
551
+ - spec/data/layouts/extends-units-mixed.yml
552
+ - spec/data/layouts/extends-units.yml
512
553
  - spec/data/layouts/hard-circular-extends.yml
513
554
  - spec/data/layouts/multi-extends-single-entry.yml
514
555
  - spec/data/layouts/multi-level-extends.yml
@@ -550,6 +591,7 @@ files:
550
591
  - spec/data/xlsx/with_macros.xlsm
551
592
  - spec/deck_spec.rb
552
593
  - spec/graphics/cairo_context_wrapper_spec.rb
594
+ - spec/graphics/embedding_utils_spec.rb
553
595
  - spec/graphics/graphics_save_doc_spec.rb
554
596
  - spec/layout_parser_spec.rb
555
597
  - spec/logger_spec.rb
@@ -641,13 +683,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
641
683
  version: '0'
642
684
  requirements: []
643
685
  rubyforge_project:
644
- rubygems_version: 2.4.5.1
686
+ rubygems_version: 2.5.1
645
687
  signing_key:
646
688
  specification_version: 2
647
689
  summary: A Ruby DSL for prototyping card games
648
690
  test_files:
649
691
  - spec/api/api_data_spec.rb
650
692
  - spec/api/api_settings_spec.rb
693
+ - spec/api/api_units_spec.rb
651
694
  - spec/args/box_spec.rb
652
695
  - spec/args/draw_spec.rb
653
696
  - spec/args/embed_key_spec.rb
@@ -680,6 +723,8 @@ test_files:
680
723
  - spec/data/layouts/empty-rule.yml
681
724
  - spec/data/layouts/empty.yml
682
725
  - spec/data/layouts/extends-nonexists.yml
726
+ - spec/data/layouts/extends-units-mixed.yml
727
+ - spec/data/layouts/extends-units.yml
683
728
  - spec/data/layouts/hard-circular-extends.yml
684
729
  - spec/data/layouts/multi-extends-single-entry.yml
685
730
  - spec/data/layouts/multi-level-extends.yml
@@ -721,6 +766,7 @@ test_files:
721
766
  - spec/data/xlsx/with_macros.xlsm
722
767
  - spec/deck_spec.rb
723
768
  - spec/graphics/cairo_context_wrapper_spec.rb
769
+ - spec/graphics/embedding_utils_spec.rb
724
770
  - spec/graphics/graphics_save_doc_spec.rb
725
771
  - spec/layout_parser_spec.rb
726
772
  - spec/logger_spec.rb