solano 1.31.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +15 -0
  2. data/bin/solano +29 -0
  3. data/bin/tddium +29 -0
  4. data/lib/solano.rb +19 -0
  5. data/lib/solano/agent.rb +3 -0
  6. data/lib/solano/agent/solano.rb +128 -0
  7. data/lib/solano/cli.rb +25 -0
  8. data/lib/solano/cli/api.rb +368 -0
  9. data/lib/solano/cli/commands/account.rb +50 -0
  10. data/lib/solano/cli/commands/activate.rb +16 -0
  11. data/lib/solano/cli/commands/api.rb +15 -0
  12. data/lib/solano/cli/commands/config.rb +78 -0
  13. data/lib/solano/cli/commands/console.rb +85 -0
  14. data/lib/solano/cli/commands/describe.rb +104 -0
  15. data/lib/solano/cli/commands/find_failing.rb +64 -0
  16. data/lib/solano/cli/commands/heroku.rb +17 -0
  17. data/lib/solano/cli/commands/hg.rb +48 -0
  18. data/lib/solano/cli/commands/keys.rb +81 -0
  19. data/lib/solano/cli/commands/login.rb +37 -0
  20. data/lib/solano/cli/commands/logout.rb +14 -0
  21. data/lib/solano/cli/commands/password.rb +26 -0
  22. data/lib/solano/cli/commands/rerun.rb +59 -0
  23. data/lib/solano/cli/commands/server.rb +21 -0
  24. data/lib/solano/cli/commands/spec.rb +401 -0
  25. data/lib/solano/cli/commands/status.rb +117 -0
  26. data/lib/solano/cli/commands/stop.rb +19 -0
  27. data/lib/solano/cli/commands/suite.rb +110 -0
  28. data/lib/solano/cli/commands/support.rb +24 -0
  29. data/lib/solano/cli/commands/web.rb +29 -0
  30. data/lib/solano/cli/config.rb +246 -0
  31. data/lib/solano/cli/params_helper.rb +66 -0
  32. data/lib/solano/cli/prompt.rb +128 -0
  33. data/lib/solano/cli/show.rb +136 -0
  34. data/lib/solano/cli/solano.rb +208 -0
  35. data/lib/solano/cli/suite.rb +104 -0
  36. data/lib/solano/cli/text_helper.rb +16 -0
  37. data/lib/solano/cli/timeformat.rb +21 -0
  38. data/lib/solano/cli/util.rb +132 -0
  39. data/lib/solano/constant.rb +581 -0
  40. data/lib/solano/scm.rb +18 -0
  41. data/lib/solano/scm/configure.rb +37 -0
  42. data/lib/solano/scm/git.rb +349 -0
  43. data/lib/solano/scm/git_log_parser.rb +67 -0
  44. data/lib/solano/scm/hg.rb +263 -0
  45. data/lib/solano/scm/hg_log_parser.rb +66 -0
  46. data/lib/solano/scm/scm.rb +119 -0
  47. data/lib/solano/scm/scm_stub.rb +9 -0
  48. data/lib/solano/scm/url.rb +75 -0
  49. data/lib/solano/script.rb +12 -0
  50. data/lib/solano/script/git-remote-hg +1258 -0
  51. data/lib/solano/ssh.rb +66 -0
  52. data/lib/solano/util.rb +63 -0
  53. data/lib/solano/version.rb +5 -0
  54. metadata +413 -0
