turbot 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmMyOTU2MTY5ZTEwYWU5ZTFhMTlhNDQ5ODA0NDBmYzE0MmJhYjU2NA==
4
+ Nzc1MWMyZDgyZjBiOWU3MzcyOWE2MzUxYWUwNDI1ZTNjZTkxM2ZkYw==
5
5
  data.tar.gz: !binary |-
6
- NmQ4NWJhMWE0ZTA3N2FiNGE0OGExM2ZkYzdhY2ExNzFhYTNjYTExOA==
6
+ NDNlNTJlMDQxM2I1NmJkNjhkNjI4MzUwNDllODU3MDgzMzQ5MmQwNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTNkNmRkYTk0N2VkZDk3MWNhMTk5NGEyMzM2Zjg4M2Q2MTQ4Njg4MWU3MGM0
10
- NWQ1YmYzN2Y5MzJkOTI2ZGU1N2U0MjZkYjE4OTNhMWE4YjA4MDVmZDAzOTRj
11
- MDNkNDc3ZTY2ZTE2NWZkZjViMzg3YmEyMDU0ZGU4MmQyNTg5ZDc=
9
+ OTNiZTc3MTBhMTE1NTg5YTY2MDA3MmQ5MjE2YjQxMDZmYzk4YzAxYjAwNzY5
10
+ NjFiYmJkYzY2YWMxMTgwNmU4MzIyMmIyYzhmOTUzMTQ5MDIwNjMxMzExM2Rj
11
+ Yzk5MDdkNzE2ZTViYjVkNzJmNTE3NGM0NDUwYjUzZWJhODUwOTY=
12
12
  data.tar.gz: !binary |-
13
- ODNkZGZlOWY1MDU1ZmM4MjZkNGU4ODhmOGE1ZmY4YWRjOTg4MjQzZTRhMDNj
14
- MzY3ZTg4MjJlNTQyNmMyM2I1N2Y5NTNhYWMyMTQzM2U2NjM0Mzk3NmEyZDg1
15
- YmFkNWI1Y2UzY2QxMWEzODQ4ODJhZGQwNGRjMjU3MjQyNWRkMTE=
13
+ MjM0M2VhMzdmZjdkOGQ1ZmE2MjE4NWI4NDAyMTgxOTk3NmRkZmIxODQ0ZGE3
14
+ YmE2ZTVkZTljYTg2YmU4MTU1Zjc5NTFhNTM2MTQ1NmQ4MWNhMmU1YmI3ZThj
15
+ OTEyZDgwMTkwMDViY2Q0MmI2MTJhZDZhYzkxYTdlZjM5ZGM4M2U=
@@ -0,0 +1,3 @@
1
+ --hide-void-return
2
+ --embed-mixin ClassMethods
3
+ --markup=markdown
@@ -31,7 +31,7 @@
31
31
  "frequency": {
32
32
  "type": "string",
33
33
  "enum": [
34
- "oneoff",
34
+ "once",
35
35
  "daily",
36
36
  "weekly",
37
37
  "monthly",
@@ -1,3 +1,3 @@
1
1
  module Turbot
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -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.1
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-12 00:00:00.000000000 Z
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