Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 8 additions & 44 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,24 @@ require "rake/testtask"

task default: :test

# THE 3.0 SPLIT.
# `rake test:canonical` is gone with the thing it was defined against: it
# was "test/**/*_test.rb minus test/legacy/", i.e. exactly what had to keep
# passing once the v1 compatibility trees were deleted. 2.1 deleted them and
# test/legacy/ with them, so that task became a second name for `rake test`.
#
# test/legacy/ holds every test whose SUBJECT is the v1 compatibility surface
# -- the old Capybara::Screenshot / CapybaraScreenshotDiff namespaces, their
# deprecation warnings, and the gates that keep lib/capybara* alias-only.
# Those tests guard the v1 contract for the whole 2.x line, so they stay and
# stay green; in 3.0 they are deleted by the same commit that deletes what
# they test:
#
# git rm -r lib/capybara* lib/capybara_screenshot_diff.rb \
# lib/snap_diff/legacy_shims.rb lib/snap_diff/deprecation.rb \
# test/legacy
#
# A directory rather than a list in this file: there is nothing to keep in
# sync, and the deletion is one `git rm -r`.
#
# `rake test` -- everything, today's gate.
# `rake test:canonical` -- exactly what must still pass once test/legacy and
# the v1 trees are gone. THE 3.0 GATE.
# `rake test:unit` -- unit-sized tests; test/legacy is unit-sized too
# (legacy/ marks lifetime, not kind), so it is in.
LEGACY_SURFACE_TESTS = "test/legacy/**/*_test.rb"

# The split still has a live guard, on the other side: canonical tests must
# not grow legacy references BACK (test/unit/canonical_suite_has_no_legacy_
# refs_test.rb, and its lib/ twin core_tree_has_no_legacy_deps_test.rb).
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
end

desc "Run every test that must survive the 3.0 deletion of the v1 surface"
Rake::TestTask.new("test:canonical") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"].exclude(LEGACY_SURFACE_TESTS)
end

Rake::TestTask.new("test:unit") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/unit/**/*_test.rb", LEGACY_SURFACE_TESTS]
t.test_files = FileList["test/unit/**/*_test.rb"]
end

Rake::TestTask.new("test:integration") do |t|
Expand Down Expand Up @@ -79,17 +57,3 @@ task "clobber" do
puts "Cleanup tmp/"
FileUtils.rm_rf(Dir["./tmp/*"])
end

task "test:benchmark" do
require_relative "scripts/benchmark/find_region_benchmark"
benchmark = Capybara::Screenshot::Diff::Drivers::FindRegionBenchmark.new

puts "For Medium Screen Size: 800x600"
benchmark.for_medium_size_screens

puts ""
puts "*" * 100

puts "For Small Screen Size: 80x60"
benchmark.for_small_images
end
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

require "bundler/setup"
require "capybara/screenshot/diff"
require "snap_diff"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Expand Down
3 changes: 0 additions & 3 deletions lib/capybara-screenshot-diff.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/capybara/screenshot/diff.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/annotation_service.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/area_calculator.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/browser_helpers.rb

This file was deleted.

21 changes: 0 additions & 21 deletions lib/capybara/screenshot/diff/config_legacy.rb

This file was deleted.

7 changes: 0 additions & 7 deletions lib/capybara/screenshot/diff/cucumber.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/difference.rb

This file was deleted.

8 changes: 0 additions & 8 deletions lib/capybara/screenshot/diff/drivers.rb

This file was deleted.

9 changes: 0 additions & 9 deletions lib/capybara/screenshot/diff/drivers/base_driver.rb

This file was deleted.

7 changes: 0 additions & 7 deletions lib/capybara/screenshot/diff/drivers/chunky_png_driver.rb

This file was deleted.

6 changes: 0 additions & 6 deletions lib/capybara/screenshot/diff/drivers/vips_driver.rb

This file was deleted.

16 changes: 0 additions & 16 deletions lib/capybara/screenshot/diff/image_compare.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/image_preprocessor.rb

This file was deleted.

7 changes: 0 additions & 7 deletions lib/capybara/screenshot/diff/os.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/region.rb

This file was deleted.

8 changes: 0 additions & 8 deletions lib/capybara/screenshot/diff/reporters/default.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/screenshot_matcher.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/screenshoter.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/stable_screenshoter.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/utils.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara/screenshot/diff/vcs.rb

This file was deleted.

10 changes: 0 additions & 10 deletions lib/capybara/screenshot/diff/version.rb

This file was deleted.

45 changes: 0 additions & 45 deletions lib/capybara_screenshot_diff.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara_screenshot_diff/attempts_reporter.rb

This file was deleted.

8 changes: 0 additions & 8 deletions lib/capybara_screenshot_diff/cucumber.rb

This file was deleted.

12 changes: 0 additions & 12 deletions lib/capybara_screenshot_diff/dsl.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara_screenshot_diff/error_with_filtered_backtrace.rb

This file was deleted.

14 changes: 0 additions & 14 deletions lib/capybara_screenshot_diff/minitest.rb

This file was deleted.

5 changes: 0 additions & 5 deletions lib/capybara_screenshot_diff/reporters/html.rb

This file was deleted.

8 changes: 0 additions & 8 deletions lib/capybara_screenshot_diff/rspec.rb

This file was deleted.

Loading