autotask_ruby 2.2.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3936f1591534be885ff6f7347f8ff84d93c66e976e6eff1f9e6229edb764ac86
4
- data.tar.gz: e3e41c55aa66a5526ace4fc547a40b00105c75c8b3c7c0fd82fcc780e5c1caea
3
+ metadata.gz: bdd51310dd4d513ab7db590859767224a8b266d769ce0f73dc3244c36bad1018
4
+ data.tar.gz: 3aaefadb50bd022c3dab306e456425d3700b76e1ccbf049308bbd8ee4bc68977
5
5
  SHA512:
6
- metadata.gz: 9342a8931a98582939335fee1567bb141a4fa828589df41707d4a7a5aec84154fc80a2f14c73bdf8ab25909fdfb0228fee363e5b278f85a3d53d8d7754c918f1
7
- data.tar.gz: 0d5f1124b59362e3a2166279787b29447a9097ff73ae764f52cca749f4cad74bd21e77a8a6a90f2d932ef5f00efb7acb569ac41d58e9b7dc7984130be3cd3c31
6
+ metadata.gz: 34f9906f23377faadf9c31d6ba7a4b38f508d506e84dd53573067bd68ed81305e391ba5315a84feb7c8e2c5e32b1cbbe459c23b1716921ed0583ef7402f00002
7
+ data.tar.gz: c71ba4211afa5274f00ff56ccfff60fc284007cd4b83894f42329f82948323c9191dde81373daf5af8a9b3048a7ac8b532a916293bb661a84b1246db80f1acde
@@ -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,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- autotask_ruby (2.2.0)
5
- activesupport (~> 6.0)
4
+ autotask_ruby (2.4.0)
5
+ activesupport (~> 6.0.3.2)
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.3.2)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2)
16
+ zeitwerk (~> 2.2, >= 2.2.2)
17
17
  addressable (2.7.0)
18
18
  public_suffix (>= 2.0.2, < 5.0)
19
19
  akami (1.3.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,35 +47,35 @@ 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
54
- i18n (1.8.2)
54
+ i18n (1.8.3)
55
55
  concurrent-ruby (~> 1.0)
56
56
  jaro_winkler (1.5.4)
57
57
  listen (3.2.1)
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
- minitest (5.14.0)
63
+ minitest (5.14.1)
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.3)
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
@@ -149,4 +149,4 @@ DEPENDENCIES
149
149
  webmock (~> 3.8)
150
150
 
151
151
  BUNDLED WITH
152
- 2.1.2
152
+ 2.1.4
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.
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
35
35
  spec.require_paths = ['lib']
36
36
 
37
- spec.add_runtime_dependency 'activesupport', '~> 6.0'
37
+ spec.add_runtime_dependency 'activesupport', '~> 6.0.3.2'
38
38
  spec.add_runtime_dependency 'savon', '~> 2.12'
39
39
 
40
40
  spec.add_development_dependency 'awesome_print', '~> 1.8'
@@ -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
 
@@ -32,5 +32,12 @@ module AutotaskRuby
32
32
  def account
33
33
  find('Account', account_id)
34
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
35
42
  end
36
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.2.0'
4
+ VERSION = '2.4.1'
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.2.0
4
+ version: 2.4.1
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-12 00:00:00.000000000 Z
11
+ date: 2020-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: 6.0.3.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.0'
26
+ version: 6.0.3.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: savon
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -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