squib 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +14 -0
  3. data/.travis.yml +4 -0
  4. data/CHANGELOG.md +201 -175
  5. data/Gemfile +2 -4
  6. data/README.md +650 -645
  7. data/RELEASE TODO.md +18 -18
  8. data/Rakefile +106 -99
  9. data/appveyor.yml +29 -0
  10. data/lib/squib.rb +32 -32
  11. data/lib/squib/api/background.rb +20 -20
  12. data/lib/squib/api/data.rb +131 -131
  13. data/lib/squib/api/image.rb +108 -90
  14. data/lib/squib/api/save.rb +151 -149
  15. data/lib/squib/api/settings.rb +35 -35
  16. data/lib/squib/api/shapes.rb +255 -230
  17. data/lib/squib/api/text.rb +65 -65
  18. data/lib/squib/api/text_embed.rb +96 -96
  19. data/lib/squib/args/arg_loader.rb +138 -138
  20. data/lib/squib/args/box.rb +54 -54
  21. data/lib/squib/args/card_range.rb +32 -32
  22. data/lib/squib/args/color_validator.rb +11 -11
  23. data/lib/squib/args/coords.rb +32 -32
  24. data/lib/squib/args/dir_validator.rb +16 -16
  25. data/lib/squib/args/draw.rb +92 -92
  26. data/lib/squib/args/embed_adjust.rb +25 -25
  27. data/lib/squib/args/embed_key.rb +17 -17
  28. data/lib/squib/args/hand_special.rb +37 -37
  29. data/lib/squib/args/import.rb +39 -39
  30. data/lib/squib/args/input_file.rb +37 -37
  31. data/lib/squib/args/paint.rb +43 -43
  32. data/lib/squib/args/paragraph.rb +116 -115
  33. data/lib/squib/args/save_batch.rb +63 -60
  34. data/lib/squib/args/scale_box.rb +53 -53
  35. data/lib/squib/args/sheet.rb +72 -72
  36. data/lib/squib/args/showcase_special.rb +38 -38
  37. data/lib/squib/args/svg_special.rb +37 -37
  38. data/lib/squib/args/transform.rb +60 -24
  39. data/lib/squib/args/typographer.rb +117 -117
  40. data/lib/squib/card.rb +66 -67
  41. data/lib/squib/conf.rb +131 -117
  42. data/lib/squib/constants.rb +12 -178
  43. data/lib/squib/deck.rb +113 -113
  44. data/lib/squib/graphics/cairo_context_wrapper.rb +113 -99
  45. data/lib/squib/graphics/gradient_regex.rb +46 -46
  46. data/lib/squib/graphics/hand.rb +42 -42
  47. data/lib/squib/graphics/image.rb +103 -76
  48. data/lib/squib/graphics/save_doc.rb +103 -103
  49. data/lib/squib/graphics/save_images.rb +39 -33
  50. data/lib/squib/graphics/shapes.rb +135 -119
  51. data/lib/squib/graphics/showcase.rb +85 -85
  52. data/lib/squib/graphics/text.rb +176 -176
  53. data/lib/squib/layout_parser.rb +91 -91
  54. data/lib/squib/layouts/economy.yml +85 -85
  55. data/lib/squib/layouts/fantasy.yml +101 -101
  56. data/lib/squib/layouts/hand.yml +62 -62
  57. data/lib/squib/layouts/playing-card.yml +35 -35
  58. data/lib/squib/layouts/tuck_box.yml +45 -45
  59. data/lib/squib/project_template/IDEAS.md +22 -0
  60. data/lib/squib/project_template/PLAYTESTING.md +26 -0
  61. data/lib/squib/project_template/RULES.md +21 -0
  62. data/lib/squib/project_template/config.yml +49 -45
  63. data/lib/squib/sample_helpers.rb +34 -0
  64. data/lib/squib/version.rb +10 -10
  65. data/samples/autoscale_font/_autoscale_font.rb +29 -0
  66. data/samples/color_shortcuts.rb +6 -6
  67. data/samples/csv_import.rb +26 -26
  68. data/samples/custom-config.yml +5 -5
  69. data/samples/custom_config.rb +18 -18
  70. data/samples/draw_shapes.rb +48 -45
  71. data/samples/embed_text.rb +88 -88
  72. data/samples/excel.rb +55 -55
  73. data/samples/hand.rb +24 -24
  74. data/samples/images/_images.rb +104 -0
  75. data/samples/intro/01_hello.rb +9 -0
  76. data/samples/intro/02_options.rb +15 -0
  77. data/samples/intro/03_layout.rb +12 -0
  78. data/samples/intro/04_arrays.rb +16 -0
  79. data/samples/intro/05_excel.rb +15 -0
  80. data/samples/layouts.rb +62 -62
  81. data/samples/layouts_builtin.rb +51 -51
  82. data/samples/load_images.rb +99 -78
  83. data/samples/load_images_config.yml +1 -0
  84. data/samples/quantity_explosion.csv +2 -2
  85. data/samples/ranges.rb +64 -64
  86. data/samples/sample.csv +2 -2
  87. data/samples/saves.rb +9 -1
  88. data/samples/sprites.png +0 -0
  89. data/samples/text/_text.rb +46 -0
  90. data/samples/text_options.rb +102 -102
  91. data/spec/api/api_data_spec.rb +117 -117
  92. data/spec/api/api_settings_spec.rb +37 -37
  93. data/spec/args/box_spec.rb +127 -127
  94. data/spec/args/draw_spec.rb +101 -95
  95. data/spec/args/embed_key_spec.rb +13 -13
  96. data/spec/args/input_file_spec.rb +21 -21
  97. data/spec/args/paint_spec.rb +21 -21
  98. data/spec/args/paragraph_spec.rb +152 -152
  99. data/spec/args/range_spec.rb +40 -40
  100. data/spec/args/save_batch_spec.rb +51 -51
  101. data/spec/args/scale_box_spec.rb +71 -71
  102. data/spec/args/sheet_spec.rb +58 -58
  103. data/spec/args/showcase_special_spec.rb +15 -15
  104. data/spec/args/transform_spec.rb +25 -0
  105. data/spec/card_spec.rb +11 -0
  106. data/spec/conf_spec.rb +13 -3
  107. data/spec/data/conf/unrecognized.yml +4 -0
  108. data/spec/data/csv/qty.csv +2 -2
  109. data/spec/data/csv/qty_named.csv +2 -2
  110. data/spec/data/csv/with_spaces.csv +2 -2
  111. data/spec/data/samples/autoscale_font.rb.txt +84 -84
  112. data/spec/data/samples/basic.rb.txt +227 -209
  113. data/spec/data/samples/config_text_markup.rb.txt +72 -72
  114. data/spec/data/samples/csv_import.rb.txt +213 -213
  115. data/spec/data/samples/custom_config.rb.txt +57 -48
  116. data/spec/data/samples/draw_shapes.rb.txt +555 -3
  117. data/spec/data/samples/embed_text.rb.txt +283 -283
  118. data/spec/data/samples/excel.rb.txt +661 -661
  119. data/spec/data/samples/gradients.rb.txt +77 -79
  120. data/spec/data/samples/hand.rb.txt +538 -538
  121. data/spec/data/samples/hello_world.rb.txt +36 -36
  122. data/spec/data/samples/load_images.rb.txt +170 -0
  123. data/spec/data/samples/portrait-landscape.rb.txt +51 -49
  124. data/spec/data/samples/ranges.rb.txt +472 -460
  125. data/spec/data/samples/saves.rb.txt +810 -801
  126. data/spec/data/samples/showcase.rb.txt +5926 -5910
  127. data/spec/data/samples/text_options.rb.txt +1125 -1125
  128. data/spec/data/samples/tgc_proofs.rb.txt +95 -81
  129. data/spec/graphics/cairo_context_wrapper_spec.rb +104 -84
  130. data/spec/graphics/graphics_save_doc_spec.rb +67 -67
  131. data/spec/samples/diff-with-css.example.html +39 -0
  132. data/spec/samples/expected/load_images_00.png +0 -0
  133. data/spec/samples/expected/shape_00.png +0 -0
  134. data/spec/samples/run_samples_spec.rb +17 -0
  135. data/spec/samples/samples_regression_spec.rb +72 -82
  136. data/spec/spec_helper.rb +9 -1
  137. data/squib.gemspec +49 -48
  138. data/squib.sublime-project +42 -42
  139. metadata +94 -48
  140. data/spec/graphics/graphics_images_spec.rb +0 -94
