compatriot 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c679503194671c201eedbdd42419d1cd838ff9e1
4
- data.tar.gz: d98c18230b4dcb22f1d9e7fc5a1e609ee9d3b356
3
+ metadata.gz: afbb7d347ac7f62d9d76171d015598375dacc3ea
4
+ data.tar.gz: 4ed581e50ef32ee9bfb09600548a4cb68569f04e
5
5
  SHA512:
6
- metadata.gz: 7a6de3a5cca25b8251c4ca1e2d5e2b045e81bdbb37dcd0119796988f3dfab4cce8e9b45f8752a2e438833982dd1304b3bc0864d14aae6d68cf5801cd90766305
7
- data.tar.gz: c776231462be785e72b1275dadeb973bc577a39fb365fdb2f825625d7c2252647d72fd405d48d010c46aa003837f1771d22cf535e924d895079b22a709f71436
6
+ metadata.gz: 6892b84bcd419b50f9b44e599a5f7507e344b000c73d17a2ffeafc3d12a345e21d9eb4c3c2b417f5d7aefd5f60870e7789e5a20fc9a103bb020c75596261f130
7
+ data.tar.gz: 7ce449cbfb6c95b6ba3a1286dcf362c81291924b42b39bbd9897440dcde59a346cb48913dbef8ede55b8c612c99e16172042a0fa31a55dddaed34357e9e3541c
@@ -51,6 +51,10 @@ module Compatriot
51
51
  def filepath_for_screenshot(type, filename)
52
52
  File.expand_path(self.screenshot_directory + '/' + type + '/' + filename)
53
53
  end
54
+
55
+ def relative_filepath_for_screenshot(type, filename)
56
+ self.screenshot_directory + '/' + type + '/' + filename
57
+ end
54
58
  end
55
59
 
56
60
  Compatriot.configure do |config|
@@ -25,9 +25,9 @@ module Compatriot
25
25
  label: test.location + ':' + title + ':' + test.compatriot_percentages_changed[j].to_s + "% difference",
26
26
  percentage_changed: test.compatriot_percentages_changed[j],
27
27
  status: test.passed? ? "passed" : "failed",
28
- control_image_path: Compatriot.filepath_for_screenshot('control', Compatriot.filename_for_test(test, title)),
29
- variable_image_path: Compatriot.filepath_for_screenshot('variable', Compatriot.filename_for_test(test, title)),
30
- diff_image_path: Compatriot.filepath_for_screenshot('diffs', Compatriot.filename_for_test(test, title)),
28
+ control_image_path: Compatriot.relative_filepath_for_screenshot('control', Compatriot.filename_for_test(test, title)),
29
+ variable_image_path: Compatriot.relative_filepath_for_screenshot('variable', Compatriot.filename_for_test(test, title)),
30
+ diff_image_path: Compatriot.relative_filepath_for_screenshot('diffs', Compatriot.filename_for_test(test, title)),
31
31
  }
32
32
  formated_tests << formated_test
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module Compatriot
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -41,9 +41,9 @@ describe Compatriot::Reporter do
41
41
  compatriot_percentages_changed: [ 0.02 ],
42
42
  passed?: true)]
43
43
  formated_test = Compatriot::Reporter.new(tests).format(tests)[0]
44
- formated_test[:control_image_path].must_equal File.expand_path("./tmp/test/screenshots/control/mocha::mock_viewing_a_specific_report_did_stuff.png")
45
- formated_test[:variable_image_path].must_equal File.expand_path("./tmp/test/screenshots/variable/mocha::mock_viewing_a_specific_report_did_stuff.png")
46
- formated_test[:diff_image_path].must_equal File.expand_path("./tmp/test/screenshots/diffs/mocha::mock_viewing_a_specific_report_did_stuff.png")
44
+ formated_test[:control_image_path].must_equal './tmp/test/screenshots/control/mocha::mock_viewing_a_specific_report_did_stuff.png'
45
+ formated_test[:variable_image_path].must_equal './tmp/test/screenshots/variable/mocha::mock_viewing_a_specific_report_did_stuff.png'
46
+ formated_test[:diff_image_path].must_equal './tmp/test/screenshots/diffs/mocha::mock_viewing_a_specific_report_did_stuff.png'
47
47
  end
48
48
  end
49
49
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compatriot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carol (Nichols || Goulding)
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-12 00:00:00.000000000 Z
12
+ date: 2016-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest