pied_piper 0.1.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.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +0 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +41 -0
- data/LICENSE.txt +21 -0
- data/README.md +183 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/pied_piper/kernel.rb +11 -0
- data/lib/pied_piper/version.rb +3 -0
- data/lib/pied_piper.rb +42 -0
- data/pied_piper.gemspec +42 -0
- metadata +120 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 87334c647e9be342839edbef72429d045ed689e4d4279493829e157de81df18a
|
|
4
|
+
data.tar.gz: 39a736f7f6c659f22ee63e5742e6109ddbec69d4c1550ea7a862e52fac9cb646
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 86ae9191ce94fe5ca8699a43818b6ad640fd5e164208242d51b527e5449247b5b91cc2401530d85d444ed34323ef9203ae6146c596c36bc9b56c77de6d50b3d4
|
|
7
|
+
data.tar.gz: 5721440aa08e28016e20985f009135f3388cc6d944aab30cba66bd44ebc0c7c66f3c749f64cec0692ade4d5c3712009fe162b01b291753ba62763d23035c9caa
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
|
File without changes
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
+
orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at christophweegen@googlemail.com. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
|
72
|
+
|
|
73
|
+
[homepage]: http://contributor-covenant.org
|
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
pied_piper (0.1.1)
|
|
5
|
+
|
|
6
|
+
GEM
|
|
7
|
+
remote: https://rubygems.org/
|
|
8
|
+
specs:
|
|
9
|
+
coderay (1.1.2)
|
|
10
|
+
diff-lcs (1.3)
|
|
11
|
+
method_source (0.9.2)
|
|
12
|
+
pry (0.12.2)
|
|
13
|
+
coderay (~> 1.1.0)
|
|
14
|
+
method_source (~> 0.9.0)
|
|
15
|
+
rake (12.3.2)
|
|
16
|
+
rspec (3.8.0)
|
|
17
|
+
rspec-core (~> 3.8.0)
|
|
18
|
+
rspec-expectations (~> 3.8.0)
|
|
19
|
+
rspec-mocks (~> 3.8.0)
|
|
20
|
+
rspec-core (3.8.0)
|
|
21
|
+
rspec-support (~> 3.8.0)
|
|
22
|
+
rspec-expectations (3.8.2)
|
|
23
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
24
|
+
rspec-support (~> 3.8.0)
|
|
25
|
+
rspec-mocks (3.8.0)
|
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
27
|
+
rspec-support (~> 3.8.0)
|
|
28
|
+
rspec-support (3.8.0)
|
|
29
|
+
|
|
30
|
+
PLATFORMS
|
|
31
|
+
ruby
|
|
32
|
+
|
|
33
|
+
DEPENDENCIES
|
|
34
|
+
bundler (~> 2.0)
|
|
35
|
+
pied_piper!
|
|
36
|
+
pry
|
|
37
|
+
rake (~> 12.3)
|
|
38
|
+
rspec (~> 3.8)
|
|
39
|
+
|
|
40
|
+
BUNDLED WITH
|
|
41
|
+
2.0.1
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Christoph Weegen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# PiedPiper - Don't let him lure you away...
|
|
2
|
+
|
|
3
|
+
This gem provides "Unix-like" pipe functionality in Ruby.
|
|
4
|
+
|
|
5
|
+
Another inspiration for this gem were `|>` pipes and functional programming in [Elixir](https://elixir-lang.org).
|
|
6
|
+
|
|
7
|
+
If you want to read about the inspiration for the name `PiedPiper`, it's an old german [fairy tale](https://en.wikipedia.org/wiki/Pied_Piper_of_Hamelin), of a guy who played pipe and hypnotized and lured all children out of town with his music and they were never be seen again.
|
|
8
|
+
|
|
9
|
+
Despite the word "pipe" there's also another common thing between the fairy tale and pipes in this gem:
|
|
10
|
+
|
|
11
|
+
There's a "piper" object who lures "children" (other objects) away ( through pipes ) until they never be seen again ( are transformed into other objects ). :-)
|
|
12
|
+
|
|
13
|
+
If you never worked with pipes, this little analogy may help to understand what's happening.
|
|
14
|
+
|
|
15
|
+
Have fun with PiedPiper and don't let him lure you away :-)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Add this line to your application's Gemfile:
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
gem 'pied_piper'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
And then execute:
|
|
26
|
+
|
|
27
|
+
$ bundle
|
|
28
|
+
|
|
29
|
+
Or install it yourself as:
|
|
30
|
+
|
|
31
|
+
$ gem install pied_piper
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
First you have to initialize a piper object with another object of your choice:
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
require "pied_piper"
|
|
39
|
+
|
|
40
|
+
piper = PiedPiper.new("rats and children")
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A shortcut to get a piper object anywhere you want, is shown in the following example. Only use this if your name is "Chuck Norris of Hamelin", since it "roundhouse pipes" (monkey-patches) Ruby's `Kernel` module :-D
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
require 'pied_piper/kernel'
|
|
47
|
+
|
|
48
|
+
piper = pipe("rats and children")
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Once you have a piper object you can pipe it "Unix-style".
|
|
52
|
+
|
|
53
|
+
Our initial object (e.g: `"rats and children"`), is passed around through each pipe from left to right and transformed by one of the following objects:
|
|
54
|
+
|
|
55
|
+
### Symbol/String Pipes
|
|
56
|
+
|
|
57
|
+
1. A Symbol or String, this calls a method on the piped object with the same name:
|
|
58
|
+
|
|
59
|
+
```ruby
|
|
60
|
+
p = pipe("rats and children")
|
|
61
|
+
p | :upcase | p.end
|
|
62
|
+
# => "RATS AND CHILDREN"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Note: Since "piping" is not a native Ruby syntax feature, rather than a method call in disguise (e.g: `p.|(:upcase)`), the underlying `PiedPiper` class, which wraps the initial object (e.g: `"foo"`) and on which the pipe method is called, is just a wrapper for the initial object which handles piping logic.
|
|
66
|
+
|
|
67
|
+
Everytime you "pipe" you create a new object of class `PiedPiper`, which wraps the mutated inital object again (e.g: from `"foo"` to `"FOO"`).
|
|
68
|
+
|
|
69
|
+
At the end of each pipe-chain, the piped object has to be "unwrapped" again by ending the pipe-chain with the `.end` method on the pipe object or by just writing `PiedPiper::EndOfPipe` or if you have required `pied_piper/kernel` you can just write `pipe_end`.
|
|
70
|
+
|
|
71
|
+
```ruby
|
|
72
|
+
p = pipe("rats and children")
|
|
73
|
+
|
|
74
|
+
p | :upcase | p.end
|
|
75
|
+
# => "RATS AND CHILDREN"
|
|
76
|
+
|
|
77
|
+
p | :upcase | PiedPiper::EndOfPipe
|
|
78
|
+
# => "RATS AND CHILDREN"
|
|
79
|
+
|
|
80
|
+
p | :upcase | pipe_end # when PiedPiper::Kernel was required
|
|
81
|
+
# => "RATS AND CHILDREN"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Array Pipes
|
|
85
|
+
|
|
86
|
+
An Array, whose first element (Symbol/String) again acts as a method call on the piped object and additonal elements which act as parameters to the method call.
|
|
87
|
+
|
|
88
|
+
```ruby
|
|
89
|
+
p = pipe("Pied Piper")
|
|
90
|
+
|
|
91
|
+
concat = [:concat, " of", " Hamelin"]
|
|
92
|
+
|
|
93
|
+
p | concat | p.end
|
|
94
|
+
# => "Pied Piper of Hamelin"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Proc Object Pipes
|
|
98
|
+
|
|
99
|
+
An Object of `Proc` class which takes exactly one parameter:
|
|
100
|
+
- `Proc.new { |child| ... }`
|
|
101
|
+
- `proc { |child| ... }`
|
|
102
|
+
- `lambda { |child| ... }`
|
|
103
|
+
- `->(child) { ... }`
|
|
104
|
+
|
|
105
|
+
```ruby
|
|
106
|
+
p = pipe("Hypnotized child")
|
|
107
|
+
|
|
108
|
+
no_happy_end = ->(child) { child + " was never seen again" }
|
|
109
|
+
|
|
110
|
+
p | no_happy_end | p.end
|
|
111
|
+
# => "Hypnotized child was never seen again"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Method Object Pipe
|
|
115
|
+
|
|
116
|
+
An object of the `Method` class, where the piped object will be used as the first parameter. You can pass an Array if you need additional parameters:
|
|
117
|
+
|
|
118
|
+
```ruby
|
|
119
|
+
class PiedPiperOfHamelin
|
|
120
|
+
def self.plays_song_on_pipe(audience = "Children", effect = "slightly")
|
|
121
|
+
puts "#{audience} feel already #{effect + " "}hypnotized!"
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
p = pipe("You")
|
|
126
|
+
hypnotize = PiedPiperOfHamelin.method(:plays_song_on_pipe)
|
|
127
|
+
|
|
128
|
+
p | hypnotize | p.end
|
|
129
|
+
# => "You feel already slightly hypnotized!"
|
|
130
|
+
|
|
131
|
+
p | [hypnotize, "VERY"] | p.end
|
|
132
|
+
# => "You feel already VERY hypnotized!"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Combining Pipes
|
|
136
|
+
|
|
137
|
+
Once you know the basic building blocks, you can combine them and build your own pipes of arbitrary length:
|
|
138
|
+
|
|
139
|
+
```ruby
|
|
140
|
+
piper = pipe('You')
|
|
141
|
+
lures = [:+, " feel"]
|
|
142
|
+
you = ->(str) { str + " hypnotized!" }
|
|
143
|
+
away = :upcase
|
|
144
|
+
|
|
145
|
+
piper | lures | you | away | h.end
|
|
146
|
+
# => "YOU FEEL HYPNOTIZED!"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Multiline Pipes
|
|
150
|
+
|
|
151
|
+
Sadly Ruby's syntax doesn't allow for totally nice multiline pipes ( at least not in a way I already found out ). Thus multiline pipes have to be written like this ( since they're actually just inline syntactic sugar for methods like `obj.|(arg)` under the hood:
|
|
152
|
+
|
|
153
|
+
```ruby
|
|
154
|
+
piper = pipe('You')
|
|
155
|
+
lures = [:+, " feel"]
|
|
156
|
+
you = ->(str) { str + " hypnotized!" }
|
|
157
|
+
away = :upcase
|
|
158
|
+
|
|
159
|
+
piper
|
|
160
|
+
.|(lures)
|
|
161
|
+
.|(you)
|
|
162
|
+
.|(away).
|
|
163
|
+
.|(h.end)
|
|
164
|
+
# => "YOU FEEL HYPNOTIZED!"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Development
|
|
168
|
+
|
|
169
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
170
|
+
|
|
171
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
172
|
+
|
|
173
|
+
## Contributing
|
|
174
|
+
|
|
175
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/christophweegen/pied-piper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
180
|
+
|
|
181
|
+
## Code of Conduct
|
|
182
|
+
|
|
183
|
+
Everyone interacting in the PiedPiper project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/christophweegen/pied-piper/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "pied_piper"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/pied_piper.rb
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require 'pied_piper/version'
|
|
2
|
+
|
|
3
|
+
class PiedPiper
|
|
4
|
+
class EndOfPipe; end
|
|
5
|
+
attr_reader :object
|
|
6
|
+
|
|
7
|
+
def initialize(object)
|
|
8
|
+
@object = object
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def end
|
|
12
|
+
EndOfPipe
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def |(function)
|
|
16
|
+
return object if function == EndOfPipe
|
|
17
|
+
|
|
18
|
+
piped_result = result(function)
|
|
19
|
+
PiedPiper.new(piped_result)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
private
|
|
23
|
+
|
|
24
|
+
def result(function)
|
|
25
|
+
case function
|
|
26
|
+
when Symbol
|
|
27
|
+
@object.send(function)
|
|
28
|
+
when Array
|
|
29
|
+
meth, *args = function
|
|
30
|
+
case meth
|
|
31
|
+
when Symbol
|
|
32
|
+
@object.send(meth, *args)
|
|
33
|
+
when Method
|
|
34
|
+
meth.call(@object, *args)
|
|
35
|
+
end
|
|
36
|
+
when Proc
|
|
37
|
+
function.call(@object, *args)
|
|
38
|
+
when Method
|
|
39
|
+
function.call(@object, *args)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
data/pied_piper.gemspec
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
+
require 'pied_piper/version'
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = 'pied_piper'
|
|
7
|
+
spec.version = PiedPiper::VERSION
|
|
8
|
+
spec.authors = ['Christoph Weegen']
|
|
9
|
+
spec.email = ['christophweegen@googlemail.com']
|
|
10
|
+
|
|
11
|
+
spec.summary = 'Unix-like pipes in Ruby'
|
|
12
|
+
spec.description = 'Unix-like pipes in Ruby'
|
|
13
|
+
spec.homepage = 'https://github.com/christophweegen/pied-piper'
|
|
14
|
+
spec.license = 'MIT'
|
|
15
|
+
|
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
|
18
|
+
if spec.respond_to?(:metadata)
|
|
19
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
|
20
|
+
|
|
21
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
22
|
+
spec.metadata['source_code_uri'] = 'https://github.com/christophweegen/pied-piper'
|
|
23
|
+
spec.metadata['changelog_uri'] = 'https://github.com/christophweegen/pied-piper/blob/master/CHANGELOG.md'
|
|
24
|
+
else
|
|
25
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
|
26
|
+
'public gem pushes.'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Specify which files should be added to the gem when it is released.
|
|
30
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
31
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
32
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
33
|
+
end
|
|
34
|
+
spec.bindir = 'exe'
|
|
35
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
36
|
+
spec.require_paths = ['lib']
|
|
37
|
+
|
|
38
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
39
|
+
spec.add_development_dependency 'pry'
|
|
40
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
|
41
|
+
spec.add_development_dependency 'rspec', '~> 3.8'
|
|
42
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: pied_piper
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Christoph Weegen
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2019-04-10 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '2.0'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '2.0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: pry
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '12.3'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '12.3'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '3.8'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '3.8'
|
|
69
|
+
description: Unix-like pipes in Ruby
|
|
70
|
+
email:
|
|
71
|
+
- christophweegen@googlemail.com
|
|
72
|
+
executables: []
|
|
73
|
+
extensions: []
|
|
74
|
+
extra_rdoc_files: []
|
|
75
|
+
files:
|
|
76
|
+
- ".gitignore"
|
|
77
|
+
- ".rspec"
|
|
78
|
+
- ".travis.yml"
|
|
79
|
+
- CHANGELOG.md
|
|
80
|
+
- CODE_OF_CONDUCT.md
|
|
81
|
+
- Gemfile
|
|
82
|
+
- Gemfile.lock
|
|
83
|
+
- LICENSE.txt
|
|
84
|
+
- README.md
|
|
85
|
+
- Rakefile
|
|
86
|
+
- bin/console
|
|
87
|
+
- bin/setup
|
|
88
|
+
- lib/pied_piper.rb
|
|
89
|
+
- lib/pied_piper/kernel.rb
|
|
90
|
+
- lib/pied_piper/version.rb
|
|
91
|
+
- pied_piper.gemspec
|
|
92
|
+
homepage: https://github.com/christophweegen/pied-piper
|
|
93
|
+
licenses:
|
|
94
|
+
- MIT
|
|
95
|
+
metadata:
|
|
96
|
+
allowed_push_host: https://rubygems.org
|
|
97
|
+
homepage_uri: https://github.com/christophweegen/pied-piper
|
|
98
|
+
source_code_uri: https://github.com/christophweegen/pied-piper
|
|
99
|
+
changelog_uri: https://github.com/christophweegen/pied-piper/blob/master/CHANGELOG.md
|
|
100
|
+
post_install_message:
|
|
101
|
+
rdoc_options: []
|
|
102
|
+
require_paths:
|
|
103
|
+
- lib
|
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
|
+
requirements:
|
|
106
|
+
- - ">="
|
|
107
|
+
- !ruby/object:Gem::Version
|
|
108
|
+
version: '0'
|
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
|
+
requirements:
|
|
111
|
+
- - ">="
|
|
112
|
+
- !ruby/object:Gem::Version
|
|
113
|
+
version: '0'
|
|
114
|
+
requirements: []
|
|
115
|
+
rubyforge_project:
|
|
116
|
+
rubygems_version: 2.7.8
|
|
117
|
+
signing_key:
|
|
118
|
+
specification_version: 4
|
|
119
|
+
summary: Unix-like pipes in Ruby
|
|
120
|
+
test_files: []
|