Skip to content

Commit 89f3fa0

Browse files
authored
Merge pull request #26 from RubyOpenSource/warnings
update ruby interpreter list
2 parents 37b43ea + f6953f9 commit 89f3fa0

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

.travis.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ script: bundle exec rake test
33
rvm:
44
- 1.9.3
55
- 2.0.0
6-
- 2.1.0
7-
- 2.2.0
6+
- 2.1.10
7+
- 2.2.8
8+
- 2.3.6
9+
- 2.4.3
10+
- 2.5.0
811
- ruby-head
912
- jruby-head
1013

lib/zenoss.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def Zenoss.connect(server, user, pass, opts = {}, &block)
4545
def plist_to_array(list)
4646
return nil if list.nil?
4747
list = sanitize_str(list)
48-
(list.gsub /[\[\]]/,'').split /,\s+/
48+
list.gsub(/[\[\]]/, '').split(/,\s+/)
4949
end
5050

5151
# Some of the REST methods return Strings that are formated like a Python list.

lib/zenoss/jsonapi/device_router.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ def get_devices(uid = '/zport/dmd/Devices', opts = {})
5151
end
5252

5353
def get_templates(device_id)
54-
resp = json_request('DeviceRouter', 'getTemplates', [{:id => device_id}])
54+
json_request('DeviceRouter', 'getTemplates', [{:id => device_id}])
5555
end
5656

5757
def get_info(device_id, keys = nil)
5858
data = {}
5959
data[:uid] = device_id
6060
data[:keys] = keys if keys
61-
resp = json_request('DeviceRouter', 'getInfo', [data])
61+
json_request('DeviceRouter', 'getInfo', [data])
6262
end
6363

6464
# =============== Non-API Helper methods ===============

lib/zenoss/jsonapi/report_router.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ module JSONAPI
2222
module ReportRouter
2323

2424
def get_report_types
25-
resp = json_request('ReportRouter', 'getReportTypes')
25+
json_request('ReportRouter', 'getReportTypes')
2626
end
2727

2828
def get_report_tree(id = '/zport/dmd/Reports')
29-
resp = json_request('ReportRouter', 'getTree', [{:id => id}])
29+
json_request('ReportRouter', 'getTree', [{:id => id}])
3030
end
3131

3232
end # ReportRouter

lib/zenoss/model/devices/device.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def get_monitored_components(collector=nil, type=nil)
181181
components = rest(method)
182182

183183
# Turn the return string into an array of components
184-
(components.gsub /[\[\]]/,'').split /,\s+/
184+
components.gsub(/[\[\]]/, '').split(/,\s+/)
185185
end
186186

187187
# Return list of all DeviceComponents on this device

lib/zenoss/model/z_device_loader.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def load_device(device_name, device_path)
4848
def add_system(system_path)
4949
method = "addSystem?newSystemPath=#{system_path}"
5050
rest(method)
51-
sys = System.new("/Systems/#{system_path}")
51+
System.new("/Systems/#{system_path}")
5252
end
5353

5454

test/zenoss_client_test.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require_relative './test_helper'
2-
require 'minitest/spec'
32
require 'minitest/autorun'
43
require 'logger'
54

0 commit comments

Comments
 (0)