@@ -0,0 +1,39 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width">
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7
+ <title>Diff with CSS Example</title>
8
+ <style>
9
+ body{
10
+ background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHElEQVQYlWO4ePFiAzGY4eLFiw0MxIBRhVRRCADsljgKUbBKPgAAAABJRU5ErkJggg==) repeat;
11
+ }
12
+ img{
13
+ height: 4in;
14
+ }
15
+ .diff {
16
+ width: 3in;
17
+ height: 4in;
18
+ background-repeat: none, none;
19
+ background-size: contain, contain;
20
+ background-blend-mode: difference;
21
+ display: inline-table;
22
+ }
23
+
24
+ </style>
25
+ </head>
26
+ <body>
27
+
28
+ <img src="expected/autoscale_00.png"/>
29
+ <img src="expected/autoscale_01.png"/>
30
+ <style>
31
+ .mine{
32
+ background-image: url(expected/autoscale_00.png), url(expected/autoscale_01.png);"
33
+ }
34
+ </style>
35
+ <div class="diff mine"/>
36
+
37
+
38
+ </body>
39
+ </html>
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+ require 'squib'
3
+ require 'pp'
4
+
5
+ describe "Squib samples" do
6
+
7
+ Dir["#{samples_dir}/**/*.rb"].each do |sample|
8
+ it "executes #{sample} with no errors", slow: true do
9
+ allow(Squib.logger).to receive(:warn) {}
10
+ allow(ProgressBar).to receive(:create).and_return(Squib::DoNothing.new)
11
+ Dir.chdir(File.dirname(sample)) do
12
+ load sample
13
+ end
14
+ end
15
+ end
16
+
17
+ end
@@ -1,82 +1,72 @@
1
- require 'spec_helper'
2
- require 'squib'
3
- require 'pp'
4
-
5
- describe "Squib samples" do
6
- @SAMPLES_DIR = "#{File.expand_path(File.dirname(__FILE__))}/../../samples/"
7
- let(:samples_dir) { "#{File.expand_path(File.dirname(__FILE__))}/../../samples/" }
8
-
9
- around(:each) do |example|
10
- Dir.chdir(samples_dir) do
11
- example.run
12
- end
13
- end
14
-
15
- Dir["#{@SAMPLES_DIR}/**/*.rb"].each do |sample|
16
- it "should execute #{sample} with no errors", slow: true do
17
- allow(Squib.logger).to receive(:warn) {}
18
- allow(ProgressBar).to receive(:create).and_return(Squib::DoNothing.new)
19
- load sample
20
- end
21
- end
22
-
23
- # This test could use some explanation
24
- # Much of the development of Squib has been sample-driven. Every time I want
25
- # new syntax or feature, I write a sample, get it working, and then write
26
- # tests for boundary cases in the unit tests.
27
- #
28
- # This makes documentation much easier and example-driven.
29
- # ...but I want to use those samples for regression & integration tests too.
30
- #
31
- # The above test is a good smoke test, but it just looks for exceptions.
32
- # What this set of tests do is run the samples again, but mocking out Cairo,
33
- # Pango, RSVG, and any other dependencies. We log those API calls and store
34
- # them in a super-verbose string. We compare our runs against what happened
35
- # before.
36
- #
37
- # Thus, if we ever change anything that results in a ANY change to our
38
- # regression logs, then these tests will fail. If it's SURPRISING, then we
39
- # caught an integration bug. If it's not, just update and overwrite the logs.
40
- #
41
- # So it's understood that you should have to periodically enable the
42
- # overwrite_sample method below to store the new regression log. Just make
43
- # sure you inspect the change and make sure it makes sense with the change
44
- # you made to the samples or Squib.
45
- # FOR NOW!! These two I can't get working on Travis, so I'm disabling
46
- # Has to do with UTF-8 encoding of a special characters
47
- # layouts.rb
48
- # These are samples that don't really need a regression log
49
- # colors.rb
50
- # unicode.rb
51
- %w( autoscale_font.rb
52
- basic.rb
53
- cairo_access.rb
54
- csv_import.rb
55
- config_text_markup.rb
56
- custom_config.rb
57
- draw_shapes.rb
58
- embed_text.rb
59
- excel.rb
60
- gradients.rb
61
- hand.rb
62
- hello_world.rb
63
- load_images.rb
64
- portrait-landscape.rb
65
- ranges.rb
66
- saves.rb
67
- showcase.rb
68
- text_options.rb
69
- tgc_proofs.rb
70
- units.rb
71
- ).each do |sample|
72
- it "has not changed for #{sample}", slow: true do
73
- log = StringIO.new
74
- mock_cairo(log)
75
- load sample
76
- # overwrite_sample(sample, log) # Use TEMPORARILY once happy with the new sample log
77
- test_file_str = File.open(sample_regression_file(sample), 'r:UTF-8').read
78
- expect(log.string).to eq(test_file_str)
79
- end
80
- end
81
-
82
- end
1
+ require 'spec_helper'
2
+ require 'squib'
3
+ require 'pp'
4
+
5
+ describe "Squib samples" do
6
+
7
+ around(:each) do |example|
8
+ Dir.chdir(samples_dir) do
9
+ example.run
10
+ end
11
+ end
12
+
13
+ # This test could use some explanation
14
+ # Much of the development of Squib has been sample-driven. Every time I want
15
+ # new syntax or feature, I write a sample, get it working, and then write
16
+ # tests for boundary cases in the unit tests.
17
+ #
18
+ # This makes documentation much easier and example-driven.
19
+ # ...but I want to use those samples for regression & integration tests too.
20
+ #
21
+ # The above test is a good smoke test, but it just looks for exceptions.
22
+ # What this set of tests do is run the samples again, but mocking out Cairo,
23
+ # Pango, RSVG, and any other dependencies. We log those API calls and store
24
+ # them in a super-verbose string. We compare our runs against what happened
25
+ # before.
26
+ #
27
+ # Thus, if we ever change anything that results in a ANY change to our
28
+ # regression logs, then these tests will fail. If it's SURPRISING, then we
29
+ # caught an integration bug. If it's not, just update and overwrite the logs.
30
+ #
31
+ # So it's understood that you should have to periodically enable the
32
+ # overwrite_sample method below to store the new regression log. Just make
33
+ # sure you inspect the change and make sure it makes sense with the change
34
+ # you made to the samples or Squib.
35
+ # FOR NOW!! These two I can't get working on Travis, so I'm disabling
36
+ # Has to do with UTF-8 encoding of a special characters
37
+ # layouts.rb
38
+ # These are samples that don't really need a regression log
39
+ # colors.rb
40
+ # unicode.rb
41
+ %w( autoscale_font.rb
42
+ basic.rb
43
+ cairo_access.rb
44
+ csv_import.rb
45
+ config_text_markup.rb
46
+ custom_config.rb
47
+ draw_shapes.rb
48
+ embed_text.rb
49
+ excel.rb
50
+ gradients.rb
51
+ hand.rb
52
+ hello_world.rb
53
+ load_images.rb
54
+ portrait-landscape.rb
55
+ ranges.rb
56
+ saves.rb
57
+ showcase.rb
58
+ text_options.rb
59
+ tgc_proofs.rb
60
+ units.rb
61
+ ).each do |sample|
62
+ it "has not changed for #{sample}", slow: true do
63
+ log = StringIO.new
64
+ mock_cairo(log)
65
+ load sample
66
+ # overwrite_sample(sample, log) # Use TEMPORARILY once happy with the new sample log
67
+ test_file_str = File.open(sample_regression_file(sample), 'r:UTF-8').read
68
+ expect(log.string).to eq(test_file_str)
69
+ end
70
+ end
71
+
72
+ end
@@ -1,6 +1,6 @@
1
1
  require 'simplecov'
