flapjack 0.6.43 → 0.6.44
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.
- data/bin/flapjack +4 -2
- data/bin/flapjack-nagios-receiver +4 -1
- data/bin/flapjack-populator +4 -1
- data/etc/flapjack_config.yaml.example +111 -106
- data/features/steps/notifications_steps.rb +6 -6
- data/lib/flapjack/configuration.rb +76 -24
- data/lib/flapjack/coordinator.rb +27 -44
- data/lib/flapjack/data/entity.rb +28 -7
- data/lib/flapjack/data/entity_check.rb +18 -20
- data/lib/flapjack/executive.rb +5 -4
- data/lib/flapjack/gateways/api.rb +391 -0
- data/lib/flapjack/gateways/api/entity_check_presenter.rb +185 -0
- data/lib/flapjack/gateways/api/entity_presenter.rb +70 -0
- data/lib/flapjack/gateways/base.rb +38 -0
- data/lib/flapjack/{notification → gateways}/email.rb +4 -5
- data/lib/flapjack/{notification → gateways}/email/alert.html.haml +0 -0
- data/lib/flapjack/{notification → gateways}/email/alert.text.erb +0 -0
- data/lib/flapjack/gateways/jabber.rb +387 -0
- data/lib/flapjack/gateways/oobetet.rb +241 -0
- data/lib/flapjack/gateways/pagerduty.rb +247 -0
- data/lib/flapjack/{notification → gateways}/sms.rb +5 -6
- data/lib/flapjack/{notification → gateways}/sms/messagenet.rb +1 -1
- data/lib/flapjack/gateways/web.rb +293 -0
- data/lib/flapjack/{web → gateways/web}/views/_css.haml +0 -0
- data/lib/flapjack/{web → gateways/web}/views/_nav.haml +0 -0
- data/lib/flapjack/{web → gateways/web}/views/check.haml +0 -0
- data/lib/flapjack/{web → gateways/web}/views/contact.haml +0 -0
- data/lib/flapjack/{web → gateways/web}/views/contacts.haml +0 -0
- data/lib/flapjack/{web → gateways/web}/views/index.haml +0 -0
- data/lib/flapjack/{web → gateways/web}/views/self_stats.haml +0 -0
- data/lib/flapjack/pikelet.rb +0 -23
- data/lib/flapjack/version.rb +1 -1
- data/spec/lib/flapjack/coordinator_spec.rb +56 -36
- data/spec/lib/flapjack/data/entity_spec.rb +53 -4
- data/spec/lib/flapjack/{api → gateways/api}/entity_check_presenter_spec.rb +10 -13
- data/spec/lib/flapjack/{api → gateways/api}/entity_presenter_spec.rb +10 -10
- data/spec/lib/flapjack/{api_spec.rb → gateways/api_spec.rb} +14 -14
- data/spec/lib/flapjack/gateways/email_spec.rb +6 -0
- data/spec/lib/flapjack/{jabber_spec.rb → gateways/jabber_spec.rb} +9 -9
- data/spec/lib/flapjack/{oobetet_spec.rb → gateways/oobetet_spec.rb} +10 -10
- data/spec/lib/flapjack/{pagerduty_spec.rb → gateways/pagerduty_spec.rb} +11 -11
- data/spec/lib/flapjack/gateways/sms_spec.rb +6 -0
- data/spec/lib/flapjack/{web_spec.rb → gateways/web_spec.rb} +4 -4
- metadata +46 -79
- data/bin/install-flapjack-systemwide +0 -58
- data/features/steps/flapjack-importer_steps.rb +0 -109
- data/features/steps/flapjack-worker_steps.rb +0 -68
- data/lib/flapjack/api.rb +0 -388
- data/lib/flapjack/api/entity_check_presenter.rb +0 -181
- data/lib/flapjack/api/entity_presenter.rb +0 -66
- data/lib/flapjack/cli/worker_manager.rb +0 -46
- data/lib/flapjack/inifile.rb +0 -44
- data/lib/flapjack/jabber.rb +0 -383
- data/lib/flapjack/notifier_engine.rb +0 -40
- data/lib/flapjack/notifiers/mailer/init.rb +0 -3
- data/lib/flapjack/notifiers/mailer/mailer.rb +0 -51
- data/lib/flapjack/notifiers/xmpp/init.rb +0 -3
- data/lib/flapjack/notifiers/xmpp/xmpp.rb +0 -46
- data/lib/flapjack/oobetet.rb +0 -240
- data/lib/flapjack/pagerduty.rb +0 -242
- data/lib/flapjack/web.rb +0 -286
- data/spec.old/check_sandbox/echo +0 -3
- data/spec.old/check_sandbox/sandboxed_check +0 -5
- data/spec.old/configs/flapjack-notifier-couchdb.ini +0 -25
- data/spec.old/configs/flapjack-notifier.ini +0 -39
- data/spec.old/configs/recipients.ini +0 -14
- data/spec.old/helpers.rb +0 -15
- data/spec.old/inifile_spec.rb +0 -66
- data/spec.old/mock-notifiers/mock/init.rb +0 -3
- data/spec.old/mock-notifiers/mock/mock.rb +0 -19
- data/spec.old/notifier-directories/spoons/testmailer/init.rb +0 -20
- data/spec.old/notifier_application_spec.rb +0 -222
- data/spec.old/notifier_filters_spec.rb +0 -52
- data/spec.old/notifier_options_multiplexer_spec.rb +0 -71
- data/spec.old/notifier_options_spec.rb +0 -115
- data/spec.old/notifier_spec.rb +0 -57
- data/spec.old/notifiers/mailer_spec.rb +0 -36
- data/spec.old/notifiers/xmpp_spec.rb +0 -36
- data/spec.old/persistence/datamapper_spec.rb +0 -74
- data/spec.old/persistence/mock_persistence_backend.rb +0 -26
- data/spec.old/simple.ini +0 -6
- data/spec.old/spec.opts +0 -4
- data/spec.old/test-filters/blocker.rb +0 -13
- data/spec.old/test-filters/mock.rb +0 -13
- data/spec.old/transports/beanstalkd_spec.rb +0 -44
- data/spec.old/transports/mock_transport.rb +0 -58
- data/spec.old/worker_application_spec.rb +0 -62
- data/spec.old/worker_options_spec.rb +0 -83
- data/spec/lib/flapjack/notification/email_spec.rb +0 -6
- data/spec/lib/flapjack/notification/sms_spec.rb +0 -6
@@ -1,83 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
$: << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
-
require 'lib/flapjack/cli/worker'
|
4
|
-
|
5
|
-
describe Flapjack::WorkerOptions do
|
6
|
-
|
7
|
-
before(:each) do
|
8
|
-
end
|
9
|
-
|
10
|
-
# beanstalk
|
11
|
-
it "should accept the location of a beanstalk queue in short form" do
|
12
|
-
args = %w(-b localhost)
|
13
|
-
options = Flapjack::WorkerOptions.parse(args)
|
14
|
-
options.host.should == "localhost"
|
15
|
-
end
|
16
|
-
|
17
|
-
it "should accept the location of a beanstalk queue in long form" do
|
18
|
-
args = %w(--beanstalk localhost)
|
19
|
-
options = Flapjack::WorkerOptions.parse(args)
|
20
|
-
options.host.should == "localhost"
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should set a default beanstalk host" do
|
24
|
-
args = []
|
25
|
-
options = Flapjack::WorkerOptions.parse(args)
|
26
|
-
options.host.should == 'localhost'
|
27
|
-
end
|
28
|
-
|
29
|
-
# beanstalk port
|
30
|
-
it "should accept a specified beanstalk port in short form" do
|
31
|
-
args = %w(-b localhost -p 11340)
|
32
|
-
options = Flapjack::WorkerOptions.parse(args)
|
33
|
-
options.port.should == 11340
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should accept a specified beanstalk port in long form" do
|
37
|
-
args = %w(-b localhost --port 11399)
|
38
|
-
options = Flapjack::WorkerOptions.parse(args)
|
39
|
-
options.port.should == 11399
|
40
|
-
end
|
41
|
-
|
42
|
-
it "should set a default beanstalk port" do
|
43
|
-
args = %w(-b localhost)
|
44
|
-
options = Flapjack::WorkerOptions.parse(args)
|
45
|
-
options.port.should == 11300
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should accept a specified checks directory in short form" do
|
49
|
-
args = %w(-c /tmp)
|
50
|
-
options = Flapjack::WorkerOptions.parse(args)
|
51
|
-
options.checks_directory.should == "/tmp"
|
52
|
-
end
|
53
|
-
|
54
|
-
it "should accept a specified checks directory in long form" do
|
55
|
-
args = %w(--checks-directory /tmp)
|
56
|
-
options = Flapjack::WorkerOptions.parse(args)
|
57
|
-
options.checks_directory.should == "/tmp"
|
58
|
-
end
|
59
|
-
|
60
|
-
it "should set a default checks directory" do
|
61
|
-
args = []
|
62
|
-
options = Flapjack::WorkerOptions.parse(args)
|
63
|
-
options.checks_directory.should_not be_nil
|
64
|
-
end
|
65
|
-
|
66
|
-
# general
|
67
|
-
it "should exit on when asked for help in short form" do
|
68
|
-
args = %w(-h)
|
69
|
-
lambda {
|
70
|
-
Flapjack::WorkerOptions.parse(args)
|
71
|
-
}.should raise_error(SystemExit)
|
72
|
-
end
|
73
|
-
|
74
|
-
it "should exit on when asked for help in long form" do
|
75
|
-
args = %w(--help)
|
76
|
-
lambda {
|
77
|
-
Flapjack::WorkerOptions.parse(args)
|
78
|
-
}.should raise_error(SystemExit)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
|
83
|
-
def puts(*args) ; end
|