autotask_ruby 2.1.2 → 2.3.2

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
  SHA256:
3
- metadata.gz: 705b182732309a3b58d7d433c64a51f5d65542cdf0d4633458d922965e22b7a0
4
- data.tar.gz: acc24955689f7820e9a861d0444fec0340120330f3ff6e674866f4d033df12d9
3
+ metadata.gz: 37dc87bd4c160933cc6c149076de15c32484450ddec0327fa98a931ba2b6897c
4
+ data.tar.gz: 4908fd5ded56d50c66f42368099d8b0f9244c92f7503f5dfaf7ba543ae21feab
5
5
  SHA512:
6
- metadata.gz: 2aacdba143efad791fb4433a8835961ab56c56477b11565ecdfd1cf69219006e7ec351577c777815836b85842773c2e0f74a8dfea969c12353674d9c586987de
7
- data.tar.gz: 25e2765f31e13280dbdb6bc2ec03bc12ce7e26ecee34adb1250475ac3226876fec5ddd3cb6b254f3d78a07447925cda72cd68222b8ffc538556eed8ffab6d175
6
+ metadata.gz: cd8337045aadc8c0c67a048de135de6726df56dc85bc9d7056434a7a44e288ee02568a59e5e66b80404d09d3ac3184f951293b8a3d3dd0c7fe423be71a7066e3
7
+ data.tar.gz: 37a1e4494512c5649645952e2280a7a6a2946d6aade0dab7aed8df8878afee8615c166ac8b45e630a3a5a4cddb826ee01d69c6dede36b286fec950c4c9845e99
@@ -0,0 +1,32 @@
1
+ name: autotask_ruby
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build + Publish
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ ruby: [ '2.5.x', '2.6.x', '2.7.x' ]
16
+
17
+ steps:
18
+ - uses: actions/checkout@master
19
+ - name: Setup ruby
20
+ uses: actions/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby }}
23
+ - name: Publish to RubyGems
24
+ run: |
25
+ mkdir -p $HOME/.gem
26
+ touch $HOME/.gem/credentials
27
+ chmod 0600 $HOME/.gem/credentials
28
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
29
+ gem build *.gemspec
30
+ gem push *.gem
31
+ env:
32
+ GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
@@ -1,7 +1,9 @@
1
1
  require: rubocop-rspec
2
2
 
3
- Metrics/LineLength:
3
+ # Commonly used screens these days easily fit more than 80 characters.
4
+ Layout/LineLength:
4
5
  Max: 120
5
6
 
6
7
  Layout/IndentationWidth:
7
- Width: 2
8
+ # Number of spaces for each indentation level.
9
+ Width: 2
@@ -1,2 +1,2 @@
1
- ruby-2.6.5
1
+ ruby-2.7.1
2
2
 
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- autotask_ruby (2.1.2)
4
+ autotask_ruby (2.3.1)
5
5
  activesupport (~> 6.0)
6
6
  savon (~> 2.12)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (6.0.2.1)
11
+ activesupport (6.0.2.2)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
@@ -24,14 +24,14 @@ GEM
24
24
  builder (3.2.4)
25
25
  byebug (11.1.1)
26
26
  coderay (1.1.2)
27
- concurrent-ruby (1.1.5)
27
+ concurrent-ruby (1.1.6)
28
28
  crack (0.4.3)
29
29
  safe_yaml (~> 1.0.0)
30
30
  diff-lcs (1.3)
31
31
  dotenv (2.7.5)
32
32
  ffi (1.12.2)
33
33
  formatador (0.2.5)
34
- guard (2.16.1)
34
+ guard (2.16.2)
35
35
  formatador (>= 0.2.4)
36
36
  listen (>= 2.7, < 4.0)
37
37
  lumberjack (>= 1.0.12, < 2.0)
@@ -47,7 +47,7 @@ GEM
47
47
  rspec (>= 2.99.0, < 4.0)
48
48
  gyoku (1.3.1)
49
49
  builder (>= 2.1.2)
50
- hashdiff (1.0.0)
50
+ hashdiff (1.0.1)
51
51
  httpi (2.4.4)
52
52
  rack
53
53
  socksify
@@ -58,24 +58,24 @@ GEM
58
58
  rb-fsevent (~> 0.10, >= 0.10.3)
59
59
  rb-inotify (~> 0.9, >= 0.9.10)
60
60
  lumberjack (1.2.4)
61
- method_source (0.9.2)
61
+ method_source (1.0.0)
62
62
  mini_portile2 (2.4.0)
63
63
  minitest (5.14.0)
64
64
  nenv (0.3.0)
65
- nokogiri (1.10.7)
65
+ nokogiri (1.10.9)
66
66
  mini_portile2 (~> 2.4.0)
67
67
  nori (2.6.0)
68
68
  notiffany (0.1.3)
69
69
  nenv (~> 0.1)
70
70
  shellany (~> 0.0)
71
71
  parallel (1.19.1)
72
- parser (2.7.0.4)
72
+ parser (2.7.1.0)
73
73
  ast (~> 2.4.0)
74
- pry (0.12.2)
75
- coderay (~> 1.1.0)
76
- method_source (~> 0.9.0)
77
- public_suffix (4.0.3)
78
- rack (2.2.1)
74
+ pry (0.13.0)
75
+ coderay (~> 1.1)
76
+ method_source (~> 1.0)
77
+ public_suffix (4.0.4)
78
+ rack (2.2.2)
79
79
  rainbow (3.0.0)
80
80
  rake (13.0.1)
81
81
  rb-fsevent (0.10.3)
@@ -88,21 +88,21 @@ GEM
88
88
  rspec-mocks (~> 3.9.0)
89
89
  rspec-core (3.9.1)
90
90
  rspec-support (~> 3.9.1)
