rexleparser 0.6.9 → 0.7.0

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: 5b55185bf7aa82e200fd328510a09831c577dc80
4
- data.tar.gz: a4fda100e5dc77da4854d9c2c085d10701e5e6c7
3
+ metadata.gz: ee04b8296e1ad55015362927d7096f519999d71d
4
+ data.tar.gz: 5c5b2a0bdbc09eaaed25cd8315a513f4986cc4bb
5
5
  SHA512:
6
- metadata.gz: 851cb58d17fae7e3fbba858c037280c9ad687abcf90284fed6e1b74191490b5d1065fe07a22d47b389bc47d1dde5b02c7ab3024dadb98800b517e4f6ca48050d
7
- data.tar.gz: 26b02f8fee737aea86078845a053cadeb78ad5243618c0f63309ccf31be6e1ccc04a5175f80fcdf4e068518174438281481a5d5d878b136d26e1dad6fdd1b5c0
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
- .flatten.inject({}) do |r, x|
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.6.9
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-03 00:00:00.000000000 Z
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