logicmonitor_simple 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/logicmonitor_simple.rb +4 -3
  2. metadata +3 -2
@@ -3,7 +3,7 @@
3
3
  # Simple LogicMonitor API library - a spartan wrapper around the LogicMonitor API
4
4
  #
5
5
  # Author: Michael Mittelstadt (<meek@getsatisfaction.com>)
6
- # Version: 0.1.0
6
+ # Version: 0.1.2
7
7
  #
8
8
  # Usage:
9
9
  #
@@ -18,6 +18,7 @@
18
18
  require 'awrence'
19
19
  require 'curb'
20
20
  require 'multi_json'
21
+ require 'cgi'
21
22
 
22
23
  module Logicmonitor
23
24
  class Simple
@@ -35,8 +36,8 @@ module Logicmonitor
35
36
  if v.is_a? Array
36
37
  v = v.join(',')
37
38
  end
38
- "#{k}=#{v}"
39
- end.join('&') rescue []
39
+ "#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}"
40
+ end.join('&') rescue ""
40
41
  g = Curl.get("https://#{@domain}.logicmonitor.com/santaba/rpc/#{method}?#{http_args}") do |http|
41
42
  if @cookies.size > 0
42
43
  http.headers['Cookie'] = @cookies.join('; ')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logicmonitor_simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-10 00:00:00.000000000 Z
12
+ date: 2013-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: curb
@@ -93,3 +93,4 @@ signing_key:
93
93
  specification_version: 3
94
94
  summary: Simple API client for LogicMonitor
95
95
  test_files: []
96
+ has_rdoc: