samanage 2.1.02 → 2.1.03
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +3 -0
- data/lib/samanage/api/contracts.rb +2 -1
- data/lib/samanage/api/custom_fields.rb +2 -1
- data/lib/samanage/api/custom_forms.rb +2 -1
- data/lib/samanage/api/departments.rb +2 -1
- data/lib/samanage/api/groups.rb +1 -1
- data/lib/samanage/api/hardwares.rb +2 -1
- data/lib/samanage/api/incidents.rb +1 -1
- data/lib/samanage/api/mobiles.rb +2 -1
- data/lib/samanage/api/other_assets.rb +3 -2
- data/lib/samanage/api/sites.rb +1 -1
- data/lib/samanage/api/users.rb +2 -1
- data/lib/samanage/version.rb +1 -1
- data/spec/api/samanage_solution_spec.rb +4 -2
- 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: 96cd6c46302b608aee724d5ce0c52c0b18809c84
|
4
|
+
data.tar.gz: 1b0e75bf1547cd663acffa977f610a9e4abe9ef7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06c13812cf2d816cc85662ef5db91b50470cebeeb6d8f29b9cbc01a569ffd80c2e6c906c80cc9add7850bb9c72a52e155fd6cbb1979d80ce802ce4c09966a672
|
7
|
+
data.tar.gz: 86ddac466de2047c481568732ea713dff235eebbe07b18d3dbdcdfc9d589edf74e4e933a13a38c52ca39df8d3d049ef44bd7167ead09a9d584fe8aead51cee6d
|
data/changelog.md
CHANGED
@@ -16,7 +16,8 @@ module Samanage
|
|
16
16
|
options[:page] = page
|
17
17
|
params = self.set_params(options: options)
|
18
18
|
puts "Collecting contracts page: #{page}/#{total_pages}" if options[:verbose]
|
19
|
-
|
19
|
+
path = "contracts.json?#{params}"
|
20
|
+
self.execute(path: path)[:data].each do |contract|
|
20
21
|
if block_given?
|
21
22
|
yield contract
|
22
23
|
end
|
@@ -16,7 +16,8 @@ module Samanage
|
|
16
16
|
options[:page] = page
|
17
17
|
params = self.set_params(options: options)
|
18
18
|
puts "Collecting Custom Fields page: #{page}/#{total_pages}" if options[:verbose]
|
19
|
-
|
19
|
+
path = "custom_fields.json?#{params}"
|
20
|
+
self.execute(path: path)[:data].each do |custom_field|
|
20
21
|
if block_given?
|
21
22
|
yield custom_field
|
22
23
|
end
|
@@ -15,7 +15,8 @@ module Samanage
|
|
15
15
|
options[:page] = page
|
16
16
|
params = self.set_params(options: options)
|
17
17
|
puts "Collecting Custom Forms page: #{page}/#{total_pages}" if options[:verbose]
|
18
|
-
|
18
|
+
path = "custom_forms.json?#{params}"
|
19
|
+
self.execute(path: path)[:data].each do |custom_form|
|
19
20
|
if block_given?
|
20
21
|
yield custom_form
|
21
22
|
end
|
@@ -13,7 +13,8 @@ module Samanage
|
|
13
13
|
options[:page] = page
|
14
14
|
params = self.set_params(options: options)
|
15
15
|
puts "Collecting Groups page: #{page}/#{total_pages}" if options[:verbose]
|
16
|
-
|
16
|
+
path = "departments.json?#{params}"
|
17
|
+
self.execute(path: path)[:data].each do |department|
|
17
18
|
if block_given?
|
18
19
|
yield department
|
19
20
|
end
|
data/lib/samanage/api/groups.rb
CHANGED
@@ -14,7 +14,7 @@ module Samanage
|
|
14
14
|
params = self.set_params(options: options)
|
15
15
|
puts "Collecting Groups page: #{page}/#{total_pages}" if options[:verbose]
|
16
16
|
path = 'groups.json?' + params
|
17
|
-
self.execute(
|
17
|
+
self.execute(path: path)[:data].each do |group|
|
18
18
|
if block_given?
|
19
19
|
yield group
|
20
20
|
end
|
@@ -16,7 +16,8 @@ module Samanage
|
|
16
16
|
options[:page] = page
|
17
17
|
params = self.set_params(options: options)
|
18
18
|
puts "Collecting Hardwares page: #{page}/#{total_pages}" if options[:verbose]
|
19
|
-
|
19
|
+
path = "hardwares.json?#{params}"
|
20
|
+
self.execute(path: path)[:data].each do |hardware|
|
20
21
|
if block_given?
|
21
22
|
yield hardware
|
22
23
|
end
|
@@ -37,7 +37,7 @@ module Samanage
|
|
37
37
|
options[:page] = page
|
38
38
|
params = self.set_params(options: options)
|
39
39
|
path = "incidents.json?" + params
|
40
|
-
self.execute(
|
40
|
+
self.execute(path: path)[:data].each do |incident|
|
41
41
|
if block_given?
|
42
42
|
yield incident
|
43
43
|
end
|
data/lib/samanage/api/mobiles.rb
CHANGED
@@ -17,7 +17,8 @@ module Samanage
|
|
17
17
|
options[:page] = page
|
18
18
|
params = self.set_params(options: options)
|
19
19
|
puts "Collecting Mobiles page: #{page}/#{total_pages}" if options[:verbose]
|
20
|
-
|
20
|
+
path = "mobiles.json?#{params}"
|
21
|
+
self.execute(path: path)[:data].each do |mobile|
|
21
22
|
if block_given?
|
22
23
|
yield mobiles
|
23
24
|
end
|
@@ -4,7 +4,7 @@ module Samanage
|
|
4
4
|
# Default get other_assets path
|
5
5
|
def get_other_assets(path: PATHS[:other_asset], options: {})
|
6
6
|
params = self.set_params(options: options)
|
7
|
-
path = 'other_assets.json' + params
|
7
|
+
path = 'other_assets.json?' + params
|
8
8
|
self.execute(path: path)
|
9
9
|
end
|
10
10
|
|
@@ -17,7 +17,8 @@ module Samanage
|
|
17
17
|
options[:page] = page
|
18
18
|
params = self.set_params(options: options)
|
19
19
|
puts "Collecting Other Assets page: #{page}/#{total_pages}" if options[:verbose]
|
20
|
-
|
20
|
+
path = "other_assets.json?#{params}"
|
21
|
+
self.execute(path: path)[:data].each do |other_asset|
|
21
22
|
if block_given?
|
22
23
|
yield other_asset
|
23
24
|
end
|
data/lib/samanage/api/sites.rb
CHANGED
@@ -14,7 +14,7 @@ module Samanage
|
|
14
14
|
params = self.set_params(options: options)
|
15
15
|
puts "Collecting Sites page: #{page}/#{total_pages}" if options[:verbose]
|
16
16
|
path = "sites.json?" + params
|
17
|
-
self.execute(
|
17
|
+
self.execute(path: path)[:data].each do |site|
|
18
18
|
if block_given?
|
19
19
|
yield site
|
20
20
|
end
|
data/lib/samanage/api/users.rb
CHANGED
@@ -17,7 +17,8 @@ module Samanage
|
|
17
17
|
params = self.set_params(options: options)
|
18
18
|
path = "users.json?" + params
|
19
19
|
puts "Collecting Users page: #{page}/#{total_pages}" if options[:verbose]
|
20
|
-
|
20
|
+
path = "users.json?#{params}"
|
21
|
+
self.execute(path: path)[:data].each do |user|
|
21
22
|
if block_given?
|
22
23
|
yield user
|
23
24
|
end
|
data/lib/samanage/version.rb
CHANGED
@@ -39,8 +39,10 @@ describe Samanage::Api do
|
|
39
39
|
new_description = solution_description = "Description #{(rand*10**4).ceil}"
|
40
40
|
payload = {solution: {description: new_description}}
|
41
41
|
solution_update = @samanage.update_solution(id: sample_solution_id, payload: payload)
|
42
|
-
|
43
|
-
|
42
|
+
<<<<<<< HEAD
|
43
|
+
=======
|
44
|
+
|
45
|
+
>>>>>>> cfd796242ef4e0d4ffa21306ea9242b3ed472c33
|
44
46
|
expect(new_description).to eq(solution_update.dig(:data,'description'))
|
45
47
|
expect(solution_update[:code]).to eq(200)
|
46
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samanage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.03
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Walls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|