squib 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +162 -133
- data/Gemfile +4 -4
- data/README.md +630 -550
- data/RELEASE TODO.md +18 -18
- data/Rakefile +99 -99
- data/lib/squib.rb +32 -32
- data/lib/squib/api/background.rb +20 -19
- data/lib/squib/api/data.rb +100 -99
- data/lib/squib/api/image.rb +90 -76
- data/lib/squib/api/save.rb +149 -103
- data/lib/squib/api/settings.rb +35 -37
- data/lib/squib/api/shapes.rb +230 -228
- data/lib/squib/api/text.rb +65 -66
- data/lib/squib/api/text_embed.rb +96 -66
- data/lib/squib/args/arg_loader.rb +138 -0
- data/lib/squib/args/box.rb +55 -0
- data/lib/squib/args/card_range.rb +32 -0
- data/lib/squib/args/color_validator.rb +12 -0
- data/lib/squib/args/coords.rb +33 -0
- data/lib/squib/args/dir_validator.rb +16 -0
- data/lib/squib/args/draw.rb +92 -0
- data/lib/squib/args/embed_adjust.rb +25 -0
- data/lib/squib/args/embed_key.rb +17 -0
- data/lib/squib/args/hand_special.rb +37 -0
- data/lib/squib/args/input_file.rb +37 -0
- data/lib/squib/args/paint.rb +44 -0
- data/lib/squib/args/paragraph.rb +115 -0
- data/lib/squib/args/save_batch.rb +60 -0
- data/lib/squib/args/scale_box.rb +53 -0
- data/lib/squib/args/sheet.rb +72 -0
- data/lib/squib/args/showcase_special.rb +38 -0
- data/lib/squib/args/svg_special.rb +37 -0
- data/lib/squib/args/transform.rb +25 -0
- data/lib/squib/args/typographer.rb +117 -117
- data/lib/squib/card.rb +67 -67
- data/lib/squib/conf.rb +117 -111
- data/lib/squib/constants.rb +178 -178
- data/lib/squib/deck.rb +113 -111
- data/lib/squib/graphics/cairo_context_wrapper.rb +99 -53
- data/lib/squib/graphics/gradient_regex.rb +46 -46
- data/lib/squib/graphics/hand.rb +42 -43
- data/lib/squib/graphics/image.rb +76 -73
- data/lib/squib/graphics/save_doc.rb +103 -137
- data/lib/squib/graphics/save_images.rb +33 -33
- data/lib/squib/graphics/shapes.rb +119 -152
- data/lib/squib/graphics/showcase.rb +85 -88
- data/lib/squib/graphics/text.rb +176 -216
- data/lib/squib/layout_parser.rb +91 -89
- data/lib/squib/layouts/economy.yml +85 -0
- data/lib/squib/layouts/fantasy.yml +101 -0
- data/lib/squib/layouts/hand.yml +62 -46
- data/lib/squib/layouts/playing-card.yml +35 -18
- data/lib/squib/project_template/config.yml +45 -40
- data/lib/squib/version.rb +10 -10
- data/samples/color_shortcuts.rb +6 -0
- data/samples/csv_import.rb +18 -18
- data/samples/custom-config.yml +5 -5
- data/samples/custom_config.rb +18 -18
- data/samples/draw_shapes.rb +45 -35
- data/samples/embed_text.rb +88 -90
- data/samples/hand.rb +24 -24
- data/samples/layouts.rb +62 -61
- data/samples/layouts_builtin.rb +51 -0
- data/samples/load_images.rb +78 -64
- data/samples/ranges.rb +64 -53
- data/samples/sample.csv +2 -2
- data/samples/text_options.rb +102 -94
- data/spec/api/api_data_spec.rb +57 -50
- data/spec/api/api_settings_spec.rb +37 -17
- data/spec/args/box_spec.rb +127 -0
- data/spec/args/draw_spec.rb +95 -0
- data/spec/args/embed_key_spec.rb +13 -0
- data/spec/args/input_file_spec.rb +21 -0
- data/spec/args/paint_spec.rb +22 -0
- data/spec/args/paragraph_spec.rb +153 -0
- data/spec/args/range_spec.rb +36 -0
- data/spec/args/save_batch_spec.rb +51 -0
- data/spec/args/scale_box_spec.rb +71 -0
- data/spec/args/sheet_spec.rb +58 -0
- data/spec/args/showcase_special_spec.rb +15 -0
- data/spec/data/samples/autoscale_font.rb.txt +84 -87
- data/spec/data/samples/basic.rb.txt +209 -203
- data/spec/data/samples/cairo_access.rb.txt +2 -2
- data/spec/data/samples/config_text_markup.rb.txt +72 -75
- data/spec/data/samples/csv_import.rb.txt +76 -80
- data/spec/data/samples/custom_config.rb.txt +48 -49
- data/spec/data/samples/draw_shapes.rb.txt +100 -42
- data/spec/data/samples/embed_text.rb.txt +283 -295
- data/spec/data/samples/excel.rb.txt +162 -171
- data/spec/data/samples/gradients.rb.txt +79 -67
- data/spec/data/samples/hand.rb.txt +538 -514
- data/spec/data/samples/hello_world.rb.txt +36 -38
- data/spec/data/samples/load_images.rb.txt +41 -5
- data/spec/data/samples/portrait-landscape.rb.txt +49 -51
- data/spec/data/samples/ranges.rb.txt +460 -429
- data/spec/data/samples/saves.rb.txt +801 -785
- data/spec/data/samples/showcase.rb.txt +5910 -5906
- data/spec/data/samples/text_options.rb.txt +1125 -981
- data/spec/data/samples/tgc_proofs.rb.txt +81 -79
- data/spec/data/samples/units.rb.txt +18 -12
- data/spec/data/xlsx/with_macros.xlsm +0 -0
- data/spec/graphics/cairo_context_wrapper_spec.rb +84 -75
- data/spec/graphics/graphics_images_spec.rb +94 -85
- data/spec/graphics/graphics_save_doc_spec.rb +67 -65
- data/spec/samples/expected/hand.png +0 -0
- data/spec/samples/expected/hand_pretty.png +0 -0
- data/spec/samples/expected/layout_00.png +0 -0
- data/spec/samples/expected/load_images_00.png +0 -0
- data/spec/samples/expected/ranges_00.png +0 -0
- data/spec/samples/expected/shape_00.png +0 -0
- data/spec/samples/expected/showcase.png +0 -0
- data/spec/samples/expected/showcase2.png +0 -0
- data/spec/samples/expected/showcase_individual_00.png +0 -0
- data/spec/samples/expected/showcase_individual_01.png +0 -0
- data/spec/samples/expected/showcase_individual_02.png +0 -0
- data/spec/samples/expected/showcase_individual_03.png +0 -0
- data/spec/samples/expected/text_00.png +0 -0
- data/spec/samples/expected/text_01.png +0 -0
- data/spec/samples/expected/text_02.png +0 -0
- data/spec/samples/samples_regression_spec.rb +82 -82
- data/spec/spec_helper.rb +3 -2
- data/squib.gemspec +48 -48
- data/squib.sublime-project +42 -36
- metadata +61 -33
- data/lib/squib/input_helpers.rb +0 -238
- data/spec/api/api_image_spec.rb +0 -38
- data/spec/api/api_text_spec.rb +0 -37
- data/spec/graphics/graphics_shapes_spec.rb +0 -85
- data/spec/graphics/graphics_text_spec.rb +0 -164
- data/spec/input_helpers_spec.rb +0 -238
- data/spec/samples/expected/embed_multi_00.png +0 -0
- data/spec/samples/expected/embed_multi_01.png +0 -0
- data/spec/samples/expected/embed_multi_02.png +0 -0
- data/spec/samples/expected/ranges_01.png +0 -0
- 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(
|
30
|
-
expect(Squib.logger).to receive(:
|
31
|
-
expect(
|
32
|
-
|
33
|
-
|
34
|
-
expect_card_place(
|
35
|
-
expect_card_place(
|
36
|
-
expect_card_place(
|
37
|
-
expect_card_place(
|
38
|
-
expect_card_place(
|
39
|
-
expect_card_place(
|
40
|
-
expect_card_place(
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
expect(
|
54
|
-
expect(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
expect_card_place(
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -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
|
data/spec/spec_helper.rb
CHANGED
@@ -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
|
|
data/squib.gemspec
CHANGED
@@ -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.
|
31
|
-
spec.add_runtime_dependency 'pango', '~>
|
32
|
-
spec.add_runtime_dependency 'roo', '~> 2.
|
33
|
-
spec.add_runtime_dependency 'rsvg2', '~>
|
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.
|
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
|
data/squib.sublime-project
CHANGED
@@ -1,36 +1,42 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
"
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
{"name": "rake
|
19
|
-
{"name": "rake
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
{"name": "
|
24
|
-
|
25
|
-
// {"name": "rake run[
|
26
|
-
// {"name": "rake run[
|
27
|
-
// {"name": "
|
28
|
-
|
29
|
-
|
30
|
-
// {"name": "
|
31
|
-
// {"name": "
|
32
|
-
// {"name": "
|
33
|
-
// {"name": "rspec spec/
|
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
|
+
}
|