samanage 2.1.14 → 2.1.15

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: 480aed4373e288637af7d4d8e37670d0c0070360
4
- data.tar.gz: 90dbe235e460d83d7eb1974a2e1d87327f82fc86
3
+ metadata.gz: 2b3edf616c02a5a68065d36aa9cf44c2bb7eddec
4
+ data.tar.gz: 36489fd9004eb8c220fc8a7eaf55dd6f1919ee46
5
5
  SHA512:
6
- metadata.gz: 4abdd3d92377d533be3f7adc1b6123c5fbd9ab9fa62defc032acd5490ea9d4395b1b6d87e220d1501522b4827d3049c2099243d614a0da3c9833cf044cc1968c
7
- data.tar.gz: 14748f57baeed30c1806bef946df196c334dea40c472874efd17c3eddf11c676cc8aa26dfb1b18d4b0f58757c97a4194030c907ef8428094a0f45a02c1bc033e
6
+ metadata.gz: 06d6187866bf910eee253f3fa485f5b88239f8b700f2b0df0467c6de1436e6d4e8c191d3e0c884e357d59c86abc717926dd9d423a11bb6f194862592381913ac
7
+ data.tar.gz: e0378296ebae937e9f6dd9b6e030341020f9ff2218e52841e9da330f585251ce7e44c6d9532aed11fee25ca663423bc5fbcad98a5af77036e7ef55c950db1467
data/changelog.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 2.1.15
2
+ - Use options in find methods
3
+
1
4
  ### 2.1.14
2
5
  - Swap header merging
3
6
 
@@ -33,9 +33,9 @@ module Samanage
33
33
  end
34
34
 
35
35
  # Find contract given id
36
- def find_contract(id: )
36
+ def find_contract(id: , options: {})
37
37
  path = "contracts/#{id}.json"
38
- self.execute(path: path)
38
+ self.execute(path: path, options: {})
39
39
  end
40
40
 
41
41
  # Check for contract using URL builder
@@ -39,9 +39,9 @@ module Samanage
39
39
  end
40
40
  end
41
41
 
42
- def find_group(id: )
42
+ def find_group(id: , options: {})
43
43
  path = "groups/#{id}.json"
44
- self.execute(path: path)
44
+ self.execute(path: path, options: {})
45
45
  end
46
46
 
47
47
  def add_member_to_group(email: , group_id: nil, group_name: nil)
@@ -36,9 +36,9 @@ module Samanage
36
36
 
37
37
 
38
38
  # Find release by id
39
- def find_release(id: )
39
+ def find_release(id: , options: {})
40
40
  path = "releases/#{id}.json"
41
- self.execute(path: path)
41
+ self.execute(path: path, options: {})
42
42
  end
43
43
 
44
44
  # Update release given json and id
@@ -34,9 +34,9 @@ module Samanage
34
34
  end
35
35
 
36
36
  # Return user by ID
37
- def find_user(id: )
37
+ def find_user(id: , options: {})
38
38
  path = "users/#{id}.json"
39
- self.execute(path: path)
39
+ self.execute(path: path, options: {})
40
40
  end
41
41
 
42
42
  # Email is unique so compare first for exact match only. Returns nil or the id
@@ -1,12 +1,5 @@
1
1
  # Consts and common lookup functions
2
2
  module Samanage
3
- INCIDENT_ORIGIN = {
4
- 1 => 'Web',
5
- 2 => 'Portal',
6
- 3 => 'API',
7
- 4 => 'Email'
8
- }
9
-
10
3
  def find_custom_field(custom_fields_values: , field_name:, user_type: false, user_resolve: 'email')
11
4
  result = custom_fields_values.select{|field| field['name'] == field_name}.first.to_h
12
5
  if user_type
@@ -1,3 +1,3 @@
1
1
  module Samanage
2
- VERSION = '2.1.14'
2
+ VERSION = '2.1.15'
3
3
  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.14
4
+ version: 2.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Walls
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-08 00:00:00.000000000 Z
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty