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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abd7b203f702edddda3105a0b8e06434730064a7f82e891456f21843a8003c35
4
- data.tar.gz: e5751642d4b68f54553d8fc622d355e8828ab6efcc3a43fb78a9d1ac2e41e9a3
3
+ metadata.gz: 24a97c0f3839431a595b8b7db8795f1be4d83b2a06ea356c09a36f6036c88b3f
4
+ data.tar.gz: a4196c0318eca6e67014b1b963b6f44e52b8b375bbfdadbe777e519d53e126d8
5
5
  SHA512:
6
- metadata.gz: 15cd94d6fefe9d29e38907eea218e0f285093f5c3b5433c3096e9b54eb25882c96f7a254c7555b5741662a65afa7e326f685e25d9c09425950678696feecde9e
7
- data.tar.gz: 54044910777d3168571bf8b801e690fd947c704683b68c3818b0888d71ee2a7b376e4884aef393ef813df6da72d7ec6524b5907b9c784f50e74cdbc730f5efa5
6
+ metadata.gz: 4808c9c79b5fe650c88213d758585d26358e248fdb1a62d926e638c3c3afcb3b8a69a4a4d3039991aefead0d9fa81cfb934165c9c54e2c6bfbb66ef9911e893a
7
+ data.tar.gz: f99ba00dfc2636b266da1bad750269fd16d6eff54d6ab6dafe5593e4ced8949384de11c0812a0411cbf85681aaf21faa8e227087fb5342f49bb5b5068b165dfb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- field_mask_parser (0.3.0)
4
+ field_mask_parser (0.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -43,7 +43,7 @@ end
43
43
 
44
44
  # == Schema Information
45
45
  #
46
- # Table name: users
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).klass
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
@@ -1,3 +1,3 @@
1
1
  module FieldMaskParser
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  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.0
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-10 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler