paychex_api 0.0.24 → 0.0.27

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
- SHA1:
3
- metadata.gz: 42a0c3031099569f0a4a88d0ee94e6df4917879d
4
- data.tar.gz: 2818ed46371e2641b3110f9f4ae6e13d39c9a1dc
2
+ SHA256:
3
+ metadata.gz: 80908e4ea91b324968a085282b9501e1214f26d769539b31b864760c60b11348
4
+ data.tar.gz: 37243af47110f52b2a99f341786571f968586f14f7376f79a2376c0e7f00551f
5
5
  SHA512:
6
- metadata.gz: 7e0cdbe1f7a752321cef63fed3036b4aa191be0c55c24aba7109750e933fcdf20eb2fc46b9c7c8edb4c20fd61fc789df7e4c88a2acbe5efefdd2706140411223
7
- data.tar.gz: a7c6dbb305d8a6d195d87ee67defdd4e470bd93f71c5bf941d5c76d69df2f453e46b9f12e9755fed1f58fc35fe2c05b6bacc734fdcf11dc4c0207b54713b400e
6
+ metadata.gz: 28abd7d530e0b7a6b87ed50fa4f30c42a9a1b89f157ab9f3bc7539069c1194258e8c0dc111a95ecd5ea39e09f1e2d73abbf5d82bbf51a513117f7edac74dc446
7
+ data.tar.gz: 666be9cfe70c0ebeca346609dd6a99eddffd411f19ff96494e0356123631d948bce77c209df52a5e82785e9d40b46cb0a02b6ca4289c7ffab90f34f0e44196a1
@@ -0,0 +1,35 @@
1
+ # Virtual environments with possible versions infos: https://github.com/actions/virtual-environments
2
+
3
+ name: CI
4
+ on: [push]
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2 # Step 1: github action that clones the repository
10
+ - name: Setup Ruby # Step 2 (we gave the name 'Setup Ruby' to this step)
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7.3
14
+ - name: Install bundle and gems # Step 4
15
+ run: |
16
+ gem update --system
17
+ gem install bundler
18
+ bundle install --jobs 4 --retry 3
19
+ - if: ${{ failure() }}
20
+ run: echo "Something went wrong on the previous steps"
21
+ - if: ${{ success() }}
22
+ name: Run Rubocop # Step 7
23
+ run: bundle exec rubocop
24
+ brakeman:
25
+ name: runner / brakeman # Step 8
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - name: Check out code
29
+ uses: actions/checkout@v1
30
+ - name: brakeman
31
+ uses: reviewdog/action-brakeman@v1
32
+ with:
33
+ brakeman_version: 4.8.2
34
+ github_token: ${{ secrets.github_token }}
35
+ reporter: github-pr-review # Default is github-pr-check
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ bridge_api.iml
6
6
  .byebug_history
7
7
  *.gem
8
8
  coverage
9
+ .history
data/Gemfile.lock CHANGED
@@ -1,64 +1,70 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paychex_api (0.0.23)
5
- faraday (~> 0.9.2)
4
+ paychex_api (0.0.27)
5
+ faraday (~> 0.17.3)
6
6
  faraday_middleware (>= 0.12.2)