@@ -0,0 +1,66 @@
1
+ # Copyright (c) 2011, 2012, 2013, 2014 Solano Labs All Rights Reserved
2
+
3
+ module Solano
4
+ class Ssh
5
+ class << self
6
+ include SolanoConstant
7
+
8
+ def load_ssh_key(ssh_file, name)
9
+ begin
10
+ data = File.open(File.expand_path(ssh_file)) {|file| file.read}
11
+ rescue Errno::ENOENT => e
12
+ raise SolanoError.new(Text::Error::INACCESSIBLE_SSH_PUBLIC_KEY % [ssh_file, e])
13
+ end
14
+
15
+ if data =~ /^-+BEGIN \S+ PRIVATE KEY-+/ then
16
+ raise SolanoError.new(Text::Error::INVALID_SSH_PUBLIC_KEY % ssh_file)
17
+ end
18
+ if data !~ /^\s*ssh-(dss|rsa)/ && data !~ /^\s*ecdsa-/ then
19
+ raise SolanoError.new(Text::Error::INVALID_SSH_PUBLIC_KEY % ssh_file)
20
+ end
21
+
22
+ {:name=>name,
23
+ :pub=>data,
24
+ :hostname=>`hostname`,
25
+ :fingerprint=>`ssh-keygen -lf #{ssh_file}`}
26
+ end
27
+
28
+ def generate_keypair(name, output_dir)
29
+ filename = File.expand_path(File.join(output_dir, "identity.solano.#{name}"))
30
+ pub_filename = filename + ".pub"
31
+ if File.exists?(filename) then
32
+ raise SolanoError.new(Text::Error::KEY_ALREADY_EXISTS % filename)
33
+ end
34
+ cmd = "ssh-keygen -q -t rsa -P '' -C 'solano.#{name}' -f #{filename}"
35
+ exit_failure Text::Error::KEYGEN_FAILED % name unless system(cmd)
36
+ {:name=>name,
37
+ :pub=>File.read(pub_filename),
38
+ :hostname=>`hostname`,
39
+ :fingerprint=>`ssh-keygen -lf #{pub_filename}`}
40
+ end
41
+
42
+ def validate_keys(name, path, solano_api, generate_new_key = false)
43
+ keys_details, keydata = solano_api.get_keys, nil
44
+
45
+ # key name should be unique
46
+ if keys_details.count{|x|x['name'] == name} > 0
47
+ abort Text::Error::ADD_KEYS_DUPLICATE % name
48
+ end
49
+
50
+ if !generate_new_key then
51
+ # check out key's content uniqueness
52
+ keydata = self.load_ssh_key(path, name)
53
+ duplicate_keys = keys_details.select{|key| key['pub'] == keydata[:pub] }
54
+ if !duplicate_keys.empty? then
55
+ abort Text::Error::ADD_KEY_CONTENT_DUPLICATE % duplicate_keys.first['name']
56
+ end
57
+ else
58
+ # generate new key
59
+ keydata = self.generate_keypair(name, path)
60
+ end
61
+
62
+ keydata
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,63 @@
1
+ # Copyright (c) 2012, 2013, 2014, 2015 Solano Labs, Inc. All Rights Reserved
2
+
3
+ require 'stringio'
4
+ require 'addressable/uri'
5
+
6
+ class String
7
+ def sanitize(encoding="UTF-8")
8
+ opts = {:invalid => :replace, :undef => :replace}
9
+ d = self.dup
10
+ d.force_encoding(encoding).valid_encoding? ?
11
+ d : d.force_encoding("BINARY").encode(encoding, opts)
12
+ end
13
+
14
+ def sanitize!(encoding="UTF-8")
15
+ opts = {:invalid => :replace, :undef => :replace}
16
+ unless self.force_encoding(encoding).valid_encoding?
17
+ self.force_encoding("BINARY")
18
+ self.encode!(encoding, opts)
19
+ end
20
+ end
21
+ end
22
+
23
+ module Solano
24
+ def self.message_pack(value)
25
+ io = StringIO.new
26
+ if RUBY_VERSION =~ /^1[.]([0-8]|9[.][0-2])/ then
27
+ io.set_encoding("UTF-8")
28
+ else
29
+ io.set_encoding("UTF-8", "UTF-8")
30
+ end
31
+ packer = ::MessagePackPure::Packer.new(io)
32
+ packer.write(value)
33
+ result = io.string
34
+ return result
35
+ end
36
+
37
+ def self.sensitive(hash)
38
+ hash.each_pair do |k, v|
39
+ if v.is_a?(Hash) then
40
+ hash[k] = sensitive(v)
41
+ elsif v.is_a?(String) then
42
+ if k =~ /_(key|privkey|token)\z/ then
43
+ hash[k] = '[SENSITIVE]'
44
+ end
45
+ end
46
+ end
47
+
48
+ return hash
49
+ end
50
+ end
51
+
52
+ module ConfigHelper
53
+ def hash_stringify_keys(h)
54
+ case h
55
+ when Hash
56
+ Hash[ h.map { |k, v| [ k.to_s, hash_stringify_keys(v) ] } ]
57
+ when Enumerable
58
+ h.map { |v| hash_stringify_keys(v) }
59
+ else
60
+ h
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,5 @@
1
+ # Copyright (c) 2011-2016 Solano Labs All Rights Reserved
2
+
3
+ module Solano
4
+ VERSION = "1.31.0"
5
+ end
metadata ADDED
@@ -0,0 +1,413 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: solano
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.31.0
5
+ platform: ruby
6
+ authors:
7
+ - Solano Labs
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-12-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: highline
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 1.7.3
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 1.7.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 1.8.3
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.8.3
55
+ - !ruby/object:Gem::Dependency
56
+ name: launchy
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '2.4'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '2.4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: addressable
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '2.3'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '2.3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: tddium_client
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '0.6'
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: 0.6.0
93
+ type: :runtime
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ~>
98
+ - !ruby/object:Gem::Version
99
+ version: '0.6'
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: 0.6.0
103
+ - !ruby/object:Gem::Dependency
104
+ name: nayutaya-msgpack-pure
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: '0.0'
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
+ version: 0.0.2
113
+ type: :runtime
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ~>
118
+ - !ruby/object:Gem::Version
119
+ version: '0.0'
120
+ - - ! '>='
121
+ - !ruby/object:Gem::Version
122
+ version: 0.0.2
123
+ - !ruby/object:Gem::Dependency
124
+ name: aruba
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - '='
128
+ - !ruby/object:Gem::Version
129
+ version: 0.4.6
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - '='
135
+ - !ruby/object:Gem::Version
136
+ version: 0.4.6
137
+ - !ruby/object:Gem::Dependency
138
+ name: rdiscount
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - '='
142
+ - !ruby/object:Gem::Version
143
+ version: 1.6.8
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - '='
149
+ - !ruby/object:Gem::Version
150
+ version: 1.6.8
151
+ - !ruby/object:Gem::Dependency
152
+ name: pickle
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: '0.5'
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ~>
163
+ - !ruby/object:Gem::Version
164
+ version: '0.5'
165
+ - !ruby/object:Gem::Dependency
166
+ name: mimic
167
+ requirement: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ~>
170
+ - !ruby/object:Gem::Version
171
+ version: '0.4'
172
+ type: :development
173
+ prerelease: false
174
+ version_requirements: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ~>
177
+ - !ruby/object:Gem::Version
178
+ version: '0.4'
179
+ - !ruby/object:Gem::Dependency
180
+ name: daemons
181
+ requirement: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - ~>
184
+ - !ruby/object:Gem::Version
185
+ version: '1.1'
186
+ type: :development
187
+ prerelease: false
188
+ version_requirements: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ~>
191
+ - !ruby/object:Gem::Version
192
+ version: '1.1'
193
+ - !ruby/object:Gem::Dependency
194
+ name: httparty
195
+ requirement: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - '='
198
+ - !ruby/object:Gem::Version
199
+ version: 0.9.0
200
+ type: :development
201
+ prerelease: false
202
+ version_requirements: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - '='
205
+ - !ruby/object:Gem::Version
206
+ version: 0.9.0
207
+ - !ruby/object:Gem::Dependency
208
+ name: httpclient
209
+ requirement: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - '='
212
+ - !ruby/object:Gem::Version
213
+ version: 2.4.0
214
+ type: :development
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - '='
219
+ - !ruby/object:Gem::Version
220
+ version: 2.4.0
221
+ - !ruby/object:Gem::Dependency
222
+ name: antilles
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - ~>
226
+ - !ruby/object:Gem::Version
227
+ version: '0.1'
228
+ type: :development
229
+ prerelease: false
230
+ version_requirements: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - ~>
233
+ - !ruby/object:Gem::Version
234
+ version: '0.1'
235
+ - !ruby/object:Gem::Dependency
236
+ name: rspec
237
+ requirement: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - ~>
240
+ - !ruby/object:Gem::Version
241
+ version: '3.1'
242
+ type: :development
243
+ prerelease: false
244
+ version_requirements: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - ~>
247
+ - !ruby/object:Gem::Version
248
+ version: '3.1'
249
+ - !ruby/object:Gem::Dependency
250
+ name: cucumber
251
+ requirement: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - ~>
254
+ - !ruby/object:Gem::Version
255
+ version: '1.3'
256
+ type: :development
257
+ prerelease: false
258
+ version_requirements: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - ~>
261
+ - !ruby/object:Gem::Version
262
+ version: '1.3'
263
+ - !ruby/object:Gem::Dependency
264
+ name: fakefs
265
+ requirement: !ruby/object:Gem::Requirement
266
+ requirements:
267
+ - - ~>
268
+ - !ruby/object:Gem::Version
269
+ version: '0.6'
270
+ type: :development
271
+ prerelease: false
272
+ version_requirements: !ruby/object:Gem::Requirement
273
+ requirements:
274
+ - - ~>
275
+ - !ruby/object:Gem::Version
276
+ version: '0.6'
277
+ - !ruby/object:Gem::Dependency
278
+ name: simplecov
279
+ requirement: !ruby/object:Gem::Requirement
280
+ requirements:
281
+ - - ~>
282
+ - !ruby/object:Gem::Version
283
+ version: '0.9'
284
+ type: :development
285
+ prerelease: false
286
+ version_requirements: !ruby/object:Gem::Requirement
287
+ requirements:
288
+ - - ~>
289
+ - !ruby/object:Gem::Version
290
+ version: '0.9'
291
+ - !ruby/object:Gem::Dependency
292
+ name: rake
293
+ requirement: !ruby/object:Gem::Requirement
294
+ requirements:
295
+ - - ~>
296
+ - !ruby/object:Gem::Version
297
+ version: '10.4'
298
+ type: :development
299
+ prerelease: false
300
+ version_requirements: !ruby/object:Gem::Requirement
301
+ requirements:
302
+ - - ~>
303
+ - !ruby/object:Gem::Version
304
+ version: '10.4'
305
+ description: ! 'Solano CI runs your test suite simply and quickly in our managed
306
+
307
+ cloud environment. You can run tests by hand, or enable our hosted CI to watch
308
+
309
+ your git repos automatically.
310
+
311
+
312
+ Solano CI automatically and safely parallelizes your tests to save you time, and
313
+
314
+ takes care of setting up fresh isolated DB instances for each test thread.
315
+
316
+
317
+ Tests have access to a wide variety of databases (postgres, mongo, redis,
318
+
319
+ mysql, memcache), solr, sphinx, selenium/webdriver browsers, webkit and culerity.
320
+
321
+
322
+ Solano CI supports all common Ruby test frameworks, including rspec, cucumber,
323
+
324
+ test::unit, and spinach. Solano CI also supports Javascript testing using
325
+
326
+ jasmine, evergreen, and many other frameworks.
327
+
328
+ '
329
+ email:
330
+ - info@solanolabs.com
331
+ executables:
332
+ - solano
333
+ - tddium
334
+ extensions: []
335
+ extra_rdoc_files: []
336
+ files:
337
+ - bin/solano
338
+ - bin/tddium
339
+ - lib/solano.rb
340
+ - lib/solano/agent.rb
341
+ - lib/solano/agent/solano.rb
342
+ - lib/solano/cli.rb
343
+ - lib/solano/cli/api.rb
344
+ - lib/solano/cli/commands/account.rb
345
+ - lib/solano/cli/commands/activate.rb
346
+ - lib/solano/cli/commands/api.rb
347
+ - lib/solano/cli/commands/config.rb
348
+ - lib/solano/cli/commands/console.rb
349
+ - lib/solano/cli/commands/describe.rb
350
+ - lib/solano/cli/commands/find_failing.rb
351
+ - lib/solano/cli/commands/heroku.rb
352
+ - lib/solano/cli/commands/hg.rb
353
+ - lib/solano/cli/commands/keys.rb
354
+ - lib/solano/cli/commands/login.rb
355
+ - lib/solano/cli/commands/logout.rb
356
+ - lib/solano/cli/commands/password.rb
357
+ - lib/solano/cli/commands/rerun.rb
358
+ - lib/solano/cli/commands/server.rb
359
+ - lib/solano/cli/commands/spec.rb
360
+ - lib/solano/cli/commands/status.rb
361
+ - lib/solano/cli/commands/stop.rb
362
+ - lib/solano/cli/commands/suite.rb
363
+ - lib/solano/cli/commands/support.rb
364
+ - lib/solano/cli/commands/web.rb
365
+ - lib/solano/cli/config.rb
366
+ - lib/solano/cli/params_helper.rb
367
+ - lib/solano/cli/prompt.rb
368
+ - lib/solano/cli/show.rb
369
+ - lib/solano/cli/solano.rb
370
+ - lib/solano/cli/suite.rb
371
+ - lib/solano/cli/text_helper.rb
372
+ - lib/solano/cli/timeformat.rb
373
+ - lib/solano/cli/util.rb
374
+ - lib/solano/constant.rb
375
+ - lib/solano/scm.rb
376
+ - lib/solano/scm/configure.rb
377
+ - lib/solano/scm/git.rb
378
+ - lib/solano/scm/git_log_parser.rb
379
+ - lib/solano/scm/hg.rb
380
+ - lib/solano/scm/hg_log_parser.rb
381
+ - lib/solano/scm/scm.rb
382
+ - lib/solano/scm/scm_stub.rb
383
+ - lib/solano/scm/url.rb
384
+ - lib/solano/script.rb
385
+ - lib/solano/script/git-remote-hg
386
+ - lib/solano/ssh.rb
387
+ - lib/solano/util.rb
388
+ - lib/solano/version.rb
389
+ homepage: https://github.com/solanolabs/solano.git
390
+ licenses:
391
+ - MIT
392
+ metadata: {}
393
+ post_install_message:
394
+ rdoc_options: []
395
+ require_paths:
396
+ - lib
397
+ required_ruby_version: !ruby/object:Gem::Requirement
398
+ requirements:
399
+ - - ! '>='
400
+ - !ruby/object:Gem::Version
401
+ version: '0'
402
+ required_rubygems_version: !ruby/object:Gem::Requirement
403
+ requirements:
404
+ - - ! '>='
405
+ - !ruby/object:Gem::Version
406
+ version: '0'
407
+ requirements: []
408
+ rubyforge_project:
409
+ rubygems_version: 2.6.7
410
+ signing_key:
411
+ specification_version: 4
412
+ summary: Run tests in Solano CI Hosted Test Environment
413
+ test_files: []