cucumber-screenshot 0.2.2-universal-darwin → 0.2.3-universal-darwin

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.
data/Rakefile CHANGED
@@ -7,8 +7,8 @@ begin
7
7
  gemspec.platform = "universal-darwin"
8
8
  gemspec.requirements << "Mac OS X 10.5 or later"
9
9
  gemspec.requirements << "RubyCocoa"
10
- gemspec.add_dependency('cucumber', '>= 0.4.3')
11
- gemspec.add_dependency('webrat', '>= 0.5.3')
10
+ gemspec.add_dependency('cucumber', '>= 0.6.2')
11
+ gemspec.add_dependency('webrat', '>= 0.7.0')
12
12
  gemspec.add_dependency('snapurl', '>= 0.0.3')
13
13
  gemspec.email = 'joel.chippindale@gmail.com'
14
14
  gemspec.authors = ['Joel Chippindale']
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 2
2
+ :patch: 3
3
3
  :major: 0
4
4
  :minor: 2
@@ -5,5 +5,5 @@ require 'webrat'
5
5
  require 'cucumber_screenshot/world'
6
6
 
7
7
  module CucumberScreenshot
8
- VERSION = '0.2.1'
8
+ VERSION = '0.2.2'
9
9
  end
@@ -41,8 +41,7 @@ module CucumberScreenshot
41
41
  end
42
42
 
43
43
  def rewrite_javascript_and_css_and_image_references(response_html) # :nodoc:
44
- doc_root = webrat_session.adapter.doc_root
45
- return response_html unless doc_root && response_html
44
+ return response_html unless doc_root
46
45
  response_html.gsub(/"\/(javascripts|stylesheets|images)\//, '"' + doc_root + '/\1/')
47
46
  end
48
47
 
@@ -58,5 +57,9 @@ Please remember need to have installed the gem snapurl to take screenshots
58
57
 
59
58
  "
60
59
  end
60
+
61
+ def doc_root
62
+ File.expand_path(File.join(RAILS_ROOT, 'public'))
63
+ end
61
64
  end
62
65
  end
@@ -89,7 +89,7 @@ describe CucumberScreenshot::World do
89
89
  describe 'protected' do
90
90
  describe '#rewrite_javascript_and_css_and_image_references' do
91
91
  before(:each) do
92
- @session.stub!(:webrat_session => stub('webrat_session', :adapter => stub('rails_adapter', :doc_root => '/tmp/public')))
92
+ @session.stub!(:doc_root => '/tmp/public')
93
93
  end
94
94
 
95
95
  it 'should replace relative /javascripts/ references with file references' do
@@ -101,10 +101,6 @@ describe CucumberScreenshot::World do
101
101
  @session.send(:rewrite_javascript_and_css_and_image_references, '<link href="/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />').
102
102
  should == '<link href="/tmp/public/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />'
103
103
  end
104
-
105
- it 'should return nil when passed nil' do
106
- @session.send(:rewrite_javascript_and_css_and_image_references, nil).should be_nil
107
- end
108
104
  end
109
105
  end
110
106
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-screenshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 3
9
+ version: 0.2.3
5
10
  platform: universal-darwin
6
11
  authors:
7
12
  - Joel Chippindale
@@ -9,39 +14,51 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-12-21 00:00:00 +00:00
17
+ date: 2010-03-06 00:00:00 +00:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: cucumber
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
23
- version: 0.4.3
24
- version:
27
+ segments:
28
+ - 0
29
+ - 6
30
+ - 2
31
+ version: 0.6.2
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: webrat
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
33
- version: 0.5.3
34
- version:
41
+ segments:
42
+ - 0
43
+ - 7
44
+ - 0
45
+ version: 0.7.0
46
+ type: :runtime
47
+ version_requirements: *id002
35
48
  - !ruby/object:Gem::Dependency
36
49
  name: snapurl
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
40
52
  requirements:
41
53
  - - ">="
42
54
  - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
57
+ - 0
58
+ - 3
43
59
  version: 0.0.3
44
- version:
60
+ type: :runtime
61
+ version_requirements: *id003
45
62
  description: Extension for Cucumber (http://cukes.info/) that makes it easy to use Webkit to capture PNG screenshots of your web application during tests
46
63
  email: joel.chippindale@gmail.com
47
64
  executables: []
@@ -74,19 +91,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
91
  requirements:
75
92
  - - ">="
76
93
  - !ruby/object:Gem::Version
94
+ segments:
95
+ - 0
77
96
  version: "0"
78
- version:
79
97
  required_rubygems_version: !ruby/object:Gem::Requirement
80
98
  requirements:
81
99
  - - ">="
82
100
  - !ruby/object:Gem::Version
101
+ segments:
102
+ - 0
83
103
  version: "0"
84
- version:
85
104
  requirements:
86
105
  - Mac OS X 10.5 or later
87
106
  - RubyCocoa
88
107
  rubyforge_project:
89
- rubygems_version: 1.3.5
108
+ rubygems_version: 1.3.6
90
109
  signing_key:
91
110
  specification_version: 3
92
111
  summary: Extension for Cucumber to capture PNG screenshots of your app