thor 0.19.0 → 0.19.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/lib/thor/shell/basic.rb +1 -1
- data/lib/thor/version.rb +1 -1
- data/spec/shell/basic_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a362ea0b9b3cf1f41649c522ddc312925cf1e47
|
4
|
+
data.tar.gz: 9267cf56eb7c014270c8077b1ed4b2c95fcaa7ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c659d6a5020fa953ec51394089c5a49a4fae9afefc2190a088a8e481a6ac586fbe2c268a47204d66b19ca660468f1e3e87f4e5be9b509faf83fc3992b2b7eb42
|
7
|
+
data.tar.gz: fac520f0a428f1cf3ba627b47285c04534e11633599d82c7b15596eb76c1e1762d66b32195e8519252c58a061ccb54e37e8bfa4ba98684c6b0efc8f208cd66f4
|
data/lib/thor/shell/basic.rb
CHANGED
@@ -78,7 +78,7 @@ class Thor
|
|
78
78
|
#
|
79
79
|
def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
|
80
80
|
buffer = prepare_message(message, *color)
|
81
|
-
buffer << "\n" if force_new_line && !message.end_with?("\n")
|
81
|
+
buffer << "\n" if force_new_line && !message.to_s.end_with?("\n")
|
82
82
|
|
83
83
|
stdout.print(buffer)
|
84
84
|
stdout.flush
|
data/lib/thor/version.rb
CHANGED
data/spec/shell/basic_spec.rb
CHANGED
@@ -119,6 +119,11 @@ describe Thor::Shell::Basic do
|
|
119
119
|
expect($stdout).to receive(:print).with("Running...")
|
120
120
|
shell.say("Running...", nil, false)
|
121
121
|
end
|
122
|
+
|
123
|
+
it "coerces everything to a string before printing" do
|
124
|
+
expect($stdout).to receive(:print).with("this_is_not_a_string\n")
|
125
|
+
shell.say(:this_is_not_a_string, nil, true)
|
126
|
+
end
|
122
127
|
end
|
123
128
|
|
124
129
|
describe "#say_status" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|