s2_netbox 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/lib/s2_netbox/api_request.rb +3 -3
- data/lib/s2_netbox/commands/credential.rb +1 -1
- data/lib/s2_netbox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4085554c3822c85044da1b27ab3ba4e8cae9d7c
|
4
|
+
data.tar.gz: d96ae90ea4d6aa700fc66647e8099f945dc776a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b209ef54c58ae24448c216c6108e0108c52399ecf0d1ce4b38580b53bcabed01b971259d5910ab9aa0928768368538f5e388399ad8f9ece3ebcce811b56bd3f
|
7
|
+
data.tar.gz: 4cbf716e599bf2c8b25e147d9656296dd8176a03a8ad7fcc6107ac989f7d8449a32cc269127b763830218c502f62055418cd7fe6ef087d686327bd9aadc71403
|
data/LICENSE.txt
CHANGED
@@ -10,7 +10,7 @@ class S2Netbox::ApiRequest
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.send_request(command_name, attributes, session_id=nil)
|
13
|
-
S2Netbox.request(S2Netbox::BASIC_ENDPOINT, build_command(command_name, attributes), session_id)
|
13
|
+
S2Netbox.request(S2Netbox::BASIC_ENDPOINT, build_command(command_name, map_attributes(attributes)), session_id)
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.method_missing(method_name, *arguments, &block)
|
@@ -25,7 +25,7 @@ class S2Netbox::ApiRequest
|
|
25
25
|
session_id = arguments[0]
|
26
26
|
end
|
27
27
|
|
28
|
-
send_request(command_for_method(method_name),
|
28
|
+
send_request(command_for_method(method_name), attributes, session_id)
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.respond_to_missing?(method_name, include_private = false)
|
@@ -79,6 +79,6 @@ class S2Netbox::ApiRequest
|
|
79
79
|
def self.map_attributes(attributes)
|
80
80
|
return unless attributes
|
81
81
|
|
82
|
-
attributes.
|
82
|
+
attributes.map { |k, v| [k.to_s.delete('_').upcase, blank?(v) ? '' : v] }.to_h
|
83
83
|
end
|
84
84
|
end
|
data/lib/s2_netbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s2_netbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Teamsquare
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|