rexle-css 0.1.4 → 0.1.5

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: a457055546d4c98dc70ed576f66d2a6211132eea
4
- data.tar.gz: f25142573f55a3fe0115dbf2946e7aab9cffca92
3
+ metadata.gz: 71187815eb116b425d36fbb19c393ae7cc920f73
4
+ data.tar.gz: c59cfa0b6671b4f37ab98caf9ed4fb40ad50caa0
5
5
  SHA512:
6
- metadata.gz: fb87c43f8c7a5cb66edfe8b080cb308e2b86f8be75ff6998b2664354a043b29c166d80bb8e1c15ffc07def69e31926bea02dccc7e2c9f23d92c93464c83c923e
7
- data.tar.gz: e274469757a3c33afa2153780179f24e1c5c2f13116f31e9cb0ae0a64b56f5100fa5c5011ba194f59b0c58083935f7df45c7b89613297aee558c2a2cc4072d85
6
+ metadata.gz: 6a953c9448edcd82d399fcb385448990f39e534ed79e412b8032b41c1914c33d7351df0caa34b311cb99ee8a5bdffcaa856d0777830cf191bdb5ce9533450336
7
+ data.tar.gz: 0c986ba308aa6ded79b4373c47d738f3c6676e3721d37039fef7cae8976c5abf4e9abf1af28bf6ee72bd04233a791e399a8c04598f87b730bc16a45022756d6e
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1 @@
1
- D�34�`�iUI��4��r�:�Vw���7,frN+ �C�������W !�8]������bP9���gڹ�@^�����8"_gPh���v���2���y��i��mQ��1W��B 4��^vv p\'/����*�
2
- 6���xa!�u�n޿]����7V�l](Ĭ�,|E�bk�����I��W$#I�UבH��#q#n u3=m�@\w�7�
1
+ **%�0�*�:w:��[���� v�C8���3'��+jG}���W<:\�$�\;��/��uk��IzT�?�~(���i�Υ$���q�Ŀ'���Of?�Ѧ����A�`=�IH�Y��zj-������ǤSᗰ����GM*�,]:MYM�"��r%��������%�޲��<�Z�N�b��T����"~uD)X���"�Ʈn]���Hw����
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- /+��c;_ةU9�>(��g+��[����.]�e���lLj Za(�/n)CD��C8�lf�L �l�O�GxW�W{ c��oN2AG.k��rOJ(�̺g�lJ�/Xz`yFЃ:�^��{�K�����Lx��P6n��Unk���� 8{�\fSKO��?�d������4M��1Xt�g� �����GhuB��,�y:}#Y.M��`�vd����9<��M���5��õ����]R�7��
1
+ "eZ��G���Ll�gj9�* PMZ)ue�l-������b682?��٧�WQxQ�\� J!�f"�^D)��[@m�.E���hENS����S{p�K"=�FR0 'o�k�`�L�}S�{����&x��e᪙x��K�m�@� 9�� �����)�k��{4S}��ͩ�&A�~�B����l ���p��6O�o����z��7^�f�� �"��m��2�Q
2
+ �ROM^�xrxJk���\I��
data/lib/rexle-css.rb CHANGED
@@ -6,12 +6,16 @@ class RexleCSS
6
6
 
7
7
  attr_reader :to_xpath
8
8
 
9
- def initialize(selector)
10
- @to_xpath = selector.prepend('//')\
11
- .gsub(/(\w+)#(\w+)/,'\1[@id="\2"]')\
12
- .gsub(/#(\w+)/,'.[@id="\1"]')\
13
- .gsub(/\.(\w+)/,'[@class="\1"]')\
14
- .gsub(/ /,'//').gsub(/>/,'/')
9
+ def initialize(raw_selector)
10
+
11
+ selector = raw_selector\
12
+ .gsub(/(\w+)#(\w+)/,'\1[@id="\2"]')\
13
+ .gsub(/#(\w+)/,'.[@id="\1"]')\
14
+ .gsub(/\.(\w+)/,'[@class="\1"]')\
15
+ .gsub(/ /,'//').gsub(/>/,'/')\
16
+ .gsub(/^\*$/,'.')
17
+
18
+ @to_xpath = '//' + selector
15
19
  end
16
20
 
17
- end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle-css
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  yN4MXUX2zdaZkboeXfzIBjOAdrZpqVMCQIV0CYDEjpPesFeE9oP3PrX1EEwcr+et
32
32
  +cjku6sb+bV0/w==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-11-09 00:00:00.000000000 Z
34
+ date: 2015-11-25 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@r0bertson.co.uk
metadata.gz.sig CHANGED
Binary file