mongoid_enumerable 0.2.1 → 0.2.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: 9ec2532e40c5edfc29029fe022a8feb7bb597454221962243aa10400bc34afb4
4
- data.tar.gz: 44bae9e6eb17d5cc1382e780728e4b9c71078212781aa103bb6dcbd804c164d1
3
+ metadata.gz: 2297bea78c60f9cab28d878252f29a80752d7a29b708ba9e11b3ac6d5a3cefca
4
+ data.tar.gz: 619b26c22a62e2acbd6f84ad2623d62a7494048958c57ef9c01853e5526af274
5
5
  SHA512:
6
- metadata.gz: cddccbd3dccf073ac03e5a803414a42e174cddf6c1e8009c38e4138909d4a7ff8eb3d0d8102c12edee123cd2a7a0ef44102d1f78f5bb2b8ac99397cfb0349481
7
- data.tar.gz: 45caf06aa1ab7d4ef5ae487292ea55dc069c805f1c7f16a43b69acaa23f448add7ca6bae780b1ee4696228ef963a79c516249e2668835aa0e515357033ca1648
6
+ metadata.gz: da92a24350c59ee86e9c6f5035b45e640b0e8207e64c4fe93f0491edf3383c3ff68bde374cea0881567caacfa3ba724290357c35f756c6e20975368db52f62f2
7
+ data.tar.gz: 98a2761a3feaf2d62d8143327b935991e576457f764202daec1c907b6f35d622bb5411f181ffa4198a99f0b171ef748132a7adfb9b221e9bed6364fbf24d9170
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mongoid_enumerable (0.2.1)
4
+ mongoid_enumerable (0.2.2)
5
5
  mongoid (>= 4.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -95,3 +95,10 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
95
95
  ## Contributing
96
96
 
97
97
  Bug reports and pull requests are welcome on GitHub at https://github.com/douglaslise/mongoid_enumerable.
98
+
99
+ ## Releasing a New Version
100
+ After change version in file `lib/mongoid_enumerable/version.rb` it is needed only to run this command in terminal:
101
+
102
+ ```shell
103
+ rake release
104
+ ```
@@ -23,9 +23,7 @@ module MongoidEnumerable
23
23
  send(field_name) == value
24
24
  end
25
25
 
26
- base.define_singleton_method(method_name) do
27
- base.where(field_name => value)
28
- end
26
+ scope value, -> { where(field_name => value) }
29
27
  end
30
28
 
31
29
  base.define_singleton_method("all_#{field_name}") do
@@ -1,3 +1,3 @@
1
1
  module MongoidEnumerable
2
- VERSION = "0.2.1"
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_enumerable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Lise
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-11 00:00:00.000000000 Z
11
+ date: 2018-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler