mongoid_enumerable 0.1.1 → 0.2.0

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: fb530cf42499e51a032c2aa44b278956b0cc9f09a85c51c2327f45e25c00c05f
4
- data.tar.gz: cd079294ce92f0455eaf75f87e418aa1637418be8fd0e06914eab79af99f735a
3
+ metadata.gz: 6c71de239aa1fc189ba440d65634943a35eceeaf6d168060e83c723b0b85db28
4
+ data.tar.gz: 8cfccd02d93029c1e2cb512e48471ebbf995aef507d4cbf468d18df89484faa6
5
5
  SHA512:
6
- metadata.gz: add16cbb3e8ddc294a3a2ee5de08f8083e6fe21a63dadba3a0f80ba79e1c7d19abe72d47e8d8d006df451c797a89d1e73cb70368116d1f23017589ec2d8c7d93
7
- data.tar.gz: 4b6a175e68056e2cc01664ffd660a9fa133d6e10c9bdab3899e250a1a0bcd2d0a94af2657ab2a714ea7976bbb181071106a8a8ba5bc3ffcec84afec1f173ff56
6
+ metadata.gz: be7b70e9018f32ad371ae9efebe45f24ba2f60f0219d9bbdb4182fd5521a83aa876f6f8519fd97af076d6a2a67c307682a3b90a8ca7f037c89eff965452f26d4
7
+ data.tar.gz: 84fb62ed5d800f5d46914fc41767a75bc45642296bfeb157cea45dc1adcd00719bcc8adc226e9f32c8c6d595e349220c5e2b281a38c8a599793513c505c0b43a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mongoid_enumerable (0.1.1)
4
+ mongoid_enumerable (0.2.0)
5
5
  mongoid (>= 4.0)
6
6
 
7
7
  GEM
@@ -16,19 +16,52 @@ GEM
16
16
  tzinfo (~> 1.1)
17
17
  bson (4.3.0)
18
18
  byebug (10.0.2)
19
+ coderay (1.1.2)
19
20
  concurrent-ruby (1.0.5)
20
21
  diff-lcs (1.3)
21
22
  docile (1.3.0)
23
+ ffi (1.9.25)
24
+ formatador (0.2.5)
25
+ guard (2.14.2)
26
+ formatador (>= 0.2.4)
27
+ listen (>= 2.7, < 4.0)
28
+ lumberjack (>= 1.0.12, < 2.0)
29
+ nenv (~> 0.1)
30
+ notiffany (~> 0.0)
31
+ pry (>= 0.9.12)
32
+ shellany (~> 0.0)
33
+ thor (>= 0.18.1)
34
+ guard-compat (1.2.1)
35
+ guard-rspec (4.7.3)
36
+ guard (~> 2.1)
37
+ guard-compat (~> 1.1)
38
+ rspec (>= 2.99.0, < 4.0)
22
39
  i18n (1.0.1)
23
40
  concurrent-ruby (~> 1.0)
24
41
  json (2.1.0)
42
+ listen (3.1.5)
43
+ rb-fsevent (~> 0.9, >= 0.9.4)
44
+ rb-inotify (~> 0.9, >= 0.9.7)
45
+ ruby_dep (~> 1.2)
46
+ lumberjack (1.0.13)
47
+ method_source (0.9.0)
25
48
  minitest (5.11.3)
26
49
  mongo (2.5.3)
27
50
  bson (>= 4.3.0, < 5.0.0)
28
51
  mongoid (7.0.1)
29
52
  activemodel (>= 5.1, < 6.0.0)
30
53
  mongo (>= 2.5.1, < 3.0.0)
54
+ nenv (0.3.0)
55
+ notiffany (0.1.1)
56
+ nenv (~> 0.1)
57
+ shellany (~> 0.0)
58
+ pry (0.11.3)
59
+ coderay (~> 1.1.0)
60
+ method_source (~> 0.9.0)
31
61
  rake (10.5.0)
62
+ rb-fsevent (0.10.3)
63
+ rb-inotify (0.9.10)
64
+ ffi (>= 0.5.0, < 2)
32
65
  rspec (3.7.0)
