pickles 0.1.1 → 0.1.2

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: 288501fe87bdcd1723a59483ff8763255fdc6ad5
4
- data.tar.gz: 8d9b503a3a2b71786f5e4c9ef19febbb1af32357
3
+ metadata.gz: 72d6e22f2f6fd14229c296df173b4854762edef1
4
+ data.tar.gz: 51d569bc63640d7d5161c93d7015e6c26beeb32c
5
5
  SHA512:
6
- metadata.gz: f0cdd2cdd431aeb9fefb68ca162f2ff56357a68417e6461be78d4e0b9491b55f247ccc7f989067caef87008ed02fb9a88704b334d9d9e12c078f6a342c207efa
7
- data.tar.gz: 4ab2bba90221cbc0da00ebfe784c7505434565b76532ae5f7cf5bf024716023468ebdf9ca95c6e5aca62f6b453e7d571a58a3998d071bd12060758fe6235c5ab
6
+ metadata.gz: 2ed654f8c2c9f98b0000a762c24211bdecd6edeb71eb3adeff68ba854095d674dc88231ca6c407ed59984d8ceb2cb0dd11fc92c74a931fc3866551d4bca54775
7
+ data.tar.gz: fc52d31e3d0a68c27ae9ac138a27a1421ddf7c90c63c43c438f836e8711630b12a21597f657b5e38b910e582a848516379b6e831c6af56a4b67284296ec2fd41
@@ -29,13 +29,13 @@ class Pickles::Config
29
29
  def css_node_map=(map)
30
30
  raise(ArgumentError, "Node map must be a hash") unless map.is_a?(Hash)
31
31
 
32
- @css_node_map = map.symbolize_keys
32
+ @css_node_map = map.stringify_keys
33
33
  end
34
34
 
35
35
  def xpath_node_map=(map)
36
36
  raise(ArgumentError, "Node map must be a hash") unless map.is_a?(Hash)
37
37
 
38
- @xpath_node_map = map.symbolize_keys
38
+ @xpath_node_map = map.stringify_keys
39
39
  end
40
40
 
41
41
  def fill_tag_steps_map=(map)
@@ -41,7 +41,7 @@ module NodeFinders
41
41
  el_alias, index = Locator::Index.execute(el_alias.to_s)
42
42
  end
43
43
 
44
- el_alias = el_alias.to_sym
44
+ el_alias = el_alias.to_s
45
45
 
46
46
  if xpath = Pickles.config.xpath_node_map[el_alias]
47
47
  xpath = xpath.respond_to?(:call) ? xpath.call(locator) : xpath
@@ -1,3 +1,19 @@
1
+ module HashStringifyKeys
2
+
3
+ refine Hash do
4
+ def stringify_keys
5
+ res = {}
6
+
7
+ each_key do |key|
8
+ res[key.to_s] = self[key]
9
+ end
10
+
11
+ res
12
+ end
13
+ end
14
+
15
+ end
16
+
1
17
  module HashSymbolizeKeys
2
18
 
3
19
  refine Hash do
@@ -1,3 +1,3 @@
1
1
  module Pickles
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pickles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - vs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara