page_magic 0.9.5 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/page_magic.rb +2 -5
  3. data/page_magic.gemspec +1 -1
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.5
1
+ 0.9.6
data/lib/page_magic.rb CHANGED
@@ -12,10 +12,7 @@ require 'page_magic/section'
12
12
  module PageMagic
13
13
  class << self
14
14
  def session browser=nil, options = {}
15
- if browser.is_a?(Hash)
16
- Session.new(Capybara::Session.new(:rack_test, browser[:application]))
17
- else
18
- if browser
15
+ if browser.is_a?(Symbol)
19
16
  application = options.delete(:application)
20
17
 
21
18
  Capybara.register_driver browser do |app|
@@ -36,9 +33,9 @@ module PageMagic
36
33
  Session.new(Capybara::Session.new(browser, application))
37
34
  else
38
35
  Capybara.reset!
36
+ Capybara.app = browser[:application] if browser.is_a?(Hash) && browser[:application]
39
37
  Session.new(Capybara.current_session)
40
38
  end
41
- end
42
39
 
43
40
  end
44
41
 
data/page_magic.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "page_magic"
8
- s.version = "0.9.5"
8
+ s.version = "0.9.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Leon Davis"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page_magic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -125,7 +125,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  segments:
127
127
  - 0
128
- hash: 1433970493081870819
128
+ hash: -3173894650534542993
129
129
  required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements: