show_me_the_cookies 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjBmNjdjN2RkZTg1MTQyNDAyOTc0MTI5NDVkZTc2NDJlNWQ5ZWZmOA==
4
+ YjEyNjJhYzcwMDI4MTc5MTQ0OWJmODEwNWMwYmQxMzI0YzY0NjhhMA==
5
5
  data.tar.gz: !binary |-
6
- OTk4YTFiNDQxMTAxZGViODMzYWQzZDZlZWNkZTUzNTc2N2M3ZDQzZA==
6
+ MzlmMDQyOTkzNzViYmQxYWEyNTQyMzVkNDE0Mzc0OTg2YjBlMmYzYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTRiNDEwOGEwMzZkMjBhZThlNTkwYzA1NDgwMzhhMWQ3YmIzZGU2MjM2YjA2
10
- YTIxNDNjYWM0ODEyM2FmZTc1YWU1Y2QyZmIzMzZjMzViNGFjNjIzNWE1NmE5
11
- ZTlhYmZkMGU4MDA2NTFlZDk5NGM5YzVjNmM2OTI0OTA4MDExMDE=
9
+ MDU4NDM0MTIzYjE3MzE5MzFjYzMyNDNiNGYxNTU0NzBkOWNmNjIyNmUxYzVk
10
+ ZjBlMTEwZTcyMzgxMjhiOGEyOWE1MjM1MTNjNmQ2ZmM4YWQwNzk1NDI5MjUw
11
+ M2Q0ODk2OTM4YmM4YzJmNWEzMmJlNWRiMWQ4YzcwZGFjZjI3ODQ=
12
12
  data.tar.gz: !binary |-
13
- MWVkNmJjMzY2NjExYjVhYWNhOTQ5M2U2MTQ1NjQ2Yzk5ZjJlMzEzNjE3ZmE1
14
- NjViMzNhNThmMjBmZmVlMTMwMjBjMWE5NjNkZmJiNDg3N2E0MWM4ZmQ3NWVk
15
- ZTliZjUyMjQwNjZmOTkxMmZjM2MxOWE0MjE5YjM1ZWFhYzkxZjA=
13
+ ZjRlZmNlYjNhZDFmZGRlMGZjN2MzNDQwYTJkYjcwMmRkNDk3OWZmZTgyYTZl
14
+ NGVlZWY0OWZjNjU0Nzc2ZmMwMGRjYWNiY2ViYTc2YTdlOTkxNGNlNTM5N2Qy
15
+ NmZkYzBhYWE2NGUyM2NlMDAyM2NlNWVhMTRmYmVhODhiMjExNjY=
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Show me the cookies
2
2
 
3
+ ![Build status](https://semaphoreapp.com/api/v1/projects/9a0dc444-fd04-4187-95a7-7a07abecbad7/201807/shields_badge.png)
4
+
3
5
  Some helpers for poking around at your Capybara driven browser's cookies in integration tests.
4
6
 
5
7
  Supports Capybara's bundled drivers (rack-test, Selenium Webdriver) and Poltergeist (PhantomJS).
@@ -18,7 +20,7 @@ You may add new drivers for your application by implementing an adapter class an
18
20
  show_me_the_cookies
19
21
 
20
22
  # returns an array of cookie hashes
21
- # form: [{:name, :domain, :value, :expires, :path}]
23
+ # form: [{:name, :domain, :value, :expires, :path, :secure}]
22
24
  get_me_the_cookies
23
25
 
24
26
  # deletes the named cookie
@@ -44,6 +44,7 @@ private
44
44
  :domain => cookie.domain,
45
45
  :value => cookie.value,
46
46
  :expires => cookie.expires,
47
- :path => cookie.path}
47
+ :path => cookie.path,
48
+ :secure => cookie.secure?}
48
49
  end
49
50
  end
@@ -50,7 +50,7 @@ class ShowMeTheCookies::Webkit
50
50
  :value => cookie.value,
51
51
  :expires => (cookie.expires rescue nil),
52
52
  :path => cookie.path,
53
- :secure => cookie.secure
53
+ :secure => cookie.secure.nil? ? false : true
54
54
  }
55
55
  end
56
56
  end
@@ -1,3 +1,3 @@
1
1
  module ShowMeTheCookies
2
- VERSION = "2.3.0"
2
+ VERSION = "2.4.0"
3
3
  end
@@ -5,7 +5,7 @@ get '/' do
5
5
  end
6
6
 
7
7
  get '/set/:key/:value' do
8
- response.set_cookie params[:key], {:value => params[:value], :path => '/'}
8
+ response.set_cookie params[:key], {:value => params[:value], :path => '/', :secure => false}
9
9
  "Setting #{params[:key]}=#{params[:value]}"
10
10
  end
11
11
 
@@ -18,7 +18,7 @@ shared_examples "the API" do
18
18
  describe "get_me_the_cookie" do
19
19
  it "returns the cookie hash" do
20
20
  visit '/set/foo/bar'
21
- get_me_the_cookie('foo').should include(:name => "foo", :value => "bar", :expires => nil)
21
+ get_me_the_cookie('foo').should include(:name => "foo", :value => "bar", :expires => nil, :secure => false)
22
22
  end
23
23
  end
24
24
 
@@ -30,7 +30,7 @@ shared_examples "the API" do
30
30
  it "returns an array of standardised cookie hashes" do
31
31
  visit '/set/foo/bar'
32
32
  page.should have_content("Setting foo=bar")
33
- get_me_the_cookies.first.should include(:name => "foo", :value => "bar", :expires => nil)
33
+ get_me_the_cookies.first.should include(:name => "foo", :value => "bar", :expires => nil, :secure => false)
34
34
  visit '/set/myopic/mice'
35
35
  get_me_the_cookies.length.should be(2)
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: show_me_the_cookies
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Rutherford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-23 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara