active_json_cli 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: 00b1050d2e8e3fc75bfff973e5625faebb5eb5546c9f357cc2c3ebb97be2c133
4
- data.tar.gz: 8940e6f6ae2877cfd69c15668ade74efa081c02f0a77f4a4d1bcf48f1fb6dcc9
3
+ metadata.gz: 5cdd1ffe2a71bd5883e77e1f8c150f7619b2bbb558d5dc28cde36d9bc16fa016
4
+ data.tar.gz: 6df976807d6e2c2313dc46578e3c412a43f62f59d85664500fab01419230f7a0
5
5
  SHA512:
6
- metadata.gz: 730bc7426b800773b8bd56f2b16983b5d2db73d8dcf8eab80928631d518933b8233bad88b6eaffc811dcd39998cbdfa4ae8f8a058309112a0c8a4867189c043d
7
- data.tar.gz: 0e0820ea84515ba7652fe23e341d24cad62401cfda25f904c6ac176b818cd333248cfab22b5f28a3622b6742bab762bd89e96bc92fbc3d6186aa49359a38efef
6
+ metadata.gz: d9df44ec2d021fcd8c777feb7b62f58fb05d59599848af76d5199b4bfccde89a093b221a3549daefc0a45cf9cc4517d528d0584506a9e0681df17ed89bb3d31b
7
+ data.tar.gz: 1fde3ad093f0ec56707a66c64d1d80e813ff7928f27bd27adf1be4015844acc73fbd8deb805bacc62382159d09a118408448f8a43154ce652f2d0e7d460012a1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_json_cli (0.1.2)
4
+ active_json_cli (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
Binary file
@@ -15,6 +15,7 @@ module ActiveJson
15
15
 
16
16
  def split_nested(pluck)
17
17
  return unless pluck
18
+
18
19
  pluck.split('.').map(&:to_sym)
19
20
  end
20
21
 
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module ActiveJson
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
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.2
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-16 00:00:00.000000000 Z
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