jr-cli 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 005677c875531b270187379f8b765a4a9beb6374
4
- data.tar.gz: e41526bfe71c4df143449b48e65faa08874ffed9
3
+ metadata.gz: 3e9c0a3d80b3402fe9d7eed9c291bfbb879d906b
4
+ data.tar.gz: e3288ed72a7e928839b06fdc7bda4888bfec886b
5
5
  SHA512:
6
- metadata.gz: aff0c9d30eb30fda0108cbde415e60d7a96849b2b1e6c6f0c4adb407688b12af81086ef8881ee76bd3838e7d9cb432b7a6356ef25ce12b5f1f51eca98a5836c5
7
- data.tar.gz: a7a38592ef10488966c86e54da474d2879c1a25fa910d540d34301bda5361cea374b11a5c1e82d675e583fceb50a0b093c105326deff8d6cf57d267723f7c5bc
6
+ metadata.gz: a1b1d1afdf96a5c1743fc52431e51a35396548d4c04aca525f87581d0611f29ad6ea6a9141d39ab565cb792b8e6136589e6d1135d93a3c128d0ea17a2b621af8
7
+ data.tar.gz: 02d62467015405fe56247703e881d254c3e0bfa57e49e9da5347de46340f0fd2769b7ebd0afa06bb76fd477356f574c24d1106a1dff4f42c6bcbb31e510a063b
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ 0.0.2 (2014-10-06)
2
+ ------------------
3
+
4
+ * JSON Enumerator is returned as Enumerator::Lazy by default
5
+ * Add Kernel#itself method for Ruby 2.1 or earlier
6
+
7
+ 0.0.1 (2014-10-03)
8
+ ------------------
9
+
10
+ * Initial release
data/README.md CHANGED
@@ -109,7 +109,7 @@ json_enumerator.instance_eval { your_jr_filter_runs_here }
109
109
 
110
110
  ## Contributing
111
111
 
112
- 1. Fork it ( https://github.com/yuya-takeyama/jr-cli/fork )
112
+ 1. Fork it ( https://github.com/yuya-takeyama/jr/fork )
113
113
  2. Create your feature branch (`git checkout -b my-new-feature`)
114
114
  3. Commit your changes (`git commit -am 'Add some feature'`)
115
115
  4. Push to the branch (`git push origin my-new-feature`)
data/bin/jr CHANGED
@@ -6,7 +6,15 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
 
7
7
  require 'jr/cli/version'
8
8
  require 'yajl'
9
-
9
+
10
+ unless Kernel.respond_to? :itself
11
+ module Kernel
12
+ def itself
13
+ self
14
+ end
15
+ end
16
+ end
17
+
10
18
  inputs = ARGV[1] ? ARGV[1..-1].map {|f| open f } : [STDIN]
11
19
  result = Enumerator.new do |yielder|
12
20
  inputs.each do |input|
@@ -14,7 +22,7 @@ result = Enumerator.new do |yielder|
14
22
  yielder.yield d
15
23
  end
16
24
  end
17
- end.instance_eval(ARGV[0])
25
+ end.lazy.instance_eval(ARGV[0])
18
26
 
19
27
  encoder = Yajl::Encoder.new(pretty: true)
20
28
 
@@ -1,5 +1,5 @@
1
1
  module Jr
2
2
  module Cli
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jr-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuya Takeyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-02 00:00:00.000000000 Z
11
+ date: 2014-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby
@@ -61,6 +61,7 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - ".gitignore"
64
+ - CHANGELOG.md
64
65
  - Gemfile
65
66
  - LICENSE.txt
66
67
  - README.md