turbot 0.2.1 → 0.2.2
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 +8 -8
- data/.yardopts +3 -0
- data/data/schema.json +1 -1
- data/lib/turbot/version.rb +1 -1
- data/spec/turbot/command_spec.rb +0 -7
- data/spec/turbot/helpers_spec.rb +32 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Nzc1MWMyZDgyZjBiOWU3MzcyOWE2MzUxYWUwNDI1ZTNjZTkxM2ZkYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDNlNTJlMDQxM2I1NmJkNjhkNjI4MzUwNDllODU3MDgzMzQ5MmQwNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTNiZTc3MTBhMTE1NTg5YTY2MDA3MmQ5MjE2YjQxMDZmYzk4YzAxYjAwNzY5
|
10
|
+
NjFiYmJkYzY2YWMxMTgwNmU4MzIyMmIyYzhmOTUzMTQ5MDIwNjMxMzExM2Rj
|
11
|
+
Yzk5MDdkNzE2ZTViYjVkNzJmNTE3NGM0NDUwYjUzZWJhODUwOTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjM0M2VhMzdmZjdkOGQ1ZmE2MjE4NWI4NDAyMTgxOTk3NmRkZmIxODQ0ZGE3
|
14
|
+
YmE2ZTVkZTljYTg2YmU4MTU1Zjc5NTFhNTM2MTQ1NmQ4MWNhMmU1YmI3ZThj
|
15
|
+
OTEyZDgwMTkwMDViY2Q0MmI2MTJhZDZhYzkxYTdlZjM5ZGM4M2U=
|
data/.yardopts
ADDED
data/data/schema.json
CHANGED
data/lib/turbot/version.rb
CHANGED
data/spec/turbot/command_spec.rb
CHANGED
@@ -65,13 +65,6 @@ STDERR
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
it 'correctly resolves commands' do
|
69
|
-
expect(Turbot::Command.parse('unknown')).to be_nil
|
70
|
-
expect(Turbot::Command.parse('list')).to include(:klass => Turbot::Command::Bots, :method => :index)
|
71
|
-
expect(Turbot::Command.parse('bots')).to include(:klass => Turbot::Command::Bots, :method => :index)
|
72
|
-
expect(Turbot::Command.parse('bots:info')).to include(:klass => Turbot::Command::Bots, :method => :info)
|
73
|
-
end
|
74
|
-
|
75
68
|
context 'when no commands match' do
|
76
69
|
it 'suggests one command' do
|
77
70
|
stderr, stdout = execute('bot')
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Turbot::Helpers do
|
4
|
+
describe '#styled_error' do
|
5
|
+
it 'should display an error' do
|
6
|
+
begin
|
7
|
+
raise 'My message'
|
8
|
+
rescue => e
|
9
|
+
original_stderr, original_stdout = $stderr, $stdout
|
10
|
+
|
11
|
+
$stderr = captured_stderr = StringIO.new
|
12
|
+
$stdout = captured_stdout = StringIO.new
|
13
|
+
|
14
|
+
Turbot::Helpers.styled_error(e)
|
15
|
+
|
16
|
+
$stderr, $stdout = original_stderr, original_stdout
|
17
|
+
|
18
|
+
[
|
19
|
+
' ! Turbot client internal error.',
|
20
|
+
' ! Report a bug at: https://github.com/openc/turbot-client/issues/new',
|
21
|
+
' Error: My message (RuntimeError)',
|
22
|
+
' Backtrace: ',
|
23
|
+
' Command: ',
|
24
|
+
' Version: ',
|
25
|
+
].each do |string|
|
26
|
+
expect(captured_stderr.string).to include(string)
|
27
|
+
end
|
28
|
+
expect(captured_stdout.string).to eq('')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenCorporates
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: netrc
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- .gitignore
|
161
161
|
- .rspec
|
162
162
|
- .travis.yml
|
163
|
+
- .yardopts
|
163
164
|
- Gemfile
|
164
165
|
- LICENSE
|
165
166
|
- README.md
|
@@ -220,6 +221,7 @@ files:
|
|
220
221
|
- spec/turbot/command/help_spec.rb
|
221
222
|
- spec/turbot/command/version_spec.rb
|
222
223
|
- spec/turbot/command_spec.rb
|
224
|
+
- spec/turbot/helpers_spec.rb
|
223
225
|
- turbot.gemspec
|
224
226
|
homepage: https://github.com/openc/turbot-client
|
225
227
|
licenses:
|
@@ -262,3 +264,4 @@ test_files:
|
|
262
264
|
- spec/turbot/command/help_spec.rb
|
263
265
|
- spec/turbot/command/version_spec.rb
|
264
266
|
- spec/turbot/command_spec.rb
|
267
|
+
- spec/turbot/helpers_spec.rb
|