fmcache 0.1.1 → 0.1.2

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: ec627f276181ebe2b3545e82864946010a0f056221075829eb53a2fc3884575f
4
- data.tar.gz: bcc99177ea4e1b935eff30925e2ccb6a3fde41b19034c1741f7c4d6109c506de
3
+ metadata.gz: 450fac8896504841b9ed4dcc1f8846c077678aa00f6e046377f0aaf1d9d5bca8
4
+ data.tar.gz: 66d1c2585c68faafc4949d41e5112ba798f16d985fd7e557c1c154ee34b294b0
5
5
  SHA512:
6
- metadata.gz: 3c6393c6abd0f841036bf1f4db7c33bf7328231c86373401de104bd388079df9b0907019cd7d46d53e027535d5e339362c06431c629c82813eeaac0aa2d4f464
7
- data.tar.gz: ddda0f0ed14eddf7a528e1282cd54e126fc72dd641037fe0b4646813c911450ada586300d8b9e3188b3cf5045944b350023c009532484865e7a28f0fe5966c88
6
+ metadata.gz: 829181d98d91b0d32fd9a95bca2991a908a8f0f25238e4d185b94c28fa83c543b9d0092d347bf5204add4212fc225eaa520a35697afb2634ccef4a487c5f60ff
7
+ data.tar.gz: c340dc530f656b75a33e5becfc7fe9562ff08a1c3f7b36a30f8f2614146d5480f804ab85e041c7e4cd0de32ef5e66d20c5a5e2f5cbb0a7dcedd67db3b81e6801
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fmcache (0.1.1)
5
- field_mask_parser (~> 0.4.1)
4
+ fmcache (0.1.2)
5
+ field_mask_parser (~> 0.4.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -22,7 +22,7 @@ GEM
22
22
  coderay (1.1.2)
23
23
  concurrent-ruby (1.1.3)
24
24
  diff-lcs (1.3)
25
- field_mask_parser (0.4.1)
25
+ field_mask_parser (0.4.2)
26
26
  i18n (1.2.0)
27
27
  concurrent-ruby (~> 1.0)
28
28
  method_source (0.9.2)
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "mock_redis", "~> 0.19"
31
31
  spec.add_development_dependency "redis", "~> 4.0"
32
32
  spec.add_development_dependency "activerecord", "~> 5.2"
33
- spec.add_dependency "field_mask_parser", "~> 0.4.1"
33
+ spec.add_dependency "field_mask_parser", "~> 0.4.2"
34
34
  end
@@ -4,14 +4,7 @@ module FMCache
4
4
  # @param [FieldMaskParser::Node] field_mask
5
5
  # @return [<String>]
6
6
  def to_fields(field_mask, prefix: [])
7
- r = []
8
- field_mask.attrs.each do |attr|
9
- r << Field.to_s(prefix: prefix, attr: attr)
10
- end
11
- field_mask.assocs.each do |assoc|
12
- r += to_fields(assoc, prefix: prefix + [assoc.name])
13
- end
14
- r
7
+ field_mask.to_paths(prefix: prefix, sort: false)
15
8
  end
16
9
 
17
10
  # @param [<Integer>] ids
@@ -9,7 +9,7 @@ module FMCache
9
9
 
10
10
  def ==(other)
11
11
  @ids == other.ids &&
12
- @field_mask.to_h == other.field_mask.to_h
12
+ @field_mask.to_paths == other.field_mask.to_paths
13
13
  end
14
14
 
15
15
  def eql?(other)
@@ -1,3 +1,3 @@
1
1
  module FMCache
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fmcache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nao Minami
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.4.1
117
+ version: 0.4.2
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.4.1
124
+ version: 0.4.2
125
125
  description: Library for caching json masked by FieldMask
126
126
  email:
127
127
  - south37777@gmail.com