33
66
  rspec-core (~> 3.7.0)
34
67
  rspec-expectations (~> 3.7.0)
@@ -45,12 +78,15 @@ GEM
45
78
  rspec (>= 3)
46
79
  terminal-notifier (>= 1.4)
47
80
  rspec-support (3.7.1)
81
+ ruby_dep (1.5.0)
82
+ shellany (0.0.1)
48
83
  simplecov (0.16.1)
49
84
  docile (~> 1.1)
50
85
  json (>= 1.8, < 3)
51
86
  simplecov-html (~> 0.10.0)
52
87
  simplecov-html (0.10.2)
53
88
  terminal-notifier (2.0.0)
89
+ thor (0.20.0)
54
90
  thread_safe (0.3.6)
55
91
  tzinfo (1.2.5)
56
92
  thread_safe (~> 0.1)
@@ -61,6 +97,8 @@ PLATFORMS
61
97
  DEPENDENCIES
62
98
  bundler (~> 1.16)
63
99
  byebug
100
+ guard
101
+ guard-rspec
64
102
  mongoid
65
103
  mongoid_enumerable!
66
104
  rake (~> 10.0)
@@ -69,4 +107,4 @@ DEPENDENCIES
69
107
  simplecov
70
108
 
71
109
  BUNDLED WITH
72
- 1.16.1
110
+ 1.16.2
data/Guardfile CHANGED
@@ -15,45 +15,6 @@
15
15
  #
16
16
  # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
17
 
18
- guard 'livereload' do
19
- extensions = {
20
- css: :css,
21
- scss: :css,
22
- sass: :css,
23
- js: :js,
24
- coffee: :js,
25
- html: :html,
26
- png: :png,
27
- gif: :gif,
28
- jpg: :jpg,
29
- jpeg: :jpeg,
30
- # less: :less, # uncomment if you want LESS stylesheets done in browser
31
- }
32
-
33
- rails_view_exts = %w(erb haml slim)
34
-
35
- # file types LiveReload may optimize refresh for
36
- compiled_exts = extensions.values.uniq
37
- watch(%r{public/.+\.(#{compiled_exts * '|'})})
38
-
39
- extensions.each do |ext, type|
40
- watch(%r{
41
- (?:app|vendor)
42
- (?:/assets/\w+/(?<path>[^.]+) # path+base without extension
43
- (?<ext>\.#{ext})) # matching extension (must be first encountered)
44
- (?:\.\w+|$) # other extensions
45
- }x) do |m|
46
- path = m[1]
47
- "/assets/#{path}.#{type}"
48
- end
49
- end
50
-
51
- # file needing a full reload of the page anyway
52
- watch(%r{app/views/.+\.(#{rails_view_exts * '|'})$})
53
- watch(%r{app/helpers/.+\.rb})
54
- watch(%r{config/locales/.+\.yml})
55
- end
56
-
57
18
  # Note: The cmd option is now required due to the increasing number of ways
58
19
  # rspec may be run, below are examples of the most common uses.
59
20
  # * bundler: 'bundle exec rspec'
@@ -26,6 +26,10 @@ module MongoidEnumerable
26
26
  base.class.redefine_method(method_name) do
27
27
  base.where(field_name => value)
28
28
  end
29
+
30
+ base.class.redefine_method("all_#{field_name}") do
31
+ values
32
+ end
29
33
  end
30
34
  end
31
35
  end
@@ -1,3 +1,3 @@
1
1
  module MongoidEnumerable
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -26,6 +26,8 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "rspec-nc"
27
27
  spec.add_development_dependency "mongoid"
28
28
  spec.add_development_dependency "byebug"
29
+ spec.add_development_dependency "guard"
30
+ spec.add_development_dependency "guard-rspec"
29
31
  spec.add_dependency "mongoid", ">= 4.0"
30
32
  spec.add_development_dependency "simplecov"
31
33
  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.1.1
4
+ version: 0.2.0
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-05-21 00:00:00.000000000 Z
11
+ date: 2018-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,34 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: guard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: mongoid
99
127
  requirement: !ruby/object:Gem::Requirement