cocaine 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cocaine might be problematic. Click here for more details.
- data/NEWS.md +5 -0
- data/cocaine.gemspec +2 -0
- data/lib/cocaine/command_line.rb +1 -1
- data/lib/cocaine/version.rb +1 -1
- data/spec/cocaine/command_line_spec.rb +9 -0
- data/spec/spec_helper.rb +2 -0
- metadata +33 -1
data/NEWS.md
CHANGED
data/cocaine.gemspec
CHANGED
data/lib/cocaine/command_line.rb
CHANGED
data/lib/cocaine/version.rb
CHANGED
@@ -179,6 +179,15 @@ describe Cocaine::CommandLine do
|
|
179
179
|
logger.entries.should include("\e[32mCommand\e[0m :: echo 'Logging!' 'bar'")
|
180
180
|
end
|
181
181
|
|
182
|
+
it 'can still take something that does not respond to tty as a logger' do
|
183
|
+
output_buffer = StringIO.new
|
184
|
+
logger = ActiveSupport::BufferedLogger.new(output_buffer)
|
185
|
+
logger.should_not respond_to(:tty?)
|
186
|
+
Cocaine::CommandLine.new("echo", "'Logging!' :foo", :logger => logger).run(:foo => "bar")
|
187
|
+
output_buffer.rewind
|
188
|
+
output_buffer.read.should == "Command :: echo 'Logging!' 'bar'\n"
|
189
|
+
end
|
190
|
+
|
182
191
|
it "logs the command to a supplied logger" do
|
183
192
|
logger = FakeLogger.new
|
184
193
|
Cocaine::CommandLine.new("echo", "'Logging!' :foo", :logger => logger).run(:foo => "bar")
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocaine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -91,6 +91,38 @@ dependencies:
|
|
91
91
|
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: active_support
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: pry
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
94
126
|
description: A small library for doing (command) lines
|
95
127
|
email: jyurek@thoughtbot.com
|
96
128
|
executables: []
|