prtg 0.0.5 → 0.0.6

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.
Files changed (3) hide show
  1. data/lib/#prtg.rb# +20 -0
  2. data/lib/prtg/client.rb +5 -1
  3. metadata +11 -5
data/lib/#prtg.rb# ADDED
@@ -0,0 +1,20 @@
1
+ # encoding: utf-8
2
+ dir = File.dirname(__FILE__)
3
+ $LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
4
+ require "rubygems"
5
+ require "#{dir}/prtg/client"
6
+ require "#{dir}/prtg/query"
7
+ require "#{dir}/prtg/utils"
8
+
9
+ # This is a wrapper for the api of paessler's prtg monitoring tool.
10
+ #
11
+ # Simple Example:
12
+ # http = Net::HTTP.new("subdomain.domain.tld", 443)
13
+ # http.use_ssl = true
14
+ # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
15
+ #
16
+ # client = Prtg::Client.new(:host => http, :username => "foo", :password => "bar")
17
+ # p client.live_data(:sensors)
18
+ module Prtg
19
+ VERSION = "0.0.5"
20
+ end
data/lib/prtg/client.rb CHANGED
@@ -82,7 +82,11 @@ module Prtg # :nodoc:
82
82
 
83
83
  def api_request(params)
84
84
  url_params = Utils.url_params(auth_params.merge(params))
85
- response = host.get("/api/table.xml?" + url_params)
85
+
86
+ response = host.get(
87
+ "/api/table.xml?#{ url_params }",
88
+ { "Accept-Encoding" => "*"}
89
+ )
86
90
 
87
91
  parse_response(response)
88
92
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prtg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-31 00:00:00.000000000 Z
12
+ date: 2013-04-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: xml-simple
16
- requirement: &10050660 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: 1.1.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *10050660
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.1.1
25
30
  description: This gem is a wrapper around the prth http api.Prtg is an network monitoring
26
31
  solution which provides a api to retrieve several information about monitored devices.
27
32
  email: k@kanello.de
@@ -32,6 +37,7 @@ files:
32
37
  - lib/prtg/utils.rb
33
38
  - lib/prtg/query.rb
34
39
  - lib/prtg/client.rb
40
+ - lib/#prtg.rb#
35
41
  - lib/prtg.rb
36
42
  homepage: http://github.com/ikaros/Prtg-for-Ruby
37
43
  licenses: []
@@ -53,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
59
  version: 1.3.6
54
60
  requirements: []
55
61
  rubyforge_project:
56
- rubygems_version: 1.8.10
62
+ rubygems_version: 1.8.25
57
63
  signing_key:
58
64
  specification_version: 3
59
65
  summary: Wrapper for the prtg network monitor api (http://www.paessler.com/prtg)