easy_meli 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +32 -0
- data/CHANGELOG.md +3 -0
- data/lib/easy_meli/authorization_client.rb +2 -2
- data/lib/easy_meli/errors.rb +8 -0
- data/lib/easy_meli/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c8dc1140d9368b076baf0a49a9742aea8de95565a90512152c9c58ec2b98723
|
4
|
+
data.tar.gz: 543cbed2c4789b0259b62f11d332a02c3b5b281feb2c5b60c5f87fd8640c0754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2a7ecfa32beed3a9329b01312b1cfd4ed70fceb26469dc90e8d0d2c3b42186a9c1ec06f115f1dc5fa15236aa48d99b7e074a089fad7f710bddaf2bcb324680a
|
7
|
+
data.tar.gz: dfc01a8544c0f2d23711888fdfa3fb6a6f6f68196782d41cb501c1f50d53900882fb5c1b8d7a9f88e610eb1fafc8112447943ff87b8793af7fccd29e800a6d17
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
branches: [ master ]
|
5
|
+
push:
|
6
|
+
branches: [ master ]
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby_version: [ '2.6' ]
|
13
|
+
steps:
|
14
|
+
- name: Checkout
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
- name: Setup ruby ${{ matrix.ruby_version }}
|
17
|
+
uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby_version }}
|
20
|
+
- name: Setup cache key and directory for gems cache
|
21
|
+
uses: actions/cache@v1
|
22
|
+
with:
|
23
|
+
path: vendor/bundle
|
24
|
+
key: ${{ runner.os }}-gem-use-ruby-${{ matrix.ruby_version }}-${{ hashFiles('**/Gemfile.lock') }}
|
25
|
+
- name: Bundle install
|
26
|
+
run: |
|
27
|
+
gem install bundler:1.17.0
|
28
|
+
bundle config path vendor/bundle
|
29
|
+
bundle install --jobs 4 --retry 3
|
30
|
+
- name: Run tests
|
31
|
+
run: |
|
32
|
+
bundle exec rake test
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## V 0.6.1
|
4
|
+
- Fix a bug in the error raising in the authorization client introduced in V 0.6.0
|
5
|
+
|
3
6
|
## V 0.6.0
|
4
7
|
- Classify an `invalid_token` response as an `InvalidTokenError`.
|
5
8
|
- `Malformed access_token` error changed from `AuthenticationError` to `InvalidTokenError`.
|
@@ -45,7 +45,7 @@ class EasyMeli::AuthorizationClient
|
|
45
45
|
if response.success?
|
46
46
|
response.to_h
|
47
47
|
else
|
48
|
-
raise EasyMeli::
|
48
|
+
raise EasyMeli::CreateTokenError.new(response)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -54,7 +54,7 @@ class EasyMeli::AuthorizationClient
|
|
54
54
|
if response.success?
|
55
55
|
response.to_h[EasyMeli::AuthorizationClient::ACCESS_TOKEN_KEY]
|
56
56
|
else
|
57
|
-
raise EasyMeli::
|
57
|
+
raise EasyMeli::InvalidTokenError.new(response)
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
data/lib/easy_meli/errors.rb
CHANGED
@@ -16,6 +16,14 @@ module EasyMeli
|
|
16
16
|
|
17
17
|
class AuthenticationError < Error; end
|
18
18
|
|
19
|
+
class CreateTokenError < AuthenticationError
|
20
|
+
private
|
21
|
+
|
22
|
+
def local_message
|
23
|
+
'Error Creating Token'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
19
27
|
class InvalidGrantError < AuthenticationError
|
20
28
|
private
|
21
29
|
|
data/lib/easy_meli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_meli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Northam
|
@@ -115,6 +115,7 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- ".github/workflows/ci.yml"
|
118
119
|
- ".gitignore"
|
119
120
|
- CHANGELOG.md
|
120
121
|
- Gemfile
|