cucumber-screenshot 0.3.2 → 0.3.3

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.
@@ -6,7 +6,7 @@ by your Rails application as it runs your Cucumber/Webrat features.
6
6
  It uses WebKit to generate the PNG screenshots and so they are only available for OS X.
7
7
 
8
8
  If you want to take bitmap screenshots on any other platform then take a look at
9
- [this example]http://github.com/aslakhellesoy/cucumber/blob/master/examples/watir/features/support/screenshots.rb
9
+ {this example}[http://github.com/aslakhellesoy/cucumber/blob/master/examples/watir/features/support/screenshots.rb]
10
10
  from Cucumber.
11
11
 
12
12
  == Requirements
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ task :default => ['spec']
25
25
  spec = Gem::Specification.new do |s|
26
26
  # Change these as appropriate
27
27
  s.name = 'cucumber-screenshot'
28
- s.version = '0.3.2'
28
+ s.version = '0.3.3'
29
29
  s.summary = 'Extension for Cucumber to capture HTML snapshots/PNG screenshots of your app'
30
30
 
31
31
  s.description = 'Extension for Cucumber (http://cukes.info/) that makes it easy to take HTML snapshots and also to use Webkit to capture PNG screenshots of your web application during tests'
@@ -57,9 +57,7 @@ You will also need to install the snapurl gem
57
57
 
58
58
  gem install snapurl --version=0.3.0
59
59
 
60
- '
61
-
62
- s.requirements = ['Mac OS X 10.5 or later', 'RubyCocoa']
60
+ For details about how to set up your features to make use of cucumber-screenshot see http://github.com/mocoso/cucumber-screenshot'
63
61
  end
64
62
 
65
63
  # This task actually builds the gem. We also regenerate a static
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Joel Chippindale"]
9
- s.date = %q{2010-05-19}
9
+ s.date = %q{2010-05-21}
10
10
  s.description = %q{Extension for Cucumber (http://cukes.info/) that makes it easy to take HTML snapshots and also to use Webkit to capture PNG screenshots of your web application during tests}
11
11
  s.email = %q{joel.chippindale@gmail.com}
12
12
  s.extra_rdoc_files = ["README.rdoc"]
@@ -18,18 +18,17 @@ You will also need to install the snapurl gem
18
18
 
19
19
  gem install snapurl --version=0.3.0
20
20
 
21
- }
21
+ For details about how to set up your features to make use of cucumber-screenshot see http://github.com/mocoso/cucumber-screenshot}
22
22
  s.rdoc_options = ["--main", "README.rdoc"]
23
23
  s.require_paths = ["lib"]
24
- s.requirements = ["Mac OS X 10.5 or later", "RubyCocoa"]
25
- s.rubygems_version = %q{1.3.6}
24
+ s.rubygems_version = %q{1.3.7}
26
25
  s.summary = %q{Extension for Cucumber to capture HTML snapshots/PNG screenshots of your app}
27
26
 
28
27
  if s.respond_to? :specification_version then
29
28
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
30
29
  s.specification_version = 3
31
30
 
32
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
31
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
33
32
  s.add_runtime_dependency(%q<cucumber>, [">= 0.6.2"])
34
33
  s.add_runtime_dependency(%q<webrat>, [">= 0.7.0"])
35
34
  s.add_development_dependency(%q<rspec>, [">= 0"])
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>currentDocument</key>
6
- <string>spec/cucumber_screenshot/world_spec.rb</string>
6
+ <string>lib/cucumber_screenshot/world.rb</string>
7
7
  <key>documents</key>
8
8
  <array>
9
9
  <dict>
@@ -28,7 +28,7 @@
28
28
  <key>column</key>
29
29
  <integer>0</integer>
30
30
  <key>line</key>
31
- <integer>0</integer>
31
+ <integer>6</integer>
32
32
  </dict>
33
33
  <key>firstVisibleColumn</key>
34
34
  <integer>0</integer>
@@ -82,41 +82,54 @@
82
82
  <key>caret</key>
83
83
  <dict>
84
84
  <key>column</key>
85
- <integer>10</integer>
85
+ <integer>1</integer>
86
86
  <key>line</key>
87
- <integer>75</integer>
87
+ <integer>16</integer>
88
88
  </dict>
89
+ <key>columnSelection</key>
90
+ <false/>
89
91
  <key>firstVisibleColumn</key>
90
92
  <integer>0</integer>
91
93
  <key>firstVisibleLine</key>
92
- <integer>32</integer>
94
+ <integer>0</integer>
95
+ <key>selectFrom</key>
96
+ <dict>
97
+ <key>column</key>
98
+ <integer>11</integer>
99
+ <key>line</key>
100
+ <integer>18</integer>
101
+ </dict>
102
+ <key>selectTo</key>
103
+ <dict>
104
+ <key>column</key>
105
+ <integer>1</integer>
106
+ <key>line</key>
107
+ <integer>16</integer>
108
+ </dict>
93
109
  </dict>
94
110
  <key>spec/cucumber_screenshot/world_spec.rb</key>
95
111
  <dict>
96
112
  <key>caret</key>
97
113
  <dict>
98
114
  <key>column</key>
99
- <integer>32</integer>
115
+ <integer>50</integer>
100
116
  <key>line</key>
101
- <integer>127</integer>
117
+ <integer>117</integer>
102
118
  </dict>
103
119
  <key>firstVisibleColumn</key>
104
120
  <integer>0</integer>
105
121
  <key>firstVisibleLine</key>
106
- <integer>77</integer>
122
+ <integer>80</integer>
107
123
  </dict>
108
124
  </dict>
109
125
  <key>openDocuments</key>
110
126
  <array>
127
+ <string>CHANGELOG.mdown</string>
111
128
  <string>lib/cucumber_screenshot/world.rb</string>
112
- <string>Rakefile</string>
113
- <string>README.rdoc</string>
114
- <string>lib/cucumber_screenshot.rb</string>
115
- <string>spec/cucumber_screenshot/world_spec.rb</string>
116
129
  </array>
117
130
  <key>showFileHierarchyDrawer</key>
118
131
  <false/>
119
132
  <key>windowFrame</key>
120
- <string>{{300, 111}, {1519, 1028}}</string>
133
+ <string>{{50, 0}, {1519, 1028}}</string>
121
134
  </dict>
122
135
  </plist>
@@ -7,7 +7,7 @@ require 'nokogiri'
7
7
  require 'cucumber_screenshot/world'
8
8
 
9
9
  module CucumberScreenshot
10
- VERSION = '0.3.2'
10
+ VERSION = '0.3.3'
11
11
 
12
12
  begin
13
13
  require 'snapurl'
@@ -49,10 +49,13 @@ module CucumberScreenshot
49
49
  def rewrite_local_urls(response_html) # :nodoc:
50
50
  if base_url
51
51
  doc = Nokogiri::HTML::Document.parse response_html
52
- base = Nokogiri::HTML::DocumentFragment.parse "<base href=\"#{base_url}\">"
53
- head = doc.xpath("//head").first
54
- head.child && head.child.add_previous_sibling(base)
55
- doc.to_html
52
+ if head = doc.xpath("//head").first
53
+ base = Nokogiri::HTML::DocumentFragment.parse "<base href=\"#{base_url}\">"
54
+ head.child && head.child.add_previous_sibling(base)
55
+ doc.to_html
56
+ else
57
+ response_html
58
+ end
56
59
  elsif doc_root
57
60
  # TODO: replace with nokogiri calls
58
61
  response_html.gsub(/"\/([^"]*)"/, %{"#{doc_root}} + '/\1"')
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-screenshot
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 21
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 3
8
- - 2
9
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
10
11
  platform: ruby
11
12
  authors:
12
13
  - Joel Chippindale
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-05-19 00:00:00 +01:00
18
+ date: 2010-08-19 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: cucumber
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 3
27
30
  segments:
28
31
  - 0
29
32
  - 6
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: webrat
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ">="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 3
41
46
  segments:
42
47
  - 0
43
48
  - 7
@@ -49,9 +54,11 @@ dependencies:
49
54
  name: rspec
50
55
  prerelease: false
51
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
52
58
  requirements:
53
59
  - - ">="
54
60
  - !ruby/object:Gem::Version
61
+ hash: 3
55
62
  segments:
56
63
  - 0
57
64
  version: "0"
@@ -77,37 +84,41 @@ has_rdoc: true
77
84
  homepage: http://github.com/mocoso/cucumber-screenshot
78
85
  licenses: []
79
86
 
80
- post_install_message: |+
87
+ post_install_message: |-
81
88
  To take actual screenshots rather than just snapshots of the HTML returned you will need Mac OS X 10.5 or later with RubyCocoa.
82
89
 
83
90
  You will also need to install the snapurl gem
84
91
 
85
92
  gem install snapurl --version=0.3.0
86
93
 
94
+ For details about how to set up your features to make use of cucumber-screenshot see http://github.com/mocoso/cucumber-screenshot
87
95
  rdoc_options:
88
96
  - --main
89
97
  - README.rdoc
90
98
  require_paths:
91
99
  - lib
92
100
  required_ruby_version: !ruby/object:Gem::Requirement
101
+ none: false
93
102
  requirements:
94
103
  - - ">="
95
104
  - !ruby/object:Gem::Version
105
+ hash: 3
96
106
  segments:
97
107
  - 0
98
108
  version: "0"
99
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
+ none: false
100
111
  requirements:
101
112
  - - ">="
102
113
  - !ruby/object:Gem::Version
114
+ hash: 3
103
115
  segments:
104
116
  - 0
105
117
  version: "0"
106
- requirements:
107
- - Mac OS X 10.5 or later
108
- - RubyCocoa
118
+ requirements: []
119
+
109
120
  rubyforge_project:
110
- rubygems_version: 1.3.6
121
+ rubygems_version: 1.3.7
111
122
  signing_key:
112
123
  specification_version: 3
113
124
  summary: Extension for Cucumber to capture HTML snapshots/PNG screenshots of your app