diff --git a/.gitignore b/.gitignore index 31ff215..e16a25a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ benchmarks/_output/*.pdf benchmarks/_output/ samples/_output/*.svg *.sublime-workspace +spec/samples/sanity.html \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 481a0eb..fbac2ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ Features: Bugs: * Fixed global text hinting (#63) +Compatbility: +* rsvg2 and pango updated to v2.2.5. Squib follows 2.2.x of both of those. If you run `bundle` you will automatically be upgraded. They appear to be mostly bugfix releases. + +Chores: +* Added `rake sanity` as a visual regression test to ensure the samples don't break +* Lots of automated test refactoring + Thanks to [pickfifteen](https://github.com/pickfifteen) for the bug report! ## v0.5.1 / 2015-04-13 diff --git a/README.md b/README.md index 625ac5c..b3f1256 100644 --- a/README.md +++ b/README.md @@ -523,7 +523,7 @@ If you want to test new features as I develop them, you can always point your Ge gem 'squib', :git => 'git://github.com/andymeneely/squib', :branch => "dev" ``` * The `dev` branch is where I am working on features in-process. I have not done much regression testing at this point, but would love testing feedback nonetheless. -* The `master` branch is where I consider features that are done and tested, but not released yet. +* The `master` branch is where I consider features and bug that are done and tested, but not released yet. ## Contributing @@ -535,6 +535,8 @@ If you want your code integrated: 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request +Be sure to run the unit tests and packaging with just `rake`. Also, you can check that the samples render properly with `rake sanity`. + # What's up the with the name? Truthfully, I just thought it was a cool, simple word that was not used much in the Ruby community nor the board game community. But, now that I've committed to the name, I've realized that: diff --git a/RELEASE TODO.md b/RELEASE TODO.md index dd21413..118548d 100644 --- a/RELEASE TODO.md +++ b/RELEASE TODO.md @@ -7,6 +7,7 @@ Be sure to remember to do the following for releases. (Copy into a GitHub issue) - [ ] Check that sample regression tests are all enabled - [ ] Bump version.rb - [ ] Do a full rake locally + - [ ] `rake sanity`, and check visually - [ ] Travis is passing on dev branch - [ ] Merge master branch - [ ] Create GitHub release tag diff --git a/Rakefile b/Rakefile index a49ae1a..ddc3e2c 100644 --- a/Rakefile +++ b/Rakefile @@ -40,6 +40,13 @@ task benchmark: [:install] do end end +task :sanity do + require_relative 'spec/samples/sanity.rb' + Sanity.new.run +end + +task sanity_clean: [:install, :spec, :sanity] + task :apply_google_analytics do # The string to replace in the html document. This is chosen to be the end # body
+ <% count = 0 %> + <% images.each do |exp, actual| %> +tag. So the script can be injected as the last thing in the diff --git a/spec/samples/expected/autoscale_00.png b/spec/samples/expected/autoscale_00.png new file mode 100644 index 0000000..e69b293 Binary files /dev/null and b/spec/samples/expected/autoscale_00.png differ diff --git a/spec/samples/expected/autoscale_01.png b/spec/samples/expected/autoscale_01.png new file mode 100644 index 0000000..d0a2cb0 Binary files /dev/null and b/spec/samples/expected/autoscale_01.png differ diff --git a/spec/samples/expected/autoscale_02.png b/spec/samples/expected/autoscale_02.png new file mode 100644 index 0000000..dbe1817 Binary files /dev/null and b/spec/samples/expected/autoscale_02.png differ diff --git a/spec/samples/expected/backend_00.png b/spec/samples/expected/backend_00.png new file mode 100644 index 0000000..07cd7ad Binary files /dev/null and b/spec/samples/expected/backend_00.png differ diff --git a/spec/samples/expected/backend_00.svg b/spec/samples/expected/backend_00.svg new file mode 100644 index 0000000..679f326 --- /dev/null +++ b/spec/samples/expected/backend_00.svg @@ -0,0 +1,78 @@ + + diff --git a/spec/samples/expected/backend_01.png b/spec/samples/expected/backend_01.png new file mode 100644 index 0000000..07cd7ad Binary files /dev/null and b/spec/samples/expected/backend_01.png differ diff --git a/spec/samples/expected/backend_01.svg b/spec/samples/expected/backend_01.svg new file mode 100644 index 0000000..3abf14b --- /dev/null +++ b/spec/samples/expected/backend_01.svg @@ -0,0 +1,78 @@ + + diff --git a/spec/samples/expected/basic_00.png b/spec/samples/expected/basic_00.png new file mode 100644 index 0000000..59b1a91 Binary files /dev/null and b/spec/samples/expected/basic_00.png differ diff --git a/spec/samples/expected/basic_01.png b/spec/samples/expected/basic_01.png new file mode 100644 index 0000000..e72f492 Binary files /dev/null and b/spec/samples/expected/basic_01.png differ diff --git a/spec/samples/expected/basic_02.png b/spec/samples/expected/basic_02.png new file mode 100644 index 0000000..355d5fe Binary files /dev/null and b/spec/samples/expected/basic_02.png differ diff --git a/spec/samples/expected/cairo_access_00.png b/spec/samples/expected/cairo_access_00.png new file mode 100644 index 0000000..80974e8 Binary files /dev/null and b/spec/samples/expected/cairo_access_00.png differ diff --git a/spec/samples/expected/cairo_access_01.png b/spec/samples/expected/cairo_access_01.png new file mode 100644 index 0000000..f1f77d9 Binary files /dev/null and b/spec/samples/expected/cairo_access_01.png differ diff --git a/spec/samples/expected/card_00.png b/spec/samples/expected/card_00.png new file mode 100644 index 0000000..c2c68f9 Binary files /dev/null and b/spec/samples/expected/card_00.png differ diff --git a/spec/samples/expected/card_01.png b/spec/samples/expected/card_01.png new file mode 100644 index 0000000..af4994e Binary files /dev/null and b/spec/samples/expected/card_01.png differ diff --git a/spec/samples/expected/colors_00.png b/spec/samples/expected/colors_00.png new file mode 100644 index 0000000..b03425b Binary files /dev/null and b/spec/samples/expected/colors_00.png differ diff --git a/spec/samples/expected/config_disable_text_00.png b/spec/samples/expected/config_disable_text_00.png new file mode 100644 index 0000000..45c78ce Binary files /dev/null and b/spec/samples/expected/config_disable_text_00.png differ diff --git a/spec/samples/expected/config_text_00.png b/spec/samples/expected/config_text_00.png new file mode 100644 index 0000000..64dba33 Binary files /dev/null and b/spec/samples/expected/config_text_00.png differ diff --git a/spec/samples/expected/custom-config_00.png b/spec/samples/expected/custom-config_00.png new file mode 100644 index 0000000..a2810d7 Binary files /dev/null and b/spec/samples/expected/custom-config_00.png differ diff --git a/spec/samples/expected/embed_00.png b/spec/samples/expected/embed_00.png new file mode 100644 index 0000000..5f38974 Binary files /dev/null and b/spec/samples/expected/embed_00.png differ diff --git a/spec/samples/expected/embed_multi_00.png b/spec/samples/expected/embed_multi_00.png new file mode 100644 index 0000000..e45cc9d Binary files /dev/null and b/spec/samples/expected/embed_multi_00.png differ diff --git a/spec/samples/expected/embed_multi_01.png b/spec/samples/expected/embed_multi_01.png new file mode 100644 index 0000000..b902b92 Binary files /dev/null and b/spec/samples/expected/embed_multi_01.png differ diff --git a/spec/samples/expected/embed_multi_02.png b/spec/samples/expected/embed_multi_02.png new file mode 100644 index 0000000..c878f65 Binary files /dev/null and b/spec/samples/expected/embed_multi_02.png differ diff --git a/spec/samples/expected/embed_multisheet_00.png b/spec/samples/expected/embed_multisheet_00.png new file mode 100644 index 0000000..1d636d3 Binary files /dev/null and b/spec/samples/expected/embed_multisheet_00.png differ diff --git a/spec/samples/expected/gitkeep.txt b/spec/samples/expected/gitkeep.txt new file mode 100644 index 0000000..e69de29 diff --git a/spec/samples/expected/gradient_00.png b/spec/samples/expected/gradient_00.png new file mode 100644 index 0000000..93e710e Binary files /dev/null and b/spec/samples/expected/gradient_00.png differ diff --git a/spec/samples/expected/landscape_00.png b/spec/samples/expected/landscape_00.png new file mode 100644 index 0000000..2154809 Binary files /dev/null and b/spec/samples/expected/landscape_00.png differ diff --git a/spec/samples/expected/layout2_00.png b/spec/samples/expected/layout2_00.png new file mode 100644 index 0000000..82eeab6 Binary files /dev/null and b/spec/samples/expected/layout2_00.png differ diff --git a/spec/samples/expected/layout_00.png b/spec/samples/expected/layout_00.png new file mode 100644 index 0000000..3236f8c Binary files /dev/null and b/spec/samples/expected/layout_00.png differ diff --git a/spec/samples/expected/layout_builtin_hand_00.png b/spec/samples/expected/layout_builtin_hand_00.png new file mode 100644 index 0000000..472d7aa Binary files /dev/null and b/spec/samples/expected/layout_builtin_hand_00.png differ diff --git a/spec/samples/expected/layout_builtin_playing_card_00.png b/spec/samples/expected/layout_builtin_playing_card_00.png new file mode 100644 index 0000000..30b4fcc Binary files /dev/null and b/spec/samples/expected/layout_builtin_playing_card_00.png differ diff --git a/spec/samples/expected/load_images_00.png b/spec/samples/expected/load_images_00.png new file mode 100644 index 0000000..d15343f Binary files /dev/null and b/spec/samples/expected/load_images_00.png differ diff --git a/spec/samples/expected/portrait_00.png b/spec/samples/expected/portrait_00.png new file mode 100644 index 0000000..9899846 Binary files /dev/null and b/spec/samples/expected/portrait_00.png differ diff --git a/spec/samples/expected/ranges_00.png b/spec/samples/expected/ranges_00.png new file mode 100644 index 0000000..499d360 Binary files /dev/null and b/spec/samples/expected/ranges_00.png differ diff --git a/spec/samples/expected/ranges_01.png b/spec/samples/expected/ranges_01.png new file mode 100644 index 0000000..baafa98 Binary files /dev/null and b/spec/samples/expected/ranges_01.png differ diff --git a/spec/samples/expected/ranges_02.png b/spec/samples/expected/ranges_02.png new file mode 100644 index 0000000..87e7bf8 Binary files /dev/null and b/spec/samples/expected/ranges_02.png differ diff --git a/spec/samples/expected/sample_csv_00.png b/spec/samples/expected/sample_csv_00.png new file mode 100644 index 0000000..7216d18 Binary files /dev/null and b/spec/samples/expected/sample_csv_00.png differ diff --git a/spec/samples/expected/sample_csv_01.png b/spec/samples/expected/sample_csv_01.png new file mode 100644 index 0000000..7216d18 Binary files /dev/null and b/spec/samples/expected/sample_csv_01.png differ diff --git a/spec/samples/expected/sample_excel_00.png b/spec/samples/expected/sample_excel_00.png new file mode 100644 index 0000000..ca41134 Binary files /dev/null and b/spec/samples/expected/sample_excel_00.png differ diff --git a/spec/samples/expected/sample_excel_01.png b/spec/samples/expected/sample_excel_01.png new file mode 100644 index 0000000..81806a5 Binary files /dev/null and b/spec/samples/expected/sample_excel_01.png differ diff --git a/spec/samples/expected/sample_excel_02.png b/spec/samples/expected/sample_excel_02.png new file mode 100644 index 0000000..7bafcaa Binary files /dev/null and b/spec/samples/expected/sample_excel_02.png differ diff --git a/spec/samples/expected/save_sheet_00.png b/spec/samples/expected/save_sheet_00.png new file mode 100644 index 0000000..1b57c33 Binary files /dev/null and b/spec/samples/expected/save_sheet_00.png differ diff --git a/spec/samples/expected/save_sheet_01.png b/spec/samples/expected/save_sheet_01.png new file mode 100644 index 0000000..dc2d5f6 Binary files /dev/null and b/spec/samples/expected/save_sheet_01.png differ diff --git a/spec/samples/expected/save_sheet_range_00.png b/spec/samples/expected/save_sheet_range_00.png new file mode 100644 index 0000000..2c19aca Binary files /dev/null and b/spec/samples/expected/save_sheet_range_00.png differ diff --git a/spec/samples/expected/save_sheet_range_01.png b/spec/samples/expected/save_sheet_range_01.png new file mode 100644 index 0000000..60bc5e7 Binary files /dev/null and b/spec/samples/expected/save_sheet_range_01.png differ diff --git a/spec/samples/expected/save_single_sheet_00.png b/spec/samples/expected/save_single_sheet_00.png new file mode 100644 index 0000000..d8c0a65 Binary files /dev/null and b/spec/samples/expected/save_single_sheet_00.png differ diff --git a/spec/samples/expected/saves_notrim_01.png b/spec/samples/expected/saves_notrim_01.png new file mode 100644 index 0000000..8ee4486 Binary files /dev/null and b/spec/samples/expected/saves_notrim_01.png differ diff --git a/spec/samples/expected/shape_00.png b/spec/samples/expected/shape_00.png new file mode 100644 index 0000000..da0bf1b Binary files /dev/null and b/spec/samples/expected/shape_00.png differ diff --git a/spec/samples/expected/showcase.png b/spec/samples/expected/showcase.png new file mode 100644 index 0000000..94d1cd7 Binary files /dev/null and b/spec/samples/expected/showcase.png differ diff --git a/spec/samples/expected/showcase2.png b/spec/samples/expected/showcase2.png new file mode 100644 index 0000000..ebc0718 Binary files /dev/null and b/spec/samples/expected/showcase2.png differ diff --git a/spec/samples/expected/showcase_individual_00.png b/spec/samples/expected/showcase_individual_00.png new file mode 100644 index 0000000..1514a5c Binary files /dev/null and b/spec/samples/expected/showcase_individual_00.png differ diff --git a/spec/samples/expected/showcase_individual_01.png b/spec/samples/expected/showcase_individual_01.png new file mode 100644 index 0000000..64d855e Binary files /dev/null and b/spec/samples/expected/showcase_individual_01.png differ diff --git a/spec/samples/expected/showcase_individual_02.png b/spec/samples/expected/showcase_individual_02.png new file mode 100644 index 0000000..2dfc963 Binary files /dev/null and b/spec/samples/expected/showcase_individual_02.png differ diff --git a/spec/samples/expected/showcase_individual_03.png b/spec/samples/expected/showcase_individual_03.png new file mode 100644 index 0000000..2b9a1b3 Binary files /dev/null and b/spec/samples/expected/showcase_individual_03.png differ diff --git a/spec/samples/expected/text_00.png b/spec/samples/expected/text_00.png new file mode 100644 index 0000000..dcf3510 Binary files /dev/null and b/spec/samples/expected/text_00.png differ diff --git a/spec/samples/expected/text_01.png b/spec/samples/expected/text_01.png new file mode 100644 index 0000000..7c7fc68 Binary files /dev/null and b/spec/samples/expected/text_01.png differ diff --git a/spec/samples/expected/text_02.png b/spec/samples/expected/text_02.png new file mode 100644 index 0000000..52e89ee Binary files /dev/null and b/spec/samples/expected/text_02.png differ diff --git a/spec/samples/expected/tgc_sample_00.png b/spec/samples/expected/tgc_sample_00.png new file mode 100644 index 0000000..027d7aa Binary files /dev/null and b/spec/samples/expected/tgc_sample_00.png differ diff --git a/spec/samples/expected/units_00.png b/spec/samples/expected/units_00.png new file mode 100644 index 0000000..3e733ac Binary files /dev/null and b/spec/samples/expected/units_00.png differ diff --git a/spec/samples/sanity.html.erb b/spec/samples/sanity.html.erb new file mode 100644 index 0000000..ea5c629 --- /dev/null +++ b/spec/samples/sanity.html.erb @@ -0,0 +1,33 @@ + +
+ + + +
+ + +