s2_netbox 0.0.1 → 0.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b70e6ef03b4e2e70b559e99aed3d310be1a9937f
4
- data.tar.gz: fca51277062f1225a2362ffdc851439bc37622c6
3
+ metadata.gz: f4085554c3822c85044da1b27ab3ba4e8cae9d7c
4
+ data.tar.gz: d96ae90ea4d6aa700fc66647e8099f945dc776a5
5
5
  SHA512:
6
- metadata.gz: d4e62ff92d0d570d6f18f714732da57118e1c0f75ddd06dae914d7ef8eec1a0499cd209bb2eb12371e36e19855591eefc1d2d113cb5cf9d40865f2ab02490e28
7
- data.tar.gz: 1d6fc17fe9d3188e5488b7ac665186d4de36ee2f9a92a542ffeb5b88462814a6f646f756a6a5305c8d78bb13d5c8d54497653a91ffa1d2d88ebf8398caa5f178
6
+ metadata.gz: 1b209ef54c58ae24448c216c6108e0108c52399ecf0d1ce4b38580b53bcabed01b971259d5910ab9aa0928768368538f5e388399ad8f9ece3ebcce811b56bd3f
7
+ data.tar.gz: 4cbf716e599bf2c8b25e147d9656296dd8176a03a8ad7fcc6107ac989f7d8449a32cc269127b763830218c502f62055418cd7fe6ef087d686327bd9aadc71403
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Michael Shimmins
3
+ Copyright (c) 2016 Teamsquare Pty. Ltd.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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), map_attributes(attributes), session_id)
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.reject { |_,v| blank?(v) }.map { |k, v| [k.to_s.delete('_').upcase, v] }.to_h
82
+ attributes.map { |k, v| [k.to_s.delete('_').upcase, blank?(v) ? '' : v] }.to_h
83
83
  end
84
84
  end
@@ -1,3 +1,3 @@
1
1
  class S2Netbox::Commands::Credential < S2Netbox::ApiRequest
2
- provides_command :add, :modify
2
+ provides_command :add, :modify, :remove
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module S2Netbox
2
- VERSION = '0.0.1'
2
+ VERSION = '0.1.0'
3
3
  end
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.1
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-12 00:00:00.000000000 Z
11
+ date: 2016-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty