missile_emitter 0.3.18 → 0.3.19
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 +4 -4
- data/Gemfile.lock +14 -14
- data/lib/missile_emitter/searchable.rb +5 -6
- data/lib/missile_emitter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 525f92760c025042f96e1f370ad98633d46305238bc30c7041cc3c2c57fb247a
|
|
4
|
+
data.tar.gz: f4dd1e712152f896653f7c2c9dd45974eda854c44e28047704767a5333091c9a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9593b253dc11e5d109bb2334b4ed2b0b18e3052139359812bc515216c9803cefe07d7e7652c13566839eab4dd0680c4b00292d8f8335c65d7885eb37ba479812
|
|
7
|
+
data.tar.gz: 55572f2c8b620fdaac999df889ff23a5d085e7878ddfae020812ce4849895e6d4dcfbb3c29d8a68d42bb1f9b875c353f74672b826fa314122edb3f94bb1cd4f1
|
data/Gemfile.lock
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
missile_emitter (0.3.
|
|
4
|
+
missile_emitter (0.3.19)
|
|
5
5
|
activesupport
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activesupport (6.0.
|
|
10
|
+
activesupport (6.0.3.1)
|
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
12
12
|
i18n (>= 0.7, < 2)
|
|
13
13
|
minitest (~> 5.1)
|
|
14
14
|
tzinfo (~> 1.1)
|
|
15
|
-
zeitwerk (~> 2.2)
|
|
15
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
16
16
|
coderay (1.1.2)
|
|
17
17
|
concurrent-ruby (1.1.6)
|
|
18
18
|
diff-lcs (1.3)
|
|
19
19
|
i18n (1.8.2)
|
|
20
20
|
concurrent-ruby (~> 1.0)
|
|
21
|
-
method_source (0.
|
|
22
|
-
minitest (5.14.
|
|
23
|
-
pry (0.
|
|
24
|
-
coderay (~> 1.1
|
|
25
|
-
method_source (~>
|
|
21
|
+
method_source (1.0.0)
|
|
22
|
+
minitest (5.14.1)
|
|
23
|
+
pry (0.13.1)
|
|
24
|
+
coderay (~> 1.1)
|
|
25
|
+
method_source (~> 1.0)
|
|
26
26
|
rake (13.0.1)
|
|
27
27
|
rspec (3.9.0)
|
|
28
28
|
rspec-core (~> 3.9.0)
|
|
29
29
|
rspec-expectations (~> 3.9.0)
|
|
30
30
|
rspec-mocks (~> 3.9.0)
|
|
31
|
-
rspec-core (3.9.
|
|
32
|
-
rspec-support (~> 3.9.
|
|
33
|
-
rspec-expectations (3.9.
|
|
31
|
+
rspec-core (3.9.2)
|
|
32
|
+
rspec-support (~> 3.9.3)
|
|
33
|
+
rspec-expectations (3.9.2)
|
|
34
34
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
35
35
|
rspec-support (~> 3.9.0)
|
|
36
36
|
rspec-mocks (3.9.1)
|
|
37
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
38
38
|
rspec-support (~> 3.9.0)
|
|
39
|
-
rspec-support (3.9.
|
|
39
|
+
rspec-support (3.9.3)
|
|
40
40
|
thread_safe (0.3.6)
|
|
41
|
-
tzinfo (1.2.
|
|
41
|
+
tzinfo (1.2.7)
|
|
42
42
|
thread_safe (~> 0.1)
|
|
43
|
-
zeitwerk (2.
|
|
43
|
+
zeitwerk (2.3.0)
|
|
44
44
|
|
|
45
45
|
PLATFORMS
|
|
46
46
|
ruby
|
|
@@ -18,14 +18,13 @@ module MissileEmitter
|
|
|
18
18
|
next relation if value.blank? # ignore empty value
|
|
19
19
|
|
|
20
20
|
if filter = conditions.fetch(self, {})[key]
|
|
21
|
+
# Inside the scope block, You can get value through calling the _ method
|
|
21
22
|
relation.extending do
|
|
22
|
-
# Just for fun :)
|
|
23
|
+
# Just for fun :)
|
|
23
24
|
define_method(:_) { value }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
alias_method :_1, :_
|
|
28
|
-
end
|
|
25
|
+
# With ruby >= 2.7 you can use _1 instead of _
|
|
26
|
+
# Polyfill for the earlier version
|
|
27
|
+
alias_method :_1, :_ unless has_underline_method
|
|
29
28
|
end.instance_exec(value, &filter)
|
|
30
29
|
elsif column_names.include?(key.to_s)
|
|
31
30
|
relation.where key => value
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: missile_emitter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jerry Chen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
130
|
version: '0'
|
|
131
131
|
requirements: []
|
|
132
|
-
rubygems_version: 3.
|
|
132
|
+
rubygems_version: 3.1.2
|
|
133
133
|
signing_key:
|
|
134
134
|
specification_version: 4
|
|
135
135
|
summary: Ruby元编程辅助工具
|