active_json_cli 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/active_json_cli-0.1.2.gem +0 -0
- data/lib/active_json/pluck.rb +1 -0
- data/lib/active_json/query.rb +2 -2
- data/lib/active_json/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cdd1ffe2a71bd5883e77e1f8c150f7619b2bbb558d5dc28cde36d9bc16fa016
|
4
|
+
data.tar.gz: 6df976807d6e2c2313dc46578e3c412a43f62f59d85664500fab01419230f7a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9df44ec2d021fcd8c777feb7b62f58fb05d59599848af76d5199b4bfccde89a093b221a3549daefc0a45cf9cc4517d528d0584506a9e0681df17ed89bb3d31b
|
7
|
+
data.tar.gz: 1fde3ad093f0ec56707a66c64d1d80e813ff7928f27bd27adf1be4015844acc73fbd8deb805bacc62382159d09a118408448f8a43154ce652f2d0e7d460012a1
|
data/Gemfile.lock
CHANGED
Binary file
|
data/lib/active_json/pluck.rb
CHANGED
data/lib/active_json/query.rb
CHANGED
@@ -5,12 +5,12 @@ module ActiveJson
|
|
5
5
|
extend self
|
6
6
|
|
7
7
|
def select(data, where:, pluck: nil)
|
8
|
-
result = data.select(&apply_filters(where))
|
8
|
+
result = Array(data).select(&apply_filters(where))
|
9
9
|
pluck ? result.map(&pluck_attributes(pluck)).compact : result
|
10
10
|
end
|
11
11
|
|
12
12
|
def reject(data, where:, pluck: nil)
|
13
|
-
result = data.reject(&apply_filters(where))
|
13
|
+
result = Array(data).reject(&apply_filters(where))
|
14
14
|
pluck ? result.map(&pluck_attributes(pluck)).compact : result
|
15
15
|
end
|
16
16
|
|
data/lib/active_json/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_json_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- Rakefile
|
100
100
|
- active_json_cli-0.1.0.gem
|
101
101
|
- active_json_cli-0.1.1.gem
|
102
|
+
- active_json_cli-0.1.2.gem
|
102
103
|
- active_json_cli.gemspec
|
103
104
|
- bin/active_json
|
104
105
|
- bin/console
|