samanage 2.1.13 → 2.1.14

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: 0e46107af1beae0b563cc233e9d69c6727feca40
4
- data.tar.gz: 045c5ebd2cfc9103a696af0e7439a17a795c2eb5
3
+ metadata.gz: 480aed4373e288637af7d4d8e37670d0c0070360
4
+ data.tar.gz: 90dbe235e460d83d7eb1974a2e1d87327f82fc86
5
5
  SHA512:
6
- metadata.gz: 02ad1751605e323200930b5a15e19c6fc1ebea3e863a28234dad15a1ff18b10cba47ca152fbf2e9deb1bed845314ca4c295008839eeb8c2f15d13f03b8b89f89
7
- data.tar.gz: fe6872d3e228a4f04084786b8ccf9a39e5a3ded0168226d755bd22625bde462c5fffddbe1b052fd065eaf948f34adb727c65c78a1f55f24faa069f5ab9f1bfcf
6
+ metadata.gz: 4abdd3d92377d533be3f7adc1b6123c5fbd9ab9fa62defc032acd5490ea9d4395b1b6d87e220d1501522b4827d3049c2099243d614a0da3c9833cf044cc1968c
7
+ data.tar.gz: 14748f57baeed30c1806bef946df196c334dea40c472874efd17c3eddf11c676cc8aa26dfb1b18d4b0f58757c97a4194030c907ef8428094a0f45a02c1bc033e
@@ -1,5 +1,9 @@
1
+ ### 2.1.14
2
+ - Swap header merging
3
+
1
4
  ### 2.1.13
2
5
  - Pass Query params separate from Body
6
+ - Add coverage for `{add_calbacks: true}` option
3
7
  - Add Release support
4
8
 
5
9
  ### 2.1.12
@@ -74,11 +74,11 @@ module Samanage
74
74
  verbose = '?layout=long'
75
75
  end
76
76
 
77
- headers = headers.merge({
77
+ headers = {
78
78
  'Accept' => "application/vnd.samanage.v2.1+#{self.content_type}#{verbose}",
79
79
  'Content-Type' => "application/#{self.content_type}",
80
80
  'X-Samanage-Authorization' => 'Bearer ' + self.token
81
- })
81
+ }.merge(headers)
82
82
  options = options.except(:verbose)
83
83
  full_path = self.base_url + path
84
84
  retries = 0
@@ -1,3 +1,3 @@
1
1
  module Samanage
2
- VERSION = '2.1.13'
2
+ VERSION = '2.1.14'
3
3
  end
@@ -112,6 +112,7 @@ describe Samanage::Api do
112
112
  initial_email_audits = audits_req.dig(:data,'audits').select{|audit| audit['message'].match(/was sent./) }.count
113
113
  incident_json = {
114
114
  :incident => {
115
+ state: 'New',
115
116
  due_at: Date.new(2019,rand(11) + 1, rand(27) + 1), # need to configure email notifications for due date change
116
117
  assignee: {email: @users.find{|u| u.dig('role','name') == 'Administrator'}.dig('email')}
117
118
  }
@@ -123,6 +124,11 @@ describe Samanage::Api do
123
124
  final_email_audits = final_audits_req.dig(:data,'audits').select{|audit| audit['message'].match(/was sent./) }.count
124
125
  expect(initial_email_audits).to be < final_email_audits
125
126
  end
127
+ it 'Finds incident origin in v2.0 layout=long header' do
128
+ sample_id = @samanage.get_incidents[:data].sample['id']
129
+ origin_req = @samanage.execute(path: "incidents/#{sample_id}.json", verbose: true, headers: {'Accept' => "application/vnd.samanage.v2.0+json?layout=long"})
130
+ expect(origin_req[:data]).to have_key('origin')
131
+ end
126
132
  end
127
133
  end
128
134
  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.13
4
+ version: 2.1.14
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-07 00:00:00.000000000 Z
11
+ date: 2019-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty