mongoid-normalize-strings 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82cbebbb67d134e3c73f5031e15a3195a1e79f69
4
- data.tar.gz: af32e857ea377f2af72317c0431a64e45b346505
3
+ metadata.gz: 09316e83b81f79f4ab988a563f2c0329dd16edd7
4
+ data.tar.gz: 3667ea07595b313ce0bf91d0bae2f290c3230858
5
5
  SHA512:
6
- metadata.gz: e82a88242a71987816ee2256414e12e7f8187a2b8c296f907433e3b6d15fcd586413a0e782c1dfa6d03becd7be74c93790376aacb3c548989ff3ed5ad7bc341c
7
- data.tar.gz: 500beecd10065d3fbaff9fdde02c8265a1e7ec710e3360e2990b3a72981ca27b455a0b215fa53bfce38ac236e3462dec16e2ad588eafc6e1c34ccf11496e7908
6
+ metadata.gz: a69f52d9a15d765050d1ec8829011ae2662eff1387104810f6d44f044b8ccc0a5db28fea69bce8cdd0cc74c546ee3f90f0cfdc7cad7e5efd158c0c84aa697c11
7
+ data.tar.gz: 7c4e9e931a38e563a40b126a369c96dee396c33e6d52bc711f8eff909f6ceba39b15ad8741e2b7d3ec86ce8b4110dcb773c8f126e33da08824c9ed820d88755c
@@ -17,7 +17,7 @@ module Mongoid
17
17
  # Returns normalized_fields Class intance variable
18
18
  #
19
19
  def normalized_fields
20
- @normalized_fields
20
+ self.superclass == Object ? @normalized_fields : self.superclass.normalized_fields
21
21
  end
22
22
  end
23
23
 
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module NormalizeStrings
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -20,4 +20,12 @@ describe Mongoid::NormalizeStrings do
20
20
  city.save
21
21
  expect(city.reload.name_normalized).to eq('avila')
22
22
  end
23
+
24
+ it 'support one level of heritage' do
25
+ class Aux < City
26
+ end
27
+
28
+ expect(City.normalized_fields).to match_array([:name])
29
+ expect(Aux.normalized_fields).to match_array([:name])
30
+ end
23
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-normalize-strings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Jurado
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-08 00:00:00.000000000 Z
11
+ date: 2016-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.2.2
122
+ rubygems_version: 2.4.5.1
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Normalize fields of type string in your Mongoid models.