show_me_the_cookies 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -9,21 +9,21 @@ drivers may be added (at time of writing Akephalos is also available).
9
9
 
10
10
  # puts a string summary of the cookie
11
11
  show_me_the_cookie(cookie_name)
12
-
12
+
13
13
  # returns a hash of the cookie
14
14
  # form: {:name, :domain, :value, :expires, :path}
15
15
  get_me_the_cookie(cookie_name)
16
-
16
+
17
17
  # puts a string summary of all cookies
18
18
  show_me_the_cookies
19
-
19
+
20
20
  # returns an array of cookie hashes
21
21
  # form: [{:name, :domain, :value, :expires, :path}]
22
22
  get_me_the_cookies
23
-
23
+
24
24
  # deletes the named cookie
25
25
  delete_cookie(cookie_name)
26
-
26
+
27
27
  # removes session cookies and expired persistent cookies
28
28
  expire_cookies
29
29
 
@@ -32,13 +32,13 @@ drivers may be added (at time of writing Akephalos is also available).
32
32
  If you find this useful, the best way to say thanks is to take a poke around the code and send feedback upstream.
33
33
  Bugs / requests / suggestions should be raised in the [Github issues](https://github.com/nruth/show_me_the_cookies/issues) tracker.
34
34
 
35
- Code contributions should be sent by github pull request, or contact [me](https://github.com/nruth) with a link
35
+ Code contributions should be sent by github pull request, or contact [me](https://github.com/nruth) with a link
36
36
  to your repository branch.
37
37
  Patches should be small, isolated, testable, and preferably tested.
38
38
 
39
- New drivers should be accompanied by a passing API spec.
39
+ New drivers should be accompanied by a passing API spec.
40
40
  Driver-specific edge cases should not be added to the shared spec unless thought to be of general interest.
41
- API spec should not be changed because something doesn't work, fix the driver or make a plugin gem.
41
+ API spec should not be changed because something doesn't work – try to fix the driver, or make an addon gem.
42
42
 
43
43
  More tests are welcome.
44
44
 
@@ -85,7 +85,7 @@ Install by loading the gem and adding the following to your stepdefs or support
85
85
  When I go to the dashboard
86
86
  And I log in with the Remember Me option checked
87
87
  Then I should see "Welcome back"
88
-
88
+
89
89
  When I close my browser (clearing the session)
90
90
  And I return to the dashboard url
91
91
  Then I should see "Welcome back"
@@ -96,7 +96,7 @@ Install by loading the gem and adding the following to your stepdefs or support
96
96
  When I go to the dashboard
97
97
  And I log in without the Remember Me option checked
98
98
  Then I should see "Welcome back"
99
-
99
+
100
100
  When I close my browser (clearing the session)
101
101
  And I return to the dashboard url
102
102
  Then I should see the log-in screen
@@ -105,7 +105,11 @@ Install by loading the gem and adding the following to your stepdefs or support
105
105
  ### Stepdefs
106
106
 
107
107
  Then /^show me the cookies!$/ do
108
- puts inspect_cookies
108
+ show_me_the_cookies
109
+ end
110
+
111
+ Then /^show me the "([^"]*)" cookie$/ do |cookie_name|
112
+ show_me_the_cookie(cookie_name)
109
113
  end
110
114
 
111
115
  Given /^I close my browser \(clearing the session\)$/ do
@@ -21,7 +21,7 @@ class ShowMeTheCookies::RackTest
21
21
 
22
22
  def delete_cookie(cookie_name)
23
23
  cookies.reject! do |existing_cookie|
24
- existing_cookie.name.downcase == cookie_name
24
+ existing_cookie.name.downcase == cookie_name.to_s
25
25
  end
26
26
  end
27
27
 
@@ -1,3 +1,3 @@
1
1
  module ShowMeTheCookies
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -59,11 +59,17 @@ shared_examples "the API" do
59
59
  cookies_should_contain('extras', 'hazlenut')
60
60
  cookies_should_contain('choc', 'milk')
61
61
 
62
- visit '/delete/choc'
63
- page.should have_content("Deleting choc")
62
+ delete_cookie('choc')
64
63
  cookies_should_contain('extras', 'hazlenut')
65
64
  cookies_should_not_contain('choc', 'milk')
66
65
  end
66
+
67
+ it "accepts symbols" do
68
+ visit '/set/choc/milk'
69
+ cookies_should_contain('choc', 'milk')
70
+ delete_cookie(:choc)
71
+ cookies_should_not_contain('choc', 'milk')
72
+ end
67
73
  end
68
74
 
69
75
  describe "expire_cookies" do
@@ -91,4 +97,4 @@ shared_examples "the API" do
91
97
  end
92
98
  end
93
99
  end
94
- end
100
+ end
metadata CHANGED
@@ -1,89 +1,67 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: show_me_the_cookies
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.1
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Nicholas Rutherford
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-12-16 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-05-13 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: capybara
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &12791240 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 15
29
- segments:
30
- - 1
31
- - 0
32
- version: "1.0"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rspec
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *12791240
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &12790800 !ruby/object:Gem::Requirement
39
28
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
47
33
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: sinatra
51
34
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *12790800
36
+ - !ruby/object:Gem::Dependency
37
+ name: sinatra
38
+ requirement: &12790340 !ruby/object:Gem::Requirement
53
39
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
61
44
  type: :development
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
64
- name: akephalos2
65
45
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *12790340
47
+ - !ruby/object:Gem::Dependency
48
+ name: akephalos2
49
+ requirement: &12789880 !ruby/object:Gem::Requirement
67
50
  none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
75
55
  type: :development
76
- version_requirements: *id004
56
+ prerelease: false
57
+ version_requirements: *12789880
77
58
  description: Cookie manipulation for Capybara drivers -- viewing, deleting, ...
78
- email:
59
+ email:
79
60
  - nick.rutherford@gmail.com
80
61
  executables: []
81
-
82
62
  extensions: []
83
-
84
63
  extra_rdoc_files: []
85
-
86
- files:
64
+ files:
87
65
  - .gitignore
88
66
  - Gemfile
89
67
  - README.md
@@ -102,43 +80,34 @@ files:
102
80
  - spec/shared_examples_for_api.rb
103
81
  - spec/spec_helper.rb
104
82
  homepage: https://github.com/nruth/show_me_the_cookies
105
- licenses:
83
+ licenses:
106
84
  - MIT
107
85
  post_install_message:
108
86
  rdoc_options: []
109
-
110
- require_paths:
87
+ require_paths:
111
88
  - lib
112
- required_ruby_version: !ruby/object:Gem::Requirement
89
+ required_ruby_version: !ruby/object:Gem::Requirement
113
90
  none: false
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- hash: 3
118
- segments:
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ segments:
119
96
  - 0
120
- version: "0"
121
- required_rubygems_version: !ruby/object:Gem::Requirement
97
+ hash: 3053348570764713548
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
122
99
  none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ segments:
128
105
  - 0
129
- version: "0"
106
+ hash: 3053348570764713548
130
107
  requirements: []
131
-
132
108
  rubyforge_project:
133
109
  rubygems_version: 1.8.10
134
110
  signing_key:
135
111
  specification_version: 3
136
112
  summary: Cookie manipulation for Capybara drivers
137
- test_files:
138
- - spec/app/set_cookie.rb
139
- - spec/request/akephalos_spec.rb
140
- - spec/request/custom_spec.rb
141
- - spec/request/rack-test_spec.rb
142
- - spec/request/selenium_spec.rb
143
- - spec/shared_examples_for_api.rb
144
- - spec/spec_helper.rb
113
+ test_files: []