attributor 4.2.0 → 5.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de74a91670c3d4d2ab545ed984f7a8e04ad258bc
|
4
|
+
data.tar.gz: 6d1764a9765d136fe1439ec0cd46e54519aaf07f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2899ff383f44c4266725b69e35a60707885dd648ca6f00e75fb5f515b0946fbe0a8192c9f822891a0222aeaa572b24f50d05bfeff9b7adac74e275147f7748b
|
7
|
+
data.tar.gz: 9d6823ce40583045dc223d5f5e348d5f276840cf7ff211880d8d491521de16484ccd338e3677a4be665defb55fdccf5bdc09893c1b667b6489892ae3715696cf
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@ module Attributor
|
|
3
3
|
class Parser < Parslet::Parser
|
4
4
|
rule(:simple_name) { match('[a-zA-Z0-9_]').repeat(1) }
|
5
5
|
rule(:item) { simple_name.as(:field) >> parenthesized.repeat(0).as(:children) }
|
6
|
-
rule(:parenthesized) { str('
|
6
|
+
rule(:parenthesized) { str('{') >> csv >> str('}') }
|
7
7
|
rule(:csv) { (item >> (str(',') >> item).repeat(0)).as(:csv) }
|
8
8
|
root(:csv)
|
9
9
|
end
|
@@ -349,7 +349,7 @@ module Attributor
|
|
349
349
|
end
|
350
350
|
|
351
351
|
|
352
|
-
raise
|
352
|
+
raise LoadError, "Unknown key received: #{key.inspect} for #{Attributor.humanize_context(context)}"
|
353
353
|
end
|
354
354
|
|
355
355
|
|
@@ -384,7 +384,7 @@ module Attributor
|
|
384
384
|
end
|
385
385
|
end
|
386
386
|
|
387
|
-
raise
|
387
|
+
raise LoadError, "Unknown key received: #{key.inspect} while loading #{Attributor.humanize_context(context)}"
|
388
388
|
end
|
389
389
|
|
390
390
|
def self.from_hash(object,context, recurse: false)
|
data/lib/attributor/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Attributor
|
2
|
-
VERSION =
|
3
|
-
end
|
2
|
+
VERSION = '5.0'
|
3
|
+
end
|
@@ -14,8 +14,8 @@ describe Attributor::FieldSelector do
|
|
14
14
|
'' => {},
|
15
15
|
'one' => { one: true },
|
16
16
|
'one,two,three' => { one: true, two: true, three: true },
|
17
|
-
'one,two
|
18
|
-
'one,two
|
17
|
+
'one,two{a,b},three' => { one: true, two: { a: true, b: true }, three: true },
|
18
|
+
'one,two{a,b,c{A,B}},three' => {
|
19
19
|
one: true,
|
20
20
|
two: {
|
21
21
|
a: true,
|
@@ -25,7 +25,7 @@ describe Attributor::FieldSelector do
|
|
25
25
|
three: true
|
26
26
|
}
|
27
27
|
}
|
28
|
-
|
28
|
+
|
29
29
|
cases.each do |fields, result|
|
30
30
|
it "loads #{fields.inspect}" do
|
31
31
|
loaded = subject.load(fields)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attributor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '5.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep M. Blanquer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashie
|
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
369
369
|
version: '0'
|
370
370
|
requirements: []
|
371
371
|
rubyforge_project:
|
372
|
-
rubygems_version: 2.4.5
|
372
|
+
rubygems_version: 2.4.5
|
373
373
|
signing_key:
|
374
374
|
specification_version: 4
|
375
375
|
summary: A powerful attribute and type management library for Ruby
|