capybara-select-2 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7af62f3881fb8ef2ee4968456409bbd49b7a5c7c
4
- data.tar.gz: d7d599175f2201a97adaab410a84835492e91d8e
3
+ metadata.gz: eeee9f6049fd1d4191bdd07f1c579d858f4ea7e4
4
+ data.tar.gz: 841c3e8889cca92018456aeb2e55c42cf297cda7
5
5
  SHA512:
6
- metadata.gz: 5fe650b6f5c6664f64a4b8c1fb2b04751f63a512c9f5820829363a0c6b86f7d241db646a0e3cfae0da706bfa32e9cbea7f8eb9dc9a90417a8b9a24c86a9699e7
7
- data.tar.gz: f2b2d9944c7ef04f81428fb862e100b05c1defaf7aca1d556f5c5665dd024e80284661ba78f17f712a307e551a5f70f8ccf6bfe59eae4923d849134e558e8f73
6
+ metadata.gz: 6acdc3e5951168d7e36ef0c2ac5ff5e90724ddd1218e1f4f76c3536e1189b82fc1754f1d93b996e43de41c53e7eae0d5213fda6d662c97cb73384cf0ec355667
7
+ data.tar.gz: cf21831309dac43c4e6188de1c3dd9e6cf77294d5340193bb6a43c09150bc5e0e3f711ecb24084f897791a308dd38704df572a235654f9380fe1c547f2f43e54
data/README.md CHANGED
@@ -38,28 +38,32 @@ World CapybaraSelect2
38
38
 
39
39
  ## Usage
40
40
 
41
- ### Select from a container containing the select2 control
41
+ ### Select from a node containing select2 control
42
42
 
43
- #### Identified by CSS selector
43
+ * Identified by CSS selector
44
44
  ```ruby
45
45
  select2 'Buy Milk', css: '#todo'
46
46
  ```
47
47
 
48
- #### Identified by XPath selector
48
+ * Identified by XPath selector
49
49
  ```ruby
50
50
  select2 'Buy Milk', xpath: '//div[@id="todo"]'
51
51
  ```
52
52
 
53
- #### Or Identified by label
53
+ ### Select from select2 control identified by label
54
54
  ```ruby
55
55
  select2 'Buy Milk', from: 'Things to do'
56
56
  ```
57
57
 
58
- #### If you want to search for an option (via Ajax for example)
58
+ If you want to search for an option (via Ajax for example)
59
59
  ```ruby
60
60
  select2 'Buy Milk', from: 'Things to do', search: true
61
61
  ```
62
62
 
63
+ ### Dynamically create an option from search input
64
+ ```ruby
65
+ select2 'Millenials', from: 'Generations', tag: true
66
+ ```
63
67
 
64
68
  ## Contributing
65
69
 
@@ -29,7 +29,7 @@ module CapybaraSelect2
29
29
 
30
30
  container.find(open_select).click
31
31
 
32
- if options[:search]
32
+ if options[:search] || options[:tag]
33
33
  find(search_input).set value
34
34
  end
35
35
 
@@ -1,3 +1,3 @@
1
1
  module CapybaraSelect2
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-select-2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dzmitry Kavalionak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2018-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler