terrapin 0.6.0.alpha → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/NEWS.md +10 -0
- data/README.md +20 -8
- data/lib/terrapin/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fe1ba61cb02d982ac5535ff8423186dcb045c9de
|
4
|
+
data.tar.gz: d1eae833ed7b0041442275d6a005188c4300a5fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8d2a8e41b0f12e41062cfcbbacaa7abcc9e2d02519ffe27214a4ffaa93c5c0243b681066fa76e59c66e13dd2f8abf87258644b5cf421c7e66e47118434c764d
|
7
|
+
data.tar.gz: 3e3e8d27c8a9e569fe99b30a09baacbe05a7dae3a260b36470453bcaaa7303f685a6868d84304d6e1afd55661ead32b31d89f3d4debf01bd7b31c67379ac47b0
|
data/NEWS.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
New for 0.6.0:
|
2
|
+
|
3
|
+
* Rename the project to Terrapin
|
4
|
+
|
5
|
+
New for 0.5.8:
|
6
|
+
|
7
|
+
* Improvement: Ensure that argument interpolations can be turned into Strings
|
8
|
+
* Feature: Save STDOUT and STDERR for inspection when the command completes
|
9
|
+
* Bug fix: Properly interpolate at the end of the line
|
10
|
+
|
1
11
|
New for 0.5.7:
|
2
12
|
|
3
13
|
* Feature: Allow collection of both STDOUT and STDERR.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Terrapin [![Build Status](https://secure.travis-ci.org/thoughtbot/terrapin.png?branch=master)](http://travis-ci.org/thoughtbot/terrapin)
|
2
2
|
|
3
|
-
|
3
|
+
Run shell commands safely, even with user-supplied values
|
4
4
|
|
5
5
|
[API reference](http://rubydoc.info/gems/terrapin/)
|
6
6
|
|
@@ -40,7 +40,15 @@ passed into `new` (see 'Security' below):
|
|
40
40
|
```ruby
|
41
41
|
line = Terrapin::CommandLine.new("echo", "haha`whoami`")
|
42
42
|
line.command # => "echo haha`whoami`"
|
43
|
-
line.run # => "hahawebserver"
|
43
|
+
line.run # => "hahawebserver\n"
|
44
|
+
```
|
45
|
+
|
46
|
+
This is the right way:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
line = Terrapin::CommandLine.new("echo", "haha:whoami")
|
50
|
+
line.command(whoami: "`whoami`") # => "echo haha'`whoami`'"
|
51
|
+
line.run(whoami: "`whoami`") # => "haha`whoami`\n"
|
44
52
|
```
|
45
53
|
|
46
54
|
You can ignore the result:
|
@@ -111,7 +119,8 @@ line = Terrapin::CommandLine.new("/opt/bin/lolwut")
|
|
111
119
|
line.command # => "/opt/bin/lolwut"
|
112
120
|
```
|
113
121
|
|
114
|
-
You can see what's getting run. The 'Command' part it logs is in green for
|
122
|
+
You can see what's getting run. The 'Command' part it logs is in green for
|
123
|
+
visibility! (where applicable)
|
115
124
|
|
116
125
|
```ruby
|
117
126
|
line = Terrapin::CommandLine.new("echo", ":var", logger: Logger.new(STDOUT))
|
@@ -173,8 +182,9 @@ http://jira.codehaus.org/browse/JRUBY-6162. You *will* want to use the
|
|
173
182
|
|
174
183
|
#### Spawn warning
|
175
184
|
|
176
|
-
If you get `unsupported spawn option: out` warning (like in [issue
|
177
|
-
try to use
|
185
|
+
If you get `unsupported spawn option: out` warning (like in [issue
|
186
|
+
38](https://github.com/thoughtbot/terrapin/issues/38)), try to use
|
187
|
+
`PopenRunner`:
|
178
188
|
|
179
189
|
```ruby
|
180
190
|
Terrapin::CommandLine.runner = Terrapin::CommandLine::PopenRunner.new
|
@@ -199,17 +209,19 @@ Question? Idea? Problem? Bug? Comment? Concern? Like using question marks?
|
|
199
209
|
|
200
210
|
## Credits
|
201
211
|
|
202
|
-
Thank you to all [the
|
212
|
+
Thank you to all [the
|
213
|
+
contributors](https://github.com/thoughtbot/terrapin/graphs/contributors)!
|
203
214
|
|
204
215
|
![thoughtbot](http://thoughtbot.com/logo.png)
|
205
216
|
|
206
|
-
Terrapin is maintained and funded by [thoughtbot,
|
217
|
+
Terrapin is maintained and funded by [thoughtbot,
|
218
|
+
inc](http://thoughtbot.com/community)
|
207
219
|
|
208
220
|
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
209
221
|
|
210
222
|
## License
|
211
223
|
|
212
|
-
Copyright 2011-
|
224
|
+
Copyright 2011-2018 Jon Yurek and thoughtbot, inc. This is free software, and
|
213
225
|
may be redistributed under the terms specified in the
|
214
226
|
[LICENSE](https://github.com/thoughtbot/terrapin/blob/master/LICENSE)
|
215
227
|
file.
|
data/lib/terrapin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terrapin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.0
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Yurek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -180,12 +180,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
180
180
|
version: '0'
|
181
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
182
|
requirements:
|
183
|
-
- - "
|
183
|
+
- - ">="
|
184
184
|
- !ruby/object:Gem::Version
|
185
|
-
version:
|
185
|
+
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
188
|
+
rubygems_version: 2.6.14
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Run shell commands safely, even with user-supplied values
|