rexleparser 0.6.9 → 0.7.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rexleparser.rb +9 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee04b8296e1ad55015362927d7096f519999d71d
|
4
|
+
data.tar.gz: 5c5b2a0bdbc09eaaed25cd8315a513f4986cc4bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67ea28bc5df8783ecce8c62ae443b3bd48c5524ab0a00b16c11ffb7743ff383f6d912b917297fe9c8331692290453f5533014bbadfdd4f2df8adaf976192efab
|
7
|
+
data.tar.gz: 4501651703020fa237d2f4671d3101cd40c681f03b73f1c24a492080257bb3ddc7f73d781ea652eac78a916ebfc4d1c824d6f1af059864a42d90e33d4bd14f6d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexleparser.rb
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
# file: rexleparser.rb
|
4
4
|
# description: used by rexle.rb
|
5
5
|
|
6
|
+
|
7
|
+
class Attributes < Hash
|
8
|
+
|
9
|
+
def []=(k,v)
|
10
|
+
super(k, k != :class ? v.to_s : v)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
6
14
|
class RexleParserException < Exception
|
7
15
|
end
|
8
16
|
|
@@ -156,7 +164,7 @@ class RexleParser
|
|
156
164
|
r2 = /([\w\-:]+\="[^"]*)"/
|
157
165
|
|
158
166
|
r = raw_attributes.scan(/#{r1}|#{r2}/).map(&:compact)\
|
159
|
-
|
167
|
+
.flatten.inject(Attributes.new) do |r, x|
|
160
168
|
attr_name, raw_val = x.split(/=/,2)
|
161
169
|
val = attr_name != 'class' ? raw_val[1..-1] : raw_val[1..-1].split
|
162
170
|
r.merge(attr_name.to_sym => val)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexleparser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
CkjTMLaPwIQI6dsbG4bVJ7/XzL7c8niqJSF7M0yr1+2kUrWFUZMBMrUUxgZxSkjL
|
32
32
|
Cgd76bp2zjiyCw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-03-
|
34
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
35
35
|
dependencies: []
|
36
36
|
description:
|
37
37
|
email: james@r0bertson.co.uk
|
metadata.gz.sig
CHANGED
Binary file
|