frameworks-capybara 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/frameworks/cucumber.rb +4 -2
- data/lib/version.rb +1 -1
- data/spec/frameworks_cucumber_spec.rb +27 -0
- metadata +47 -45
data/Gemfile.lock
CHANGED
data/lib/frameworks/cucumber.rb
CHANGED
@@ -23,21 +23,22 @@ module Frameworks
|
|
23
23
|
|
24
24
|
if(environment =='sandbox')
|
25
25
|
@base_url = @sandbox + @bbc_domain
|
26
|
+
@pal_base_url = @sandbox + @bbc_domain
|
26
27
|
@ssl_base_url = @sslsandbox + @bbc_domain
|
27
28
|
@static_base_url = @static_sandbox + @bbc_domain
|
28
29
|
@mobile_base_url = @mobiledot_prefix + "sandbox.dev.bbc.co.uk"
|
29
30
|
@m_base_url = @mdot_prefix + "sandbox.dev.bbc.co.uk"
|
30
31
|
elsif (environment =='live' && ENV['WWW_LIVE']=='false')
|
31
32
|
@base_url = @www_prefix.chop + @bbc_domain
|
33
|
+
@pal_base_url = @pal_prefix + environment + @bbc_domain
|
32
34
|
@ssl_base_url = @ssl_prefix.chop + @bbc_domain
|
33
35
|
@static_base_url = @static_prefix.chop + @bbci_domain
|
34
36
|
@open_base_url = @open_prefix.chop + @bbc_domain
|
35
37
|
@mobile_base_url = @mobiledot_prefix.chop + @bbc_domain
|
36
38
|
@m_base_url = @mdot_prefix.chop + @bbc_domain
|
37
|
-
elsif (environment.split('.')[0].include? 'pal') #address specific box
|
38
|
-
@base_url = "#{scheme}://#{ENV['ENVIRONMENT']}"
|
39
39
|
else
|
40
40
|
@base_url = @www_prefix + environment + @bbc_domain
|
41
|
+
@pal_base_url = @pal_prefix + environment + @bbc_domain
|
41
42
|
@ssl_base_url = @ssl_prefix + environment + @bbc_domain
|
42
43
|
@static_base_url = @static_prefix + environment + @bbci_domain
|
43
44
|
@static_base_url = @static_prefix.chop + @bbci_domain if environment == 'live'
|
@@ -74,6 +75,7 @@ module Frameworks
|
|
74
75
|
def prepare_host
|
75
76
|
ENV['SCHEME']=='https' ? scheme = 'https' : scheme = 'http'
|
76
77
|
@www_prefix = "#{scheme}://www."
|
78
|
+
@pal_prefix = "#{scheme}://pal."
|
77
79
|
@ssl_prefix = "https://ssl."
|
78
80
|
@static_prefix = "#{scheme}://static."
|
79
81
|
@open_prefix = "#{scheme}://open."
|
data/lib/version.rb
CHANGED
@@ -77,6 +77,33 @@ describe Frameworks::EnvHelper do
|
|
77
77
|
@mobile_base_url.should == 'http://mobile.bbc.co.uk'
|
78
78
|
end
|
79
79
|
|
80
|
+
it "should be able to set pal url and not be case sensitive" do
|
81
|
+
ENV['ENVIRONMENT'] = 'Live'
|
82
|
+
generate_base_urls
|
83
|
+
@base_url.should == 'http://www.live.bbc.co.uk'
|
84
|
+
@pal_base_url.should == 'http://pal.live.bbc.co.uk'
|
85
|
+
@ssl_base_url.should == 'https://ssl.live.bbc.co.uk'
|
86
|
+
@static_base_url.should == 'http://static.bbci.co.uk'
|
87
|
+
@open_base_url.should == 'http://open.live.bbc.co.uk'
|
88
|
+
@m_base_url.should == 'http://m.live.bbc.co.uk'
|
89
|
+
@mobile_base_url.should == 'http://mobile.live.bbc.co.uk'
|
90
|
+
end
|
91
|
+
|
92
|
+
it "pal url should still have environment even if asking for classic live url" do
|
93
|
+
ENV['ENVIRONMENT'] = 'Live'
|
94
|
+
ENV['WWW_LIVE'] = 'false'
|
95
|
+
generate_base_urls
|
96
|
+
@base_url.should == 'http://www.bbc.co.uk'
|
97
|
+
@pal_base_url.should == 'http://pal.live.bbc.co.uk'
|
98
|
+
@ssl_base_url.should == 'https://ssl.bbc.co.uk'
|
99
|
+
@static_base_url.should == 'http://static.bbci.co.uk'
|
100
|
+
@open_base_url.should == 'http://open.bbc.co.uk'
|
101
|
+
@m_base_url.should == 'http://m.bbc.co.uk'
|
102
|
+
@mobile_base_url.should == 'http://mobile.bbc.co.uk'
|
103
|
+
end
|
104
|
+
|
105
|
+
|
106
|
+
|
80
107
|
it "should be able to set scheme to ssl" do
|
81
108
|
ENV['SCHEME'] = 'https'
|
82
109
|
ENV['ENVIRONMENT'] = 'foo'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frameworks-capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 13
|
10
|
+
version: 0.2.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- matt robbins
|
@@ -15,12 +15,12 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-07-
|
18
|
+
date: 2012-07-18 00:00:00 +01:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
-
|
23
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
|
+
type: :runtime
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
@@ -31,12 +31,12 @@ dependencies:
|
|
31
31
|
- 0
|
32
32
|
- 0
|
33
33
|
version: 1.0.0
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
34
|
+
name: capybara
|
35
|
+
version_requirements: *id001
|
37
36
|
prerelease: false
|
38
|
-
|
39
|
-
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
type: :runtime
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ">="
|
@@ -47,12 +47,12 @@ dependencies:
|
|
47
47
|
- 3
|
48
48
|
- 0
|
49
49
|
version: 0.3.0
|
50
|
-
|
51
|
-
|
52
|
-
- !ruby/object:Gem::Dependency
|
50
|
+
name: capybara-mechanize
|
51
|
+
version_requirements: *id002
|
53
52
|
prerelease: false
|
54
|
-
|
55
|
-
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
type: :runtime
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
56
|
none: false
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
@@ -61,12 +61,12 @@ dependencies:
|
|
61
61
|
segments:
|
62
62
|
- 0
|
63
63
|
version: "0"
|
64
|
-
|
65
|
-
|
66
|
-
- !ruby/object:Gem::Dependency
|
64
|
+
name: json
|
65
|
+
version_requirements: *id003
|
67
66
|
prerelease: false
|
68
|
-
|
69
|
-
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
type: :runtime
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
70
|
none: false
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
@@ -75,12 +75,12 @@ dependencies:
|
|
75
75
|
segments:
|
76
76
|
- 0
|
77
77
|
version: "0"
|
78
|
-
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
78
|
+
name: capybara-celerity
|
79
|
+
version_requirements: *id004
|
81
80
|
prerelease: false
|
82
|
-
|
83
|
-
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
type: :runtime
|
83
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
@@ -89,12 +89,12 @@ dependencies:
|
|
89
89
|
segments:
|
90
90
|
- 0
|
91
91
|
version: "0"
|
92
|
-
|
93
|
-
|
94
|
-
- !ruby/object:Gem::Dependency
|
92
|
+
name: w3c_validators
|
93
|
+
version_requirements: *id005
|
95
94
|
prerelease: false
|
96
|
-
|
97
|
-
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
type: :runtime
|
97
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
98
98
|
none: false
|
99
99
|
requirements:
|
100
100
|
- - ">="
|
@@ -105,12 +105,12 @@ dependencies:
|
|
105
105
|
- 10
|
106
106
|
- 5
|
107
107
|
version: 0.10.5
|
108
|
-
|
109
|
-
|
110
|
-
- !ruby/object:Gem::Dependency
|
108
|
+
name: cucumber
|
109
|
+
version_requirements: *id006
|
111
110
|
prerelease: false
|
112
|
-
|
113
|
-
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
type: :development
|
113
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
114
114
|
none: false
|
115
115
|
requirements:
|
116
116
|
- - ">="
|
@@ -119,12 +119,12 @@ dependencies:
|
|
119
119
|
segments:
|
120
120
|
- 0
|
121
121
|
version: "0"
|
122
|
-
|
123
|
-
|
124
|
-
- !ruby/object:Gem::Dependency
|
122
|
+
name: rake
|
123
|
+
version_requirements: *id007
|
125
124
|
prerelease: false
|
126
|
-
|
127
|
-
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
type: :development
|
127
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ">="
|
@@ -135,8 +135,9 @@ dependencies:
|
|
135
135
|
- 0
|
136
136
|
- 0
|
137
137
|
version: 1.0.0
|
138
|
-
|
139
|
-
|
138
|
+
name: rspec
|
139
|
+
version_requirements: *id008
|
140
|
+
prerelease: false
|
140
141
|
description: Gem to ease the pain of managing capybara driver config and provide a home for common utils and patches
|
141
142
|
email:
|
142
143
|
- mcrobbins@gmail.com
|
@@ -175,6 +176,7 @@ files:
|
|
175
176
|
- spec/profiles.ini
|
176
177
|
- spec/spec_helper.rb
|
177
178
|
- spec/unit_test_monkeypatches.rb
|
179
|
+
has_rdoc: true
|
178
180
|
homepage:
|
179
181
|
licenses: []
|
180
182
|
|
@@ -204,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
206
|
requirements: []
|
205
207
|
|
206
208
|
rubyforge_project:
|
207
|
-
rubygems_version: 1.
|
209
|
+
rubygems_version: 1.6.0
|
208
210
|
signing_key:
|
209
211
|
specification_version: 3
|
210
212
|
summary: Gem to ease the pain of managing capybara driver config and provide a home for common utils and patches
|