gorgon 0.10.4 → 0.10.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/bin/gorgon +11 -0
- data/lib/gorgon/originator.rb +6 -5
- data/lib/gorgon/version.rb +1 -1
- data/spec/originator_spec.rb +17 -0
- metadata +3 -82
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fe52cba1d84d676b228d5a80486de29a191e036
|
4
|
+
data.tar.gz: 0d2b782f2957592f67bd27b307421faeb35f7180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b987bad8d1d4ef05df182d97b3617e02991cc8b0e99a3337c3948eb72ed4995838e44d269d1eb9d74e6a5a662536d5674b43a8bdbd99e8decd49f406691e12f8
|
7
|
+
data.tar.gz: 059f7e2f0be2d86d78c37903d2490634afe85e86956b4cfce6845056e09e876f6f772a750c4864689cc59d6b5a5cf1914249bd3ab826c996f24f24d9aba74288
|
data/Gemfile.lock
CHANGED
data/bin/gorgon
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
1
3
|
require "rubygems"
|
2
4
|
require 'gorgon'
|
3
5
|
require 'gorgon/originator'
|
@@ -72,11 +74,20 @@ def usage
|
|
72
74
|
puts "\tgem command [options...] - execute the gem command on every listener and shutdown listener. e.g. 'gorgon gem install --version 1.0.0'"
|
73
75
|
end
|
74
76
|
|
77
|
+
case ARGV[0] # special case for 'version', because we don't need the welcome message telling us the version when we're explicitly asking for it
|
78
|
+
when "version", "--version"
|
79
|
+
puts Gorgon::VERSION
|
80
|
+
exit 0
|
81
|
+
end
|
82
|
+
|
75
83
|
puts WELCOME_MSG
|
76
84
|
|
77
85
|
case ARGV[0]
|
78
86
|
when nil
|
79
87
|
start
|
88
|
+
when "help", "--help"
|
89
|
+
usage
|
90
|
+
exit 0
|
80
91
|
when "start"
|
81
92
|
start
|
82
93
|
when "listen"
|
data/lib/gorgon/originator.rb
CHANGED
@@ -30,13 +30,14 @@ class Originator
|
|
30
30
|
publish
|
31
31
|
@logger.log "Originator finished successfully"
|
32
32
|
rescue StandardError
|
33
|
-
puts "Unhandled exception in originator:"
|
34
|
-
puts $!.message
|
35
|
-
puts $!.backtrace.join("\n")
|
36
|
-
puts "----------------------------------"
|
37
|
-
puts "Now attempting to cancel the job."
|
33
|
+
$stderr.puts "Unhandled exception in originator:"
|
34
|
+
$stderr.puts $!.message
|
35
|
+
$stderr.puts $!.backtrace.join("\n")
|
36
|
+
$stderr.puts "----------------------------------"
|
37
|
+
$stderr.puts "Now attempting to cancel the job."
|
38
38
|
@logger.log_error "Unhandled Exception!" if @logger
|
39
39
|
cancel_job
|
40
|
+
exit 2
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
data/lib/gorgon/version.rb
CHANGED
data/spec/originator_spec.rb
CHANGED
@@ -76,6 +76,23 @@ describe Originator do
|
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
|
+
describe "#originate" do
|
80
|
+
before do
|
81
|
+
stub_methods
|
82
|
+
end
|
83
|
+
|
84
|
+
it "exits with a non-zero status code when the originator crashes" do
|
85
|
+
originator_logger.stub(:log_error)
|
86
|
+
$stderr = StringIO.new # slurp up the error output so we don't pollute the rsync run
|
87
|
+
CallbackHandler.any_instance.should_receive(:before_originate).and_throw("I'm an unhandled exception")
|
88
|
+
|
89
|
+
expect { @originator.originate }.to raise_error(SystemExit) do |error|
|
90
|
+
error.success?.should be_false
|
91
|
+
end
|
92
|
+
$stderr = STDERR
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
79
96
|
describe "#cancel_job" do
|
80
97
|
before do
|
81
98
|
stub_methods
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gorgon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Fitzsimmons
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2016-
|
15
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake
|
@@ -404,83 +404,4 @@ rubygems_version: 2.4.8
|
|
404
404
|
signing_key:
|
405
405
|
specification_version: 4
|
406
406
|
summary: Distributed testing for ruby with centralized management
|
407
|
-
test_files:
|
408
|
-
- spec/acceptance_spec_helper.rb
|
409
|
-
- spec/callback_handler_spec.rb
|
410
|
-
- spec/crash_reporter_spec.rb
|
411
|
-
- spec/failures_printer_spec.rb
|
412
|
-
- spec/gem_command_handler_spec.rb
|
413
|
-
- spec/gem_service_spec.rb
|
414
|
-
- spec/gorgon_rspec_formatter_spec.rb
|
415
|
-
- spec/host_state_spec.rb
|
416
|
-
- spec/job_definition_spec.rb
|
417
|
-
- spec/job_state_spec.rb
|
418
|
-
- spec/listener_spec.rb
|
419
|
-
- spec/mini_test_runner_spec.rb
|
420
|
-
- spec/originator_logger_spec.rb
|
421
|
-
- spec/originator_protocol_spec.rb
|
422
|
-
- spec/originator_spec.rb
|
423
|
-
- spec/ping_service_spec.rb
|
424
|
-
- spec/pipe_forker_spec.rb
|
425
|
-
- spec/progress_bar_view_spec.rb
|
426
|
-
- spec/rspec_runner_spec.rb
|
427
|
-
- spec/rsync_daemon_spec.rb
|
428
|
-
- spec/runtime_file_reader_spec.rb
|
429
|
-
- spec/runtime_recorder_spec.rb
|
430
|
-
- spec/shutdown_manager_spec.rb
|
431
|
-
- spec/source_tree_syncer_spec.rb
|
432
|
-
- spec/support/mock_app/.gitignore
|
433
|
-
- spec/support/mock_app/Gemfile
|
434
|
-
- spec/support/mock_app/Gemfile.lock
|
435
|
-
- spec/support/mock_app/README.rdoc
|
436
|
-
- spec/support/mock_app/Rakefile
|
437
|
-
- spec/support/mock_app/app/assets/images/rails.png
|
438
|
-
- spec/support/mock_app/app/assets/javascripts/application.js
|
439
|
-
- spec/support/mock_app/app/assets/stylesheets/application.css
|
440
|
-
- spec/support/mock_app/app/controllers/application_controller.rb
|
441
|
-
- spec/support/mock_app/app/helpers/application_helper.rb
|
442
|
-
- spec/support/mock_app/app/mailers/.gitkeep
|
443
|
-
- spec/support/mock_app/app/models/.gitkeep
|
444
|
-
- spec/support/mock_app/app/views/layouts/application.html.erb
|
445
|
-
- spec/support/mock_app/config.ru
|
446
|
-
- spec/support/mock_app/config/application.rb
|
447
|
-
- spec/support/mock_app/config/boot.rb
|
448
|
-
- spec/support/mock_app/config/database.yml
|
449
|
-
- spec/support/mock_app/config/environment.rb
|
450
|
-
- spec/support/mock_app/config/environments/development.rb
|
451
|
-
- spec/support/mock_app/config/environments/production.rb
|
452
|
-
- spec/support/mock_app/config/environments/test.rb
|
453
|
-
- spec/support/mock_app/config/initializers/backtrace_silencers.rb
|
454
|
-
- spec/support/mock_app/config/initializers/inflections.rb
|
455
|
-
- spec/support/mock_app/config/initializers/mime_types.rb
|
456
|
-
- spec/support/mock_app/config/initializers/secret_token.rb
|
457
|
-
- spec/support/mock_app/config/initializers/session_store.rb
|
458
|
-
- spec/support/mock_app/config/initializers/wrap_parameters.rb
|
459
|
-
- spec/support/mock_app/config/locales/en.yml
|
460
|
-
- spec/support/mock_app/config/routes.rb
|
461
|
-
- spec/support/mock_app/db/seeds.rb
|
462
|
-
- spec/support/mock_app/doc/README_FOR_APP
|
463
|
-
- spec/support/mock_app/lib/assets/.gitkeep
|
464
|
-
- spec/support/mock_app/lib/tasks/.gitkeep
|
465
|
-
- spec/support/mock_app/log/.gitkeep
|
466
|
-
- spec/support/mock_app/public/404.html
|
467
|
-
- spec/support/mock_app/public/422.html
|
468
|
-
- spec/support/mock_app/public/500.html
|
469
|
-
- spec/support/mock_app/public/favicon.ico
|
470
|
-
- spec/support/mock_app/public/index.html
|
471
|
-
- spec/support/mock_app/public/robots.txt
|
472
|
-
- spec/support/mock_app/script/rails
|
473
|
-
- spec/support/mock_app/test/fixtures/.gitkeep
|
474
|
-
- spec/support/mock_app/test/functional/.gitkeep
|
475
|
-
- spec/support/mock_app/test/integration/.gitkeep
|
476
|
-
- spec/support/mock_app/test/performance/browsing_test.rb
|
477
|
-
- spec/support/mock_app/test/test_helper.rb
|
478
|
-
- spec/support/mock_app/test/unit/.gitkeep
|
479
|
-
- spec/support/mock_app/test/unit/passing_test.rb
|
480
|
-
- spec/support/mock_app/vendor/assets/javascripts/.gitkeep
|
481
|
-
- spec/support/mock_app/vendor/assets/stylesheets/.gitkeep
|
482
|
-
- spec/support/mock_app/vendor/plugins/.gitkeep
|
483
|
-
- spec/support/originator_handler.rb
|
484
|
-
- spec/unknown_runner_spec.rb
|
485
|
-
- spec/worker_manager_spec.rb
|
486
|
-
- spec/worker_spec.rb
|
407
|
+
test_files: []
|