apj 0.0.1 → 0.0.2

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.
Files changed (4) hide show
  1. data/README.md +4 -0
  2. data/bin/apj +10 -1
  3. data/lib/apj/version.rb +1 -1
  4. metadata +5 -5
data/README.md CHANGED
@@ -12,6 +12,10 @@ Just pipe in whatever you want.
12
12
 
13
13
  $ curl https://github.com/rauchy.json | apj
14
14
 
15
+ or read a file:
16
+
17
+ $ apj some_file.json
18
+
15
19
  ## Contributing
16
20
 
17
21
  1. Fork it
data/bin/apj CHANGED
@@ -4,7 +4,16 @@ $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
4
4
  require 'apj'
5
5
 
6
6
  if STDIN.tty?
7
- awesome_print({"Usage" => "curl https://github.com/rauchy.json | apj"})
7
+ if ARGV.empty?
8
+ awesome_print({"Usage" =>
9
+ [
10
+ "curl https://github.com/rauchy.json | apj",
11
+ "apj some_file.json"
12
+ ]})
13
+ else
14
+ input = File.open(ARGV[0]).read
15
+ Apj.print_awesomely(input)
16
+ end
8
17
  else
9
18
  Apj.print_awesomely(STDIN.read)
10
19
  end
@@ -1,3 +1,3 @@
1
1
  module Apj
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: awesome_print
16
- requirement: &70124430236800 !ruby/object:Gem::Requirement
16
+ requirement: &70300241856200 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70124430236800
24
+ version_requirements: *70300241856200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70124430235200 !ruby/object:Gem::Requirement
27
+ requirement: &70300241855740 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70124430235200
35
+ version_requirements: *70300241855740
36
36
  description: Pipe your JSONs into this.
37
37
  email:
38
38
  - omer@rauchy.net