7
7
  footrest (>= 0.5.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (5.2.3)
12
+ activesupport (7.0.3)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (>= 0.7, < 2)
15
- minitest (~> 5.1)
16
- tzinfo (~> 1.1)
17
- addressable (2.5.2)
18
- public_suffix (>= 2.0.2, < 4.0)
19
- ast (2.4.0)
20
- byebug (8.2.5)
21
- coderay (1.1.2)
22
- concurrent-ruby (1.1.5)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ addressable (2.7.0)
18
+ public_suffix (>= 2.0.2, < 5.0)
19
+ ast (2.4.1)
20
+ byebug (11.1.3)
21
+ coderay (1.1.3)
22
+ concurrent-ruby (1.1.10)
23
23
  crack (0.4.3)
24
24
  safe_yaml (~> 1.0.0)
25
- diff-lcs (1.3)
26
- docile (1.3.0)
27
- faraday (0.9.2)
25
+ diff-lcs (1.4.4)
26
+ docile (1.3.2)
27
+ faraday (0.17.5)
28
28
  multipart-post (>= 1.2, < 3)
29
- faraday_middleware (0.13.1)
29
+ faraday_middleware (0.14.0)
30
30
  faraday (>= 0.7.4, < 1.0)
31
31
  footrest (0.5.3)
32
32
  activesupport (>= 3.0.0)
33
33
  faraday (>= 0.9.0, < 1)
34
34
  link_header (>= 0.0.7)
35
- gergich (0.2.2)
36
- httparty (~> 0.6)
37
- sqlite3 (~> 1.3)
38
- hashdiff (0.3.7)
39
- httparty (0.16.2)
35
+ gergich (1.2.0)
36
+ httparty (~> 0.17)
37
+ sqlite3 (~> 1.4)
38
+ hashdiff (1.0.1)
39
+ httparty (0.18.1)
40
+ mime-types (~> 3.0)
40
41
  multi_xml (>= 0.5.2)
41
- i18n (1.6.0)
42
+ i18n (1.10.0)
42
43
  concurrent-ruby (~> 1.0)
43
- json (2.1.0)
44
44
  link_header (0.0.8)
45
- method_source (0.9.0)
46
- minitest (5.11.3)
45
+ method_source (1.0.0)
46
+ mime-types (3.3.1)
47
+ mime-types-data (~> 3.2015)
48
+ mime-types-data (3.2020.0512)
49
+ minitest (5.16.2)
47
50
  multi_xml (0.6.0)
48
- multipart-post (2.1.1)
49
- parallel (1.12.1)
50
- parser (2.5.1.0)
51
- ast (~> 2.4.0)
52
- powerpack (0.1.1)
53
- pry (0.11.3)
54
- coderay (~> 1.1.0)
55
- method_source (~> 0.9.0)
56
- public_suffix (3.0.1)
57
- rack (1.6.8)
58
- rack-protection (1.5.3)
51
+ multipart-post (2.2.3)
52
+ mustermann (1.1.1)
53
+ ruby2_keywords (~> 0.0.1)
54
+ parallel (1.19.2)
55
+ parser (2.7.1.4)
56
+ ast (~> 2.4.1)
57
+ pry (0.13.1)
58
+ coderay (~> 1.1)
59
+ method_source (~> 1.0)
60
+ public_suffix (4.0.5)
61
+ rack (2.2.3)
62
+ rack-protection (2.0.8.1)
59
63
  rack
60
64
  rainbow (3.0.0)
61
- rake (0.9.6)
65
+ rake (13.0.1)
66
+ regexp_parser (1.7.1)
67
+ rexml (3.2.4)
62
68
  rspec (2.99.0)
63
69
  rspec-core (~> 2.99.0)
64
70
  rspec-expectations (~> 2.99.0)
@@ -67,51 +73,54 @@ GEM
67
73
  rspec-expectations (2.99.2)
68
74
  diff-lcs (>= 1.1.3, < 2.0)
69
75
  rspec-mocks (2.99.4)
70
- rubocop (0.54.0)
76
+ rubocop (0.88.0)
71
77
  parallel (~> 1.10)
72
- parser (>= 2.5)
73
- powerpack (~> 0.1)
78
+ parser (>= 2.7.1.1)
74
79
  rainbow (>= 2.2.2, < 4.0)
80
+ regexp_parser (>= 1.7)
81
+ rexml
82
+ rubocop-ast (>= 0.1.0, < 1.0)
75
83
  ruby-progressbar (~> 1.7)
76
- unicode-display_width (~> 1.0, >= 1.0.1)
77
- ruby-progressbar (1.9.0)
78
- safe_yaml (1.0.4)
79
- simplecov (0.16.1)
84
+ unicode-display_width (>= 1.4.0, < 2.0)
85
+ rubocop-ast (0.2.0)
86
+ parser (>= 2.7.0.1)
87
+ ruby-progressbar (1.10.1)
88
+ ruby2_keywords (0.0.2)
89
+ safe_yaml (1.0.5)
90
+ simplecov (0.18.5)
80
91
  docile (~> 1.1)
81
- json (>= 1.8, < 3)
82
- simplecov-html (~> 0.10.0)
83
- simplecov-html (0.10.2)
84
- sinatra (1.4.8)
85
- rack (~> 1.5)
86
- rack-protection (~> 1.4)
87
- tilt (>= 1.3, < 3)
88
- sqlite3 (1.3.13)
89
- thread_safe (0.3.6)
90
- tilt (1.4.1)
91
- tzinfo (1.2.5)
92
- thread_safe (~> 0.1)
93
- unicode-display_width (1.3.2)
94
- webmock (1.22.6)
92
+ simplecov-html (~> 0.11)
93
+ simplecov-html (0.12.2)
94
+ sinatra (2.0.8.1)
95
+ mustermann (~> 1.0)
96
+ rack (~> 2.0)
97
+ rack-protection (= 2.0.8.1)
98
+ tilt (~> 2.0)
99
+ sqlite3 (1.4.2)
100
+ tilt (2.0.10)
101
+ tzinfo (2.0.4)
102
+ concurrent-ruby (~> 1.0)
103
+ unicode-display_width (1.7.0)
104
+ webmock (3.8.3)
95
105
  addressable (>= 2.3.6)
96
106
  crack (>= 0.3.2)
97
- hashdiff
107
+ hashdiff (>= 0.4.0, < 2.0.0)
98
108
 
99
109
  PLATFORMS
100
110
  ruby
101
111
 
102
112
  DEPENDENCIES
103
- bundler (~> 1.0, >= 1.0.0)
104
- byebug (~> 8.2.2)
105
- gergich (~> 0.2.2)
113
+ bundler (>= 1.0)
114
+ byebug (>= 8.2)
115
+ gergich (~> 1.0)
106
116
  paychex_api!
107
- pry (~> 0)
108
- rake (~> 0)
117
+ pry (>= 0.12)
118
+ rake (>= 1.0)
109
119
  rspec (~> 2.6)
110
- rubocop (~> 0.54.0)
111
- simplecov (~> 0.16.1)
112
- sinatra (~> 1.0)
113
- tilt (~> 1.3, >= 1.3.4)
114
- webmock (~> 1.22.6)
120
+ rubocop (~> 0.54)
121
+ simplecov (~> 0.16)
122
+ sinatra (>= 1.0, < 3)
123
+ webmock (>= 1.22)
115
124
 
116
125
  BUNDLED WITH
117
- 1.16.1
126
+ 2.3.8
data/README.md ADDED
@@ -0,0 +1 @@
1
+ # paychex-api [![Build Status](https://semaphoreci.com/api/v1/projects/4e099653-8dee-49ac-9842-99cc0d62d29c/3343193/badge.svg)](https://semaphoreci.com/neomind/paychex-api)
@@ -1,4 +1,4 @@
1
-
1
+ # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
2
2
  module PaychexAPI
3
3
  class ApiArray
4
4
  include Enumerable
@@ -63,7 +63,7 @@ module PaychexAPI
63
63
  def each_page
64
64
  yield(members, @linked, @meta)
65
65
  while @next_page
66
- response = get_page(@next_page)
66
+ response = page(@next_page)
67
67
  apply_response_metadata(response, false)
68
68
  @members = get_response_content(response)
69
69
  yield(members, @linked, @meta)
@@ -73,6 +73,7 @@ module PaychexAPI
73
73
 
74
74
  def all_pages!
75
75
  return self unless pages?
76
+
76
77
  combine_page
77
78
  combine_pages
78
79
  self
@@ -89,39 +90,42 @@ module PaychexAPI
89
90
  end
90
91
 
91
92
  def combine_page
92
- response = get_page(@next_page)
93
+ response = page(@next_page)
93
94
  apply_response_metadata(response)
94
95
  @members.concat(get_response_content(response))
95
96
  end
96
97
 
97
- def get_page(url, params = {}, tries=0)
98
+ def page(url, params = {}, tries = 0)
98
99
  query = URI.parse(url).query
99
100
  p = CGI.parse(query).merge(params)
100
101
  u = url.gsub("?#{query}", '')
102
+
101
103
  p.each { |k, v| p[k] = v.first if v.is_a?(Array) }
104
+
102
105
  resp = @api_client.connection.send(:get) do |r|
103
106
  r.url(u, p)
104
107
  end
108
+
105
109
  tries = 0 if status == 200
106
110
  resp
107
111
  rescue Footrest::HttpError::Unauthorized => e
108
- if tries == 0
109
- # token may have expired for long running pagination requests, refresh and try again
110
- @api_client.refresh_token!
111
- get_page(url, params, (tries +1))
112
- else
113
- raise e
114
- end
112
+ raise e unless tries.zero?
113
+
114
+ # token may have expired for long running pagination requests, refresh and try again
115
+ @api_client.refresh_token!
116
+ page(url, params, (tries + 1))
115
117
  end
116
118
 
117
119
  def load_page(url)
118
- response = get_page(url)
120
+ response = page(url)
119
121
  ApiArray.process_response(response, @api_client)
120
122
  end
121
123
 
122
124
  def get_response_content(response)
123
125
  body = response.body
126
+
124
127
  return [] unless body.is_a?(Hash)
128
+
125
129
  if body.key?('content')
126
130
  body['content'] || []
127
131
  else
@@ -134,9 +138,11 @@ module PaychexAPI
134
138
  @links = []
135
139
  @metadata = {}
136
140
  end
141
+
137
142
  @status = response.status
138
143
  @headers = response.headers
139
144
  @method = response.env[:method]
145
+
140
146
  init_pages(response)
141
147
  init_linked(response)
142
148
  init_meta(response)
@@ -144,16 +150,19 @@ module PaychexAPI
144
150
 
145
151
  def init_linked(response)
146
152
  return nil unless response.body.is_a?(Hash) && response.body.key?('links')
153
+
147
154
  @links = @links.concat(response.body['links'])
148
155
  end
149
156
 
150
157
  def init_meta(response)
151
158
  return nil unless response.body.is_a?(Hash) && response.body.key?('metadata')
159
+
152
160
  @metadata = response.body['metadata']
153
161
  end
154
162
 
155
163
  def init_pages(response)
156
164
  return nil unless response.body.is_a?(Hash) && response.body.key?('links')
165
+
157
166
  @next_page, @prev_page = nil
158
167
  response.body['links'].each do |link|
159
168
  case link['rel']
@@ -166,3 +175,4 @@ module PaychexAPI
166
175
  end
167
176
  end
168
177
  end
178
+ # rubocop:enable Metrics/AbcSize,Metrics/MethodLength
@@ -2,7 +2,7 @@ module PaychexAPI
2
2
  class Client
3
3
  module Notifications
4
4
  def send_notification(notification_id, params = {})
5
- post("#{API_PATH}#{NOTIFICATIONS_PATH}/#{URI.escape(notification_id)}", params)
5
+ post("#{API_PATH}#{NOTIFICATIONS_PATH}/#{CGI.escape(notification_id).gsub('+', '%20')}", params)
6
6
  end
7
7
  end
8
8
  end
@@ -1,15 +1,15 @@
1
1
  module PaychexAPI
2
2
  class Client
3
3
  module Statuses
4
- def company_status(params={})
4
+ def company_status(params = {})
5
5
  get("#{API_PATH}#{STATUS_PATH}/company", params)
6
6
  end
7
7
 
8
- def user_status(params={})
8
+ def user_status(params = {})
9
9
  get("#{API_PATH}#{STATUS_PATH}/user", params)
10
10
  end
11
11
 
12
- def worker_status(params={})
12
+ def worker_status(params = {})
13
13
  get("#{API_PATH}#{STATUS_PATH}/worker", params)
14
14
  end
15
15
  end
@@ -10,6 +10,7 @@ require 'base64'
10
10
  require 'active_support/time'
11
11
  require 'paychex_api/api_array'
12
12
 
13
+ # rubocop:disable Lint/NonDeterministicRequireOrder
13
14
  module PaychexAPI
14
15
  class Client < Footrest::Client
15
16
  API_PATH = ''.freeze
@@ -47,10 +48,11 @@ module PaychexAPI
47
48
 
48
49
  def token
49
50
  return config[:token] if config[:token].present?
51
+
50
52
  authorize if @authorization.blank? || @authorization['expiration'] <= Time.now - 30.seconds
51
53
  @authorization['access_token']
52
54
  end
53
-
55
+
54
56
  def refresh_token!
55
57
  config.delete(:token)
56
58
  authorize
@@ -150,3 +152,4 @@ module PaychexAPI
150
152
  end
151
153
  end
152
154
  end
155
+ # rubocop:enable Lint/NonDeterministicRequireOrder
@@ -1,3 +1,3 @@
1
1
  module PaychexAPI
2
- VERSION = '0.0.24'.freeze unless defined?(PaychexAPI::VERSION)
2
+ VERSION = '0.0.27'.freeze unless defined?(PaychexAPI::VERSION)
3
3
  end
data/paychex_api.gemspec CHANGED
@@ -1,5 +1,5 @@
1
-
2
1
  $LOAD_PATH.push File.expand_path('lib', __dir__)
2
+
3
3
  require 'paychex_api/version'
4
4
 
5
5
  Gem::Specification.new do |gem|
@@ -18,19 +18,18 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ['lib']
19
19
  gem.version = PaychexAPI::VERSION
20
20
 
21
- gem.add_development_dependency 'bundler', '~> 1.0', '>= 1.0.0'
22
- gem.add_development_dependency 'byebug', '~> 8.2.2'
23
- gem.add_development_dependency 'gergich', '~> 0.2.2'
24
- gem.add_development_dependency 'pry', '~> 0'
25
- gem.add_development_dependency 'rake', '~> 0'
21
+ gem.add_development_dependency 'bundler', '>= 1.0'
22
+ gem.add_development_dependency 'byebug', '>= 8.2'
23
+ gem.add_development_dependency 'gergich', '~> 1.0'
24
+ gem.add_development_dependency 'pry', '>= 0.12'
25
+ gem.add_development_dependency 'rake', '>= 1.0'
26
26
  gem.add_development_dependency 'rspec', '~> 2.6'
27
- gem.add_development_dependency 'rubocop', '~> 0.54.0'
28
- gem.add_development_dependency 'simplecov', '~> 0.16.1'
29
- gem.add_development_dependency 'sinatra', '~> 1.0'
30
- gem.add_development_dependency 'tilt', '>= 1.3.4', '~> 1.3'
31
- gem.add_development_dependency 'webmock', '~>1.22.6'
27
+ gem.add_development_dependency 'rubocop', '~> 0.54'
28
+ gem.add_development_dependency 'simplecov', '~> 0.16'
29
+ gem.add_development_dependency 'sinatra', '>= 1.0', '< 3'
30
+ gem.add_development_dependency 'webmock', '>= 1.22'
32
31
 
33
- gem.add_dependency 'faraday', '~> 0.9.2'
32
+ gem.add_dependency 'faraday', '~> 0.17.3'
34
33
  gem.add_dependency 'faraday_middleware', '>= 0.12.2'
35
34
  gem.add_dependency 'footrest', '>= 0.5.1'
36
35
  end
@@ -1,10 +1,11 @@
1
1
  require 'test_helper'
2
+
2
3
  describe PaychexAPI::Client::Notifications do
3
4
  let!(:body) do
4
5
  {
5
6
  'companyId' => '00Z5V9BTI687WL8V60GT',
6
7
  'asOfDate' => '2018-01-12T00:00:00Z',
7
- 'domains' => ['CLT_PROD'],
8
+ 'domains' => ['CLT_PROD'],
8
9
  'action' => 'ADD',
9
10
  'productCode' => 'LMS_ENH'
10
11
  }
@@ -1,4 +1,5 @@
1
1
  require 'test_helper'
2
+
2
3
  describe PaychexAPI::Client::Notifications do
3
4
  before do
4
5
  @client = PaychexAPI::Client.new(
@@ -8,13 +9,15 @@ describe PaychexAPI::Client::Notifications do
8
9
 
9
10
  it 'should send a notification' do
10
11
  response = @client.send_notification('f7f9c815-0d4c-46e5-9434-5cc19470d1ed-3520000031155394')
12
+
11
13
  expect(response.status).to(eq(200))
12
14
  end
13
15
 
14
16
  it 'should URI escape a notification id' do
15
17
  expect_any_instance_of(PaychexAPI::Client::Notifications)
16
18
  .to receive(:post)
17
- .with("/notifications/f7f9c815-0d4c-46e5-9434-5cc1%209470d1ed-3520000031155394", {})
19
+ .with('/notifications/f7f9c815-0d4c-46e5-9434-5cc1%209470d1ed-3520000031155394', {})
20
+
18
21
  @client.send_notification('f7f9c815-0d4c-46e5-9434-5cc1 9470d1ed-3520000031155394')
19
22
  end
20
23
  end
@@ -3,25 +3,25 @@ require 'tilt'
3
3
 
4
4
  class FakePaychex < Sinatra::Base
5
5
  # auth
6
- post %r{/auth/oauth/v2/token$} do
6
+ post %r{/auth/oauth/v2/token} do
7
7
  get_json_data 200, 'auth.json'
8
8
  end
9
9
 
10
10
  # workers
11
- get %r{/companies/.*/workers.*$} do
11
+ get %r{/companies/.*/workers.*} do
12
12
  get_json_data 200, 'workers.json'
13
13
  end
14
14
 
15
15
  # workers
16
- get %r{/companies/.*/workers/\+d+$} do
16
+ get %r{/companies/.*/workers/\+d+} do
17
17
  get_json_data 200, 'workers.json'
18
18
  end
19
19
 
20
- get %r{/workers/\d+$} do
20
+ get %r{/workers/\d+} do
21
21
  get_json_data 200, 'workers.json'
22
22
  end
23
23
 
24
- get %r{/workers/\d+/users$} do
24
+ get %r{/workers/\d+/users} do
25
25
  case request.env['HTTP_ACCEPT']
26
26
  when "application/json;profile='http://api.paychex.com/profiles/users/v1'"
27
27
  get_json_data 200, 'users.json'
@@ -30,29 +30,29 @@ class FakePaychex < Sinatra::Base
30
30
  end
31
31
  end
32
32
 
33
- get %r{/workers/\d+/communications$} do
33
+ get %r{/workers/\d+/communications} do
34
34
  get_json_data 200, 'communications.json'
35
35
  end
36
36
 
37
- get %r{/workers/\d+/communications/\d+$} do
37
+ get %r{/workers/\d+/communications/\d+} do
38
38
  get_json_data 200, 'communications.json'
39
39
  end
40
40
 
41
- post %r{/workers/\d+/communications$} do
41
+ post %r{/workers/\d+/communications} do
42
42
  get_json_data 200, 'communications.json'
43
43
  end
44
44
 
45
- put %r{/workers/\d+/communications/\d+$} do
45
+ put %r{/workers/\d+/communications/\d+} do
46
46
  get_json_data 200, 'communications.json'
47
47
  end
48
48
 
49
- delete %r{/workers/\d+/communications/\d+$} do
49
+ delete %r{/workers/\d+/communications/\d+} do
50
50
  get_json_data 200, 'communications.json'
51
51
  end
52
52
 
53
53
  # companies
54
54
 
55
- get %r{/companies/[A-Za-z0-9]+$} do
55
+ get %r{/companies/[A-Za-z0-9]+} do
56
56
  case request.env['HTTP_ACCEPT']
57
57
  when "application/json;profile='http://api.paychex.com/profiles/company_associations/v1'"
58
58
  get_json_data 200, 'companies_associations.json'
@@ -61,41 +61,41 @@ class FakePaychex < Sinatra::Base
61
61
  end
62
62
  end
63
63
 
64
- get %r{/companies$} do
64
+ get %r{/companies} do
65
65
  get_json_data 200, 'companies.json'
66
66
  end
67
67
 
68
- get %r{/companies/[A-Za-z0-9]+/organizations+$} do
68
+ get %r{/companies/[A-Za-z0-9]+/organizations+} do
69
69
  get_json_data 200, 'organizations.json'
70
70
  end
71
71
 
72
- post %r{/companies/[A-Za-z0-9]+/purchases+$} do
72
+ post %r{/companies/[A-Za-z0-9]+/purchases+} do
73
73
  get_json_data 200, 'organizations.json'
74
74
  end
75
75
 
76
76
  # Notifications
77
77
 
78
- post %r{/notifications/\S+$} do
78
+ post %r{/notifications/\S+} do
79
79
  get_json_data 200, 'communications.json'
80
80
  end
81
81
 
82
82
  # Messages
83
83
 
84
- post %r{/messages$} do
84
+ post %r{/messages} do
85
85
  get_json_data 201, 'messages.json'
86
86
  end
87
87
 
88
- get %r{/users.*$} do
88
+ get %r{/users.*} do
89
89
  get_json_data 200, 'users.json'
90
90
  end
91
91
 
92
- get %r{/users/\S/workers+$} do
92
+ get %r{/users/\S/workers+} do
93
93
  get_json_data 200, 'workers.json'
94
94
  end
95
95
 
96
96
  # Statuses
97
- get %r{/status.*$} do
98
- get_json_data 200, 'statuses.json'
97
+ get %r{/status.*} do
98
+ get_json_data 200, 'status.json'
99
99
  end
100
100
 
101
101
  private
metadata CHANGED
@@ -1,91 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paychex_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Shaffer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-30 00:00:00.000000000 Z
11
+ date: 2022-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
- version: 1.0.0
19
+ version: '1.0'
23
20
  type: :development
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '1.0'
30
24
  - - ">="
31
25
  - !ruby/object:Gem::Version
32
- version: 1.0.0
26
+ version: '1.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: byebug
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - "~>"
31
+ - - ">="
38
32
  - !ruby/object:Gem::Version
39
- version: 8.2.2
33
+ version: '8.2'
40
34
  type: :development
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - "~>"
38
+ - - ">="
45
39
  - !ruby/object:Gem::Version
46
- version: 8.2.2
40
+ version: '8.2'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: gergich
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: 0.2.2
47
+ version: '1.0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
52
  - - "~>"
59
53
  - !ruby/object:Gem::Version
60
- version: 0.2.2
54
+ version: '1.0'
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: pry
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
- - - "~>"
59
+ - - ">="
66
60
  - !ruby/object:Gem::Version
67
- version: '0'
61
+ version: '0.12'
68
62
  type: :development
69
63
  prerelease: false
70
64
  version_requirements: !ruby/object:Gem::Requirement
71
65
  requirements:
72
- - - "~>"
66
+ - - ">="
73
67
  - !ruby/object:Gem::Version
74
- version: '0'
68
+ version: '0.12'
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: rake
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
- - - "~>"
73
+ - - ">="
80
74
  - !ruby/object:Gem::Version
81
- version: '0'
75
+ version: '1.0'
82
76
  type: :development
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
- - - "~>"
80
+ - - ">="
87
81
  - !ruby/object:Gem::Version
88
- version: '0'
82
+ version: '1.0'
89
83
  - !ruby/object:Gem::Dependency
90
84
  name: rspec
91
85
  requirement: !ruby/object:Gem::Requirement
@@ -106,90 +100,76 @@ dependencies:
106
100
  requirements:
107
101
  - - "~>"
108
102
  - !ruby/object:Gem::Version
109
- version: 0.54.0
103
+ version: '0.54'
110
104
  type: :development
111
105
  prerelease: false
112
106
  version_requirements: !ruby/object:Gem::Requirement
113
107
  requirements:
114
108
  - - "~>"
115
109
  - !ruby/object:Gem::Version
116
- version: 0.54.0
110
+ version: '0.54'
117
111
  - !ruby/object:Gem::Dependency
118
112
  name: simplecov
119
113
  requirement: !ruby/object:Gem::Requirement
120
114
  requirements:
121
115
  - - "~>"
122
116
  - !ruby/object:Gem::Version
123
- version: 0.16.1
117
+ version: '0.16'
124
118
  type: :development
125
119
  prerelease: false
126
120
  version_requirements: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: 0.16.1
124
+ version: '0.16'
131
125
  - !ruby/object:Gem::Dependency
132
126
  name: sinatra
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '1.0'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '1.0'
145
- - !ruby/object:Gem::Dependency
146
- name: tilt
147
127
  requirement: !ruby/object:Gem::Requirement
148
128
  requirements:
149
129
  - - ">="
150
130
  - !ruby/object:Gem::Version
151
- version: 1.3.4
152
- - - "~>"
131
+ version: '1.0'
132
+ - - "<"
153
133
  - !ruby/object:Gem::Version
154
- version: '1.3'
134
+ version: '3'
155
135
  type: :development
156
136
  prerelease: false
157
137
  version_requirements: !ruby/object:Gem::Requirement
158
138
  requirements:
159
139
  - - ">="
160
140
  - !ruby/object:Gem::Version
161
- version: 1.3.4
162
- - - "~>"
141
+ version: '1.0'
142
+ - - "<"
163
143
  - !ruby/object:Gem::Version
164
- version: '1.3'
144
+ version: '3'
165
145
  - !ruby/object:Gem::Dependency
166
146
  name: webmock
167
147
  requirement: !ruby/object:Gem::Requirement
168
148
  requirements:
169
- - - "~>"
149
+ - - ">="
170
150
  - !ruby/object:Gem::Version
171
- version: 1.22.6
151
+ version: '1.22'
172
152
  type: :development
173
153
  prerelease: false
174
154
  version_requirements: !ruby/object:Gem::Requirement
175
155
  requirements:
176
- - - "~>"
156
+ - - ">="
177
157
  - !ruby/object:Gem::Version
178
- version: 1.22.6
158
+ version: '1.22'
179
159
  - !ruby/object:Gem::Dependency
180
160
  name: faraday
181
161
  requirement: !ruby/object:Gem::Requirement
182
162
  requirements:
183
163
  - - "~>"
184
164
  - !ruby/object:Gem::Version
185
- version: 0.9.2
165
+ version: 0.17.3
186
166
  type: :runtime
187
167
  prerelease: false
188
168
  version_requirements: !ruby/object:Gem::Requirement
189
169
  requirements:
190
170
  - - "~>"
191
171
  - !ruby/object:Gem::Version
192
- version: 0.9.2
172
+ version: 0.17.3
193
173
  - !ruby/object:Gem::Dependency
194
174
  name: faraday_middleware
195
175
  requirement: !ruby/object:Gem::Requirement
@@ -225,12 +205,14 @@ executables: []
225
205
  extensions: []
226
206
  extra_rdoc_files: []
227
207
  files:
208
+ - ".github/workflows/ci.yml"
228
209
  - ".gitignore"
229
210
  - ".rubocop.yml"
230
211
  - ".simplecov"
231
212
  - Dockerfile
232
213
  - Gemfile
233
214
  - Gemfile.lock
215
+ - README.md
234
216
  - bin/jenkins
235
217
  - build.sh
236
218
  - docker-compose.yml
@@ -274,7 +256,7 @@ homepage: ''
274
256
  licenses:
275
257
  - MIT
276
258
  metadata: {}
277
- post_install_message:
259
+ post_install_message:
278
260
  rdoc_options: []
279
261
  require_paths:
280
262
  - lib
@@ -289,9 +271,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
289
271
  - !ruby/object:Gem::Version
290
272
  version: '0'
291
273
  requirements: []
292
- rubyforge_project:
293
- rubygems_version: 2.6.11
294
- signing_key:
274
+ rubygems_version: 3.1.6
275
+ signing_key:
295
276
  specification_version: 4
296
277
  summary: Paychex API
297
278
  test_files: