frameworks-capybara 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- frameworks-capybara (0.2.10)
4
+ frameworks-capybara (0.2.11)
5
5
  capybara (>= 1.0.0)
6
6
  capybara-celerity
7
7
  capybara-mechanize (>= 0.3.0)
@@ -19,17 +19,21 @@ module Frameworks
19
19
  def generate_base_urls
20
20
  environment = ENV['ENVIRONMENT'].downcase #be defensive
21
21
 
22
- set_scheme
22
+ prepare_host
23
23
 
24
24
  if(environment =='sandbox')
25
25
  @base_url = @sandbox + @bbc_domain
26
26
  @ssl_base_url = @sslsandbox + @bbc_domain
27
27
  @static_base_url = @static_sandbox + @bbc_domain
28
+ @mobile_base_url = @mobiledot_prefix + "sandbox.dev.bbc.co.uk"
29
+ @m_base_url = @mdot_prefix + "sandbox.dev.bbc.co.uk"
28
30
  elsif (environment =='live' && ENV['WWW_LIVE']=='false')
29
31
  @base_url = @www_prefix.chop + @bbc_domain
30
32
  @ssl_base_url = @ssl_prefix.chop + @bbc_domain
31
33
  @static_base_url = @static_prefix.chop + @bbci_domain
32
34
  @open_base_url = @open_prefix.chop + @bbc_domain
35
+ @mobile_base_url = @mobiledot_prefix.chop + @bbc_domain
36
+ @m_base_url = @mdot_prefix.chop + @bbc_domain
33
37
  elsif (environment.split('.')[0].include? 'pal') #address specific box
34
38
  @base_url = "#{scheme}://#{ENV['ENVIRONMENT']}"
35
39
  else
@@ -38,6 +42,8 @@ module Frameworks
38
42
  @static_base_url = @static_prefix + environment + @bbci_domain
39
43
  @static_base_url = @static_prefix.chop + @bbci_domain if environment == 'live'
40
44
  @open_base_url = @open_prefix + environment + @bbc_domain
45
+ @mobile_base_url = @mobiledot_prefix + environment + @bbc_domain
46
+ @m_base_url = @mdot_prefix + environment + @bbc_domain
41
47
  end
42
48
 
43
49
  proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
@@ -65,7 +71,7 @@ module Frameworks
65
71
  end
66
72
  end
67
73
 
68
- def set_scheme
74
+ def prepare_host
69
75
  ENV['SCHEME']=='https' ? scheme = 'https' : scheme = 'http'
70
76
  @www_prefix = "#{scheme}://www."
71
77
  @ssl_prefix = "https://ssl."
@@ -74,6 +80,8 @@ module Frameworks
74
80
  @bbc_domain = '.bbc.co.uk'
75
81
  @bbci_domain = '.bbci.co.uk'
76
82
  @sandbox = "#{scheme}://pal.sandbox.dev"
83
+ @mobiledot_prefix = "#{scheme}://mobile."
84
+ @mdot_prefix = "#{scheme}://m."
77
85
  @sslsandbox = "https://ssl.sandbox.dev"
78
86
  @static_sandbox = "#{scheme}://static.sandbox.dev"
79
87
  end
@@ -1,3 +1,3 @@
1
1
  module FrameworksCapybara
2
- VERSION = '0.2.10'
2
+ VERSION = '0.2.11'
3
3
  end
@@ -16,6 +16,8 @@ describe Frameworks::EnvHelper do
16
16
  @base_url.should == 'http://pal.sandbox.dev.bbc.co.uk'
17
17
  @ssl_base_url.should == 'https://ssl.sandbox.dev.bbc.co.uk'
18
18
  @static_base_url.should == 'http://static.sandbox.dev.bbc.co.uk'
19
+ @m_base_url.should == 'http://m.sandbox.dev.bbc.co.uk'
20
+ @mobile_base_url.should == 'http://mobile.sandbox.dev.bbc.co.uk'
19
21
  end
20
22
 
21
23
  it "should be able to set a base url" do
@@ -25,6 +27,8 @@ describe Frameworks::EnvHelper do
25
27
  @ssl_base_url.should == 'https://ssl.foo.bbc.co.uk'
26
28
  @static_base_url.should == 'http://static.foo.bbci.co.uk'
27
29
  @open_base_url.should == 'http://open.foo.bbc.co.uk'
30
+ @m_base_url.should == 'http://m.foo.bbc.co.uk'
31
+ @mobile_base_url.should == 'http://mobile.foo.bbc.co.uk'
28
32
  end
29
33
 
30
34
  it "should set correct static base for www.live.bbc.co.uk" do
@@ -34,6 +38,8 @@ describe Frameworks::EnvHelper do
34
38
  @ssl_base_url.should == 'https://ssl.live.bbc.co.uk'
35
39
  @static_base_url.should == 'http://static.bbci.co.uk'
36
40
  @open_base_url.should == 'http://open.live.bbc.co.uk'
41
+ @m_base_url.should == 'http://m.live.bbc.co.uk'
42
+ @mobile_base_url.should == 'http://mobile.live.bbc.co.uk'
37
43
  end
38
44
 
39
45
  it "should be able to set a base url and not be case sensitive" do
@@ -43,6 +49,8 @@ describe Frameworks::EnvHelper do
43
49
  @ssl_base_url.should == 'https://ssl.foo.bbc.co.uk'
44
50
  @static_base_url.should == 'http://static.foo.bbci.co.uk'
45
51
  @open_base_url.should == 'http://open.foo.bbc.co.uk'
52
+ @m_base_url.should == 'http://m.foo.bbc.co.uk'
53
+ @mobile_base_url.should == 'http://mobile.foo.bbc.co.uk'
46
54
  end
47
55
 
48
56
  it "should set correct static base for www.live.bbc.co.uk and not be case sensitive" do
@@ -52,6 +60,8 @@ describe Frameworks::EnvHelper do
52
60
  @ssl_base_url.should == 'https://ssl.live.bbc.co.uk'
53
61
  @static_base_url.should == 'http://static.bbci.co.uk'
54
62
  @open_base_url.should == 'http://open.live.bbc.co.uk'
63
+ @m_base_url.should == 'http://m.live.bbc.co.uk'
64
+ @mobile_base_url.should == 'http://mobile.live.bbc.co.uk'
55
65
  end
56
66
 
57
67
 
@@ -63,6 +73,8 @@ describe Frameworks::EnvHelper do
63
73
  @ssl_base_url.should == 'https://ssl.bbc.co.uk'
64
74
  @static_base_url.should == 'http://static.bbci.co.uk'
65
75
  @open_base_url.should == 'http://open.bbc.co.uk'
76
+ @m_base_url.should == 'http://m.bbc.co.uk'
77
+ @mobile_base_url.should == 'http://mobile.bbc.co.uk'
66
78
  end
67
79
 
68
80
  it "should be able to set scheme to ssl" do
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: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 10
10
- version: 0.2.10
9
+ - 11
10
+ version: 0.2.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - matt robbins
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-29 00:00:00 +01:00
18
+ date: 2012-07-04 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency