whd_ticket 0.2.2 → 0.2.5

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: 8bbe1b81b3e3865b24e1514be544572de4327bdb
4
- data.tar.gz: e32794d8034c22a5e4cc90a4c0339d95df16fc04
3
+ metadata.gz: 2ff4c912490afeec5ee6165ca8d6eaafe13f8036
4
+ data.tar.gz: 0d642a1817cc17a72ad04e2e31c9096123003daf
5
5
  SHA512:
6
- metadata.gz: efc6e125c6356e3863f2290f97cd5d1831bb637754d7626229d5789c352367483e71ca8d63b53a26168e2ce1ab194d1e83928424d4e37e1a4bd923257693052f
7
- data.tar.gz: 124e2e196c4d36efe2c26b933224cf8640e0ff023fe70c77cbd97b3de5b4bf489940cbdd26f69aa2c3114542eb41bdfeb4cf1fc989f90992109d8ef40c440d20
6
+ metadata.gz: 840c3639f81c9f6281373f29e7df3c3526692a39ab7fb963a288d77b3e226de46d3de004446f03ccf6e9e392cd451501e7f86e4e803c271cabea3598069cc067
7
+ data.tar.gz: 5c8de757fb6609175a37a84b9b6de523619f953cb7f850a0d5b815945d606845ee9de600b64158019d9814e8c6fb0c423fefeb2b38629ac98e660ac99e805b1f
@@ -1,3 +1,3 @@
1
1
  module WhdTicket
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -14,7 +14,6 @@ module WHD
14
14
  def create
15
15
 
16
16
  url = "#{@whd_url}#{@whd_url_path}/ra/Tickets"
17
- puts url
18
17
  uri = URI.parse(url)
19
18
  params = { :apiKey => @api_key }
20
19
  uri.query = URI.encode_www_form(params)
data/lib/whd_ticket.rb CHANGED
@@ -12,12 +12,12 @@ module WHD
12
12
  unless ENV["WHD_URL"]
13
13
  print "You must set an environment variable for WHD_URL with the url of your WebHelpDesk.\n"
14
14
  print "e.g. echo export WHD_URL=https://servicedesk.com >> ~/.profile\n"
15
- return
15
+ exit
16
16
  end
17
17
  unless ENV["WHD_API_KEY"]
18
18
  print "You must set an environment variable for WHD_URL with the apiKey for the tech creating the ticket.\n"
19
19
  print "e.g. echo export WHD_API_KEY=OdWPct19cIZbGIbVJkarpbrIvvx561tErxx87l3l >> ~/.profile\n"
20
- return
20
+ exit
21
21
  end
22
22
  @whd_url = ENV["WHD_URL"]
23
23
  @api_key = ENV["WHD_API_KEY"]
@@ -32,33 +32,33 @@ module WHD
32
32
 
33
33
  @whd_utc_time = Time.now.strftime("%Y-%m-%d\T%H:%M:%S\Z")
34
34
  @send_data = {
35
- "reportDateUtc": @whd_utc_time,
36
- "emailClient": true,
37
- "emailTech": true,
38
- "emailTechGroupLevel": false,
39
- "emailGroupManager": false,
40
- "emailCc": false,
41
- "emailBcc": false,
42
- "subject": @ticket_subject,
43
- "detail": @ticket_details,
44
- "assignToCreatingTech": true,
45
- "problemtype": {
46
- "type": "ProblemType",
47
- "id": 124
35
+ :reportDateUtc => @whd_utc_time,
36
+ :emailClient => true,
37
+ :emailTech => true,
38
+ :emailTechGroupLevel => false,
39
+ :emailGroupManager => false,
40
+ :emailCc => false,
41
+ :emailBcc => false,
42
+ :subject => @ticket_subject,
43
+ :detail => @ticket_details,
44
+ :assignToCreatingTech => true,
45
+ :problemtype => {
46
+ :type => "ProblemType",
47
+ :id => 124
48
48
  },
49
- "sendEmail": false,
50
- "clientReporter": {
51
- "type": "Client",
52
- "id": @ticket_client
49
+ :sendEmail => false,
50
+ :clientReporter => {
51
+ :type => "Client",
52
+ :id => @ticket_client
53
53
  },
54
- "customFields": [
54
+ :customFields => [
55
55
  {
56
- "definitionId": 21,
57
- "restValue": "WHD"
56
+ :definitionId => 21,
57
+ :restValue => "WHD"
58
58
  },
59
59
  {
60
- "definitionId": 216,
61
- "restValue": "No"
60
+ :definitionId => 216,
61
+ :restValue => "No"
62
62
  }
63
63
  ]
64
64
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whd_ticket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-26 00:00:00.000000000 Z
11
+ date: 2017-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler