Skip to content

Commit

Permalink
Merge pull request #26 from RubyOpenSource/warnings
Browse files Browse the repository at this point in the history
update ruby interpreter list
  • Loading branch information
skrobul authored Feb 18, 2018
2 parents 37b43ea + f6953f9 commit 89f3fa0
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ script: bundle exec rake test
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.1.10
- 2.2.8
- 2.3.6
- 2.4.3
- 2.5.0
- ruby-head
- jruby-head

Expand Down
2 changes: 1 addition & 1 deletion lib/zenoss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def Zenoss.connect(server, user, pass, opts = {}, &block)
def plist_to_array(list)
return nil if list.nil?
list = sanitize_str(list)
(list.gsub /[\[\]]/,'').split /,\s+/
list.gsub(/[\[\]]/, '').split(/,\s+/)
end

# Some of the REST methods return Strings that are formated like a Python list.
Expand Down
4 changes: 2 additions & 2 deletions lib/zenoss/jsonapi/device_router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ def get_devices(uid = '/zport/dmd/Devices', opts = {})
end

def get_templates(device_id)
resp = json_request('DeviceRouter', 'getTemplates', [{:id => device_id}])
json_request('DeviceRouter', 'getTemplates', [{:id => device_id}])
end

def get_info(device_id, keys = nil)
data = {}
data[:uid] = device_id
data[:keys] = keys if keys
resp = json_request('DeviceRouter', 'getInfo', [data])
json_request('DeviceRouter', 'getInfo', [data])
end

# =============== Non-API Helper methods ===============
Expand Down
4 changes: 2 additions & 2 deletions lib/zenoss/jsonapi/report_router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ module JSONAPI
module ReportRouter

def get_report_types
resp = json_request('ReportRouter', 'getReportTypes')
json_request('ReportRouter', 'getReportTypes')
end

def get_report_tree(id = '/zport/dmd/Reports')
resp = json_request('ReportRouter', 'getTree', [{:id => id}])
json_request('ReportRouter', 'getTree', [{:id => id}])
end

end # ReportRouter
Expand Down
2 changes: 1 addition & 1 deletion lib/zenoss/model/devices/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def get_monitored_components(collector=nil, type=nil)
components = rest(method)

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

# Return list of all DeviceComponents on this device
Expand Down
2 changes: 1 addition & 1 deletion lib/zenoss/model/z_device_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def load_device(device_name, device_path)
def add_system(system_path)
method = "addSystem?newSystemPath=#{system_path}"
rest(method)
sys = System.new("/Systems/#{system_path}")
System.new("/Systems/#{system_path}")
end


Expand Down
1 change: 0 additions & 1 deletion test/zenoss_client_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require_relative './test_helper'
require 'minitest/spec'
require 'minitest/autorun'
require 'logger'

Expand Down

0 comments on commit 89f3fa0

Please sign in to comment.