nagiosharder 0.5.0.rc1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ require 'nagiosharder'
2
+ require 'webmock/rspec'
metadata CHANGED
@@ -1,117 +1,104 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nagiosharder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.rc1
5
- prerelease: 6
4
+ version: 0.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Josh Nichols
9
8
  - Jesse Newland
9
+ - Travis Graham
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-22 00:00:00.000000000 Z
13
+ date: 2014-03-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
17
17
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
18
  requirements:
20
- - - ~>
19
+ - - '>='
21
20
  - !ruby/object:Gem::Version
22
- version: 1.6.1
21
+ version: '0'
23
22
  type: :runtime
24
23
  prerelease: false
25
24
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
25
  requirements:
28
- - - ~>
26
+ - - '>='
29
27
  - !ruby/object:Gem::Version
30
- version: 1.6.1
28
+ version: '0'
31
29
  - !ruby/object:Gem::Dependency
32
30
  name: nokogiri
33
31
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
32
  requirements:
36
- - - ! '>='
33
+ - - '>='
37
34
  - !ruby/object:Gem::Version
38
35
  version: '0'
39
36
  type: :runtime
40
37
  prerelease: false
41
38
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
39
  requirements:
44
- - - ! '>='
40
+ - - '>='
45
41
  - !ruby/object:Gem::Version
46
42
  version: '0'
47
43
  - !ruby/object:Gem::Dependency
48
44
  name: activesupport
49
45
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
46
  requirements:
52
- - - ! '>='
47
+ - - '>='
53
48
  - !ruby/object:Gem::Version
54
49
  version: '0'
55
50
  type: :runtime
56
51
  prerelease: false
57
52
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
53
  requirements:
60
- - - ! '>='
54
+ - - '>='
61
55
  - !ruby/object:Gem::Version
62
56
  version: '0'
63
57
  - !ruby/object:Gem::Dependency
64
58
  name: i18n
65
59
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
60
  requirements:
68
- - - ! '>='
61
+ - - '>='
69
62
  - !ruby/object:Gem::Version
70
63
  version: '0'
71
64
  type: :runtime
72
65
  prerelease: false
73
66
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
67
  requirements:
76
- - - ! '>='
68
+ - - '>='
77
69
  - !ruby/object:Gem::Version
78
70
  version: '0'
79
71
  - !ruby/object:Gem::Dependency
80
72
  name: terminal-table
81
73
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
74
  requirements:
84
- - - ! '>='
75
+ - - '>='
85
76
  - !ruby/object:Gem::Version
86
77
  version: '0'
87
78
  type: :runtime
88
79
  prerelease: false
89
80
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
81
  requirements:
92
- - - ! '>='
82
+ - - '>='
93
83
  - !ruby/object:Gem::Version
94
84
  version: '0'
95
85
  - !ruby/object:Gem::Dependency
96
86
  name: httparty
97
87
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
88
  requirements:
100
- - - ~>
89
+ - - '>='
101
90
  - !ruby/object:Gem::Version
102
- version: 0.8.3
91
+ version: '0'
103
92
  type: :runtime
104
93
  prerelease: false
105
94
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
95
  requirements:
108
- - - ~>
96
+ - - '>='
109
97
  - !ruby/object:Gem::Version
110
- version: 0.8.3
98
+ version: '0'
111
99
  - !ruby/object:Gem::Dependency
112
100
  name: hashie
113
101
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
102
  requirements:
116
103
  - - ~>
117
104
  - !ruby/object:Gem::Version
@@ -119,7 +106,6 @@ dependencies:
119
106
  type: :runtime
120
107
  prerelease: false
121
108
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
109
  requirements:
124
110
  - - ~>
125
111
  - !ruby/object:Gem::Version
@@ -127,23 +113,36 @@ dependencies:
127
113
  - !ruby/object:Gem::Dependency
128
114
  name: rspec
129
115
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
116
  requirements:
132
- - - ! '>='
117
+ - - '>='
133
118
  - !ruby/object:Gem::Version
134
119
  version: 1.2.9
135
120
  type: :development
136
121
  prerelease: false
137
122
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
123
  requirements:
140
- - - ! '>='
124
+ - - '>='
141
125
  - !ruby/object:Gem::Version
142
126
  version: 1.2.9
127
+ - !ruby/object:Gem::Dependency
128
+ name: webmock
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - '>='
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
143
141
  description: Nagios access at your ruby fingertips
144
142
  email:
145
143
  - josh@technicalpickles.com
146
144
  - jesse@github.com
145
+ - travis@railsmachine.com
147
146
  executables:
148
147
  - nagiosharder
149
148
  extensions: []
@@ -154,35 +153,39 @@ files:
154
153
  - Gemfile
155
154
  - Gemfile.lock
156
155
  - LICENSE
157
- - README.rdoc
156
+ - README.md
158
157
  - Rakefile
159
158
  - bin/nagiosharder
160
159
  - lib/nagiosharder.rb
161
160
  - lib/nagiosharder/cli.rb
