kmdata 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/kmdata +3 -9
- data/lib/kmdata/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 602ff73b5d5664a71fb24a5c94d232a4f7be40b6
|
4
|
+
data.tar.gz: 700860779bd8c136968f1167c3366e9c84d14039
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 233c04a0139779a71c9b53d94e149bd01cb59e9062618dac439703c2348cf79a71627ed50d6b3f3d84410161fcebba620aef9906996641ea8ed02843417c4c8d
|
7
|
+
data.tar.gz: 1b817bf5ff314ce388a4f80ffe54dcdaae8569d58277d77d9bea857a2662e69a10ab4c8266f9fbd7ad236e4197336091ce2ee4e879509c1017d45b8e897e39b3
|
data/bin/kmdata
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'kmdata'
|
4
4
|
require 'optparse'
|
5
5
|
require 'pry'
|
6
|
+
require 'yaml'
|
6
7
|
|
7
8
|
options = { model: "people", include: "addresses,phone_numbers" }
|
8
9
|
|
@@ -21,14 +22,7 @@ end.parse!
|
|
21
22
|
|
22
23
|
if ARGV[0]
|
23
24
|
results = KMData.get(options[:model], q: ARGV[0], include: options[:include])
|
24
|
-
|
25
|
-
|
26
|
-
results.each do |object|
|
27
|
-
puts "\n"
|
28
|
-
object.to_h.each do |k, v|
|
29
|
-
puts "#{k}: #{v}"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
puts "\n"
|
25
|
+
results.map do |r|
|
26
|
+
puts r.to_h.to_yaml if results.any?
|
33
27
|
end
|
34
28
|
end
|
data/lib/kmdata/version.rb
CHANGED