json2val 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/bin/json2val.rb +13 -0
- metadata +39 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f572b7cec66e1b461a10e5a78f4f7a480d05a976
|
4
|
+
data.tar.gz: d9262696705ef37f6133b7109f907e457bfa4a0a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1bf6ae7e5f66ed10a2aa34f6d68cf4b69fccb39a60a6b5174b7b557b3960e0010b88aababbfec86c484f2851764251d7e40caf93afb7621cb1f776e9fb5fe4fb
|
7
|
+
data.tar.gz: e54ca0384e8000f5ac483c4a78c19b96559daa43b2567492d233b0c05e4dcd48f51f09bdbdcd00d7f10a548216195c13eb0d93256ccbeef354594d69423c4c29
|
data/bin/json2val.rb
CHANGED
@@ -4,6 +4,19 @@
|
|
4
4
|
# License : GPLv2
|
5
5
|
#
|
6
6
|
|
7
|
+
if ARGV.empty?
|
8
|
+
puts "
|
9
|
+
Example Usage :
|
10
|
+
cat file.json | #{$0} key subkey
|
11
|
+
|
12
|
+
keys are infinitely stackable, as per your json
|
13
|
+
#{$0} accepts json only on STDIN
|
14
|
+
|
15
|
+
"
|
16
|
+
exit 1
|
17
|
+
end
|
18
|
+
|
19
|
+
|
7
20
|
require 'json'
|
8
21
|
|
9
22
|
a = JSON.parse(STDIN.read)
|
metadata
CHANGED
@@ -1,58 +1,61 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: json2val
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
- Mateusz Pawlowski
|
6
|
+
authors:
|
7
|
+
- Mateusz Pawlowski @ Generik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
|
12
|
+
date: 2014-03-26 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
14
15
|
name: json
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
16
|
prerelease: false
|
22
|
-
|
23
|
-
requirements:
|
24
|
-
- -
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version:
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: "0"
|
22
|
+
type: :runtime
|
23
|
+
version_requirements: *id001
|
27
24
|
description: Extract values from json on commandline without funcky regexps
|
28
25
|
email: mateusz@generik.co.uk
|
29
|
-
executables:
|
26
|
+
executables:
|
30
27
|
- json2val.rb
|
31
28
|
extensions: []
|
29
|
+
|
32
30
|
extra_rdoc_files: []
|
33
|
-
|
31
|
+
|
32
|
+
files:
|
34
33
|
- bin/json2val.rb
|
35
|
-
homepage:
|
36
|
-
licenses:
|
34
|
+
homepage: https://github.com/generiklimited/json2val
|
35
|
+
licenses:
|
36
|
+
- GPL-2
|
37
37
|
metadata: {}
|
38
|
-
|
38
|
+
|
39
|
+
post_install_message: Run json2val.rb without arguments for short help
|
39
40
|
rdoc_options: []
|
40
|
-
|
41
|
+
|
42
|
+
require_paths:
|
41
43
|
- lib
|
42
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
-
|
45
|
-
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
version: '0'
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- &id002
|
47
|
+
- ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: "0"
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- *id002
|
52
53
|
requirements: []
|
54
|
+
|
53
55
|
rubyforge_project:
|
54
|
-
rubygems_version: 2.
|
56
|
+
rubygems_version: 2.2.2
|
55
57
|
signing_key:
|
56
58
|
specification_version: 4
|
57
59
|
summary: Commandline JSON value extractor
|
58
60
|
test_files: []
|
61
|
+
|