zesty 0.1.0 → 0.2.0
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 +50 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +29 -39
- data/README.md +3 -4
- data/bin/console +1 -0
- data/lib/zesty/auth.rb +1 -3
- data/lib/zesty/request.rb +1 -3
- data/lib/zesty/version.rb +1 -1
- data/zesty.gemspec +1 -2
- metadata +6 -20
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51e03fbf069319d15eacd273ec651acfce7b4105aed908cb5dda67b91f2d0ce5
|
4
|
+
data.tar.gz: 32fc8b3aada29c2d16c98f82e0c0e8ec1f58205cafc336658b42e9badda488d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 879acc6c9dc0979638256708d902e4899ab0764f803c42515c083810c590458ad6c559c67286b73757a7528ebcc5ddc1e3ad9c222b8eb9559b2752bc648ee9f4
|
7
|
+
data.tar.gz: 33e61740c9e8ae251ba1e97e3e773abbdc51e85a6e9a7ed6aab66606272437a3793505ed2ea95f29764c4c08d7c5f73fb85114ff814390b3ed65f015b8652f6d
|
@@ -0,0 +1,50 @@
|
|
1
|
+
name: CI Build
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby: [ '2.4', '2.5', '2.6', '2.7' ]
|
15
|
+
name: Ruby ${{ matrix.ruby }}
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
|
19
|
+
- uses: actions/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
|
23
|
+
- uses: actions/cache@v1
|
24
|
+
with:
|
25
|
+
path: vendor/bundle
|
26
|
+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
27
|
+
restore-keys: |
|
28
|
+
${{ runner.os }}-gems-
|
29
|
+
|
30
|
+
- name: Install rubygems
|
31
|
+
run: |
|
32
|
+
gem update --system --no-document
|
33
|
+
|
34
|
+
- name: Install bundler
|
35
|
+
run: |
|
36
|
+
gem install bundler --no-document
|
37
|
+
|
38
|
+
- name: Install dependencies
|
39
|
+
run: |
|
40
|
+
bundle config path vendor/bundle
|
41
|
+
bundle install --jobs 4 --retry 3
|
42
|
+
|
43
|
+
- name: Run Tests
|
44
|
+
env:
|
45
|
+
EMAIL: email
|
46
|
+
PASSWORD: password
|
47
|
+
INSTANCE_ZUID: ${{ secrets.INSTANCE_ZUID }}
|
48
|
+
MODEL_ZUID: ${{ secrets.MODEL_ZUID }}
|
49
|
+
run: |
|
50
|
+
bundle exec rake
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -7,72 +7,62 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (6.0.0)
|
11
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
-
i18n (>= 0.7, < 2)
|
13
|
-
minitest (~> 5.1)
|
14
|
-
tzinfo (~> 1.1)
|
15
|
-
zeitwerk (~> 2.1, >= 2.1.8)
|
16
10
|
addressable (2.7.0)
|
17
11
|
public_suffix (>= 2.0.2, < 5.0)
|
18
|
-
concurrent-ruby (1.1.5)
|
19
12
|
crack (0.4.3)
|
20
13
|
safe_yaml (~> 1.0.0)
|
21
|
-
diff-lcs (1.3)
|
14
|
+
diff-lcs (1.4.3)
|
22
15
|
domain_name (0.5.20190701)
|
23
16
|
unf (>= 0.0.5, < 1.0.0)
|
24
17
|
dotenv (2.7.5)
|
25
|
-
|
26
|
-
|
18
|
+
ffi (1.13.1)
|
19
|
+
ffi-compiler (1.0.1)
|
20
|
+
ffi (>= 1.0.0)
|
21
|
+
rake
|
22
|
+
hashdiff (1.0.1)
|
23
|
+
http (4.4.1)
|
27
24
|
addressable (~> 2.3)
|
28
25
|
http-cookie (~> 1.0)
|
29
|
-
http-form_data (~> 2.
|
30
|
-
|
26
|
+
http-form_data (~> 2.2)
|
27
|
+
http-parser (~> 1.2.0)
|
31
28
|
http-cookie (1.0.3)
|
32
29
|
domain_name (~> 0.5)
|
33
|
-
http-form_data (2.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
rspec-
|
42
|
-
|
43
|
-
rspec-
|
44
|
-
rspec-
|
45
|
-
rspec-support (~> 3.8.0)
|
46
|
-
rspec-expectations (3.8.4)
|
30
|
+
http-form_data (2.3.0)
|
31
|
+
http-parser (1.2.1)
|
32
|
+
ffi-compiler (>= 1.0, < 2.0)
|
33
|
+
public_suffix (4.0.5)
|
34
|
+
rake (13.0.1)
|
35
|
+
rspec (3.9.0)
|
36
|
+
rspec-core (~> 3.9.0)
|
37
|
+
rspec-expectations (~> 3.9.0)
|
38
|
+
rspec-mocks (~> 3.9.0)
|
39
|
+
rspec-core (3.9.2)
|
40
|
+
rspec-support (~> 3.9.3)
|
41
|
+
rspec-expectations (3.9.2)
|
47
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.
|
43
|
+
rspec-support (~> 3.9.0)
|
49
44
|
rspec-json_expectations (2.2.0)
|
50
|
-
rspec-mocks (3.
|
45
|
+
rspec-mocks (3.9.1)
|
51
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
52
|
-
rspec-support (~> 3.
|
53
|
-
rspec-support (3.
|
47
|
+
rspec-support (~> 3.9.0)
|
48
|
+
rspec-support (3.9.3)
|
54
49
|
safe_yaml (1.0.5)
|
55
|
-
thread_safe (0.3.6)
|
56
|
-
tzinfo (1.2.5)
|
57
|
-
thread_safe (~> 0.1)
|
58
50
|
unf (0.1.4)
|
59
51
|
unf_ext
|
60
|
-
unf_ext (0.0.7.
|
61
|
-
vcr (
|
62
|
-
webmock (3.
|
52
|
+
unf_ext (0.0.7.7)
|
53
|
+
vcr (6.0.0)
|
54
|
+
webmock (3.8.3)
|
63
55
|
addressable (>= 2.3.6)
|
64
56
|
crack (>= 0.3.2)
|
65
57
|
hashdiff (>= 0.4.0, < 2.0.0)
|
66
|
-
zeitwerk (2.1.10)
|
67
58
|
|
68
59
|
PLATFORMS
|
69
60
|
ruby
|
70
61
|
|
71
62
|
DEPENDENCIES
|
72
|
-
activesupport
|
73
63
|
bundler (~> 2.0)
|
74
64
|
dotenv
|
75
|
-
rake (~>
|
65
|
+
rake (~> 13.0)
|
76
66
|
rspec (~> 3.0)
|
77
67
|
rspec-json_expectations
|
78
68
|
vcr
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# The Zesty.io Ruby Gem
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/zesty.svg)][gem]
|
4
|
-
|
4
|
+
![CI Build](https://github.com/javierjulio/zesty-rb/workflows/CI%20Build/badge.svg)
|
5
5
|
|
6
|
-
A Ruby interface to the Zesty REST API. Requires Ruby 2.4 and up. Not all API actions are supported yet. Since the Zesty API uses mostly camelCase, this gem will handle converting to and from snake_case for you.
|
6
|
+
A Ruby interface to [the Zesty REST API](https://zesty.org/apis/instant-content-api). Requires Ruby 2.4 and up. Not all API actions are supported yet. Since the Zesty API uses mostly camelCase, this gem will handle converting to and from snake_case for you.
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
@@ -97,7 +97,7 @@ All code is written in snake_case since requests and responses are converted to
|
|
97
97
|
|
98
98
|
### Tests
|
99
99
|
|
100
|
-
|
100
|
+
To run tests use `rspec`. To re-record VCR cassettes use `RECORD_MODE=all rspec` or with specific test cases.
|
101
101
|
|
102
102
|
### Releasing
|
103
103
|
|
@@ -116,4 +116,3 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
116
116
|
Everyone interacting in the Zesty project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/javierjulio/zesty-rb/blob/master/CODE_OF_CONDUCT.md).
|
117
117
|
|
118
118
|
[gem]: https://rubygems.org/gems/zesty
|
119
|
-
[travis]: https://travis-ci.org/javierjulio/zesty-rb
|
data/bin/console
CHANGED
data/lib/zesty/auth.rb
CHANGED
data/lib/zesty/request.rb
CHANGED
@@ -75,9 +75,7 @@ module Zesty
|
|
75
75
|
|
76
76
|
def parse_response_body(body)
|
77
77
|
return nil if body.strip.empty?
|
78
|
-
|
79
|
-
#pp json
|
80
|
-
json&.to_snake_case
|
78
|
+
JSON.parse(body, symbolize_names: true)&.to_snake_case
|
81
79
|
rescue JSON::ParserError
|
82
80
|
end
|
83
81
|
|
data/lib/zesty/version.rb
CHANGED
data/zesty.gemspec
CHANGED
@@ -34,11 +34,10 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_dependency "http", "~> 4.0"
|
35
35
|
|
36
36
|
spec.add_development_dependency "bundler", "~> 2.0"
|
37
|
-
spec.add_development_dependency "rake", "~>
|
37
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
38
38
|
spec.add_development_dependency "rspec", "~> 3.0"
|
39
39
|
spec.add_development_dependency "rspec-json_expectations"
|
40
40
|
spec.add_development_dependency "dotenv"
|
41
41
|
spec.add_development_dependency "vcr"
|
42
42
|
spec.add_development_dependency "webmock"
|
43
|
-
spec.add_development_dependency "activesupport"
|
44
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zesty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Julio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: activesupport
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
125
|
description: A Ruby interface to the Zesty.io API
|
140
126
|
email:
|
141
127
|
- jjfutbol@gmail.com
|
@@ -144,9 +130,9 @@ extensions: []
|
|
144
130
|
extra_rdoc_files: []
|
145
131
|
files:
|
146
132
|
- ".env.sample"
|
133
|
+
- ".github/workflows/ci.yml"
|
147
134
|
- ".gitignore"
|
148
135
|
- ".rspec"
|
149
|
-
- ".travis.yml"
|
150
136
|
- CHANGELOG.md
|
151
137
|
- CODE_OF_CONDUCT.md
|
152
138
|
- Gemfile
|
@@ -188,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
174
|
- !ruby/object:Gem::Version
|
189
175
|
version: '0'
|
190
176
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
177
|
+
rubygems_version: 3.1.4
|
192
178
|
signing_key:
|
193
179
|
specification_version: 4
|
194
180
|
summary: A Ruby interface to the Zesty.io API
|
data/.travis.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
---
|
2
|
-
language: ruby
|
3
|
-
rvm:
|
4
|
-
# - 2.4.7 # TODO: separate gemfiles to account for ActiveSupport
|
5
|
-
- 2.5.6
|
6
|
-
- 2.6.4
|
7
|
-
before_install:
|
8
|
-
- gem update --system
|
9
|
-
- gem install bundler
|
10
|
-
cache: bundler
|
11
|
-
env:
|
12
|
-
- EMAIL="email" PASSWORD="password" INSTANCE_ZUID="1-abc-def" MODEL_ZUID="6-d08392dbc9-9gl4bk"
|