2
2
  require 'coveralls'
3
- require 'byebug'
3
+ # require 'byebug'
4
4
 
5
5
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
6
6
  SimpleCov::Formatter::HTMLFormatter,
@@ -16,6 +16,14 @@ RSpec.configure do |config|
16
16
  end
17
17
  end
18
18
 
19
+ def tmp_dir
20
+ "#{File.expand_path(File.dirname(__FILE__))}/../tmp"
21
+ end
22
+
23
+ def samples_dir
24
+ File.expand_path("#{File.dirname(__FILE__)}/../samples")
25
+ end
26
+
19
27
  def layout_file(str)
20
28
  "#{File.expand_path(File.dirname(__FILE__))}/data/layouts/#{str}"
21
29
  end
@@ -1,48 +1,49 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'squib/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.specification_version = 2 if spec.respond_to? :specification_version=
8
- spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version=
9
- spec.rubygems_version = '2.2.2'
10
- spec.required_ruby_version = '>= 2.0.0'
11
-
12
- spec.name = 'squib'
13
- spec.version = Squib::VERSION
14
- spec.license = 'MIT'
15
-
16
- spec.summary = 'A Ruby DSL for prototyping card games'
17
- spec.description = 'Squib is a Ruby DSL for prototyping card games'
18
- spec.authors = ['Andy Meneely']
19
- spec.email = 'playconfidencegames@gmail.com'
20
- spec.homepage = 'https://github.com/andymeneely/squib'
21
-
22
- spec.rdoc_options = ['--charset=UTF-8']
23
- spec.extra_rdoc_files = Dir['README.md', 'samples/**/*.rb']
24
-
25
- spec.files = `git ls-files -z`.split("\x0")
26
- spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
27
- spec.test_files = spec.files.grep(/^(test|spec|features)\//)
28
- spec.require_paths = ['lib']
29
-
30
- spec.add_runtime_dependency 'cairo', '~> 1.14.3'
31
- spec.add_runtime_dependency 'pango', '~> 3.0.1'
32
- spec.add_runtime_dependency 'roo', '~> 2.1.0'
33
- spec.add_runtime_dependency 'rsvg2', '~> 3.0.0'
34
- spec.add_runtime_dependency 'mercenary', '~> 0.3.4'
35
- spec.add_runtime_dependency 'ruby-progressbar', '~> 1.6'
36
-
37
- spec.add_development_dependency 'bundler', '~> 1.6'
38
- spec.add_development_dependency 'rake'
39
- spec.add_development_dependency 'rspec', '~> 3.3'
40
- spec.add_development_dependency 'redcarpet', '~> 3.1'
41
- spec.add_development_dependency 'github-markup', '~> 1.3'
42
- # spec.add_development_dependency 'yard', '~> 0.8'
43
- spec.add_development_dependency 'coveralls'
44
- spec.add_development_dependency 'byebug'
45
- spec.add_development_dependency 'launchy'
46
- spec.add_development_dependency 'game_icons'
47
-
48
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'squib/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.specification_version = 2 if spec.respond_to? :specification_version=
8
+ spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version=
9
+ spec.rubygems_version = '2.2.2'
10
+ spec.required_ruby_version = '>= 2.0.0'
11
+
12
+ spec.name = 'squib'
13
+ spec.version = Squib::VERSION
14
+ spec.license = 'MIT'
15
+
16
+ spec.summary = 'A Ruby DSL for prototyping card games'
17
+ spec.description = 'Squib is a Ruby DSL for prototyping card games'
18
+ spec.authors = ['Andy Meneely']
19
+ spec.email = 'playconfidencegames@gmail.com'
20
+ spec.homepage = 'https://github.com/andymeneely/squib'
21
+
22
+ spec.rdoc_options = ['--charset=UTF-8']
23
+ spec.extra_rdoc_files = Dir['README.md', 'samples/**/*.rb']
24
+
25
+ spec.files = `git ls-files -z`.split("\x0")
26
+ spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
27
+ spec.test_files = spec.files.grep(/^(test|spec|features)\//)
28
+ spec.require_paths = ['lib']
29
+
30
+ spec.add_runtime_dependency 'cairo', '~> 1.14.3'
31
+ spec.add_runtime_dependency 'pango', '~> 3.0.1'
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'
35
+ spec.add_runtime_dependency 'mercenary', '~> 0.3.4'
36
+ spec.add_runtime_dependency 'ruby-progressbar', '~> 1.6'
37
+
38
+ spec.add_development_dependency 'bundler', '~> 1.6'
39
+ spec.add_development_dependency 'rake'
40
+ spec.add_development_dependency 'rspec', '~> 3.3'
41
+ spec.add_development_dependency 'redcarpet', '~> 3.1'
42
+ spec.add_development_dependency 'github-markup', '~> 1.3'
43
+ spec.add_development_dependency 'yard', '~> 0.8'
44
+ spec.add_development_dependency 'coveralls'
45
+ # spec.add_development_dependency 'byebug'
46
+ spec.add_development_dependency 'launchy'
47
+ spec.add_development_dependency 'game_icons'
48
+
49
+ end
@@ -1,42 +1,42 @@
1
- {
2
- "tab_size": 2,
3
- "translate_tabs_to_spaces": true,
4
- "folders":
5
- [
6
- {
7
- "follow_symlinks": true,
8
- "path": ".",
9
- "folder_exclude_patterns": [
10
- "doc",
11
- ".yardoc",
12
- "coverage",
13
- "pkg",
14
- ]
15
- }
16
- ],
17
- "build_systems":[
18
- {"name": "rake", "shell_cmd": "rake",},
19
- {"name": "rake sanity", "shell_cmd": "rake sanity",},
20
- {"name": "rake spec_fastonly", "shell_cmd": "rake spec_fastonly",},
21
- {"name": "rake run[text_options]", "shell_cmd": "rake run[text_options]",},
22
- {"name": "rake run[hand]", "shell_cmd": "rake run[hand]",},
23
- {"name": "rspec spec/args/paragraph_spec.rb", "shell_cmd": "rspec spec/args/paragraph_spec.rb", "working_dir": "${project_path:${folder}}"},
24
- {"name": "rspec spec/args/*_spec.rb", "shell_cmd": "rspec spec/args/*_spec.rb", "working_dir": "${project_path:${folder}}"},
25
- // {"name": "rake run[config_text_markup]", "shell_cmd": "rake run[config_text_markup]",},
26
- // {"name": "rake run[csv_import]", "shell_cmd": "rake run[csv_import]",},
27
- // {"name": "rake run[custom_config]", "shell_cmd": "rake run[custom_config]",},
28
- {"name": "rake run[draw_shapes]", "shell_cmd": "rake run[draw_shapes]",},
29
- {"name": "rake run[layouts]", "shell_cmd": "rake run[layouts]",},
30
- // {"name": "rake run[embed_text]", "shell_cmd": "rake run[embed_text]",},
31
- // {"name": "rake run[load_images]", "shell_cmd": "rake run[load_images]",},
32
- // {"name": "rake run[text_options]", "shell_cmd": "rake run[text_options]",},
33
- // {"name": "rspec spec/args/typographer_spec.rb", "shell_cmd": "rspec spec/args/typographer_spec.rb", "working_dir": "${project_path:${folder}}"},
34
- // {"name": "rspec spec/conf_spec.rb", "shell_cmd": "rspec spec/conf_spec.rb", "working_dir": "${project_path:${folder}}"},
35
- // {"name": "rspec spec/graphics/graphics_images_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_images_spec.rb", "working_dir": "${project_path:${folder}}"},
36
- // {"name": "rspec spec/graphics/graphics_shapes_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_shapes_spec.rb", "working_dir": "${project_path:${folder}}"},
37
- // {"name": "rspec spec/graphics/graphics_shapes_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_shapes_spec.rb", "working_dir": "${project_path:${folder}}"},
38
- // {"name": "rspec spec/graphics/graphics_text_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_text_spec.rb", "working_dir": "${project_path:${folder}}"},
39
- // {"name": "rspec spec/samples/samples_regression_spec.rb", "shell_cmd": "rspec spec/samples/samples_regression_spec.rb", "working_dir": "${project_path:${folder}}"},
40
- ]
41
-
42
- }
1
+ {
2
+ "tab_size": 2,
3
+ "translate_tabs_to_spaces": true,
4
+ "folders":
5
+ [
6
+ {
7
+ "follow_symlinks": true,
8
+ "path": ".",
9
+ "folder_exclude_patterns": [
10
+ "doc",
11
+ ".yardoc",
12
+ "coverage",
13
+ "pkg",
14
+ ]
15
+ }
16
+ ],
17
+ "build_systems":[
18
+ {"name": "rake", "shell_cmd": "rake",},
19
+ {"name": "rake sanity", "shell_cmd": "rake sanity",},
20
+ {"name": "rake spec_fastonly", "shell_cmd": "rake spec_fastonly",},
21
+ {"name": "rake run[text_options]", "shell_cmd": "rake run[text_options]",},
22
+ {"name": "rake run[hand]", "shell_cmd": "rake run[hand]",},
23
+ {"name": "rspec spec/args/paragraph_spec.rb", "shell_cmd": "rspec spec/args/paragraph_spec.rb", "working_dir": "${project_path:${folder}}"},
24
+ {"name": "rspec spec/args/*_spec.rb", "shell_cmd": "rspec spec/args/*_spec.rb", "working_dir": "${project_path:${folder}}"},
25
+ // {"name": "rake run[config_text_markup]", "shell_cmd": "rake run[config_text_markup]",},
26
+ // {"name": "rake run[csv_import]", "shell_cmd": "rake run[csv_import]",},
27
+ // {"name": "rake run[custom_config]", "shell_cmd": "rake run[custom_config]",},
28
+ {"name": "rake run[draw_shapes]", "shell_cmd": "rake run[draw_shapes]",},
29
+ {"name": "rake run[layouts]", "shell_cmd": "rake run[layouts]",},
30
+ // {"name": "rake run[embed_text]", "shell_cmd": "rake run[embed_text]",},
31
+ // {"name": "rake run[load_images]", "shell_cmd": "rake run[load_images]",},
32
+ // {"name": "rake run[text_options]", "shell_cmd": "rake run[text_options]",},
33
+ // {"name": "rspec spec/args/typographer_spec.rb", "shell_cmd": "rspec spec/args/typographer_spec.rb", "working_dir": "${project_path:${folder}}"},
34
+ // {"name": "rspec spec/conf_spec.rb", "shell_cmd": "rspec spec/conf_spec.rb", "working_dir": "${project_path:${folder}}"},
35
+ // {"name": "rspec spec/graphics/graphics_images_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_images_spec.rb", "working_dir": "${project_path:${folder}}"},
36
+ // {"name": "rspec spec/graphics/graphics_shapes_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_shapes_spec.rb", "working_dir": "${project_path:${folder}}"},
37
+ // {"name": "rspec spec/graphics/graphics_shapes_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_shapes_spec.rb", "working_dir": "${project_path:${folder}}"},
38
+ // {"name": "rspec spec/graphics/graphics_text_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_text_spec.rb", "working_dir": "${project_path:${folder}}"},
39
+ // {"name": "rspec spec/samples/samples_regression_spec.rb", "shell_cmd": "rspec spec/samples/samples_regression_spec.rb", "working_dir": "${project_path:${folder}}"},
40
+ ]
41
+
42
+ }
metadata CHANGED
@@ -1,223 +1,237 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.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: 2015-10-26 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cairo
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.14.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.14.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pango
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 3.0.1
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
40
  version: 3.0.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.6.7
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.6.7
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: roo
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ~>
59
+ - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: 2.1.0
61
+ version: 2.3.0
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ~>
66
+ - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: 2.1.0
68
+ version: 2.3.0
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rsvg2
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - ~>
73
+ - - "~>"
60
74
  - !ruby/object:Gem::Version
61
75
  version: 3.0.0
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ~>
80
+ - - "~>"
67
81
  - !ruby/object:Gem::Version
68
82
  version: 3.0.0
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: mercenary
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - ~>
87
+ - - "~>"
74
88
  - !ruby/object:Gem::Version
75
89
  version: 0.3.4
76
90
  type: :runtime
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - ~>
94
+ - - "~>"
81
95
  - !ruby/object:Gem::Version
82
96
  version: 0.3.4
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: ruby-progressbar
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ~>
101
+ - - "~>"
88
102
  - !ruby/object:Gem::Version
89
103
  version: '1.6'
90
104
  type: :runtime
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ~>
108
+ - - "~>"
95
109
  - !ruby/object:Gem::Version
96
110
  version: '1.6'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: bundler
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - ~>
115
+ - - "~>"
102
116
  - !ruby/object:Gem::Version
103
117
  version: '1.6'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - ~>
122
+ - - "~>"
109
123
  - !ruby/object:Gem::Version
110
124
  version: '1.6'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rake
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
- - - '>='
129
+ - - ">="
116
130
  - !ruby/object:Gem::Version
117
131
  version: '0'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
- - - '>='
136
+ - - ">="
123
137
  - !ruby/object:Gem::Version
124
138
  version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: rspec
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
- - - ~>
143
+ - - "~>"
130
144
  - !ruby/object:Gem::Version
131
145
  version: '3.3'
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
- - - ~>
150
+ - - "~>"
137
151
  - !ruby/object:Gem::Version
138
152
  version: '3.3'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: redcarpet
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - ~>
157
+ - - "~>"
144
158
  - !ruby/object:Gem::Version
145
159
  version: '3.1'
146
160
  type: :development
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
- - - ~>
164
+ - - "~>"
151
165
  - !ruby/object:Gem::Version
152
166
  version: '3.1'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: github-markup
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
- - - ~>
171
+ - - "~>"
158
172
  - !ruby/object:Gem::Version
159
173
  version: '1.3'
160
174
  type: :development
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
- - - ~>
178
+ - - "~>"
165
179
  - !ruby/object:Gem::Version
166
180
  version: '1.3'
167
181
  - !ruby/object:Gem::Dependency
168
- name: coveralls
182
+ name: yard
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
- - - '>='
185
+ - - "~>"
172
186
  - !ruby/object:Gem::Version
173
- version: '0'
187
+ version: '0.8'
174
188
  type: :development
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
- - - '>='
192
+ - - "~>"
179
193
  - !ruby/object:Gem::Version
180
- version: '0'
194
+ version: '0.8'
181
195
  - !ruby/object:Gem::Dependency
182
- name: byebug
196
+ name: coveralls
183
197
  requirement: !ruby/object:Gem::Requirement
184
198
  requirements:
185
- - - '>='
199
+ - - ">="
186
200
  - !ruby/object:Gem::Version
187
201
  version: '0'
188
202
  type: :development
189
203
  prerelease: false
190
204
  version_requirements: !ruby/object:Gem::Requirement
191
205
  requirements:
192
- - - '>='
206
+ - - ">="
193
207
  - !ruby/object:Gem::Version
194
208
  version: '0'
195
209
  - !ruby/object:Gem::Dependency
196
210
  name: launchy
197
211
  requirement: !ruby/object:Gem::Requirement
198
212
  requirements:
199
- - - '>='
213
+ - - ">="
200
214
  - !ruby/object:Gem::Version
201
215
  version: '0'
202
216
  type: :development
203
217
  prerelease: false
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
- - - '>='
220
+ - - ">="
207
221
  - !ruby/object:Gem::Version
208
222
  version: '0'
209
223
  - !ruby/object:Gem::Dependency
210
224
  name: game_icons
211
225
  requirement: !ruby/object:Gem::Requirement
212
226
  requirements:
213
- - - '>='
227
+ - - ">="
214
228
  - !ruby/object:Gem::Version
215
229
  version: '0'
216
230
  type: :development
217
231
  prerelease: false
218
232
  version_requirements: !ruby/object:Gem::Requirement
219
233
  requirements:
220
- - - '>='
234
+ - - ">="
221
235
  - !ruby/object:Gem::Version
222
236
  version: '0'
223
237
  description: Squib is a Ruby DSL for prototyping card games
@@ -227,6 +241,7 @@ executables:
227
241
  extensions: []
228
242
  extra_rdoc_files:
229
243
  - README.md
244
+ - samples/autoscale_font/_autoscale_font.rb
230
245
  - samples/autoscale_font.rb
231
246
  - samples/backend.rb
232
247
  - samples/basic.rb
@@ -242,6 +257,12 @@ extra_rdoc_files:
242
257
  - samples/gradients.rb
243
258
  - samples/hand.rb
244
259
  - samples/hello_world.rb
260
+ - samples/images/_images.rb
261
+ - samples/intro/01_hello.rb
262
+ - samples/intro/02_options.rb
263
+ - samples/intro/03_layout.rb
264
+ - samples/intro/04_arrays.rb
265
+ - samples/intro/05_excel.rb
245
266
  - samples/layouts.rb
246
267
  - samples/layouts_builtin.rb
247
268
  - samples/load_images.rb
@@ -249,21 +270,24 @@ extra_rdoc_files:
249
270
  - samples/ranges.rb
250
271
  - samples/saves.rb
251
272
  - samples/showcase.rb
273
+ - samples/text/_text.rb
252
274
  - samples/text_options.rb
253
275
  - samples/tgc_proofs.rb
254
276
  - samples/unicode.rb
255
277
  - samples/units.rb
256
278
  files:
257
- - .gitignore
258
- - .rspec
259
- - .travis.yml
260
- - .yardopts
279
+ - ".gitignore"
280
+ - ".gitmodules"
281
+ - ".rspec"
282
+ - ".travis.yml"
283
+ - ".yardopts"
261
284
  - CHANGELOG.md
262
285
  - Gemfile
263
286
  - LICENSE.txt
264
287
  - README.md
265
288
  - RELEASE TODO.md
266
289
  - Rakefile
290
+ - appveyor.yml
267
291
  - benchmarks/antialias_best.rb
268
292
  - benchmarks/antialias_best.yml
269
293
  - benchmarks/antialias_fast.rb
@@ -334,15 +358,20 @@ files:
334
358
  - lib/squib/project_template/.gitignore
335
359
  - lib/squib/project_template/ABOUT.md
336
360
  - lib/squib/project_template/Gemfile
361
+ - lib/squib/project_template/IDEAS.md
362
+ - lib/squib/project_template/PLAYTESTING.md
337
363
  - lib/squib/project_template/PNP NOTES.md
364
+ - lib/squib/project_template/RULES.md
338
365
  - lib/squib/project_template/Rakefile
339
366
  - lib/squib/project_template/_output/gitkeep.txt
340
367
  - lib/squib/project_template/config.yml
341
368
  - lib/squib/project_template/deck.rb
342
369
  - lib/squib/project_template/layout.yml
370
+ - lib/squib/sample_helpers.rb
343
371
  - lib/squib/version.rb
344
372
  - samples/_output/gitkeep.txt
345
373
  - samples/autoscale_font.rb
374
+ - samples/autoscale_font/_autoscale_font.rb
346
375
  - samples/backend-config.yml
347
376
  - samples/backend.rb
348
377
  - samples/ball.png
@@ -369,9 +398,16 @@ files:
369
398
  - samples/grit.png
370
399
  - samples/hand.rb
371
400
  - samples/hello_world.rb
401
+ - samples/images/_images.rb
402
+ - samples/intro/01_hello.rb
403
+ - samples/intro/02_options.rb
404
+ - samples/intro/03_layout.rb
405
+ - samples/intro/04_arrays.rb
406
+ - samples/intro/05_excel.rb
372
407
  - samples/layouts.rb
373
408
  - samples/layouts_builtin.rb
374
409
  - samples/load_images.rb
410
+ - samples/load_images_config.yml
375
411
  - samples/offset.svg
376
412
  - samples/pokercard.png
377
413
  - samples/portrait-landscape.rb
@@ -383,6 +419,8 @@ files:
383
419
  - samples/shiny-purse.png
384
420
  - samples/showcase.rb
385
421
  - samples/spanner.svg
422
+ - samples/sprites.png
423
+ - samples/text/_text.rb
386
424
  - samples/text_options.rb
387
425
  - samples/tgc_proofs.rb
388
426
  - samples/unicode.rb
@@ -400,12 +438,15 @@ files:
400
438
  - spec/args/scale_box_spec.rb
401
439
  - spec/args/sheet_spec.rb
402
440
  - spec/args/showcase_special_spec.rb
441
+ - spec/args/transform_spec.rb
403
442
  - spec/args/typographer_spec.rb
404
443
  - spec/args/unit_conversion_spec.rb
444
+ - spec/card_spec.rb
405
445
  - spec/commands/new_spec.rb
406
446
  - spec/conf_spec.rb
407
447
  - spec/data/conf/basic.yml
408
448
  - spec/data/conf/empty.yml
449
+ - spec/data/conf/unrecognized.yml
409
450
  - spec/data/csv/basic.csv
410
451
  - spec/data/csv/dup_cols.csv
411
452
  - spec/data/csv/qty.csv
@@ -456,11 +497,11 @@ files:
456
497
  - spec/data/xlsx/with_macros.xlsm
457
498
  - spec/deck_spec.rb
458
499
  - spec/graphics/cairo_context_wrapper_spec.rb
459
- - spec/graphics/graphics_images_spec.rb
460
500
  - spec/graphics/graphics_save_doc_spec.rb
461
501
  - spec/layout_parser_spec.rb
462
502
  - spec/logger_spec.rb
463
503
  - spec/samples/_diffs/gitkeep.txt
504
+ - spec/samples/diff-with-css.example.html
464
505
  - spec/samples/expected/autoscale_00.png
465
506
  - spec/samples/expected/autoscale_01.png
466
507
  - spec/samples/expected/autoscale_02.png
@@ -516,6 +557,7 @@ files:
516
557
  - spec/samples/expected/text_02.png
517
558
  - spec/samples/expected/tgc_sample_00.png
518
559
  - spec/samples/expected/units_00.png
560
+ - spec/samples/run_samples_spec.rb
519
561
  - spec/samples/samples_regression_spec.rb
520
562
  - spec/samples/sanity.html.erb
521
563
  - spec/samples/sanity.rb
@@ -528,22 +570,22 @@ licenses:
528
570
  metadata: {}
529
571
  post_install_message:
530
572
  rdoc_options:
531
- - --charset=UTF-8
573
+ - "--charset=UTF-8"
532
574
  require_paths:
533
575
  - lib
534
576
  required_ruby_version: !ruby/object:Gem::Requirement
535
577
  requirements:
536
- - - '>='
578
+ - - ">="
537
579
  - !ruby/object:Gem::Version
538
580
  version: 2.0.0
539
581
  required_rubygems_version: !ruby/object:Gem::Requirement
540
582
  requirements:
541
- - - '>='
583
+ - - ">="
542
584
  - !ruby/object:Gem::Version
543
585
  version: '0'
544
586
  requirements: []
545
587
  rubyforge_project:
546
- rubygems_version: 2.4.5
588
+ rubygems_version: 2.5.1
547
589
  signing_key:
548
590
  specification_version: 2
549
591
  summary: A Ruby DSL for prototyping card games
@@ -561,12 +603,15 @@ test_files:
561
603
  - spec/args/scale_box_spec.rb
562
604
  - spec/args/sheet_spec.rb
563
605
  - spec/args/showcase_special_spec.rb
606
+ - spec/args/transform_spec.rb
564
607
  - spec/args/typographer_spec.rb
565
608
  - spec/args/unit_conversion_spec.rb
609
+ - spec/card_spec.rb
566
610
  - spec/commands/new_spec.rb
567
611
  - spec/conf_spec.rb
568
612
  - spec/data/conf/basic.yml
569
613
  - spec/data/conf/empty.yml
614
+ - spec/data/conf/unrecognized.yml
570
615
  - spec/data/csv/basic.csv
571
616
  - spec/data/csv/dup_cols.csv
572
617
  - spec/data/csv/qty.csv
@@ -617,11 +662,11 @@ test_files:
617
662
  - spec/data/xlsx/with_macros.xlsm
618
663
  - spec/deck_spec.rb
619
664
  - spec/graphics/cairo_context_wrapper_spec.rb
620
- - spec/graphics/graphics_images_spec.rb
621
665
  - spec/graphics/graphics_save_doc_spec.rb
622
666
  - spec/layout_parser_spec.rb
623
667
  - spec/logger_spec.rb
624
668
  - spec/samples/_diffs/gitkeep.txt
669
+ - spec/samples/diff-with-css.example.html
625
670
  - spec/samples/expected/autoscale_00.png
626
671
  - spec/samples/expected/autoscale_01.png
627
672
  - spec/samples/expected/autoscale_02.png
@@ -677,6 +722,7 @@ test_files:
677
722
  - spec/samples/expected/text_02.png
678
723
  - spec/samples/expected/tgc_sample_00.png
679
724
  - spec/samples/expected/units_00.png
725
+ - spec/samples/run_samples_spec.rb
680
726
  - spec/samples/samples_regression_spec.rb
681
727
  - spec/samples/sanity.html.erb
682
728
  - spec/samples/sanity.rb