json2val 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -7
  2. data/bin/json2val.rb +13 -0
  3. metadata +39 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: cce986b57dc68dc747428d20b4f888603c7655db
4
- data.tar.gz: ac12d648dda5443abcc8f5a928e771bb7d1e3dce
5
- SHA512:
6
- metadata.gz: 608be419177bdba1851ff94db5b807425215b5521b782be0c69d8f5bf142f3148dab1070f7811232d10c1496f4b581095f2b0f9f91a89ec565e1e6c913c8a3db
7
- data.tar.gz: d0fa1ba4506bf24802becd266f04519537f9e7abc84fbc60dca01011997eafb9662754979fe0fa8fef3c8178236e4525ed27517b57cc5bdc9bf8ee7e27c0720f
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f572b7cec66e1b461a10e5a78f4f7a480d05a976
4
+ data.tar.gz: d9262696705ef37f6133b7109f907e457bfa4a0a
5
+ SHA512:
6
+ metadata.gz: 1bf6ae7e5f66ed10a2aa34f6d68cf4b69fccb39a60a6b5174b7b557b3960e0010b88aababbfec86c484f2851764251d7e40caf93afb7621cb1f776e9fb5fe4fb
7
+ data.tar.gz: e54ca0384e8000f5ac483c4a78c19b96559daa43b2567492d233b0c05e4dcd48f51f09bdbdcd00d7f10a548216195c13eb0d93256ccbeef354594d69423c4c29
@@ -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.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
- date: 2014-03-26 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
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
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
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
- files:
31
+
32
+ files:
34
33
  - bin/json2val.rb
35
- homepage: http://www.generik.co.uk
36
- licenses: []
34
+ homepage: https://github.com/generiklimited/json2val
35
+ licenses:
36
+ - GPL-2
37
37
  metadata: {}
38
- post_install_message:
38
+
39
+ post_install_message: Run json2val.rb without arguments for short help
39
40
  rdoc_options: []
40
- require_paths:
41
+
42
+ require_paths:
41
43
  - lib
42
- required_ruby_version: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
47
- required_rubygems_version: !ruby/object:Gem::Requirement
48
- requirements:
49
- - - '>='
50
- - !ruby/object:Gem::Version
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.0.3
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
+