field_mask_parser 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/field_mask_parser/node.rb +12 -0
- data/lib/field_mask_parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8169f8b0b07995644bde6891e92755889af7881e5bb742606145e3d661924eb5
|
4
|
+
data.tar.gz: 5b339b76aba296d6d9ebd980b23f3b22b8e7de5b1d0f0b389c62cd945b130354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a71437e37acddbf781a67b1a547b215fb1a955c46b0963f2b9e76b44fb3d150b5cbbbe27659dcf6b0305aa5af62ea3c0923b1b45be93129696404995b5e0a65f
|
7
|
+
data.tar.gz: 9358d9d0c5902d7dbf732bfb4d5bce927da9c57289c5d44f37a349e0e81da6623c815f9899c5bfa2531df9e1f8fd955eeec73ef2f8f45cb7a9ab95febb41e97a
|
data/Gemfile.lock
CHANGED
@@ -43,5 +43,17 @@ module FieldMaskParser
|
|
43
43
|
has_manies: @has_manies.map(&:to_h),
|
44
44
|
}
|
45
45
|
end
|
46
|
+
|
47
|
+
def to_paths(prefix: [], sort: true)
|
48
|
+
r = []
|
49
|
+
attrs.each do |attr|
|
50
|
+
r << (prefix + [attr]).join(".")
|
51
|
+
end
|
52
|
+
assocs.each do |assoc|
|
53
|
+
r += assoc.to_paths(prefix: prefix + [assoc.name], sort: false)
|
54
|
+
end
|
55
|
+
r.sort! if sort
|
56
|
+
r
|
57
|
+
end
|
46
58
|
end
|
47
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: field_mask_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nao Minami
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|