pco_api 1.3.0 → 1.3.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: cb681a310a78eeb3ac455edc7ab2b4696a246e74a54077b1f0c5ce26e9a31c10
4
- data.tar.gz: fe3398a9fd3c50f784e139fd65879a31cdf56d210a97e3e46e5f66309058b0f6
3
+ metadata.gz: eee1d9d3e7b4407dfc0b5f183021246c34a1467936fb77743c4cd45a1767b9b7
4
+ data.tar.gz: 014ec30ad0b2c1b814b10da5ee26716f55cea5bf85a782e4230feaadf7f0c260
5
5
  SHA512:
6
- metadata.gz: 41d1955114ffe087506d63c3907ebad24f9c0a34e9e3784d620bc2be8080bf309b3eb0fbed52a60b5805e1e2cf0ccfe07d6adcc0072a48f78336461d9e7ca14b
7
- data.tar.gz: 1ead2832a8c2f62c13845b5c7c28254494efdbdedf404b6e70ccbd9791fd12ee9932acfad3ed9255dc9d3451eaf4dd4841cb2a1ed99721304a15fc5260c1301d
6
+ metadata.gz: b36cca693f502f4c4b123aa22c61b72d41ccd51457eee7c2aef87454559d1fb7ffe85241ec97ab8832925830f864e773ce22b319d278f474245826f44bfe20e1
7
+ data.tar.gz: 3c16320118da5aee58fcec347cae41df8c215d176331863d61d079a0b47bbc23998816ff09dbecbce888177faa7847da2f13f66fe4c984622fb74cb641eb9372
data/README.md CHANGED
@@ -210,6 +210,7 @@ The following errors may be raised by the library, depending on the API response
210
210
  | 404 | `PCO::API::Errors::NotFound` < `PCO::API::Errors::ClientError` |
211
211
  | 405 | `PCO::API::Errors::MethodNotAllowed` < `PCO::API::Errors::ClientError` |
212
212
  | 422 | `PCO::API::Errors::UnprocessableEntity` < `PCO::API::Errors::ClientError` |
213
+ | 429 | `PCO::API::Errors::TooManyRequests` < `PCO::API::Errors::ClientError` |
213
214
  | other 4xx errors | `PCO::API::Errors::ClientError` |
214
215
  | 500 | `PCO::API::Errors::InternalServerError` < `PCO::API::Errors::ServerError` |
215
216
  | other 5xx errors | `PCO::API::Errors::ServerError` |
@@ -221,6 +222,7 @@ The exception object has the following methods:
221
222
  | status | HTTP status code returned by the server |
222
223
  | message | the message returned by the API |
223
224
  | detail | the full error response returned by the API |
225
+ | headers | hash of HTTP headers returned by the API |
224
226
 
225
227
  The `message` should be a simple string given by the API, e.g. "Resource Not Found".
226
228
 
data/lib/pco/api.rb CHANGED
@@ -4,8 +4,8 @@ require_relative 'api/errors'
4
4
  module PCO
5
5
  module API
6
6
  module_function
7
- def new(*args)
8
- Endpoint.new(*args)
7
+ def new(**args)
8
+ Endpoint.new(**args)
9
9
  end
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module PCO
2
2
  module API
3
- VERSION = '1.3.0'
3
+ VERSION = '1.3.1'
4
4
  end
5
5
  end
@@ -0,0 +1,9 @@
1
+ require_relative '../spec_helper'
2
+
3
+ describe PCO::API do
4
+ describe '.new' do
5
+ it 'creates a new Endpoint instance' do
6
+ expect(described_class.new(basic_auth_token: 'abc123', basic_auth_secret: 'xyz789').class).to eq(PCO::API::Endpoint)
7
+ end
8
+ end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pco_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Planning Center Online
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-21 00:00:00.000000000 Z
11
+ date: 2021-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -109,12 +109,13 @@ files:
109
109
  - lib/pco/api/version.rb
110
110
  - lib/pco_api.rb
111
111
  - spec/pco/api/endpoint_spec.rb
112
+ - spec/pco/api_spec.rb
112
113
  - spec/spec_helper.rb
113
114
  homepage: https://github.com/planningcenter/pco_api_ruby
114
115
  licenses:
115
116
  - MIT
116
117
  metadata: {}
117
- post_install_message:
118
+ post_install_message:
118
119
  rdoc_options: []
119
120
  require_paths:
120
121
  - lib
@@ -130,9 +131,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
131
  version: '0'
131
132
  requirements: []
132
133
  rubygems_version: 3.0.3
133
- signing_key:
134
+ signing_key:
134
135
  specification_version: 4
135
136
  summary: API wrapper for api.planningcenteronline.com
136
137
  test_files:
138
+ - spec/pco/api_spec.rb
137
139
  - spec/pco/api/endpoint_spec.rb
138
140
  - spec/spec_helper.rb