field_mask_parser 0.3.0 → 0.3.1
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/README.md +3 -1
- data/lib/field_mask_parser/parser.rb +5 -1
- 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: 24a97c0f3839431a595b8b7db8795f1be4d83b2a06ea356c09a36f6036c88b3f
|
4
|
+
data.tar.gz: a4196c0318eca6e67014b1b963b6f44e52b8b375bbfdadbe777e519d53e126d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4808c9c79b5fe650c88213d758585d26358e248fdb1a62d926e638c3c3afcb3b8a69a4a4d3039991aefead0d9fa81cfb934165c9c54e2c6bfbb66ef9911e893a
|
7
|
+
data.tar.gz: f99ba00dfc2636b266da1bad750269fd16d6eff54d6ab6dafe5593e4ced8949384de11c0812a0411cbf85681aaf21faa8e227087fb5342f49bb5b5068b165dfb
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -43,7 +43,7 @@ end
|
|
43
43
|
|
44
44
|
# == Schema Information
|
45
45
|
#
|
46
|
-
# Table name:
|
46
|
+
# Table name: profiles
|
47
47
|
#
|
48
48
|
# id :integer not null, primary key
|
49
49
|
# user_id :string not null, indexed
|
@@ -60,11 +60,13 @@ end
|
|
60
60
|
{
|
61
61
|
:name=>nil,
|
62
62
|
:is_leaf=>false,
|
63
|
+
:klass=>User,
|
63
64
|
:attrs=>[:id],
|
64
65
|
:assocs=>[
|
65
66
|
{
|
66
67
|
:name=>:profile,
|
67
68
|
:is_leaf=>false,
|
69
|
+
:klass=>Profile,
|
68
70
|
:attrs=>[:name],
|
69
71
|
:assocs=>[]
|
70
72
|
}
|
@@ -47,7 +47,11 @@ module FieldMaskParser
|
|
47
47
|
# @param [Symbol] name
|
48
48
|
# @return [Class]
|
49
49
|
def get_assoc_klass(parent, name)
|
50
|
-
parent.reflect_on_association(name)
|
50
|
+
assocition = parent.reflect_on_association(name)
|
51
|
+
if !assocition
|
52
|
+
raise "#{parent} does not have #{name} assocition!"
|
53
|
+
end
|
54
|
+
assocition.klass
|
51
55
|
end
|
52
56
|
end
|
53
57
|
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.3.
|
4
|
+
version: 0.3.1
|
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-09-
|
11
|
+
date: 2018-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|