squib 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +162 -133
  3. data/Gemfile +4 -4
  4. data/README.md +630 -550
  5. data/RELEASE TODO.md +18 -18
  6. data/Rakefile +99 -99
  7. data/lib/squib.rb +32 -32
  8. data/lib/squib/api/background.rb +20 -19
  9. data/lib/squib/api/data.rb +100 -99
  10. data/lib/squib/api/image.rb +90 -76
  11. data/lib/squib/api/save.rb +149 -103
  12. data/lib/squib/api/settings.rb +35 -37
  13. data/lib/squib/api/shapes.rb +230 -228
  14. data/lib/squib/api/text.rb +65 -66
  15. data/lib/squib/api/text_embed.rb +96 -66
  16. data/lib/squib/args/arg_loader.rb +138 -0
  17. data/lib/squib/args/box.rb +55 -0
  18. data/lib/squib/args/card_range.rb +32 -0
  19. data/lib/squib/args/color_validator.rb +12 -0
  20. data/lib/squib/args/coords.rb +33 -0
  21. data/lib/squib/args/dir_validator.rb +16 -0
  22. data/lib/squib/args/draw.rb +92 -0
  23. data/lib/squib/args/embed_adjust.rb +25 -0
  24. data/lib/squib/args/embed_key.rb +17 -0
  25. data/lib/squib/args/hand_special.rb +37 -0
  26. data/lib/squib/args/input_file.rb +37 -0
  27. data/lib/squib/args/paint.rb +44 -0
  28. data/lib/squib/args/paragraph.rb +115 -0
  29. data/lib/squib/args/save_batch.rb +60 -0
  30. data/lib/squib/args/scale_box.rb +53 -0
  31. data/lib/squib/args/sheet.rb +72 -0
  32. data/lib/squib/args/showcase_special.rb +38 -0
  33. data/lib/squib/args/svg_special.rb +37 -0
  34. data/lib/squib/args/transform.rb +25 -0
  35. data/lib/squib/args/typographer.rb +117 -117
  36. data/lib/squib/card.rb +67 -67
  37. data/lib/squib/conf.rb +117 -111
  38. data/lib/squib/constants.rb +178 -178
  39. data/lib/squib/deck.rb +113 -111
  40. data/lib/squib/graphics/cairo_context_wrapper.rb +99 -53
  41. data/lib/squib/graphics/gradient_regex.rb +46 -46
  42. data/lib/squib/graphics/hand.rb +42 -43
  43. data/lib/squib/graphics/image.rb +76 -73
  44. data/lib/squib/graphics/save_doc.rb +103 -137
  45. data/lib/squib/graphics/save_images.rb +33 -33
  46. data/lib/squib/graphics/shapes.rb +119 -152
  47. data/lib/squib/graphics/showcase.rb +85 -88
  48. data/lib/squib/graphics/text.rb +176 -216
  49. data/lib/squib/layout_parser.rb +91 -89
  50. data/lib/squib/layouts/economy.yml +85 -0
  51. data/lib/squib/layouts/fantasy.yml +101 -0
  52. data/lib/squib/layouts/hand.yml +62 -46
  53. data/lib/squib/layouts/playing-card.yml +35 -18
  54. data/lib/squib/project_template/config.yml +45 -40
  55. data/lib/squib/version.rb +10 -10
  56. data/samples/color_shortcuts.rb +6 -0
  57. data/samples/csv_import.rb +18 -18
  58. data/samples/custom-config.yml +5 -5
  59. data/samples/custom_config.rb +18 -18
  60. data/samples/draw_shapes.rb +45 -35
  61. data/samples/embed_text.rb +88 -90
  62. data/samples/hand.rb +24 -24
  63. data/samples/layouts.rb +62 -61
  64. data/samples/layouts_builtin.rb +51 -0
  65. data/samples/load_images.rb +78 -64
  66. data/samples/ranges.rb +64 -53
  67. data/samples/sample.csv +2 -2
  68. data/samples/text_options.rb +102 -94
  69. data/spec/api/api_data_spec.rb +57 -50
  70. data/spec/api/api_settings_spec.rb +37 -17
  71. data/spec/args/box_spec.rb +127 -0
  72. data/spec/args/draw_spec.rb +95 -0
  73. data/spec/args/embed_key_spec.rb +13 -0
  74. data/spec/args/input_file_spec.rb +21 -0
  75. data/spec/args/paint_spec.rb +22 -0
  76. data/spec/args/paragraph_spec.rb +153 -0
  77. data/spec/args/range_spec.rb +36 -0
  78. data/spec/args/save_batch_spec.rb +51 -0
  79. data/spec/args/scale_box_spec.rb +71 -0
  80. data/spec/args/sheet_spec.rb +58 -0
  81. data/spec/args/showcase_special_spec.rb +15 -0
  82. data/spec/data/samples/autoscale_font.rb.txt +84 -87
  83. data/spec/data/samples/basic.rb.txt +209 -203
  84. data/spec/data/samples/cairo_access.rb.txt +2 -2
  85. data/spec/data/samples/config_text_markup.rb.txt +72 -75
  86. data/spec/data/samples/csv_import.rb.txt +76 -80
  87. data/spec/data/samples/custom_config.rb.txt +48 -49
  88. data/spec/data/samples/draw_shapes.rb.txt +100 -42
  89. data/spec/data/samples/embed_text.rb.txt +283 -295
  90. data/spec/data/samples/excel.rb.txt +162 -171
  91. data/spec/data/samples/gradients.rb.txt +79 -67
  92. data/spec/data/samples/hand.rb.txt +538 -514
  93. data/spec/data/samples/hello_world.rb.txt +36 -38
  94. data/spec/data/samples/load_images.rb.txt +41 -5
  95. data/spec/data/samples/portrait-landscape.rb.txt +49 -51
  96. data/spec/data/samples/ranges.rb.txt +460 -429
  97. data/spec/data/samples/saves.rb.txt +801 -785
  98. data/spec/data/samples/showcase.rb.txt +5910 -5906
  99. data/spec/data/samples/text_options.rb.txt +1125 -981
  100. data/spec/data/samples/tgc_proofs.rb.txt +81 -79
  101. data/spec/data/samples/units.rb.txt +18 -12
  102. data/spec/data/xlsx/with_macros.xlsm +0 -0
  103. data/spec/graphics/cairo_context_wrapper_spec.rb +84 -75
  104. data/spec/graphics/graphics_images_spec.rb +94 -85
  105. data/spec/graphics/graphics_save_doc_spec.rb +67 -65
  106. data/spec/samples/expected/hand.png +0 -0
  107. data/spec/samples/expected/hand_pretty.png +0 -0
  108. data/spec/samples/expected/layout_00.png +0 -0
  109. data/spec/samples/expected/load_images_00.png +0 -0
  110. data/spec/samples/expected/ranges_00.png +0 -0
  111. data/spec/samples/expected/shape_00.png +0 -0
  112. data/spec/samples/expected/showcase.png +0 -0
  113. data/spec/samples/expected/showcase2.png +0 -0
  114. data/spec/samples/expected/showcase_individual_00.png +0 -0
  115. data/spec/samples/expected/showcase_individual_01.png +0 -0
  116. data/spec/samples/expected/showcase_individual_02.png +0 -0
  117. data/spec/samples/expected/showcase_individual_03.png +0 -0
  118. data/spec/samples/expected/text_00.png +0 -0
  119. data/spec/samples/expected/text_01.png +0 -0
  120. data/spec/samples/expected/text_02.png +0 -0
  121. data/spec/samples/samples_regression_spec.rb +82 -82
  122. data/spec/spec_helper.rb +3 -2
  123. data/squib.gemspec +48 -48
  124. data/squib.sublime-project +42 -36
  125. metadata +61 -33
  126. data/lib/squib/input_helpers.rb +0 -238
  127. data/spec/api/api_image_spec.rb +0 -38
  128. data/spec/api/api_text_spec.rb +0 -37
  129. data/spec/graphics/graphics_shapes_spec.rb +0 -85
  130. data/spec/graphics/graphics_text_spec.rb +0 -164
  131. data/spec/input_helpers_spec.rb +0 -238
  132. data/spec/samples/expected/embed_multi_00.png +0 -0
  133. data/spec/samples/expected/embed_multi_01.png +0 -0
  134. data/spec/samples/expected/embed_multi_02.png +0 -0
  135. data/spec/samples/expected/ranges_01.png +0 -0
  136. data/spec/samples/expected/ranges_02.png +0 -0
