ruby-each-line-2 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +4 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +13 -0
- data/.yardopts +6 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +17 -0
- data/LICENSE.md +22 -0
- data/README.md +24 -0
- data/Rakefile +7 -0
- data/bin/ruby-each-line +14 -0
- data/ruby-each-line.gemspec +13 -0
- metadata +57 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cfc89fb935726a0ce3e39373b0a144dadd1bee6dcdfce82ae1ac2bc5d9ed2e93
|
4
|
+
data.tar.gz: 1af72e7e2ca636252d59a9ef71ee1542c587c09f1b1a824e956b341a2e82d2e0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dbf62a8a20f2d09b8a950b34c357d247bbdd9ecf99545a2a1f4a6c57a599a6e86e64f8476203f7834e58e835777bb1d7d22f559a747cfb53979a99a374be5da8
|
7
|
+
data.tar.gz: 7548fc426ea7d82c0c0b88849b625f91d4e066c60b22426c13b5a4d4cffb50de1d6813ed79c3f6867d3aa00e71c7792ff5ae15fc4c31ad40b454efcd32e56b3b
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-each-line
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.1
|
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2020 Dorian Marié
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# ruby-each-line
|
2
|
+
|
3
|
+
## Description
|
4
|
+
|
5
|
+
Execute ruby on each line from input
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
```
|
10
|
+
USAGE: INPUT | ruby-each-line CODE"
|
11
|
+
```
|
12
|
+
|
13
|
+
```
|
14
|
+
EXAMPLE: ls | ruby-each-line "puts line.split('.').last"
|
15
|
+
```
|
16
|
+
|
17
|
+
## Installation
|
18
|
+
|
19
|
+
`$ gem install ruby-each-line` or add to your `Gemfile` this line: `gem 'ruby-each-line'` then run `bundle install`
|
20
|
+
|
21
|
+
## License
|
22
|
+
|
23
|
+
Released under the MIT License. See the LICENSE file for further details.
|
24
|
+
|
data/Rakefile
ADDED
data/bin/ruby-each-line
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
if ARGV.size != 1
|
4
|
+
puts "USAGE: INPUT | ruby-each-line CODE"
|
5
|
+
puts
|
6
|
+
puts 'EXAMPLE: ls | ruby-each-line "puts line.split(\'.\').last"'
|
7
|
+
exit
|
8
|
+
end
|
9
|
+
|
10
|
+
STDIN.each_line do |line|
|
11
|
+
line = line.strip
|
12
|
+
l = line
|
13
|
+
eval(ARGV.first)
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.platform = Gem::Platform::RUBY
|
3
|
+
spec.name = "ruby-each-line-2"
|
4
|
+
spec.version = "0.0.1"
|
5
|
+
spec.summary = %q{Execute ruby on each line from input}
|
6
|
+
spec.description = spec.summary
|
7
|
+
spec.license = "MIT"
|
8
|
+
spec.authors = ["Dorian Marié"]
|
9
|
+
spec.email = ["dorian@dorianmarie.fr"]
|
10
|
+
spec.homepage = "https://github.com/dorianmariefr/ruby-each-line"
|
11
|
+
spec.files = `git ls-files`.split($/)
|
12
|
+
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby-each-line-2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dorian Marié
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Execute ruby on each line from input
|
14
|
+
email:
|
15
|
+
- dorian@dorianmarie.fr
|
16
|
+
executables:
|
17
|
+
- ruby-each-line
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- ".gitignore"
|
22
|
+
- ".rspec"
|
23
|
+
- ".ruby-gemset"
|
24
|
+
- ".ruby-version"
|
25
|
+
- ".travis.yml"
|
26
|
+
- ".yardopts"
|
27
|
+
- Gemfile
|
28
|
+
- Gemfile.lock
|
29
|
+
- LICENSE.md
|
30
|
+
- README.md
|
31
|
+
- Rakefile
|
32
|
+
- bin/ruby-each-line
|
33
|
+
- ruby-each-line.gemspec
|
34
|
+
homepage: https://github.com/dorianmariefr/ruby-each-line
|
35
|
+
licenses:
|
36
|
+
- MIT
|
37
|
+
metadata: {}
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
require_paths:
|
41
|
+
- 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'
|
52
|
+
requirements: []
|
53
|
+
rubygems_version: 3.1.2
|
54
|
+
signing_key:
|
55
|
+
specification_version: 4
|
56
|
+
summary: Execute ruby on each line from input
|
57
|
+
test_files: []
|