161
+ - lib/nagiosharder/commands.rb
162
162
  - lib/nagiosharder/filters.rb
163
163
  - nagiosharder.gemspec
164
+ - spec/site_spec.rb
165
+ - spec/spec_helper.rb
164
166
  homepage: http://github.com/railsmachine/nagiosharder
165
167
  licenses: []
168
+ metadata: {}
166
169
  post_install_message:
167
170
  rdoc_options: []
168
171
  require_paths:
169
172
  - lib
170
173
  required_ruby_version: !ruby/object:Gem::Requirement
171
- none: false
172
174
  requirements:
173
- - - ! '>='
175
+ - - '>='
174
176
  - !ruby/object:Gem::Version
175
177
  version: '0'
176
178
  required_rubygems_version: !ruby/object:Gem::Requirement
177
- none: false
178
179
  requirements:
179
- - - ! '>'
180
+ - - '>='
180
181
  - !ruby/object:Gem::Version
181
- version: 1.3.1
182
+ version: '0'
182
183
  requirements: []
183
184
  rubyforge_project: nagiosharder
184
- rubygems_version: 1.8.23
185
+ rubygems_version: 2.2.1
185
186
  signing_key:
186
- specification_version: 3
187
+ specification_version: 4
187
188
  summary: Nagios access at your ruby fingertips
188
- test_files: []
189
+ test_files:
190
+ - spec/site_spec.rb
191
+ - spec/spec_helper.rb
@@ -1,100 +0,0 @@
1
- = nagiosharder
2
-
3
- Query and command a Nagios install using the power of ruby (and lots of screen-scaping)! Do the usual gem install jig:
4
-
5
- gem install nagiosharder
6
-
7
-
8
- Now you have access to both a Ruby interface and a command line interface.
9
-
10
- Here's some examples to get you started with the Ruby API:
11
-
12
- require 'nagiosharder'
13
- site = NagiosHarder::Site.new('http://path/to/nagios/cgi/directory', 'user', 'password', 'version')
14
- # version defaults to 3
15
-
16
- # get details back about a host's services
17
- puts site.host_status('myhost')
18
-
19
- # schedule a host to have services checks run again right now
20
- site.schedule_host_check('myhost')
21
-
22
- # get details on all services
23
- site.service_status
24
-
25
- # or just things with problems
26
- site.service_status(
27
- :service_status_types => [
28
- :critical,
29
- :warning,
30
- :unknown
31
- ]
32
- )
33
-
34
- # or just muted services, sorted desc by duration
35
- site.service_status(
36
- :service_props => [
37
- :notifications_disabled,
38
- ],
39
- :sort_type => :descending,
40
- :sort_option => :state_duration,
41
- )
42
-
43
- # or get the details for a single service group
44
- site.service_status(:group => "AWESOME")
45
-
46
- # schedule a host to have services checks run again right now
47
- site.schedule_service_check('myhost', 'myservice')
48
-
49
- # schedule 20 minutes of downtime, starting now
50
- site.schedule_host_downtime('myhost', :start_time => Time.now, :end_time => Time.now + 20.minutes)
51
-
52
- # schedule a flexible 20 minutes of downtime between now and 2 hours from now
53
- site.schedule_host_downtime('myhost', :type => :flexible, :start_time => Time.now, :end_time => Time.now + 2.hours, :hours => 0, :minutes => 20)
54
-
55
- # acknowledge a down service
56
- site.acknowledge_service('myhost', 'myservice', 'something bad happened')
57
-
58
- # or unacknowledge
59
- site.unacknowledge_service('myhost', 'myservice')
60
-
61
- # acknowledge a down service
62
- site.acknowledge_host('myhost', 'something bad happened')
63
-
64
- # disable notifications for a service:
65
- site.disable_service_notifications('myhost', 'myservice')
66
-
67
- # check if notifications are disabled:
68
- site.service_notifications_disabled?('myhost', 'myservice')
69
-
70
- # enable notifications for a service:
71
- site.enable_service_notifications('myhost', 'myservice')
72
-
73
- # disable notifications, and wait for nagios to process it:
74
- site.disable_service_notifications('myhost', 'myservice')
75
- until site.service_notifications_disabled?('myhost', 'myservice')
76
- sleep 3
77
- end
78
-
79
- Then there's the command line. Start with --help
80
-
81
- nagiosharder --help
82
-
83
- This will show you how you configure nagiosharder enough to talk to your nagios. You need at least a username, password, and nagios url. These can alternatively be in a config file. For example:
84
-
85
- nagiosharder --config /path/to/yaml
86
-
87
- This will display all available commands.
88
-
89
-
90
- == Note on Patches/Pull Requests
91
-
92
- * Fork the project.
93
- * Make your feature addition or bug fix.
94
- * Add tests for it. This is important so I don't break it in a future version unintentionally.
95
- * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
96
- * Send me a pull request. Bonus points for topic branches.
97
-
98
- == Copyright
99
-
100
- Copyright (c) 2010 Josh Nichols. See LICENSE for details.