capybara_select2 0.0.1 → 0.0.2

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.
data/Rakefile CHANGED
@@ -1 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ task :console do
4
+ require 'irb'
5
+ require 'irb/completion'
6
+ require_relative 'lib/capybara_select2'
7
+ ARGV.clear
8
+ IRB.start
9
+ end
@@ -1,3 +1,3 @@
1
1
  module CapybaraSelect2
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -30,7 +30,8 @@ module Capybara
30
30
  if options[:xpath].present?
31
31
  self.container = page.first(:xpath, options[:xpath])
32
32
  else
33
- self.container = page.first("label", text: options[:from]).find(:xpath, '..').find(".select2-container")
33
+ label = page.first("label", text: options[:from]) || page.first(options[:from])
34
+ self.container = label.find(:xpath, '..').find(".select2-container")
34
35
  end
35
36
  end
36
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara_select2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-18 00:00:00.000000000 Z
12
+ date: 2014-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -73,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
73
  version: '0'
74
74
  segments:
75
75
  - 0
76
- hash: -1556834304862887382
76
+ hash: 1121620845391379523
77
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  segments:
84
84
  - 0
85
- hash: -1556834304862887382
85
+ hash: 1121620845391379523
86
86
  requirements: []
87
87
  rubyforge_project:
88
88
  rubygems_version: 1.8.23