squib 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/CHANGELOG.md +16 -1
- data/appveyor.yml +2 -3
- data/lib/squib/args/sheet.rb +66 -34
- data/lib/squib/graphics/save_pdf.rb +1 -1
- data/lib/squib/import/data_frame.rb +7 -7
- data/lib/squib/version.rb +1 -1
- data/samples/autoscale_font/_autoscale_font.rb +1 -1
- data/samples/build_groups/build_groups.rb +3 -3
- data/samples/colors/_colors.rb +1 -0
- data/samples/{config_text_markup.rb → config/config_text_markup.rb} +0 -0
- data/samples/{custom_config.rb → config/custom_config.rb} +0 -0
- data/samples/{cairo_access.rb → images/_cairo_access.rb} +0 -0
- data/samples/images/_images.rb +1 -1
- data/samples/{unicode.rb → images/_unicode.rb} +0 -0
- data/samples/intro/01_hello.rb +1 -2
- data/samples/intro/02_options.rb +1 -2
- data/samples/intro/03_layout.rb +1 -2
- data/samples/intro/04_arrays.rb +1 -2
- data/samples/intro/05_excel.rb +3 -4
- data/samples/{tgc_proofs.rb → proofs/_tgc_proofs.rb} +1 -4
- data/samples/saves/_save_pdf.rb +7 -0
- data/samples/{embed_text.rb → text/_embed_text.rb} +1 -0
- data/samples/text/_text.rb +1 -1
- data/samples/{text_options.rb → text/_text_options.rb} +1 -1
- data/samples/{bug134.rb → text/bug134.rb} +0 -0
- data/squib.gemspec +17 -16
- metadata +90 -596
- data/benchmarks/antialias_best.rb +0 -13
- data/benchmarks/antialias_best.yml +0 -1
- data/benchmarks/antialias_fast.rb +0 -13
- data/benchmarks/antialias_fast.yml +0 -1
- data/benchmarks/backend-svg.yml +0 -4
- data/benchmarks/backend_memory.rb +0 -14
- data/benchmarks/backend_svg.rb +0 -14
- data/benchmarks/shiny-purse.png +0 -0
- data/benchmarks/spanner.svg +0 -91
- data/benchmarks/tons_of_png.rb +0 -6
- data/benchmarks/tons_of_svg.rb +0 -7
- data/benchmarks/tons_of_text.rb +0 -8
- data/docs/Makefile +0 -216
- data/docs/_static/css/squibdocs.css +0 -23
- data/docs/args/draw.rst +0 -36
- data/docs/args/expansion.rst +0 -3
- data/docs/args/layout.rst +0 -6
- data/docs/args/output_dir.rst +0 -6
- data/docs/args/range.rst +0 -6
- data/docs/args/transform.rst +0 -51
- data/docs/args/trim.rst +0 -11
- data/docs/args/wh.rst +0 -12
- data/docs/args/xy.rst +0 -12
- data/docs/arrays.rst +0 -80
- data/docs/backends.rst +0 -20
- data/docs/bleed.rst +0 -13
- data/docs/build_groups.rst +0 -45
- data/docs/colors.rst +0 -90
- data/docs/conf.py +0 -287
- data/docs/config.rst +0 -135
- data/docs/data.rst +0 -26
- data/docs/dsl/background.rst +0 -20
- data/docs/dsl/build.rst +0 -32
- data/docs/dsl/build_groups.rst +0 -23
- data/docs/dsl/circle.rst +0 -27
- data/docs/dsl/cm.rst +0 -19
- data/docs/dsl/configure.rst +0 -18
- data/docs/dsl/csv.rst +0 -81
- data/docs/dsl/curve.rst +0 -63
- data/docs/dsl/data_frame.rst +0 -85
- data/docs/dsl/deck.rst +0 -45
- data/docs/dsl/disable_build.rst +0 -25
- data/docs/dsl/disable_build_globally.rst +0 -46
- data/docs/dsl/ellipse.rst +0 -23
- data/docs/dsl/enable_build.rst +0 -25
- data/docs/dsl/enable_build_globally.rst +0 -44
- data/docs/dsl/grid.rst +0 -31
- data/docs/dsl/hand.rst +0 -40
- data/docs/dsl/hint.rst +0 -15
- data/docs/dsl/inches.rst +0 -19
- data/docs/dsl/index.rst +0 -9
- data/docs/dsl/line.rst +0 -52
- data/docs/dsl/mm.rst +0 -19
- data/docs/dsl/png.rst +0 -49
- data/docs/dsl/polygon.rst +0 -28
- data/docs/dsl/rect.rst +0 -22
- data/docs/dsl/save.rst +0 -23
- data/docs/dsl/save_pdf.rst +0 -89
- data/docs/dsl/save_png.rst +0 -46
- data/docs/dsl/save_sheet.rst +0 -55
- data/docs/dsl/showcase.rst +0 -76
- data/docs/dsl/star.rst +0 -35
- data/docs/dsl/svg.rst +0 -119
- data/docs/dsl/text.rst +0 -292
- data/docs/dsl/triangle.rst +0 -50
- data/docs/dsl/use_layout.rst +0 -16
- data/docs/dsl/xlsx.rst +0 -56
- data/docs/guides/game_icons.rst +0 -126
- data/docs/guides/getting-started/index.rst +0 -5
- data/docs/guides/getting-started/part_0_learning_ruby.rst +0 -145
- data/docs/guides/getting-started/part_1_zero_to_game.rst +0 -217
- data/docs/guides/getting-started/part_2_iconography.rst +0 -228
- data/docs/guides/getting-started/part_3_workflows.rst +0 -46
- data/docs/guides/getting-started/part_4_ruby_power.rst +0 -18
- data/docs/guides/git.rst +0 -14
- data/docs/guides/guard.rst +0 -84
- data/docs/guides/hello_world.rst +0 -65
- data/docs/guides/projects.rst +0 -35
- data/docs/help.rst +0 -157
- data/docs/index.rst +0 -35
- data/docs/install.rst +0 -68
- data/docs/layouts.rst +0 -290
- data/docs/learning.rst +0 -12
- data/docs/make.bat +0 -263
- data/docs/parameters.rst +0 -34
- data/docs/server.bat +0 -1
- data/docs/text_feature.rst +0 -115
- data/docs/units.rst +0 -14
- data/samples/autoscale_font/.gitignore +0 -2
- data/samples/autoscale_font/card_00_expected.png +0 -0
- data/samples/backend/.gitignore +0 -1
- data/samples/backend/_backend-config.yml +0 -5
- data/samples/backend/backend_00_expected.png +0 -0
- data/samples/backend/backend_01_expected.png +0 -0
- data/samples/backend/backend_vectorized_expected.pdf +0 -0
- data/samples/backend/backend_vectors_00_expected.svg +0 -84
- data/samples/backend/backend_vectors_01_expected.svg +0 -84
- data/samples/backend/shiny-purse.png +0 -0
- data/samples/backend/showcase_expected.png +0 -0
- data/samples/backend/spanner.svg +0 -91
- data/samples/ball.png +0 -0
- data/samples/build_groups/.gitignore +0 -1
- data/samples/build_groups/Rakefile +0 -25
- data/samples/colors/.gitignore +0 -1
- data/samples/colors/color_constants_00_expected.png +0 -0
- data/samples/colors/colors_00_expected.png +0 -0
- data/samples/colors/gradient_00_expected.png +0 -0
- data/samples/config_disable_quotes.yml +0 -3
- data/samples/config_text_markup.yml +0 -9
- data/samples/custom-config.yml +0 -5
- data/samples/customconfig-imgdir/shiny-purse2.png +0 -0
- data/samples/customconfig-imgdir/spanner2.svg +0 -91
- data/samples/data/.gitignore +0 -1
- data/samples/data/explode_quantities.xlsx +0 -0
- data/samples/data/quantity_explosion.csv +0 -3
- data/samples/data/sample.csv +0 -3
- data/samples/data/sample.xlsx +0 -0
- data/samples/data/sample_csv_00_expected.png +0 -0
- data/samples/data/sample_csv_01_expected.png +0 -0
- data/samples/data/sample_csv_qty_00_expected.png +0 -0
- data/samples/data/sample_excel_00_expected.png +0 -0
- data/samples/data/sample_excel_01_expected.png +0 -0
- data/samples/data/sample_excel_02_expected.png +0 -0
- data/samples/data/sample_excel_resources_00_expected.png +0 -0
- data/samples/data/sample_excel_resources_01_expected.png +0 -0
- data/samples/data/sample_xlsx_qty_00_expected.png +0 -0
- data/samples/glass-heart.svg +0 -52
- data/samples/grit.png +0 -0
- data/samples/images/.gitignore +0 -8
- data/samples/images/_images_00_expected.png +0 -0
- data/samples/images/angler-fish.png +0 -0
- data/samples/images/ball.png +0 -0
- data/samples/images/glass-heart.svg +0 -52
- data/samples/images/grit.png +0 -0
- data/samples/images/offset.svg +0 -85
- data/samples/images/robot-golem.svg +0 -1
- data/samples/images/shiny-purse.png +0 -0
- data/samples/images/spanner.svg +0 -91
- data/samples/images/sprites.png +0 -0
- data/samples/images/with-alpha.png +0 -0
- data/samples/intro/.gitignore +0 -2
- data/samples/intro/auto-repair.svg +0 -1
- data/samples/intro/crawling.svg +0 -1
- data/samples/intro/data.xlsx +0 -0
- data/samples/intro/humans.svg +0 -1
- data/samples/intro/ninja-mask.svg +0 -1
- data/samples/intro/part1_00_expected.png +0 -0
- data/samples/intro/part2_00_expected.png +0 -0
- data/samples/intro/part3_00_expected.png +0 -0
- data/samples/intro/part3_layout.yml +0 -34
- data/samples/intro/part4_00_expected.png +0 -0
- data/samples/intro/part4_01_expected.png +0 -0
- data/samples/intro/part5_00_expected.png +0 -0
- data/samples/intro/part5_01_expected.png +0 -0
- data/samples/intro/part5_02_expected.png +0 -0
- data/samples/intro/part5_03_expected.png +0 -0
- data/samples/intro/part5_hand_expected.png +0 -0
- data/samples/intro/part5_showcase_expected.png +0 -0
- data/samples/intro/pirate-skull.svg +0 -1
- data/samples/intro/robot-golem.svg +0 -1
- data/samples/layouts/custom-layout.yml +0 -60
- data/samples/layouts/custom-layout2.yml +0 -15
- data/samples/layouts/expected_layouts_builtin_economy_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_fantasy_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_hand_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_playing_card_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_tuck_box_00.png +0 -0
- data/samples/layouts/shiny-purse.png +0 -0
- data/samples/layouts/spanner.svg +0 -91
- data/samples/load_images_config.yml +0 -1
- data/samples/offset.svg +0 -71
- data/samples/pokercard.png +0 -0
- data/samples/project/Gemfile +0 -6
- data/samples/project/Guardfile +0 -18
- data/samples/project/Rakefile +0 -25
- data/samples/project/bw/robot-golem.svg +0 -53
- data/samples/project/color/robot-golem.svg +0 -1
- data/samples/project/config.yml +0 -2
- data/samples/project/layouts/characters.yml +0 -3
- data/samples/project/layouts/skills.yml +0 -3
- data/samples/ranges/glass-heart.svg +0 -52
- data/samples/ranges/ranges_00_expected.png +0 -0
- data/samples/saves/.gitignore +0 -1
- data/samples/saves/hand_expected.png +0 -0
- data/samples/saves/hand_pretty_expected.png +0 -0
- data/samples/saves/save-pdf-small_expected.pdf +0 -0
- data/samples/saves/save-pdf_expected.pdf +0 -0
- data/samples/saves/save_png_00_expected.png +0 -0
- data/samples/saves/save_png_trimmed_00_expected.png +0 -0
- data/samples/saves/save_sheet_00_expected.png +0 -0
- data/samples/saves/save_sheet_01_expected.png +0 -0
- data/samples/saves/save_sheet_range_00_expected.png +0 -0
- data/samples/saves/save_sheet_range_01_expected.png +0 -0
- data/samples/saves/save_single_sheet_00_expected.png +0 -0
- data/samples/saves/saves_notrim_01_expected.png +0 -0
- data/samples/saves/showcase2_expected.png +0 -0
- data/samples/saves/showcase_expected.png +0 -0
- data/samples/saves/showcase_individual_00_expected.png +0 -0
- data/samples/saves/showcase_individual_01_expected.png +0 -0
- data/samples/saves/showcase_individual_02_expected.png +0 -0
- data/samples/saves/showcase_individual_03_expected.png +0 -0
- data/samples/saves/spanner.svg +0 -91
- data/samples/shapes/.gitignore +0 -1
- data/samples/shapes/shape_00_expected.png +0 -0
- data/samples/shiny-purse.png +0 -0
- data/samples/spanner.svg +0 -91
- data/samples/sprites.png +0 -0
- data/samples/text/.gitignore +0 -2
- data/samples/text/README.md +0 -1
- data/samples/text/_text_00_expected.png +0 -0
- data/samples/text/config.yml +0 -2
- data/samples/units/units_00_expected.png +0 -0
- data/samples/units/using_units.yml +0 -10
- data/spec/api/api_data_spec.rb +0 -172
- data/spec/api/api_groups_spec.rb +0 -49
- data/spec/api/api_settings_spec.rb +0 -38
- data/spec/api/api_units_spec.rb +0 -37
- data/spec/args/box_spec.rb +0 -127
- data/spec/args/draw_spec.rb +0 -101
- data/spec/args/embed_key_spec.rb +0 -13
- data/spec/args/input_file_spec.rb +0 -21
- data/spec/args/paint_spec.rb +0 -22
- data/spec/args/paragraph_spec.rb +0 -153
- data/spec/args/range_spec.rb +0 -41
- data/spec/args/save_batch_spec.rb +0 -51
- data/spec/args/scale_box_spec.rb +0 -71
- data/spec/args/sheet_spec.rb +0 -80
- data/spec/args/showcase_special_spec.rb +0 -15
- data/spec/args/transform_spec.rb +0 -25
- data/spec/args/typographer_spec.rb +0 -71
- data/spec/args/unit_conversion_spec.rb +0 -29
- data/spec/card_spec.rb +0 -11
- data/spec/commands/new_spec.rb +0 -48
- data/spec/conf_spec.rb +0 -47
- data/spec/data/conf/basic.yml +0 -1
- data/spec/data/conf/empty.yml +0 -1
- data/spec/data/conf/unrecognized.yml +0 -4
- data/spec/data/csv/basic.csv +0 -3
- data/spec/data/csv/custom_opts.csv +0 -2
- data/spec/data/csv/dup_cols.csv +0 -3
- data/spec/data/csv/newline.csv +0 -3
- data/spec/data/csv/qty.csv +0 -3
- data/spec/data/csv/qty_named.csv +0 -3
- data/spec/data/csv/with_spaces.csv +0 -3
- data/spec/data/csv/yield.csv +0 -3
- data/spec/data/layouts/easy-circular-extends.yml +0 -6
- data/spec/data/layouts/empty-rule.yml +0 -1
- data/spec/data/layouts/empty.yml +0 -1
- data/spec/data/layouts/extends-nonexists.yml +0 -3
- data/spec/data/layouts/extends-units-mixed.yml +0 -8
- data/spec/data/layouts/extends-units.yml +0 -8
- data/spec/data/layouts/hard-circular-extends.yml +0 -9
- data/spec/data/layouts/multi-extends-single-entry.yml +0 -14
- data/spec/data/layouts/multi-level-extends.yml +0 -10
- data/spec/data/layouts/multifile-a.yml +0 -4
- data/spec/data/layouts/multifile-b.yml +0 -4
- data/spec/data/layouts/multifile-extends-a.yml +0 -8
- data/spec/data/layouts/multifile-extends-b.yml +0 -9
- data/spec/data/layouts/no-extends.yml +0 -5
- data/spec/data/layouts/pre-extends.yml +0 -7
- data/spec/data/layouts/self-circular-extends.yml +0 -3
- data/spec/data/layouts/single-extends.yml +0 -7
- data/spec/data/layouts/single-level-multi-extends.yml +0 -12
- data/spec/data/samples/autoscale_font/_autoscale_font.rb.txt +0 -133
- data/spec/data/samples/basic.rb.txt +0 -248
- data/spec/data/samples/cairo_access.rb.txt +0 -59
- data/spec/data/samples/colors/_gradients.rb.txt +0 -84
- data/spec/data/samples/config_text_markup.rb.txt +0 -74
- data/spec/data/samples/custom_config.rb.txt +0 -59
- data/spec/data/samples/data/_csv.rb.txt +0 -231
- data/spec/data/samples/data/_excel.rb.txt +0 -704
- data/spec/data/samples/embed_text.rb.txt +0 -431
- data/spec/data/samples/hello_world.rb.txt +0 -38
- data/spec/data/samples/images/_more_load_images.rb.txt +0 -335
- data/spec/data/samples/layouts.rb.txt +0 -489
- data/spec/data/samples/ranges/_ranges.rb.txt +0 -484
- data/spec/data/samples/saves/_hand.rb.txt +0 -594
- data/spec/data/samples/saves/_portrait_landscape.rb.txt +0 -57
- data/spec/data/samples/saves/_save_pdf.rb.txt +0 -1601
- data/spec/data/samples/saves/_saves.rb.txt +0 -873
- data/spec/data/samples/saves/_showcase.rb.txt +0 -5942
- data/spec/data/samples/shapes/_draw_shapes.rb.txt +0 -757
- data/spec/data/samples/text_options.rb.txt +0 -1158
- data/spec/data/samples/tgc_proofs.rb.txt +0 -102
- data/spec/data/samples/units/_units.rb.txt +0 -53
- data/spec/data/xlsx/basic.xlsx +0 -0
- data/spec/data/xlsx/explode_quantities.xlsx +0 -0
- data/spec/data/xlsx/formulas.xlsx +0 -0
- data/spec/data/xlsx/whitespace.xlsx +0 -0
- data/spec/data/xlsx/with_macros.xlsm +0 -0
- data/spec/deck_spec.rb +0 -73
- data/spec/graphics/cairo_context_wrapper_spec.rb +0 -104
- data/spec/graphics/embedding_utils_spec.rb +0 -73
- data/spec/graphics/graphics_save_doc_spec.rb +0 -74
- data/spec/import/data_frame_spec.rb +0 -251
- data/spec/layout_parser_spec.rb +0 -226
- data/spec/logger_spec.rb +0 -12
- data/spec/samples/_diffs/gitkeep.txt +0 -0
- data/spec/samples/diff-with-css.example.html +0 -39
- data/spec/samples/expected/autoscale_00.png +0 -0
- data/spec/samples/expected/autoscale_01.png +0 -0
- data/spec/samples/expected/autoscale_02.png +0 -0
- data/spec/samples/expected/backend_00.png +0 -0
- data/spec/samples/expected/backend_00.svg +0 -78
- data/spec/samples/expected/backend_01.png +0 -0
- data/spec/samples/expected/backend_01.svg +0 -78
- data/spec/samples/expected/basic_00.png +0 -0
- data/spec/samples/expected/basic_01.png +0 -0
- data/spec/samples/expected/basic_02.png +0 -0
- data/spec/samples/expected/cairo_access_00.png +0 -0
- data/spec/samples/expected/cairo_access_01.png +0 -0
- data/spec/samples/expected/card_00.png +0 -0
- data/spec/samples/expected/card_01.png +0 -0
- data/spec/samples/expected/colors_00.png +0 -0
- data/spec/samples/expected/config_disable_text_00.png +0 -0
- data/spec/samples/expected/config_text_00.png +0 -0
- data/spec/samples/expected/custom-config_00.png +0 -0
- data/spec/samples/expected/embed_00.png +0 -0
- data/spec/samples/expected/embed_multisheet_00.png +0 -0
- data/spec/samples/expected/gitkeep.txt +0 -0
- data/spec/samples/expected/gradient_00.png +0 -0
- data/spec/samples/expected/hand.png +0 -0
- data/spec/samples/expected/hand_pretty.png +0 -0
- data/spec/samples/expected/landscape_00.png +0 -0
- data/spec/samples/expected/layout2_00.png +0 -0
- data/spec/samples/expected/layout_00.png +0 -0
- data/spec/samples/expected/layout_builtin_hand_00.png +0 -0
- data/spec/samples/expected/layout_builtin_playing_card_00.png +0 -0
- data/spec/samples/expected/load_images_00.png +0 -0
- data/spec/samples/expected/portrait_00.png +0 -0
- data/spec/samples/expected/ranges_00.png +0 -0
- data/spec/samples/expected/sample_csv_00.png +0 -0
- data/spec/samples/expected/sample_csv_01.png +0 -0
- data/spec/samples/expected/sample_excel_00.png +0 -0
- data/spec/samples/expected/sample_excel_01.png +0 -0
- data/spec/samples/expected/sample_excel_02.png +0 -0
- data/spec/samples/expected/save_sheet_00.png +0 -0
- data/spec/samples/expected/save_sheet_01.png +0 -0
- data/spec/samples/expected/save_sheet_range_00.png +0 -0
- data/spec/samples/expected/save_sheet_range_01.png +0 -0
- data/spec/samples/expected/save_single_sheet_00.png +0 -0
- data/spec/samples/expected/saves_notrim_01.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/expected/tgc_sample_00.png +0 -0
- data/spec/samples/expected/units_00.png +0 -0
- data/spec/samples/run_samples_spec.rb +0 -17
- data/spec/samples/samples_regression_spec.rb +0 -71
- data/spec/samples/sanity.html.erb +0 -28
- data/spec/samples/sanity.rb +0 -70
- data/spec/sanity/.gitignore +0 -1
- data/spec/sanity/sanity.html.erb +0 -42
- data/spec/sanity/sanity_test.rb +0 -42
- data/spec/sanity/tests.yml +0 -12
- data/spec/spec_helper.rb +0 -159
data/samples/shapes/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
_output/*
|
Binary file
|
data/samples/shiny-purse.png
DELETED
Binary file
|
data/samples/spanner.svg
DELETED
@@ -1,91 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<svg
|
3
|
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
4
|
-
xmlns:cc="http://creativecommons.org/ns#"
|
5
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
6
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
8
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
9
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
10
|
-
viewBox="0 0 128 128"
|
11
|
-
id="svg2"
|
12
|
-
version="1.1"
|
13
|
-
inkscape:version="0.48.3.1 r9886"
|
14
|
-
width="100%"
|
15
|
-
height="100%"
|
16
|
-
sodipodi:docname="spanner.svg">
|
17
|
-
<metadata
|
18
|
-
id="metadata18">
|
19
|
-
<rdf:RDF>
|
20
|
-
<cc:Work
|
21
|
-
rdf:about="">
|
22
|
-
<dc:format>image/svg+xml</dc:format>
|
23
|
-
<dc:type
|
24
|
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
25
|
-
</cc:Work>
|
26
|
-
</rdf:RDF>
|
27
|
-
</metadata>
|
28
|
-
<defs
|
29
|
-
id="defs16" />
|
30
|
-
<sodipodi:namedview
|
31
|
-
pagecolor="#ffffff"
|
32
|
-
bordercolor="#666666"
|
33
|
-
borderopacity="1"
|
34
|
-
objecttolerance="10"
|
35
|
-
gridtolerance="10"
|
36
|
-
guidetolerance="10"
|
37
|
-
inkscape:pageopacity="0"
|
38
|
-
inkscape:pageshadow="2"
|
39
|
-
inkscape:window-width="1280"
|
40
|
-
inkscape:window-height="1002"
|
41
|
-
id="namedview14"
|
42
|
-
showgrid="false"
|
43
|
-
inkscape:zoom="2.8284271"
|
44
|
-
inkscape:cx="98.928938"
|
45
|
-
inkscape:cy="62.194589"
|
46
|
-
inkscape:window-x="1912"
|
47
|
-
inkscape:window-y="-8"
|
48
|
-
inkscape:window-maximized="1"
|
49
|
-
inkscape:current-layer="g3767"
|
50
|
-
inkscape:document-units="in"
|
51
|
-
units="px"
|
52
|
-
showguides="true"
|
53
|
-
inkscape:guide-bbox="true" />
|
54
|
-
<g
|
55
|
-
id="g3767"
|
56
|
-
transform="matrix(0.24961486,0,0,0.24961486,0.197194,96.049335)">
|
57
|
-
<rect
|
58
|
-
ry="67.108368"
|
59
|
-
y="-378.68747"
|
60
|
-
x="5.3126979"
|
61
|
-
height="501.3746"
|
62
|
-
width="501.3746"
|
63
|
-
id="backdrop"
|
64
|
-
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:10.62539577;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
65
|
-
inkscape:label="#rect3765" />
|
66
|
-
<path
|
67
|
-
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
68
|
-
d="M 36.267098,-7.709219 C 16.393265,5.1318032 3.2161811,27.462365 3.2161811,52.884128 c 0,39.825874 32.2852369,72.111092 72.1110909,72.111092 23.870397,0 44.964938,-11.67699 58.089488,-29.545518 -11.26063,7.275808 -24.65607,11.517748 -39.060173,11.517748 -39.825853,0 -72.11109,-32.285221 -72.11109,-72.111095 0,-15.95546 5.248882,-30.6218942 14.021601,-42.565574 z"
|
69
|
-
id="path3790"
|
70
|
-
inkscape:connector-curvature="0" />
|
71
|
-
<g
|
72
|
-
id="g6"
|
73
|
-
transform="matrix(18.68858,0,0,18.68858,-3385.6437,-2608.3849)">
|
74
|
-
<path
|
75
|
-
style="fill:#ffffff"
|
76
|
-
inkscape:connector-curvature="0"
|
77
|
-
id="path8"
|
78
|
-
d="m 192.2325,129.3203 -10,10 v 5.5625 h 5.375 l 10.0938,-10.0938 -5.4688,-5.4688 z" />
|
79
|
-
<path
|
80
|
-
style="fill:#ffffff;stroke:#000000"
|
81
|
-
inkscape:connector-curvature="0"
|
82
|
-
id="path10"
|
83
|
-
d="m 181.7796,141.8591 15.6196,-15.6178 m 3.349,3.3486 -15.8051,15.8032" />
|
84
|
-
<path
|
85
|
-
style="fill:#ffffff"
|
86
|
-
inkscape:connector-curvature="0"
|
87
|
-
id="path12"
|
88
|
-
d="m 201.2023,119.7104 c -2.8283,-0.73 -5.9623,-0.004 -8.1759,2.2097 -3.3293,3.3292 -3.3293,8.7358 -2e-5,12.065 3.32928,3.3292 8.7358,3.3292 12.065,0 2.216,-2.216 2.9436,-5.3452 2.2097,-8.1759 l -5.6348,5.6348 -4.8172,-1.2816 -1.2816,-4.8171 5.6348,-5.6348 z" />
|
89
|
-
</g>
|
90
|
-
</g>
|
91
|
-
</svg>
|
data/samples/sprites.png
DELETED
Binary file
|
data/samples/text/.gitignore
DELETED
data/samples/text/README.md
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Using the `text` method in Squib
|
Binary file
|
data/samples/text/config.yml
DELETED
Binary file
|
data/spec/api/api_data_spec.rb
DELETED
@@ -1,172 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Squib::Deck do
|
4
|
-
context '#csv' do
|
5
|
-
it 'loads basic csv data' do
|
6
|
-
expect(Squib.csv(file: csv_file('basic.csv')).to_h.to_h).to eq({
|
7
|
-
'h1' => [1, 3],
|
8
|
-
'h2' => [2, 4]
|
9
|
-
})
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'collapses duplicate columns and warns' do
|
13
|
-
expect(Squib.logger).to receive(:warn)
|
14
|
-
.with('CSV duplicated the following column keys: h1,h1')
|
15
|
-
expect(Squib.csv(file: csv_file('dup_cols.csv')).to_h.to_h).to eq({
|
16
|
-
'h1' => [1, 3],
|
17
|
-
'h2' => [5, 7],
|
18
|
-
'H2' => [6, 8],
|
19
|
-
'h3' => [9, 10],
|
20
|
-
})
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'strips spaces by default' do
|
24
|
-
expect(Squib.csv(file: csv_file('with_spaces.csv')).to_h).to eq({
|
25
|
-
'With Spaces' => ['a b c', 3],
|
26
|
-
'h2' => [2, 4],
|
27
|
-
'h3' => [3, nil]
|
28
|
-
})
|
29
|
-
end
|
30
|
-
|
31
|
-
it 'skips space stripping if told to' do
|
32
|
-
expect(Squib.csv(strip: false, file: csv_file('with_spaces.csv')).to_h).to eq({
|
33
|
-
' With Spaces ' => ['a b c ', 3],
|
34
|
-
'h2' => [2, 4],
|
35
|
-
'h3' => [3, nil]
|
36
|
-
})
|
37
|
-
end
|
38
|
-
|
39
|
-
it 'explodes quantities' do
|
40
|
-
expect(Squib.csv(file: csv_file('qty.csv')).to_h).to eq({
|
41
|
-
'Name' => %w(Ha Ha Ha Ho),
|
42
|
-
'Qty' => [3, 3, 3, 1],
|
43
|
-
})
|
44
|
-
end
|
45
|
-
|
46
|
-
it 'explodes quantities on specified header' do
|
47
|
-
expect(Squib.csv(explode: 'Quantity', file: csv_file('qty_named.csv')).to_h).to eq({
|
48
|
-
'Name' => %w(Ha Ha Ha Ho),
|
49
|
-
'Quantity' => [3, 3, 3, 1],
|
50
|
-
})
|
51
|
-
end
|
52
|
-
|
53
|
-
it 'loads inline data' do
|
54
|
-
hash = Squib.csv(data: "h1,h2\n1,2\n3,4")
|
55
|
-
expect(hash.to_h).to eq({
|
56
|
-
'h1' => [1, 3],
|
57
|
-
'h2' => [2, 4]
|
58
|
-
})
|
59
|
-
end
|
60
|
-
|
61
|
-
it 'loads csv with newlines' do
|
62
|
-
hash = Squib.csv(file: csv_file('newline.csv'))
|
63
|
-
expect(hash.to_h).to eq({
|
64
|
-
'title' => ['Foo'],
|
65
|
-
'level' => [1],
|
66
|
-
'notes' => ["a\nb"]
|
67
|
-
})
|
68
|
-
end
|
69
|
-
|
70
|
-
it 'loads custom CSV options' do
|
71
|
-
hash = Squib.csv(file: csv_file('custom_opts.csv'),
|
72
|
-
col_sep: '-', quote_char: '|')
|
73
|
-
expect(hash.to_h).to eq({
|
74
|
-
'x' => ['p'],
|
75
|
-
'y' => ['q-r']
|
76
|
-
})
|
77
|
-
end
|
78
|
-
|
79
|
-
it 'yields to block when given' do
|
80
|
-
data = Squib.csv(file: csv_file('basic.csv')) do |header, value|
|
81
|
-
case header
|
82
|
-
when 'h1'
|
83
|
-
value * 2
|
84
|
-
else
|
85
|
-
'ha'
|
86
|
-
end
|
87
|
-
end
|
88
|
-
expect(data.to_h).to eq({
|
89
|
-
'h1' => [2, 6],
|
90
|
-
'h2' => %w(ha ha),
|
91
|
-
})
|
92
|
-
end
|
93
|
-
|
94
|
-
it 'replaces newlines whenever its a string' do
|
95
|
-
data = Squib.csv(file: csv_file('yield.csv')) do |header, value|
|
96
|
-
if value.respond_to? :gsub
|
97
|
-
value.gsub '%n', "\n"
|
98
|
-
else
|
99
|
-
value
|
100
|
-
end
|
101
|
-
end
|
102
|
-
expect(data.to_h).to eq({
|
103
|
-
'a' => ["foo\nbar", 1],
|
104
|
-
'b' => [1, "blah\n"],
|
105
|
-
})
|
106
|
-
end
|
107
|
-
|
108
|
-
end
|
109
|
-
|
110
|
-
context '#xlsx' do
|
111
|
-
it 'loads basic xlsx data' do
|
112
|
-
expect(Squib.xlsx(file: xlsx_file('basic.xlsx')).to_h).to eq({
|
113
|
-
'Name' => %w(Larry Curly Mo),
|
114
|
-
'General Number' => %w(1 2 3), # general types always get loaded as strings with no conversion
|
115
|
-
'Actual Number' => [4.0, 5.0, 6.0], # numbers get auto-converted to integers
|
116
|
-
})
|
117
|
-
end
|
118
|
-
|
119
|
-
it 'loads xlsx with formulas' do
|
120
|
-
expect(Squib.xlsx(file: xlsx_file('formulas.xlsx')).to_h).to eq({
|
121
|
-
'A' => %w(1 2),
|
122
|
-
'B' => %w(3 4),
|
123
|
-
'Sum' => %w(4 6),
|
124
|
-
})
|
125
|
-
end
|
126
|
-
|
127
|
-
it 'loads xlsm files with macros' do
|
128
|
-
expect(Squib.xlsx(file: xlsx_file('with_macros.xlsm')).to_h).to eq({
|
129
|
-
'foo' => %w(8 10),
|
130
|
-
'bar' => %w(9 11),
|
131
|
-
})
|
132
|
-
end
|
133
|
-
|
134
|
-
it 'strips whitespace by default' do
|
135
|
-
expect(Squib.xlsx(file: xlsx_file('whitespace.xlsx')).to_h).to eq({
|
136
|
-
'With Whitespace' => ['foo', 'bar', 'baz'],
|
137
|
-
})
|
138
|
-
end
|
139
|
-
|
140
|
-
it 'does not strip whitespace when specified' do
|
141
|
-
expect(Squib.xlsx(file: xlsx_file('whitespace.xlsx'), strip: false).to_h).to eq({
|
142
|
-
' With Whitespace ' => ['foo ', ' bar', ' baz '],
|
143
|
-
})
|
144
|
-
end
|
145
|
-
|
146
|
-
it 'yields to block when given' do
|
147
|
-
data = Squib.xlsx(file: xlsx_file('basic.xlsx')) do |header, value|
|
148
|
-
case header
|
149
|
-
when 'Name'
|
150
|
-
'he'
|
151
|
-
when 'Actual Number'
|
152
|
-
value * 2
|
153
|
-
else
|
154
|
-
'ha'
|
155
|
-
end
|
156
|
-
end
|
157
|
-
expect(data.to_h).to eq({
|
158
|
-
'Name' => %w(he he he),
|
159
|
-
'General Number' => %w(ha ha ha),
|
160
|
-
'Actual Number' => [8.0, 10.0, 12.0],
|
161
|
-
})
|
162
|
-
end
|
163
|
-
|
164
|
-
it 'explodes quantities' do
|
165
|
-
expect(Squib.xlsx(explode: 'Qty', file: xlsx_file('explode_quantities.xlsx')).to_h).to eq({
|
166
|
-
'Name' => ['Zergling', 'Zergling', 'Zergling', 'High Templar'],
|
167
|
-
'Qty' => %w(3 3 3 1),
|
168
|
-
})
|
169
|
-
end
|
170
|
-
|
171
|
-
end
|
172
|
-
end
|
data/spec/api/api_groups_spec.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'squib'
|
3
|
-
|
4
|
-
describe :build_group do
|
5
|
-
|
6
|
-
context '#enable_build_globally' do
|
7
|
-
before(:each) { ENV['SQUIB_BUILD'] = '' }
|
8
|
-
|
9
|
-
it 'enables one group via ENV' do
|
10
|
-
Squib.enable_build_globally 'foo'
|
11
|
-
expect(ENV['SQUIB_BUILD']).to eq 'foo'
|
12
|
-
end
|
13
|
-
|
14
|
-
it 'enables two groups via ENV' do
|
15
|
-
Squib.enable_build_globally 'foo'
|
16
|
-
Squib.enable_build_globally 'bar'
|
17
|
-
expect(ENV['SQUIB_BUILD']).to eq 'foo,bar'
|
18
|
-
end
|
19
|
-
|
20
|
-
it 'uniqs the groups' do
|
21
|
-
Squib.enable_build_globally 'foo'
|
22
|
-
Squib.enable_build_globally 'bar'
|
23
|
-
Squib.enable_build_globally 'bar'
|
24
|
-
expect(ENV['SQUIB_BUILD']).to eq 'foo,bar'
|
25
|
-
end
|
26
|
-
|
27
|
-
it 'handles symbols' do
|
28
|
-
Squib.enable_build_globally :foo
|
29
|
-
expect(ENV['SQUIB_BUILD']).to eq 'foo'
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
context '#disable_build_globally' do
|
35
|
-
before(:each) { ENV['SQUIB_BUILD'] = 'foo,bar' }
|
36
|
-
|
37
|
-
it 'can be disabled globally via ENV' do
|
38
|
-
Squib.disable_build_globally 'bar'
|
39
|
-
expect(ENV['SQUIB_BUILD']).to eq 'foo'
|
40
|
-
end
|
41
|
-
|
42
|
-
it 'handles symbols' do
|
43
|
-
Squib.disable_build_globally :bar
|
44
|
-
expect(ENV['SQUIB_BUILD']).to eq 'foo'
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
|
49
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Squib::Deck do
|
4
|
-
|
5
|
-
context '#hint' do
|
6
|
-
|
7
|
-
it 'sets hinting to conf' do
|
8
|
-
mock_conf = double(Squib::Conf)
|
9
|
-
expect(mock_conf).to receive(:text_hint=).with(:cyan).once
|
10
|
-
Squib::Deck.new do
|
11
|
-
@conf = mock_conf
|
12
|
-
hint text: :cyan
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
context '#set' do
|
19
|
-
|
20
|
-
it 'puts font in @font' do
|
21
|
-
deck = Squib::Deck.new do
|
22
|
-
set font: 'foo'
|
23
|
-
end
|
24
|
-
expect(deck.font).to eq ('foo')
|
25
|
-
end
|
26
|
-
|
27
|
-
it 'raises deprecation errors on img_dir' do
|
28
|
-
set_img_dir = Proc.new do
|
29
|
-
Squib::Deck.new do
|
30
|
-
set img_dir: 'foo'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
expect { set_img_dir.call }.to raise_error('DEPRECATED: As of v0.7 img_dir is no longer supported in "set". Use config.yml instead.')
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
data/spec/api/api_units_spec.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Squib::Deck do
|
4
|
-
|
5
|
-
let(:deck) { Squib::Deck.new }
|
6
|
-
|
7
|
-
context '#in' do
|
8
|
-
it 'converts inches properly' do
|
9
|
-
expect(deck.inches(1)).to eq 300
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'handles strings too' do
|
13
|
-
expect(deck.inches('1')).to eq 300
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
context '#cm' do
|
18
|
-
it 'converts inches properly' do
|
19
|
-
expect(deck.cm(1)).to eq 118.1102361
|
20
|
-
end
|
21
|
-
|
22
|
-
it 'handles strings too' do
|
23
|
-
expect(deck.cm('1')).to eq 118.1102361
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
context '#mm' do
|
28
|
-
it 'converts inches properly' do
|
29
|
-
expect(deck.mm(1)).to eq 11.81102361
|
30
|
-
end
|
31
|
-
|
32
|
-
it 'handles strings too' do
|
33
|
-
expect(deck.mm('1')).to eq 11.81102361
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
data/spec/args/box_spec.rb
DELETED
@@ -1,127 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'squib/args/box'
|
3
|
-
|
4
|
-
describe Squib::Args::Box do
|
5
|
-
subject(:box) { Squib::Args::Box.new }
|
6
|
-
let(:expected_defaults) { { x: [0], y: [0], width: [:deck], height: [:deck] } }
|
7
|
-
|
8
|
-
it 'intitially has no params set' do
|
9
|
-
expect(box).not_to respond_to(:x, :y, :width, :height)
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'extracts the defaults from Box on an empty hash' do
|
13
|
-
box.load!({})
|
14
|
-
expect(box).to have_attributes(expected_defaults)
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'extracts what is specified and fills in defaults from Box' do
|
18
|
-
box.load!(x: 4, width: 40)
|
19
|
-
expect(box).to have_attributes(x: [4], width: [40], y: [0], height: [:deck])
|
20
|
-
end
|
21
|
-
|
22
|
-
it 'extracts the defaults from Box on an empty hash' do
|
23
|
-
box.load!({ foo: :bar })
|
24
|
-
expect(box).to have_attributes(expected_defaults)
|
25
|
-
expect(box).not_to respond_to(:foo)
|
26
|
-
end
|
27
|
-
|
28
|
-
context 'single expansion' do
|
29
|
-
let(:args) { { x: [1, 2], y: 3 } }
|
30
|
-
before(:each) { box.load!(args, expand_by: 2) }
|
31
|
-
it 'expands box' do
|
32
|
-
expect(box).to have_attributes({
|
33
|
-
x: [1, 2],
|
34
|
-
y: [3, 3],
|
35
|
-
height: [:deck, :deck],
|
36
|
-
width: [:deck, :deck]
|
37
|
-
})
|
38
|
-
end
|
39
|
-
|
40
|
-
it 'gives access to each card too' do
|
41
|
-
expect(box[0]).to have_attributes({
|
42
|
-
x: 1,
|
43
|
-
y: 3,
|
44
|
-
height: :deck,
|
45
|
-
width: :deck
|
46
|
-
})
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
context 'layouts' do
|
51
|
-
let(:layout) do
|
52
|
-
{ 'attack' => { 'x' => 50 },
|
53
|
-
'defend' => { 'x' => 60 } }
|
54
|
-
end
|
55
|
-
|
56
|
-
it 'are used when not specified' do
|
57
|
-
args = { layout: ['attack', 'defend'] }
|
58
|
-
box.load!(args, expand_by: 2, layout: layout)
|
59
|
-
expect(box).to have_attributes(
|
60
|
-
x: [50, 60], # set by layout
|
61
|
-
y: [0, 0], # Box default
|
62
|
-
)
|
63
|
-
end
|
64
|
-
|
65
|
-
it 'handle single expansion' do
|
66
|
-
args = { layout: 'attack' }
|
67
|
-
box.load!(args, expand_by: 2, layout: layout)
|
68
|
-
expect(box).to have_attributes(
|
69
|
-
x: [50, 50], # set by layout
|
70
|
-
y: [0, 0], # Box default
|
71
|
-
)
|
72
|
-
end
|
73
|
-
|
74
|
-
it 'handles symbols' do
|
75
|
-
args = { layout: :attack }
|
76
|
-
box.load!(args, expand_by: 2, layout: layout)
|
77
|
-
expect(box).to have_attributes(
|
78
|
-
x: [50, 50], # set by layout
|
79
|
-
y: [0, 0], # Box default
|
80
|
-
)
|
81
|
-
end
|
82
|
-
|
83
|
-
it 'warns on non-existent layouts' do
|
84
|
-
args = { layout: :heal }
|
85
|
-
expect(Squib.logger).to receive(:warn).with('Layout "heal" does not exist in layout file - using default instead').at_least(:once)
|
86
|
-
box.load!(args, expand_by: 2, layout: layout)
|
87
|
-
expect(box).to have_attributes(
|
88
|
-
x: [0, 0], # Box default
|
89
|
-
y: [0, 0], # Box default
|
90
|
-
)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
context 'unit conversion' do
|
95
|
-
|
96
|
-
it 'converts units on all args' do
|
97
|
-
args = { x: ['1in', '2in'], y: 300, width: '1in', height: '1in' }
|
98
|
-
box.load!(args, expand_by: 2)
|
99
|
-
expect(box).to have_attributes(
|
100
|
-
x: [300, 600],
|
101
|
-
y: [300, 300],
|
102
|
-
width: [300, 300],
|
103
|
-
height: [300, 300],
|
104
|
-
)
|
105
|
-
end
|
106
|
-
|
107
|
-
end
|
108
|
-
|
109
|
-
context 'validation' do
|
110
|
-
it 'replaces with deck width and height' do
|
111
|
-
args = { width: :deck, height: :deck }
|
112
|
-
deck = OpenStruct.new(width: 123, height: 456)
|
113
|
-
box = Squib::Args::Box.new(deck)
|
114
|
-
box.load!(args, expand_by: 1)
|
115
|
-
expect(box).to have_attributes(width: [123], height: [456])
|
116
|
-
end
|
117
|
-
|
118
|
-
it 'has radius override x_radius and y_radius' do
|
119
|
-
args = { x_radius: 1, y_radius: 2, radius: 3 }
|
120
|
-
box.load!(args, expand_by: 2)
|
121
|
-
expect(box).to have_attributes(x_radius: [3, 3], y_radius: [3, 3])
|
122
|
-
end
|
123
|
-
|
124
|
-
end
|
125
|
-
|
126
|
-
|
127
|
-
end
|