symilaa 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ module Symilaa
27
27
  end
28
28
 
29
29
  def get_unique_file_name path, extension, inc=0
30
- inc = inc.to_int+1
30
+ inc += 1
31
31
 
32
32
  new_path = "#{path}#{inc}#{extension}"
33
33
 
@@ -77,7 +77,7 @@ module Symilaa
77
77
  %w[chrome ie7 ie8 ie9].include? ENV['REQUIRED_BROWSER']
78
78
  end
79
79
 
80
- def chrome_or_firefox_3_5
80
+ def chrome_or_firefox_3_5?
81
81
  browser_name == 'chrome' or (browser_name == 'firefox' and browser_version == '3.5')
82
82
  end
83
83
 
@@ -97,13 +97,13 @@ module Symilaa
97
97
  @gherkin_statement.parameterize.underscore if @gherkin_statement
98
98
  end
99
99
 
100
- def create_screenshot_directory sub_directory, scenario_name
100
+ def create_screenshot_directory sub_directory
101
101
  FileUtils.mkdir_p(File.join screenshots_generated_this_run_dir, sub_directory, scenario_name)
102
102
  end
103
103
 
104
104
  def create_screenshot_filename sub_directory
105
105
  file_name = "#{browser_info.browser_name.capitalize.parameterize}#{version_if_required}_#{browser_info.platform.capitalize}_#{title}"
106
- get_unique_file_name "#{screenshots_generated_this_run_dir}/#{sub_directory}#{file_name}", '.png'
106
+ get_unique_file_name "#{screenshots_generated_this_run_dir}/#{sub_directory}#{scenario_name}/#{file_name}", '.png'
107
107
  end
108
108
 
109
109
  def save_screenshot screenshot_path
@@ -111,13 +111,13 @@ module Symilaa
111
111
  end
112
112
 
113
113
  def check_screen_against_reference_shot target_sub_directory
114
- create_directories %w[reference_screenshots screenshots_generated_this_run differences_in_screenshots_this_run]
114
+ create_directories %w[screenshots_generated_this_run differences_in_screenshots_this_run]
115
115
  create_screenshot_directory target_sub_directory
116
116
 
117
117
  generated_screenshot_path = create_screenshot_filename target_sub_directory
118
118
  screenshot_name = File.basename generated_screenshot_path
119
- reference_path = File.join reference_screenshots, target_sub_directory, screenshot_name
120
- difference_file = File.join path, "#{screenshot_name}_difference.gif"
119
+ reference_path = File.join reference_screenshots, target_sub_directory, scenario_name, screenshot_name
120
+ difference_file = "#{generated_screenshot_path}_difference.gif"
121
121
 
122
122
  save_screenshot generated_screenshot_path
123
123
 
@@ -1,3 +1,3 @@
1
1
  module Symilaa
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symilaa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-11-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
16
- requirement: &10950900 !ruby/object:Gem::Requirement
16
+ requirement: &23257040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *10950900
24
+ version_requirements: *23257040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: guard-minitest
27
- requirement: &10950400 !ruby/object:Gem::Requirement
27
+ requirement: &23256620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *10950400
35
+ version_requirements: *23256620
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &10949920 !ruby/object:Gem::Requirement
38
+ requirement: &23256040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *10949920
46
+ version_requirements: *23256040
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rb-inotify
49
- requirement: &10557620 !ruby/object:Gem::Requirement
49
+ requirement: &23255300 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *10557620
57
+ version_requirements: *23255300
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rmagick
60
- requirement: &10557040 !ruby/object:Gem::Requirement
60
+ requirement: &23254780 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *10557040
68
+ version_requirements: *23254780
69
69
  description: ! "Using the wonders of RMagick, this wonderful gem will produce a boolean
70
70
  result based on the computed similarity\n of the two images passed."
71
71
  email:
@@ -113,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  segments:
115
115
  - 0
116
- hash: 2284028661893929542
116
+ hash: 190942376827742012
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  segments:
124
124
  - 0
125
- hash: 2284028661893929542
125
+ hash: 190942376827742012
126
126
  requirements: []
127
127
  rubyforge_project: symilaa
128
128
  rubygems_version: 1.8.10