show_me_the_cookies 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
4
+
5
+ # don't vc this, http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
6
+ Gemfile.lock
data/Gemfile CHANGED
@@ -1,12 +1,4 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
 
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "cucumber", ">= 0"
10
- gem "bundler", "~> 1.0.0"
11
- gem "jeweler", "~> 1.5.2"
12
- end
3
+ # Specify your gem's dependencies in show_me_the_cookies.gemspec
4
+ gemspec
data/Rakefile CHANGED
@@ -1,42 +1,2 @@
1
- require 'rubygems'
2
1
  require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'rake'
11
-
12
- require 'jeweler'
13
- Jeweler::Tasks.new do |gem|
14
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
- gem.name = "show_me_the_cookies"
16
- gem.homepage = "http://github.com/nruth/show_me_the_cookies"
17
- gem.license = "MIT"
18
- gem.summary = %Q{Cookie manipulation for Capybara drivers}
19
- gem.description = %Q{Cookie manipulation for Capybara drivers -- viewing, deleting, ...}
20
- gem.email = "nick.rutherford@gmail.com"
21
- gem.authors = ["Nicholas Rutherford"]
22
- # Include your dependencies below. Runtime dependencies are required when using your gem,
23
- # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
- # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
- # gem.add_development_dependency 'rspec', '> 1.2.3'
26
- end
27
- Jeweler::RubygemsDotOrgTasks.new
28
-
29
- require 'cucumber/rake/task'
30
- Cucumber::Rake::Task.new(:features)
31
-
32
- task :default => :spec
33
-
34
- require 'rake/rdoctask'
35
- Rake::RDocTask.new do |rdoc|
36
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
37
-
38
- rdoc.rdoc_dir = 'rdoc'
39
- rdoc.title = "show_me_the_cookies #{version}"
40
- rdoc.rdoc_files.include('README*')
41
- rdoc.rdoc_files.include('lib/**/*.rb')
42
- end
2
+ Bundler::GemHelper.install_tasks
@@ -5,15 +5,16 @@ module ShowMeTheCookies
5
5
  require 'show_me_the_cookies/selenium'
6
6
 
7
7
  def current_driver_adapter
8
- case (current_driver = Capybara.current_session.driver)
9
- when Capybara::Driver::Selenium
10
- ShowMeTheCookies::Selenium.new(current_driver.browser)
11
- when Capybara::Driver::RackTest
12
- ShowMeTheCookies::RackTest.new(current_driver)
13
- when Capybara::Driver::Culerity
14
- ShowMeTheCookies::Culerity.new(current_driver.browser)
8
+ driver = Capybara.current_session.driver
9
+ case Capybara.current_driver
10
+ when :selenium
11
+ ShowMeTheCookies::Selenium.new driver
12
+ when :rack_test
13
+ ShowMeTheCookies::RackTest.new driver
14
+ when :culerity
15
+ ShowMeTheCookies::Culerity.new driver
15
16
  else
16
- unsupported_driver_spam
17
+ raise "unsupported driver, use rack::test, selenium/webdriver or culerity"
17
18
  end
18
19
  end
19
20
 
@@ -30,8 +31,4 @@ module ShowMeTheCookies
30
31
 
31
32
  private
32
33
  @@session_cookie_name = nil
33
-
34
- def self.unsupported_browser_spam
35
- raise "unsupported driver, use rack::test, selenium/webdriver or culerity"
36
- end
37
34
  end
@@ -1,6 +1,6 @@
1
1
  class ShowMeTheCookies::Culerity
2
- def initialize(browser)
3
- @browser = browser
2
+ def initialize(driver)
3
+ @browser = driver.browser
4
4
  end
5
5
 
6
6
  def show_me_the_cookies
@@ -15,6 +15,6 @@ class ShowMeTheCookies::RackTest
15
15
 
16
16
  private
17
17
  def cookie_jar
18
- @rack_test_driver.current_session.instance_variable_get(:@rack_mock_session).cookie_jar
18
+ @rack_test_driver.browser.current_session.instance_variable_get(:@rack_mock_session).cookie_jar
19
19
  end
20
20
  end
@@ -1,6 +1,6 @@
1
1
  class ShowMeTheCookies::Selenium
2
- def initialize(browser)
3
- @browser = browser
2
+ def initialize(driver)
3
+ @browser = driver.browser
4
4
  self
5
5
  end
6
6
 
@@ -0,0 +1,3 @@
1
+ module ShowMeTheCookies
2
+ VERSION = "0.2.1"
3
+ end
@@ -1,60 +1,20 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "show_me_the_cookies/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{show_me_the_cookies}
8
- s.version = "0.2.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Nicholas Rutherford"]
12
- s.date = %q{2011-01-07}
6
+ s.name = "show_me_the_cookies"
7
+ s.version = ShowMeTheCookies::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Nicholas Rutherford"]
10
+ s.email = ["nick.rutherford@gmail.com"]
11
+ s.homepage = "https://github.com/nruth/show_me_the_cookies"
12
+ s.summary = %q{Cookie manipulation for Capybara drivers}
13
13
  s.description = %q{Cookie manipulation for Capybara drivers -- viewing, deleting, ...}
