payroll_hero-api 1.1.0 → 1.2.0

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
  SHA1:
3
- metadata.gz: 8e32c2c0d9a279c2920d28bdc7381bd519509403
4
- data.tar.gz: 645950da3a28519f975ac35af21f3da6dbe51b24
3
+ metadata.gz: d3c5d0ee40b13f90b52a37128185f64cf4a35793
4
+ data.tar.gz: 3d686c5ea93c40f007f2320a03f049f59ff79347
5
5
  SHA512:
6
- metadata.gz: 12bd3ff2751a759d00056de9be3f0fb52c689ce96f34746f29cc73423406116c10394d9d98c21a5d2a41184fb57fab0c8a9a727fba22bf24c22ae311b20f8d9e
7
- data.tar.gz: 89b234c3f0d9913b63372998f23f031f3d7b1ffbf61778b72ef7f9bf8f22ffc4e1958d77142daab5bf21b94aaea0d3a9d4e5e5f1ba62a5389a87a5b3bf89ec45
6
+ metadata.gz: 4912d38c3d685627bedd57489fddaf805477644022321f535b433765ccee7e7b9087b8990de216f40d70d6edf62c7b5cdc9a2b63e49a1054b6aab5b4ae64b26b
7
+ data.tar.gz: b700173ae92607a5c835c29ab1b25543f6c8656e5ed9242233fa62aeb841cee7fbb062cbe392e7786d12825fddd1f1414058eaa2320bd6f881ad7e9c81fcdc4b
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -53,7 +53,14 @@ module PayrollHero
53
53
  klass = {
54
54
  400 => Errors::BadRequest,
55
55
  401 => Errors::Unauthorized,
56
+
57
+ 403 => Errors::Forbidden,
58
+ 404 => Errors::NotFound,
59
+ 405 => Errors::MethodNotAllowed,
60
+ 406 => Errors::NotAcceptable,
61
+
56
62
  422 => Errors::UnprocessableEntity,
63
+
57
64
  500 => Errors::InternalServerError,
58
65
  }[response.status] || Errors::ServerReturnedError
59
66
 
@@ -16,13 +16,25 @@ module PayrollHero
16
16
  attr_reader :code, :error_details
17
17
  end
18
18
 
19
- class BadRequest < ServerReturnedError
19
+ class BadRequest < ServerReturnedError # 400
20
20
  end
21
21
 
22
- class Unauthorized < ServerReturnedError
22
+ class Unauthorized < ServerReturnedError # 401
23
23
  end
24
24
 
25
- class UnprocessableEntity < ServerReturnedError
25
+ class Forbidden < ServerReturnedError # 403
26
+ end
27
+
28
+ class NotFound < ServerReturnedError # 404
29
+ end
30
+
31
+ class MethodNotAllowed < ServerReturnedError # 405
32
+ end
33
+
34
+ class NotAcceptable < ServerReturnedError # 406
35
+ end
36
+
37
+ class UnprocessableEntity < ServerReturnedError # 422
26
38
  end
27
39
 
28
40
  class InternalServerError < ServerReturnedError
@@ -1,5 +1,5 @@
1
1
  module PayrollHero
2
2
  module Api
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{Ruby API Client for PayrollHero Apis}
13
13
  spec.description = %q{Provides a clean canonical interface to accessing PayrollHero APIs with Ruby}
14
- spec.homepage = "http://github.com/payrollhero/"
14
+ spec.homepage = 'http://github.com/payrollhero/'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -26,8 +26,7 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_development_dependency 'bundler', '~> 1.9'
28
28
  spec.add_development_dependency 'rake', '~> 10.0'
29
- spec.add_development_dependency 'minitest'
30
- spec.add_development_dependency 'minitest-reporters'
29
+ spec.add_development_dependency 'rspec'
31
30
  spec.add_development_dependency 'vcr'
32
31
  spec.add_development_dependency 'webmock'
33
32
  spec.add_development_dependency 'rack', '< 2.0.0' # requires ruby >= 2.2.2 for 2.0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payroll_hero-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Banasik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-12 00:00:00.000000000 Z
11
+ date: 2016-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -95,21 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '10.0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: minitest
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: minitest-reporters
98
+ name: rspec
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
101
  - - ">="
@@ -187,6 +173,7 @@ extensions: []
187
173
  extra_rdoc_files: []
188
174
  files:
189
175
  - ".gitignore"
176
+ - ".rspec"
190
177
  - CHANGELOG.md
191
178
  - DEPLOYING.md
192
179
  - Gemfile