91
- rspec-expectations (3.9.0)
91
+ rspec-expectations (3.9.1)
92
92
  diff-lcs (>= 1.2.0, < 2.0)
93
93
  rspec-support (~> 3.9.0)
94
94
  rspec-mocks (3.9.1)
95
95
  diff-lcs (>= 1.2.0, < 2.0)
96
96
  rspec-support (~> 3.9.0)
97
97
  rspec-support (3.9.2)
98
- rubocop (0.80.1)
98
+ rubocop (0.81.0)
99
99
  jaro_winkler (~> 1.5.1)
100
100
  parallel (~> 1.10)
101
101
  parser (>= 2.7.0.1)
102
102
  rainbow (>= 2.2.2, < 4.0)
103
103
  rexml
104
104
  ruby-progressbar (~> 1.7)
105
- unicode-display_width (>= 1.4.0, < 1.7)
105
+ unicode-display_width (>= 1.4.0, < 2.0)
106
106
  rubocop-rspec (1.38.1)
107
107
  rubocop (>= 0.68.1)
108
108
  ruby-progressbar (1.10.1)
@@ -119,17 +119,17 @@ GEM
119
119
  socksify (1.7.1)
120
120
  thor (1.0.1)
121
121
  thread_safe (0.3.6)
122
- tzinfo (1.2.6)
122
+ tzinfo (1.2.7)
123
123
  thread_safe (~> 0.1)
124
- unicode-display_width (1.6.1)
124
+ unicode-display_width (1.7.0)
125
125
  wasabi (3.5.0)
126
126
  httpi (~> 2.0)
127
127
  nokogiri (>= 1.4.2)
128
- webmock (3.8.1)
128
+ webmock (3.8.3)
129
129
  addressable (>= 2.3.6)
130
130
  crack (>= 0.3.2)
131
131
  hashdiff (>= 0.4.0, < 2.0.0)
132
- zeitwerk (2.2.2)
132
+ zeitwerk (2.3.0)
133
133
 
134
134
  PLATFORMS
135
135
  ruby
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [ ![Codeship Status for trepidity/autotask_ruby](https://app.codeship.com/projects/31f37600-eacf-0136-594e-46a5d8fcc7b0/status?branch=master)](https://app.codeship.com/projects/319798)
4
4
 
5
+ ![autotask_ruby](https://github.com/trepidity/autotask_ruby/workflows/autotask_ruby/badge.svg)
6
+
5
7
  Welcome to a ruby client that interacts with the Autotask API.
6
8
 
7
9
  I intend for this to be a full-featured Ruby Client for the API.
@@ -32,7 +32,8 @@ module AutotaskRuby
32
32
  namespaces: { xmlns: AutotaskRuby.configuration.namespace },
33
33
  logger: Logger.new($stdout),
34
34
  raise_errors: false,
35
- log: true,
35
+ log: options[:log] || true,
36
+ log_level: options[:log_level] || :info,
36
37
  endpoint: @endpoint,
37
38
  ssl_version: @ssl_version # Sets ssl_version for HTTPI adapter
38
39
  }.update(savon_options))
@@ -7,7 +7,7 @@ module AutotaskRuby
7
7
  include Query
8
8
 
9
9
  FIELDS = %i[id AccountID StartDateTime EndDateTime Description Complete CreateDateTime LastModifiedDateTime Duration Status].freeze
10
- .each do |field|
10
+ .each do |field|
11
11
  attr_accessor :"#{field.to_s.underscore}"
12
12
  end
13
13
 
@@ -27,5 +27,17 @@ module AutotaskRuby
27
27
  def resource
28
28
  find('Resource', resource_id)
29
29
  end
30
+
31
+ # Returns the associated Account
32
+ def account
33
+ find('Account', account_id)
34
+ end
35
+
36
+ def ticket
37
+ service_call_ticket = find('ServiceCallTicket', 'ServiceCallId', id)
38
+ return find('Ticket', 'id', service_call_ticket.ticket_id) unless service_call_ticket.nil?
39
+
40
+ nil
41
+ end
30
42
  end
31
43
  end
@@ -4,15 +4,21 @@ module AutotaskRuby
4
4
  # Represents the Autotask Entity Ticket
5
5
  class Ticket
6
6
  include Entity
7
+ include Query
7
8
 
8
9
  FIELDS = %i[id AccountID ContactID CreateDate Description DueDateTime LastActivityDate AssignedResourceID Status TicketNumber Title].freeze
9
10
  .each do |field|
10
11
  attr_accessor :"#{field.to_s.underscore}"
11
12
  end
12
13
 
13
- def post_initialize
14
- belongs_to :account
15
- belongs_to :contact
14
+ # Returns the associated Account
15
+ def account
16
+ find('Account', account_id)
17
+ end
18
+
19
+ # Returns the associated Contact
20
+ def contact
21
+ find('Contact', contact_id)
16
22
  end
17
23
  end
18
24
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AutotaskRuby
4
- VERSION = '2.1.2'
4
+ VERSION = '2.3.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autotask_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared L Jennings
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-10 00:00:00.000000000 Z
11
+ date: 2020-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -200,6 +200,7 @@ executables: []
200
200
  extensions: []
201
201
  extra_rdoc_files: []
202
202
  files:
203
+ - ".github/workflows/gempush.yml"
203
204
  - ".gitignore"
204
205
  - ".rspec"
205
206
  - ".rubocop.yml"
@@ -268,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
269
  - !ruby/object:Gem::Version
269
270
  version: '0'
270
271
  requirements: []
271
- rubygems_version: 3.0.8
272
+ rubygems_version: 3.1.2
272
273
  signing_key:
273
274
  specification_version: 4
274
275
  summary: A ruby client for the Autotask API