14
- s.email = %q{nick.rutherford@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".rspec",
22
- "Gemfile",
23
- "LICENSE.txt",
24
- "README.md",
25
- "Rakefile",
26
- "VERSION",
27
- "features/show_me_the_cookies.feature",
28
- "features/step_definitions/show_me_the_cookies_steps.rb",
29
- "features/support/env.rb",
30
- "lib/show_me_the_cookies.rb",
31
- "lib/show_me_the_cookies/culerity.rb",
32
- "lib/show_me_the_cookies/rack_test.rb",
33
- "lib/show_me_the_cookies/selenium.rb",
34
- "show_me_the_cookies.gemspec"
35
- ]
36
- s.homepage = %q{http://github.com/nruth/show_me_the_cookies}
37
14
  s.licenses = ["MIT"]
38
- s.require_paths = ["lib"]
39
- s.rubygems_version = %q{1.4.2}
40
- s.summary = %q{Cookie manipulation for Capybara drivers}
41
-
42
- if s.respond_to? :specification_version then
43
- s.specification_version = 3
44
15
 
45
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
- s.add_development_dependency(%q<cucumber>, [">= 0"])
47
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
48
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
49
- else
50
- s.add_dependency(%q<cucumber>, [">= 0"])
51
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
52
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
53
- end
54
- else
55
- s.add_dependency(%q<cucumber>, [">= 0"])
56
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
57
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
58
- end
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
59
20
  end
60
-
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: show_me_the_cookies
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
4
+ hash: 21
5
+ prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nicholas Rutherford
@@ -15,82 +15,36 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-07 00:00:00 +01:00
18
+ date: 2011-04-29 00:00:00 +02:00
19
19
  default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- type: :development
23
- name: cucumber
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
33
- prerelease: false
34
- requirement: *id001
35
- - !ruby/object:Gem::Dependency
36
- type: :development
37
- name: bundler
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 23
44
- segments:
45
- - 1
46
- - 0
47
- - 0
48
- version: 1.0.0
49
- prerelease: false
50
- requirement: *id002
51
- - !ruby/object:Gem::Dependency
52
- type: :development
53
- name: jeweler
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ~>
58
- - !ruby/object:Gem::Version
59
- hash: 7
60
- segments:
61
- - 1
62
- - 5
63
- - 2
64
- version: 1.5.2
65
- prerelease: false
66
- requirement: *id003
20
+ dependencies: []
21
+
67
22
  description: Cookie manipulation for Capybara drivers -- viewing, deleting, ...
68
- email: nick.rutherford@gmail.com
23
+ email:
24
+ - nick.rutherford@gmail.com
69
25
  executables: []
70
26
 
71
27
  extensions: []
72
28
 
73
- extra_rdoc_files:
74
- - LICENSE.txt
75
- - README.md
29
+ extra_rdoc_files: []
30
+
76
31
  files:
77
32
  - .document
33
+ - .gitignore
78
34
  - .rspec
79
35
  - Gemfile
80
36
  - LICENSE.txt
81
37
  - README.md
82
38
  - Rakefile
83
39
  - VERSION
84
- - features/show_me_the_cookies.feature
85
- - features/step_definitions/show_me_the_cookies_steps.rb
86
- - features/support/env.rb
87
40
  - lib/show_me_the_cookies.rb
88
41
  - lib/show_me_the_cookies/culerity.rb
89
42
  - lib/show_me_the_cookies/rack_test.rb
90
43
  - lib/show_me_the_cookies/selenium.rb
44
+ - lib/show_me_the_cookies/version.rb
91
45
  - show_me_the_cookies.gemspec
92
46
  has_rdoc: true
93
- homepage: http://github.com/nruth/show_me_the_cookies
47
+ homepage: https://github.com/nruth/show_me_the_cookies
94
48
  licenses:
95
49
  - MIT
96
50
  post_install_message:
@@ -119,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
73
  requirements: []
120
74
 
121
75
  rubyforge_project:
122
- rubygems_version: 1.4.2
76
+ rubygems_version: 1.3.7
123
77
  signing_key:
124
78
  specification_version: 3
125
79
  summary: Cookie manipulation for Capybara drivers
@@ -1,9 +0,0 @@
1
- Feature: something something
2
- In order to something something
3
- A user something something
4
- something something something
5
-
6
- Scenario: something something
7
- Given inspiration
8
- When I create a sweet new gem
9
- Then everyone should see how awesome I am
@@ -1,13 +0,0 @@
1
- require 'bundler'
2
- begin
3
- Bundler.setup(:default, :development)
4
- rescue Bundler::BundlerError => e
5
- $stderr.puts e.message
6
- $stderr.puts "Run `bundle install` to install missing gems"
7
- exit e.status_code
8
- end
9
-
10
- $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
11
- require 'show_me_the_cookies'
12
-
13
- require 'rspec/expectations'