terrapin 1.1.0 → 1.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 +4 -4
- data/NEWS.md +5 -0
- data/README.md +0 -1
- data/lib/terrapin/command_line/multi_pipe.rb +2 -2
- data/lib/terrapin/version.rb +1 -1
- data/spec/spec_helper.rb +5 -0
- data/spec/terrapin/runners_spec.rb +9 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de8290a9a7c02f78729afc093bc4f91ded448cde41dfa85d3d7c57ce0acb1aa8
|
4
|
+
data.tar.gz: ebdcaed25d509d37f0652f3a3a8ed4f195d574a2ccf2e7ac57e541da4585b243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8abf06d0433f3955d508291e81e44d5a9300a4bbddbb804ee40e959152a2bea72eaf0454a673fc427aba84aa5a747e90afacb0efa7ccf64aa159adec8e87647e
|
7
|
+
data.tar.gz: d4b1e42addf7855b8b38656aa7ad36f149041e2a1b8595fcad71fc5624178e6fde1b9472dd618a95a4766ebe781f0e44ba00f572ad72423216379dd2e83304a1
|
data/NEWS.md
CHANGED
data/README.md
CHANGED
@@ -47,8 +47,8 @@ module Terrapin
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def read_streams(output, error)
|
50
|
-
@stdout_output =
|
51
|
-
@stderr_output =
|
50
|
+
@stdout_output = String.new
|
51
|
+
@stderr_output = String.new
|
52
52
|
read_fds = [output, error]
|
53
53
|
while !read_fds.empty?
|
54
54
|
to_read, = IO.select(read_fds)
|
data/lib/terrapin/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -14,6 +14,11 @@ Dir[File.dirname(__FILE__) + "/support/**.rb"].each{|support_file| require suppo
|
|
14
14
|
RSpec.configure do |config|
|
15
15
|
config.include WithExitstatus
|
16
16
|
config.include StubOS
|
17
|
+
|
18
|
+
config.before(:example) do
|
19
|
+
Terrapin::CommandLine.path = nil
|
20
|
+
Terrapin::CommandLine.runner = nil
|
21
|
+
end
|
17
22
|
end
|
18
23
|
|
19
24
|
def best_logger
|
@@ -52,17 +52,6 @@ describe "When picking a Runner" do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
describe 'When running an executable in the supplemental path' do
|
55
|
-
before do
|
56
|
-
path = Pathname.new(File.dirname(__FILE__)) + '..' + 'support'
|
57
|
-
File.open(path + 'ls', 'w'){|f| f.puts "#!/bin/sh\necho overridden-ls\n" }
|
58
|
-
FileUtils.chmod(0755, path + 'ls')
|
59
|
-
Terrapin::CommandLine.path = path
|
60
|
-
end
|
61
|
-
|
62
|
-
after do
|
63
|
-
FileUtils.rm_f("#{Terrapin::CommandLine.path}/ls")
|
64
|
-
end
|
65
|
-
|
66
55
|
[
|
67
56
|
Terrapin::CommandLine::BackticksRunner,
|
68
57
|
Terrapin::CommandLine::PopenRunner,
|
@@ -72,10 +61,19 @@ describe 'When running an executable in the supplemental path' do
|
|
72
61
|
describe runner_class do
|
73
62
|
describe '#run' do
|
74
63
|
it 'finds the correct executable' do
|
64
|
+
path = Pathname.new(File.dirname(__FILE__)) + '..' + 'support'
|
65
|
+
File.open(path + 'ls', 'w'){|f| f.puts "#!/bin/sh\necho overridden-ls\n" }
|
66
|
+
FileUtils.chmod(0755, path + 'ls')
|
67
|
+
Terrapin::CommandLine.path = path
|
75
68
|
Terrapin::CommandLine.runner = runner_class.new
|
76
69
|
command = Terrapin::CommandLine.new('ls')
|
70
|
+
|
77
71
|
result = command.run
|
72
|
+
|
78
73
|
expect(result.strip).to eq('overridden-ls')
|
74
|
+
|
75
|
+
ensure
|
76
|
+
FileUtils.rm("#{Terrapin::CommandLine.path}/ls")
|
79
77
|
end
|
80
78
|
end
|
81
79
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terrapin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Yurek
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: climate_control
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
|
-
rubygems_version: 3.6.
|
166
|
+
rubygems_version: 3.6.7
|
167
167
|
specification_version: 4
|
168
168
|
summary: Run shell commands safely, even with user-supplied values
|
169
169
|
test_files: []
|