@@ -1,65 +1,67 @@
1
- require 'spec_helper'
2
- require 'squib'
3
-
4
- describe Squib::Deck, '#save_pdf' do
5
-
6
- context 'typical inputs' do
7
- let(:cxt) { double(Cairo::Context) }
8
-
9
- def expect_card_place(x, y)
10
- expect(cxt).to receive(:translate).with(x, y).once
11
- expect(cxt).to receive(:rectangle).once
12
- expect(cxt).to receive(:clip).once
13
- expect(cxt).to receive(:set_source) # place the card
14
- .with(instance_of(Cairo::ImageSurface), 0, 0).once
15
- expect(cxt).to receive(:paint).once # paint placed card
16
- expect(cxt).to receive(:translate).with(-x,-y).once
17
- expect(cxt).to receive(:reset_clip).once
18
- end
19
-
20
- before(:each) do
21
- allow(Cairo::PDFSurface).to receive(:new).and_return(nil) #don't create the file
22
- allow(Cairo::Context).to receive(:new).and_return(cxt)
23
- allow(cxt).to receive(:antialias=)
24
- end
25
-
26
- it 'make all the expected calls on a smoke test' do
27
- num_cards = 9
28
- deck = Squib::Deck.new(cards: 9, width: 825, height: 1125)
29
- expect(deck).to receive(:dirify) { |arg| arg } #don't create the dir
30
- expect(Squib.logger).to receive(:debug).at_least(:once)
31
- expect(cxt).to receive(:scale).with(0.24, 0.24)
32
-
33
- expect_card_place(75, 75)
34
- expect_card_place(831, 75)
35
- expect_card_place(1587, 75)
36
- expect_card_place(2343, 75)
37
- expect_card_place(75, 1131)
38
- expect_card_place(831, 1131)
39
- expect_card_place(1587, 1131)
40
- expect_card_place(2343, 1131)
41
- expect(cxt).to receive(:show_page).once
42
- expect_card_place(75, 75)
43
-
44
- args = { file: 'foo.pdf', dir: '_out', margin: 75, gap: 5, trim: 37 }
45
- deck.save_pdf(args)
46
- end
47
-
48
- it 'only does the three cards on a limited range' do
49
- num_cards = 9
50
- args = { range: 2..4, file: 'foo.pdf', dir: '_out', margin: 75, gap: 5, trim: 37 }
51
- deck = Squib::Deck.new(cards: num_cards, width: 825, height: 1125)
52
- expect(Squib.logger).to receive(:debug).at_least(:once)
53
- expect(deck).to receive(:dirify) { |arg| arg } #don't create the dir
54
- expect(cxt).to receive(:scale).with(0.24, 0.24)
55
-
56
- expect_card_place(75, 75)
57
- expect_card_place(831, 75)
58
- expect_card_place(1587, 75)
59
-
60
- deck.save_pdf(args)
61
- end
62
-
63
- end
64
-
65
- end
1
+ require 'spec_helper'
2
+ require 'squib'
3
+
4
+ describe Squib::Deck, '#save_pdf' do
5
+
6
+ context 'typical inputs' do
7
+ let(:cxt) { double(Cairo::Context) }
8
+
9
+ def expect_card_place(x, y)
10
+ expect(cxt).to receive(:translate).with(x, y).once
11
+ expect(cxt).to receive(:rectangle).once
12
+ expect(cxt).to receive(:clip).once
13
+ expect(cxt).to receive(:set_source) # place the card
14
+ .with(instance_of(Cairo::ImageSurface), 0, 0).once
15
+ expect(cxt).to receive(:paint).once # paint placed card
16
+ expect(cxt).to receive(:translate).with(-x,-y).once
17
+ expect(cxt).to receive(:reset_clip).once
18
+ end
19
+
20
+ before(:each) do
21
+ allow(Cairo::PDFSurface).to receive(:new).and_return(nil) #don't create the file
22
+ allow(Cairo::Context).to receive(:new).and_return(cxt)
23
+ allow(cxt).to receive(:antialias=)
24
+ end
25
+
26
+ it 'make all the expected calls on a smoke test' do
27
+ num_cards = 9
28
+ deck = Squib::Deck.new(cards: 9, width: 825, height: 1125)
29
+ expect(Squib.logger).to receive(:debug).at_least(:once)
30
+ expect(Squib.logger).to receive(:warn).exactly(:once) #warn about making the dir
31
+ expect(Dir).to receive(:mkdir) {} # don't actually make the dir
32
+ expect(cxt).to receive(:scale).with(0.24, 0.24)
33
+
34
+ expect_card_place(75, 75)
35
+ expect_card_place(831, 75)
36
+ expect_card_place(1587, 75)
37
+ expect_card_place(2343, 75)
38
+ expect_card_place(75, 1131)
39
+ expect_card_place(831, 1131)
40
+ expect_card_place(1587, 1131)
41
+ expect_card_place(2343, 1131)
42
+ expect(cxt).to receive(:show_page).once
43
+ expect_card_place(75, 75)
44
+
45
+ args = { file: 'foo.pdf', dir: '_out', margin: 75, gap: 5, trim: 37 }
46
+ deck.save_pdf(args)
47
+ end
48
+
49
+ it 'only does the three cards on a limited range' do
50
+ num_cards = 9
51
+ args = { range: 2..4, file: 'foo.pdf', dir: '_out', margin: 75, gap: 5, trim: 37 }
52
+ deck = Squib::Deck.new(cards: num_cards, width: 825, height: 1125)
53
+ expect(Squib.logger).to receive(:debug).at_least(:once)
54
+ expect(Squib.logger).to receive(:warn).exactly(:once) #warn about making the dir
55
+ expect(Dir).to receive(:mkdir) {} # don't actually make the dir
56
+ expect(cxt).to receive(:scale).with(0.24, 0.24)
57
+
58
+ expect_card_place(75, 75)
59
+ expect_card_place(831, 75)
60
+ expect_card_place(1587, 75)
61
+
62
+ deck.save_pdf(args)
63
+ end
64
+
65
+ end
66
+
67
+ end
@@ -1,82 +1,82 @@
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
+ @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
@@ -61,6 +61,7 @@ def scrub_hex(str)
61
61
  .gsub(/#<Cairo::Matrix:.*>/,'Matrix')
62
62
  .gsub(/#<RSVG::Handle.*>/,'RSVG::Handle')
63
63
  .gsub(/#<RSpec::Mocks::Double:.*>/,'MockDouble')
64
+ .gsub(/#<Double .*>/,'MockDouble')
64
65
  .gsub(/RGB:\w{1,8}/,'RGB:')
65
66
  end
66
67
 
@@ -104,12 +105,12 @@ def mock_cairo(strio)
104
105
  set_line_width stroke fill set_source scale render_rsvg_handle circle
105
106
  triangle line_to operator= show_page clip transform mask rectangle
106
107
  reset_clip antialias= curve_to matrix= pango_layout_path stroke_preserve
107
- fill_preserve close_path).each do |m|
108
+ fill_preserve close_path set_dash set_line_cap set_line_join).each do |m|
108
109
  allow(cxt).to receive(m) { |*args| strio << scrub_hex("cairo: #{m}(#{args})\n") }
109
110
  end
110
111
 
111
112
  %w(font_description= text= width= height= wrap= ellipsize= alignment=
112
- justify= spacing= markup=).each do |m|
113
+ justify= spacing= markup= ellipsized?).each do |m|
113
114
  allow(pango).to receive(m) {|*args| strio << scrub_hex("pango: #{m}(#{args})\n") }
114
115
  end
115
116
 
@@ -1,48 +1,48 @@
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.0'
31
- spec.add_runtime_dependency 'pango', '~> 2.2.0'
32
- spec.add_runtime_dependency 'roo', '~> 2.0.0'
33
- spec.add_runtime_dependency 'rsvg2', '~> 2.2.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.2'
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 '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,36 +1,42 @@
1
- {
2
- "folders":
3
- [
4
- {
5
- "follow_symlinks": true,
6
- "path": ".",
7
- "folder_exclude_patterns": [
8
- "doc",
9
- ".yardoc",
10
- "coverage",
11
- "pkg",
12
- ]
13
- }
14
- ],
15
- "build_systems":[
16
- {"name": "rake", "shell_cmd": "rake",},
17
- {"name": "rake sanity", "shell_cmd": "rake sanity",},
18
- {"name": "rake spec_fastonly", "shell_cmd": "rake spec_fastonly",},
19
- {"name": "rake run[hand]", "shell_cmd": "rake run[hand]",},
20
- // {"name": "rake run[config_text_markup]", "shell_cmd": "rake run[config_text_markup]",},
21
- // {"name": "rake run[csv_import]", "shell_cmd": "rake run[csv_import]",},
22
- // {"name": "rake run[custom_config]", "shell_cmd": "rake run[custom_config]",},
23
- {"name": "rake run[draw_shapes]", "shell_cmd": "rake run[draw_shapes]",},
24
- // {"name": "rake run[embed_text]", "shell_cmd": "rake run[embed_text]",},
25
- // {"name": "rake run[load_images]", "shell_cmd": "rake run[load_images]",},
26
- // {"name": "rake run[text_options]", "shell_cmd": "rake run[text_options]",},
27
- // {"name": "rspec spec/args/typographer_spec.rb", "shell_cmd": "rspec spec/args/typographer_spec.rb", "working_dir": "${project_path:${folder}}"},
28
- // {"name": "rspec spec/conf_spec.rb", "shell_cmd": "rspec spec/conf_spec.rb", "working_dir": "${project_path:${folder}}"},
29
- // {"name": "rspec spec/graphics/graphics_images_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_images_spec.rb", "working_dir": "${project_path:${folder}}"},
30
- // {"name": "rspec spec/graphics/graphics_shapes_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_shapes_spec.rb", "working_dir": "${project_path:${folder}}"},
31
- // {"name": "rspec spec/graphics/graphics_shapes_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_shapes_spec.rb", "working_dir": "${project_path:${folder}}"},
32
- // {"name": "rspec spec/graphics/graphics_text_spec.rb", "shell_cmd": "rspec spec/graphics/graphics_text_spec.rb", "working_dir": "${project_path:${folder}}"},
33
- // {"name": "rspec spec/samples/samples_regression_spec.rb", "shell_cmd": "rspec spec/samples/samples_regression_spec.rb", "working_dir": "${project_path:${folder}}"},
34
- ]
35
-
36
- }
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
+ }