polyrex-object-methods 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/polyrex-object-methods.rb +17 -4
- metadata +24 -21
- 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: 92e4a8ac628a0eb89fbb97945e59267c4ff9294d
|
4
|
+
data.tar.gz: d58d43af0ba50fc6c610fc2ebdeaa5d20cdd8e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e9f9bb8d3a5e872df6873d726289c3055c6cd90faa85ab31a6968d738dd423f120832ae401caf18ce3676332d73c77ed6e808a11b18bb7c7051115f61cd971f
|
7
|
+
data.tar.gz: 56b553d98d32ed1ce88599bf7ce2e179b142226c7f4f37339807960ddda9e2890e156cbd113784a35fff6e12c7c6ca64c4a105b01171aa626acce7e3e3e36c98
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# file: polyrex-object-methods.rb
|
4
4
|
|
@@ -9,13 +9,26 @@ class PolyrexObjectMethods
|
|
9
9
|
a = schema.split('/')
|
10
10
|
a.shift
|
11
11
|
|
12
|
-
|
12
|
+
to_array = ->(x) do
|
13
13
|
name, raw_fields = x.split('[')
|
14
|
-
[name.capitalize, raw_fields ? raw_fields.chop.split(',')
|
14
|
+
[name.capitalize, raw_fields ? raw_fields.chop.split(',')\
|
15
|
+
.map(&:strip) : []]
|
15
16
|
end
|
17
|
+
|
18
|
+
@a = a.inject([]) do |r,x|
|
19
|
+
|
20
|
+
siblings = x[/[^\{]+(?=\})/]
|
21
|
+
|
22
|
+
if siblings then
|
23
|
+
siblings.split(/\s*;\s*/).each {|s| r << to_array.call(s) }
|
24
|
+
else
|
25
|
+
r << to_array.call(x)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
16
29
|
end
|
17
30
|
|
18
31
|
def to_a
|
19
32
|
@a
|
20
33
|
end
|
21
|
-
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyrex-object-methods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,26 +10,28 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE0MDcyMDA0MTU0MFoXDTE1MDcyMDA0MTU0MFowSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
18
|
+
ggEBAOF3iTh96mAbOPfpOjNh4Clsa9XFgXjVNUwZ+xoKKUhO93zBrDkVSJTVpe7Q
|
19
|
+
XkritNP06IB1v3stiJpoe9Lc3cevPMHIb6yA8EHvLHBq/IXtaYiDYz0h6jaRddtL
|
20
|
+
aTWmI/QHh6TUwoK5pIywy2lBM6fmiuaF/fBlrTehruVWkOSFlsPFsH0Qrts0gENP
|
21
|
+
OPfZ90CyLXsqK+LGXFSIHnZxTEoS9WR5D6m++Cvh0fxbaTtDT9rDVX8QAml0RgkJ
|
22
|
+
2ccHYZChqR8SxLFUDMQJL2ziMCAmYmEBsp6+SmwFwgz9tLiWKrfcsLtBGt4evS8T
|
23
|
+
/WZo7UWDZsJ47BzcF9SUO5uu4EcCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
|
24
|
+
DwQEAwIEsDAdBgNVHQ4EFgQUsHsnkV+5WwXtQLT/SK+QXeLoUmowJgYDVR0RBB8w
|
25
|
+
HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAXq5yhiRg
|
27
|
+
6l2PaYMXreERiyr5xW15UgYf7grS52zzsELKSt5h1ilooplDglNFnzfzOJwJ7hHn
|
28
|
+
nfjOiw7okyZhoJKihco7m+gP/HaZIFHw6n6habYyN0NLd5m7xyFeaBPXzGeJLzOU
|
29
|
+
jZYqwl4f5tgRDt2dZd3I1RGZuw9RVPtEk6+tUke+xUjN+7Z35x6kmOkjG9MKNEuX
|
30
|
+
ea96lRJkz8IddpbKU8oZhuNZI3s4BbHRGcckyAA1qtMZec5zh03ZnhD21O/LjLTM
|
31
|
+
d7+vhYqYpERASTxH9VrAYLVFg6y6r7dxraNSCySdPmh1Vcn9ukRIP7AK6XpthnVR
|
32
|
+
wjqolFx+GqkWWA==
|
31
33
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
34
|
+
date: 2014-07-20 00:00:00.000000000 Z
|
33
35
|
dependencies: []
|
34
36
|
description:
|
35
37
|
email: james@r0bertson.co.uk
|
@@ -48,18 +50,19 @@ require_paths:
|
|
48
50
|
- lib
|
49
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
50
52
|
requirements:
|
51
|
-
- -
|
53
|
+
- - ">="
|
52
54
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
55
|
+
version: 2.1.0
|
54
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
57
|
requirements:
|
56
|
-
- -
|
58
|
+
- - ">="
|
57
59
|
- !ruby/object:Gem::Version
|
58
60
|
version: '0'
|
59
61
|
requirements: []
|
60
62
|
rubyforge_project:
|
61
|
-
rubygems_version: 2.
|
63
|
+
rubygems_version: 2.2.2
|
62
64
|
signing_key:
|
63
65
|
specification_version: 4
|
64
66
|
summary: polyrex-object-methods
|
65
67
|
test_files: []
|
68
|
+
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|