jsonpipe 0.0.1

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.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in jsonpipe.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2011 Roc Yu
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,23 @@
1
+ = Jsonpipe
2
+
3
+ This is a ruby gem offer command line to parse and pretty print json from io pipe.
4
+
5
+ == Install
6
+
7
+ sudo gem install jsonpipe
8
+
9
+ == Use it in your shell
10
+
11
+ echo '{"abc/def": [1,2,3]}' | jsonpipe
12
+
13
+ curl http://api.twitter.com/1/statuses/public_timeline.json | jsonpipe
14
+
15
+ == Inspire by
16
+
17
+ {Python Jsonpipe by dvxhouse }[https://github.com/dvxhouse/jsonpipe]
18
+
19
+ Just Build for fun
20
+
21
+ == Support By
22
+
23
+ {intridea inc}[http://intridea.com]
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/ruby
2
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
+ require 'jsonpipe'
4
+
5
+ Jsonpipe::Runner.new()
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "jsonpipe/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "jsonpipe"
7
+ s.version = Jsonpipe::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Roc Yu"]
10
+ s.email = ["rociiu.yu@gmail.com"]
11
+ s.homepage = "http://rociiu.com"
12
+ s.summary = %q{}
13
+ s.description = %q{}
14
+
15
+ s.rubyforge_project = "jsonpipe"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency 'awesome_print', '>= 0.3.2'
23
+ s.add_dependency 'yajl-ruby', '>= 0.8.2'
24
+
25
+ end
@@ -0,0 +1,8 @@
1
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '', 'lib')
2
+ require 'rubygems'
3
+ require 'awesome_print'
4
+ require 'yajl'
5
+ require 'jsonpipe/runner'
6
+
7
+ module Jsonpipe
8
+ end
@@ -0,0 +1,16 @@
1
+ module Jsonpipe
2
+
3
+ class Runner
4
+
5
+ def initialize()
6
+ @read_from_pipe = $stdin.read
7
+ execute
8
+ end
9
+
10
+ def execute
11
+ ap Yajl::Parser.new.parse(@read_from_pipe)
12
+ end
13
+
14
+ end
15
+
16
+ end
@@ -0,0 +1,3 @@
1
+ module Jsonpipe
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,108 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jsonpipe
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Roc Yu
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-04-11 00:00:00 +08:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: awesome_print
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 23
30
+ segments:
31
+ - 0
32
+ - 3
33
+ - 2
34
+ version: 0.3.2
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: yajl-ruby
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 59
46
+ segments:
47
+ - 0
48
+ - 8
49
+ - 2
50
+ version: 0.8.2
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ description: ""
54
+ email:
55
+ - rociiu.yu@gmail.com
56
+ executables:
57
+ - jsonpipe
58
+ extensions: []
59
+
60
+ extra_rdoc_files: []
61
+
62
+ files:
63
+ - .gitignore
64
+ - Gemfile
65
+ - LICENSE
66
+ - README.rdoc
67
+ - Rakefile
68
+ - bin/jsonpipe
69
+ - jsonpipe.gemspec
70
+ - lib/jsonpipe.rb
71
+ - lib/jsonpipe/runner.rb
72
+ - lib/jsonpipe/version.rb
73
+ has_rdoc: true
74
+ homepage: http://rociiu.com
75
+ licenses: []
76
+
77
+ post_install_message:
78
+ rdoc_options: []
79
+
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ hash: 3
97
+ segments:
98
+ - 0
99
+ version: "0"
100
+ requirements: []
101
+
102
+ rubyforge_project: jsonpipe
103
+ rubygems_version: 1.3.7
104
+ signing_key:
105
+ specification_version: 3
106
+ summary: ""
107
+ test_files: []
108
+