turbot 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,10 +24,10 @@ class Turbot::Command::Bots < Turbot::Command::Base
24
24
  #
25
25
  def index
26
26
  validate_arguments!
27
- bots = api.list_bots.data
27
+ bots = api.list_bots
28
28
  unless bots.empty?
29
29
  styled_header("Bots")
30
- styled_array(bots.map{|bot| bot[:bot_id]})
30
+ styled_array(bots.map{|bot| bot['bot_id']})
31
31
  else
32
32
  display("You have no bots.")
33
33
  end
@@ -92,6 +92,7 @@ class Turbot::Command::Bots < Turbot::Command::Base
92
92
  # Created new bot template at my_amazing_bot!
93
93
 
94
94
  def generate
95
+ puts "running generate"
95
96
  validate_arguments!
96
97
  language = options[:language] || "ruby"
97
98
  puts "Generating #{language} code..."
@@ -113,16 +114,11 @@ class Turbot::Command::Bots < Turbot::Command::Base
113
114
  f.write(manifest.to_json)
114
115
  end
115
116
 
116
- response = api.create_bot(bot, manifest)
117
+ api.create_bot(bot, manifest)
117
118
 
118
- case response
119
- when Turbot::API::SuccessResponse
120
- display("Created new bot template at #{bot}!")
121
- when Turbot::API::FailureResponse
122
- display('Could not create new bot')
123
- display(response.message)
124
- FileUtils.rm_r(bot)
125
- end
119
+ # TODO handle errors
120
+
121
+ puts "Created new bot template at #{bot}!"
126
122
  end
127
123
 
128
124
 
@@ -148,17 +144,9 @@ class Turbot::Command::Bots < Turbot::Command::Base
148
144
  manifest['files'].each { |f| zipfile.add(f, File.join(working_dir,f)) }
149
145
  end
150
146
 
151
- response = File.open(archive_path) do |file|
147
+ File.open(archive_path) do |file|
152
148
  api.update_code(bot, file)
153
149
  end
154
-
155
- case response
156
- when Turbot::API::SuccessResponse
157
- display('Successfully pushed bot code')
158
- when Turbot::API::FailureResponse
159
- display('Failed to push bot code')
160
- display(response.message)
161
- end
162
150
  end
163
151
 
164
152
  alias_command "push", "bots:push"
@@ -269,16 +257,16 @@ class Turbot::Command::Bots < Turbot::Command::Base
269
257
  batch << JSON.parse(line)
270
258
  spinner(count)
271
259
  if count % 20 == 0
272
- result = api.update_draft_data(bot, config, batch.to_json).data
260
+ result = api.update_draft_data(bot, config, batch.to_json)
273
261
  batch = []
274
262
  end
275
263
  count += 1
276
264
  end
277
265
  if !batch.empty?
278
- result = api.update_draft_data(bot, config, batch.to_json).data
266
+ result = api.update_draft_data(bot, config, batch.to_json)
279
267
  end
280
268
  puts "Sent #{count} records."
281
- puts "View your records at #{result[:url]}"
269
+ puts "View your records at #{result.data[:url]}"
282
270
  end
283
271
 
284
272
  private
@@ -1,3 +1,3 @@
1
1
  module Turbot
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Turbot
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-06-06 00:00:00.000000000 Z
12
+ date: 2014-06-10 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: netrc
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rest-client
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: launchy
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rubyzip
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: json-schema
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: activesupport
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ~>
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ~>
95
108
  - !ruby/object:Gem::Version
@@ -97,20 +110,23 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: turbot-api
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
- - - '='
115
+ - - ! '>='
102
116
  - !ruby/object:Gem::Version
103
- version: 0.0.3
117
+ version: '0'
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
- - - '='
123
+ - - ! '>='
109
124
  - !ruby/object:Gem::Version
110
- version: 0.0.3
125
+ version: '0'
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: excon
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ! '>='
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :runtime
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ! '>='
123
140
  - !ruby/object:Gem::Version
@@ -202,26 +219,26 @@ files:
202
219
  homepage: http://turbot.com/
203
220
  licenses:
204
221
  - MIT
205
- metadata: {}
206
222
  post_install_message:
207
223
  rdoc_options: []
208
224
  require_paths:
209
225
  - lib
210
226
  required_ruby_version: !ruby/object:Gem::Requirement
227
+ none: false
211
228
  requirements:
212
229
  - - ! '>='
213
230
  - !ruby/object:Gem::Version
214
231
  version: 1.9.2
215
232
  required_rubygems_version: !ruby/object:Gem::Requirement
233
+ none: false
216
234
  requirements:
217
235
  - - ! '>='
218
236
  - !ruby/object:Gem::Version
219
237
  version: '0'
220
238
  requirements: []
221
239
  rubyforge_project:
222
- rubygems_version: 2.2.2
240
+ rubygems_version: 1.8.23
223
241
  signing_key:
224
- specification_version: 4
242
+ specification_version: 3
225
243
  summary: Client library and CLI to deploy apps on Turbot.
226
244
  test_files: []
227
- has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OTQzMWUxY2MwYjQzYTZlYjhlMDIxZDRjYjk4MTU0NjI1MzFmYTYwMw==
5
- data.tar.gz: !binary |-
6
- YThhNWFlNTA3ZDFhMTVlYmUwYTk5MDQyNmE2MGM3ZDU0ODVkOGZlNw==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- MGUyZmVlNGRlNzExZjdkOTk2NDdiM2Q3YWY2OWY3NGFjYWVjN2RlNTVlY2Fj
10
- YjhkN2FjNzkzZDliODljZmE1ZDhjNDRlMWFiNGQ4M2NkYWFhMjlhODI4Yzcy
11
- N2IzZjU4NDk3YWQxYjU5ZTRjZGQ4ZWFjNTVlMDlmMDAyYWE0MGY=
12
- data.tar.gz: !binary |-
13
- N2NhNjVlMGMzMjgzNTQ3YTU2YTAyYTdlNGNmOTNlMzNhODZjZmU5ODY4MDE1
14
- ZWRlMjk4M2ViYmUxNmEzZjRmNWE3YTQyMDM0ZDZjNGNlZmY1ZThhMzgyZDgx
15
- ZDQ4YTEzMGRjY2ZiMjQzMDEyODZkMmU1MzEwMTI5NDcxNGI5MGU=