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 +4 -4
- data/.rspec +1 -0
- data/lib/payroll_hero/api/client.rb +7 -0
- data/lib/payroll_hero/api/errors.rb +15 -3
- data/lib/payroll_hero/api/version.rb +1 -1
- data/payroll_hero-api.gemspec +2 -3
- metadata +4 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3c5d0ee40b13f90b52a37128185f64cf4a35793
|
4
|
+
data.tar.gz: 3d686c5ea93c40f007f2320a03f049f59ff79347
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/payroll_hero-api.gemspec
CHANGED
@@ -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 =
|
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 '
|
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.
|
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-
|
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:
|
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
|