rest-in-peace 6.0.2 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/gem-push.yml +29 -0
- data/.github/workflows/rspec.yml +38 -0
- data/.gitignore +1 -0
- data/README.md +110 -31
- data/VERSION +1 -1
- data/gemfiles/{Gemfile.activemodel-5.0.x → Gemfile.activemodel-5.1.x} +1 -1
- data/gemfiles/Gemfile.activemodel-5.2.x +5 -0
- data/gemfiles/Gemfile.activemodel-6.0.x +5 -0
- data/gemfiles/Gemfile.activemodel-6.1.x +5 -0
- data/lib/rest_in_peace/active_model_api.rb +5 -0
- data/lib/rest_in_peace/faraday/raise_errors_middleware.rb +3 -3
- data/lib/rest_in_peace/template_sanitizer.rb +7 -2
- data/rest-in-peace.gemspec +4 -3
- data/spec/rest_in_peace/active_model_api_spec.rb +21 -0
- data/spec/rest_in_peace/template_sanitizer_spec.rb +38 -2
- metadata +34 -31
- data/.ruby-version +0 -1
- data/.travis.yml +0 -22
- data/gemfiles/Gemfile.activemodel-3.2.x +0 -6
- data/gemfiles/Gemfile.activemodel-4.0.x +0 -6
- data/gemfiles/Gemfile.activemodel-4.1.x +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 90d0315a4daca36b8a68001426fa3a4fcb6e6cb14776c2ef6872dfaa19ef9dd9
|
4
|
+
data.tar.gz: c882717d388f616b2524e7b6e4cbad88e4b0d5c27db7c17d36f2d983eef795ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ae32e2bc8a5c7fa91e14a9664186fdaccd12d7e75d33626f0274d88cd33a30000f894eb425029ade43dddfa395e9ba800248711760ca3ac3eba436c36e5536
|
7
|
+
data.tar.gz: 1750b5804b78a776a067b440e6838bedceeacbc355bb44980f818694b3b77ea283423cbafca7f65a03696128967994d5460782f1f4fa647666b8df7ed3cb473e
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- "*"
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Set up Ruby 2.6
|
16
|
+
uses: actions/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: 2.6.x
|
19
|
+
|
20
|
+
- name: Publish to RubyGems
|
21
|
+
run: |
|
22
|
+
mkdir -p $HOME/.gem
|
23
|
+
touch $HOME/.gem/credentials
|
24
|
+
chmod 0600 $HOME/.gem/credentials
|
25
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
26
|
+
gem build *.gemspec
|
27
|
+
gem push *.gem
|
28
|
+
env:
|
29
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby CI
|
9
|
+
|
10
|
+
on: [push, pull_request]
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
|
17
|
+
strategy:
|
18
|
+
matrix:
|
19
|
+
ruby-version: [2.4.10, 2.5.8, 2.6.6, 2.7.2]
|
20
|
+
activemodel: [4.2.x, 5.1.x, 5.2.x, 6.0.x, 6.1.x]
|
21
|
+
exclude:
|
22
|
+
- ruby-version: 2.7.2
|
23
|
+
activemodel: 4.2.x
|
24
|
+
- ruby-version: 2.4.10
|
25
|
+
activemodel: 6.0.x
|
26
|
+
- ruby-version: 2.4.10
|
27
|
+
activemodel: 6.1.x
|
28
|
+
|
29
|
+
steps:
|
30
|
+
- uses: actions/checkout@v2
|
31
|
+
- name: Set up Ruby
|
32
|
+
uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: ${{ matrix.ruby-version }}
|
35
|
+
- name: Install dependencies
|
36
|
+
run: bundle install --gemfile gemfiles/Gemfile.activemodel-${{ matrix.activemodel }}
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rake spec
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -10,18 +10,51 @@ A ruby REST client that lets you feel like in heaven when consuming APIs.
|
|
10
10
|
|
11
11
|
gem 'rest-in-peace'
|
12
12
|
|
13
|
-
2. Choose which
|
13
|
+
2. Choose which HTTP client you want to use
|
14
14
|
|
15
15
|
gem 'faraday'
|
16
|
+
|
17
|
+
3. Choose which HTTP adapter you want to use
|
18
|
+
|
19
|
+
gem 'excon'
|
16
20
|
|
17
21
|
## Usage
|
18
22
|
|
19
23
|
### HTTP Client Library
|
20
24
|
|
21
|
-
|
25
|
+
This gem depends on the HTTP client library [Faraday](https://github.com/lostisland/faraday). REST-in-Peace has been tested in combination
|
26
|
+
with [Faraday](https://github.com/lostisland/faraday) and [Excon](https://github.com/excon/excon) only.
|
22
27
|
|
23
28
|
### Configuration
|
24
29
|
|
30
|
+
#### HTTP Client
|
31
|
+
|
32
|
+
You need to configure and specify the HTTP client library to use. You can either specify a block (for lazy loading) or a client instance directly.
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
class Resource
|
36
|
+
include RESTinPeace
|
37
|
+
|
38
|
+
rest_in_peace do
|
39
|
+
use_api ->() do
|
40
|
+
::Faraday.new(url: 'http://rip.dev', headers: { 'Accept' => 'application/json' }) do |faraday|
|
41
|
+
faraday.request :json
|
42
|
+
faraday.response :json
|
43
|
+
faraday.adapter :excon # make requests with Excon
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
class ResourceTwo
|
50
|
+
include RESTinPeace
|
51
|
+
|
52
|
+
rest_in_peace do
|
53
|
+
use_api ->() { MyClient.api }
|
54
|
+
end
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
25
58
|
#### Attributes
|
26
59
|
|
27
60
|
You need to specify all the attributes which should be read out of the parsed JSON. You have to specify whether an attribute
|
@@ -40,7 +73,7 @@ end
|
|
40
73
|
|
41
74
|
#### API Endpoints
|
42
75
|
|
43
|
-
You need to define all the API endpoints you want to consume with `
|
76
|
+
You need to define all the API endpoints you want to consume with `REST-in-Peace`. Currently the five verbs `GET`, `POST`, `PUT`, `PATCH` and `DELETE` are supported.
|
44
77
|
|
45
78
|
There are two sections where you can specify endpoints: `resource` and `collection`. `collection` supports the HTTP verb `GET` only.
|
46
79
|
|
@@ -55,28 +88,6 @@ rest_in_peace do
|
|
55
88
|
end
|
56
89
|
```
|
57
90
|
|
58
|
-
#### HTTP Client Configuration
|
59
|
-
|
60
|
-
You need to specify the HTTP client library to use. You can either specify a block (for lazy loading) or a client instance directly.
|
61
|
-
|
62
|
-
```ruby
|
63
|
-
class Resource
|
64
|
-
include RESTinPeace
|
65
|
-
|
66
|
-
rest_in_peace do
|
67
|
-
use_api ->() { Faraday.new(url: 'http://rip.dev') }
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
class ResourceTwo
|
72
|
-
include RESTinPeace
|
73
|
-
|
74
|
-
rest_in_peace do
|
75
|
-
use_api Faraday.new(url: 'http://rip.dev')
|
76
|
-
end
|
77
|
-
end
|
78
|
-
```
|
79
|
-
|
80
91
|
#### Resource
|
81
92
|
|
82
93
|
If you define anything inside the `resource` block, it will define a method on the instances of the class:
|
@@ -160,6 +171,7 @@ For easy interoperability with Rails, there is the ability to include ActiveMode
|
|
160
171
|
|
161
172
|
```ruby
|
162
173
|
require 'rest_in_peace'
|
174
|
+
require 'faraday'
|
163
175
|
|
164
176
|
module MyClient
|
165
177
|
class Fabric
|
@@ -184,11 +196,14 @@ module MyClient
|
|
184
196
|
end
|
185
197
|
```
|
186
198
|
|
187
|
-
|
199
|
+
### Complete Configurations
|
188
200
|
|
189
|
-
|
201
|
+
#### Configured Fabric class with all dependencies
|
202
|
+
|
203
|
+
```ruby
|
190
204
|
require 'my_client/paginator'
|
191
205
|
require 'rest_in_peace'
|
206
|
+
require 'faraday'
|
192
207
|
|
193
208
|
module MyClient
|
194
209
|
class Fabric
|
@@ -220,6 +235,72 @@ module MyClient
|
|
220
235
|
end
|
221
236
|
```
|
222
237
|
|
238
|
+
#### Configured Fabric class using Faraday
|
239
|
+
|
240
|
+
```ruby
|
241
|
+
require 'my_client/paginator'
|
242
|
+
require 'rest_in_peace'
|
243
|
+
require 'faraday'
|
244
|
+
|
245
|
+
module MyClient
|
246
|
+
class Fabric
|
247
|
+
include RESTinPeace
|
248
|
+
|
249
|
+
rest_in_peace do
|
250
|
+
use_api ->() do
|
251
|
+
::Faraday.new(url: 'http://localhost:3001', headers: { 'Accept' => 'application/json' }) do |faraday|
|
252
|
+
faraday.request :json
|
253
|
+
faraday.response :json
|
254
|
+
faraday.adapter :excon
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
attributes do
|
259
|
+
read :id
|
260
|
+
write :name
|
261
|
+
end
|
262
|
+
|
263
|
+
resource do
|
264
|
+
patch :save, '/fabrics/:id'
|
265
|
+
post :create, '/fabrics'
|
266
|
+
delete :destroy, '/fabrics/:id'
|
267
|
+
get :reload, '/fabrics/:id'
|
268
|
+
end
|
269
|
+
|
270
|
+
collection do
|
271
|
+
get :all, '/fabrics', paginate_with: MyClient::Paginator
|
272
|
+
get :find, '/fabrics/:id'
|
273
|
+
end
|
274
|
+
|
275
|
+
acts_as_active_model
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
279
|
+
```
|
280
|
+
|
281
|
+
#### CRUD options example of use
|
282
|
+
```ruby
|
283
|
+
# CREATE
|
284
|
+
fabric = MyClient::Fabric.new(name: 'my new fabric')
|
285
|
+
fabric.create # calls "POST /fabrics"
|
286
|
+
fabric.reload # calls "GET /fabrics/1"
|
287
|
+
|
288
|
+
# READ
|
289
|
+
last_fabric = MyClient::Fabric.find(id: fabric.id) # calls "GET /fabrics/1"
|
290
|
+
|
291
|
+
# UPDATE - first way
|
292
|
+
updated_fabric = last_fabric.update_attributes(name: 'first way fabric')
|
293
|
+
updated_fabric.save # calls "PATCH /fabrics/1"
|
294
|
+
|
295
|
+
# UPDATE - second way
|
296
|
+
updated_fabric = last_fabric.update(name: 'second way fabric') # calls "PATCH /fabrics/1"
|
297
|
+
|
298
|
+
# DELETE
|
299
|
+
updated_fabric.destroy # calls "DELETE /fabrics/1"
|
300
|
+
```
|
301
|
+
Method `update_attributes` sets updated value, `save` method stores all changes. This change can be done with calling
|
302
|
+
single line method `update` which do the both things.
|
303
|
+
|
223
304
|
## Helpers
|
224
305
|
|
225
306
|
### SSL Configuration for Faraday
|
@@ -258,8 +339,6 @@ end
|
|
258
339
|
|
259
340
|
## About
|
260
341
|
|
261
|
-
This gem is currently maintained and funded by [nine
|
262
|
-
|
263
|
-
[![nine.ch](https://blog.nine.ch/assets/logo.png)](https://nine.ch)
|
342
|
+
This gem is currently maintained and funded by [nine](https://nine.ch).
|
264
343
|
|
265
|
-
|
344
|
+
[![logo of the company 'nine'](https://logo.apps.at-nine.ch/Dmqied_eSaoBMQwk3vVgn4UIgDo=/trim/500x0/logo_claim.png)](https://www.nine.ch)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.1.1
|
@@ -8,15 +8,15 @@ module RESTinPeace
|
|
8
8
|
def on_complete(env)
|
9
9
|
case env[:status]
|
10
10
|
when 404
|
11
|
-
raise ::Faraday::
|
11
|
+
raise ::Faraday::ResourceNotFound, response_values(env)
|
12
12
|
when 407
|
13
13
|
# mimic the behavior that we get with proxy requests with HTTPS
|
14
|
-
raise ::Faraday::
|
14
|
+
raise ::Faraday::ConnectionFailed, %{407 "Proxy Authentication Required "}
|
15
15
|
when 422
|
16
16
|
# do not raise an error as 422 from a rails app means validation errors
|
17
17
|
# and response body contains the validation errors
|
18
18
|
when CLIENT_ERROR_STATUSES
|
19
|
-
raise ::Faraday::
|
19
|
+
raise ::Faraday::ClientError, response_values(env)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rest_in_peace/errors'
|
2
|
+
require 'addressable/uri'
|
2
3
|
|
3
4
|
module RESTinPeace
|
4
5
|
class TemplateSanitizer
|
@@ -16,10 +17,14 @@ module RESTinPeace
|
|
16
17
|
return @url if @url
|
17
18
|
@url = @url_template.dup
|
18
19
|
tokens.each do |token|
|
19
|
-
param = @params
|
20
|
+
param = @params[token.to_sym]
|
20
21
|
param ||= @klass.send(token) if @klass.respond_to?(token)
|
21
22
|
raise IncompleteParams, "No parameter for token :#{token} found" unless param
|
22
|
-
@
|
23
|
+
if @params.include?(token.to_sym)
|
24
|
+
@url.sub!(%r{:#{token}}, CGI.escape(param.to_s))
|
25
|
+
else
|
26
|
+
@url.sub!(%r{:#{token}}, Addressable::URI.parse(param.to_s).normalize.to_s)
|
27
|
+
end
|
23
28
|
end
|
24
29
|
@url
|
25
30
|
end
|
data/rest-in-peace.gemspec
CHANGED
@@ -5,8 +5,8 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'rest-in-peace'
|
7
7
|
s.version = File.read(File.expand_path('../VERSION', __FILE__)).strip
|
8
|
-
s.authors = ['
|
9
|
-
s.email = ['
|
8
|
+
s.authors = ['NINE Internet Soultions AG']
|
9
|
+
s.email = ['support@nine.ch']
|
10
10
|
s.homepage = 'http://github.com/ninech/'
|
11
11
|
s.license = 'MIT'
|
12
12
|
s.summary = 'REST in peace'
|
@@ -17,7 +17,8 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
18
|
s.require_paths = ['lib']
|
19
19
|
|
20
|
-
s.add_runtime_dependency 'activemodel', '>= 3.2', '<
|
20
|
+
s.add_runtime_dependency 'activemodel', '>= 3.2', '< 7'
|
21
|
+
s.add_runtime_dependency 'addressable', '~> 2.5'
|
21
22
|
|
22
23
|
s.add_development_dependency 'rake', '~> 10.0'
|
23
24
|
s.add_development_dependency 'rspec', '~> 3.0'
|
@@ -168,6 +168,27 @@ describe RESTinPeace do
|
|
168
168
|
end
|
169
169
|
end
|
170
170
|
|
171
|
+
describe '#update' do
|
172
|
+
let(:new_attributes) { { name: 'new_name', description: 'yoloswag' } }
|
173
|
+
|
174
|
+
subject { instance }
|
175
|
+
|
176
|
+
it 'saves record after update' do
|
177
|
+
expect(subject).to receive(:save)
|
178
|
+
|
179
|
+
subject.update(new_attributes)
|
180
|
+
end
|
181
|
+
|
182
|
+
specify do
|
183
|
+
expect { subject.update(new_attributes) }.
|
184
|
+
to change(instance, :description).from(attributes[:description]).to(new_attributes[:description])
|
185
|
+
end
|
186
|
+
|
187
|
+
specify do
|
188
|
+
expect { subject.update(new_attributes) }.to_not change(instance, :name).from(attributes[:name])
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
171
192
|
describe 'validation handling' do
|
172
193
|
before do
|
173
194
|
def extended_class.model_name
|
@@ -5,7 +5,6 @@ describe RESTinPeace::TemplateSanitizer do
|
|
5
5
|
let(:attributes) { {} }
|
6
6
|
let(:template_sanitizer) { RESTinPeace::TemplateSanitizer.new(url_template, params, klass) }
|
7
7
|
|
8
|
-
|
9
8
|
context 'with class' do
|
10
9
|
let(:klass) { OpenStruct }
|
11
10
|
|
@@ -18,6 +17,12 @@ describe RESTinPeace::TemplateSanitizer do
|
|
18
17
|
specify { expect(subject).to eq('/a/1') }
|
19
18
|
end
|
20
19
|
|
20
|
+
context 'single token with extra params' do
|
21
|
+
let(:params) { { id: 1, something: 'else' } }
|
22
|
+
let(:url_template) { '/a/:id' }
|
23
|
+
specify { expect(subject).to eq('/a/1') }
|
24
|
+
end
|
25
|
+
|
21
26
|
context 'multiple token' do
|
22
27
|
let(:params) { { id: 2, a_id: 1 } }
|
23
28
|
let(:url_template) { '/a/:a_id/b/:id' }
|
@@ -118,7 +123,7 @@ describe RESTinPeace::TemplateSanitizer do
|
|
118
123
|
specify { expect { subject }.to raise_error(RESTinPeace::TemplateSanitizer::IncompleteParams) }
|
119
124
|
end
|
120
125
|
|
121
|
-
context 'param which need to be encoded' do
|
126
|
+
context 'param which need to be encoded is white space separated string' do
|
122
127
|
let(:params) { { id: 'this param need to be encoded' } }
|
123
128
|
let(:encoded_param) { 'this+param+need+to+be+encoded' }
|
124
129
|
let(:attributes) { { a_id: 2 } }
|
@@ -126,6 +131,23 @@ describe RESTinPeace::TemplateSanitizer do
|
|
126
131
|
specify { expect(subject).to eq("/a/2/b/#{encoded_param}") }
|
127
132
|
end
|
128
133
|
|
134
|
+
context 'path which need to be encoded is white space separated string' do
|
135
|
+
let(:params) { { id: 1 } }
|
136
|
+
let(:attributes) { { a_name: 'with space' } }
|
137
|
+
let(:encoded_path) { 'with%20space' }
|
138
|
+
let(:url_template) { '/a/:a_name/b/:id' }
|
139
|
+
specify { expect(subject).to eq("/a/#{encoded_path}/b/1") }
|
140
|
+
end
|
141
|
+
|
142
|
+
context 'path and param which need to be encoded are white space separated string' do
|
143
|
+
let(:params) { { place: 'dhaini kata' } }
|
144
|
+
let(:encoded_param) { 'dhaini+kata' }
|
145
|
+
let(:attributes) { { a_name: 'with space' } }
|
146
|
+
let(:encoded_path) { 'with%20space' }
|
147
|
+
let(:url_template) { '/a/:a_name/b/:place' }
|
148
|
+
specify { expect(subject).to eq("/a/#{encoded_path}/b/#{encoded_param}") }
|
149
|
+
end
|
150
|
+
|
129
151
|
context 'param which need to be encoded is null string' do
|
130
152
|
let(:params) { { id: '' } }
|
131
153
|
let(:encoded_param) { '' }
|
@@ -134,6 +156,13 @@ describe RESTinPeace::TemplateSanitizer do
|
|
134
156
|
specify { expect(subject).to eq("/a/2/b/#{encoded_param}") }
|
135
157
|
end
|
136
158
|
|
159
|
+
context 'path which need to be encoded is null string' do
|
160
|
+
let(:params) { { id: 1 } }
|
161
|
+
let(:attributes) { { a_name: '' } }
|
162
|
+
let(:url_template) { '/a/:a_name/b/:id' }
|
163
|
+
specify { expect(subject).to eq('/a//b/1') }
|
164
|
+
end
|
165
|
+
|
137
166
|
context 'param which need to be encoded is nil' do
|
138
167
|
let(:params) { { id: nil } }
|
139
168
|
let(:encoded_param) { '' }
|
@@ -141,6 +170,13 @@ describe RESTinPeace::TemplateSanitizer do
|
|
141
170
|
let(:url_template) { '/a/:a_id/b/:id' }
|
142
171
|
specify { expect { subject }.to raise_exception(RESTinPeace::TemplateSanitizer::IncompleteParams) }
|
143
172
|
end
|
173
|
+
|
174
|
+
context 'path which need to be encoded is nil' do
|
175
|
+
let(:params) { { id: 1 } }
|
176
|
+
let(:attributes) { { a_name: nil } }
|
177
|
+
let(:url_template) { '/a/:a_name/b/:id' }
|
178
|
+
specify { expect { subject }.to raise_exception(RESTinPeace::TemplateSanitizer::IncompleteParams) }
|
179
|
+
end
|
144
180
|
end
|
145
181
|
|
146
182
|
describe '#tokens' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-in-peace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- NINE Internet Soultions AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,21 @@ dependencies:
|
|
29
29
|
version: '3.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: addressable
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '2.5'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '2.5'
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: rake
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,22 +96,22 @@ dependencies:
|
|
82
96
|
name: guard-rspec
|
83
97
|
requirement: !ruby/object:Gem::Requirement
|
84
98
|
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '4.2'
|
88
99
|
- - ">="
|
89
100
|
- !ruby/object:Gem::Version
|
90
101
|
version: 4.2.0
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '4.2'
|
91
105
|
type: :development
|
92
106
|
prerelease: false
|
93
107
|
version_requirements: !ruby/object:Gem::Requirement
|
94
108
|
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '4.2'
|
98
109
|
- - ">="
|
99
110
|
- !ruby/object:Gem::Version
|
100
111
|
version: 4.2.0
|
112
|
+
- - "~>"
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '4.2'
|
101
115
|
- !ruby/object:Gem::Dependency
|
102
116
|
name: simplecov
|
103
117
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,16 +134,16 @@ dependencies:
|
|
120
134
|
version: 0.8.2
|
121
135
|
description: Let your api REST in peace.
|
122
136
|
email:
|
123
|
-
-
|
137
|
+
- support@nine.ch
|
124
138
|
executables: []
|
125
139
|
extensions: []
|
126
140
|
extra_rdoc_files: []
|
127
141
|
files:
|
142
|
+
- ".github/workflows/gem-push.yml"
|
143
|
+
- ".github/workflows/rspec.yml"
|
128
144
|
- ".gitignore"
|
129
145
|
- ".rspec"
|
130
146
|
- ".ruby-gemset"
|
131
|
-
- ".ruby-version"
|
132
|
-
- ".travis.yml"
|
133
147
|
- Gemfile
|
134
148
|
- Guardfile
|
135
149
|
- LICENSE.txt
|
@@ -137,11 +151,11 @@ files:
|
|
137
151
|
- Rakefile
|
138
152
|
- VERSION
|
139
153
|
- examples/pagination_with_headers.rb
|
140
|
-
- gemfiles/Gemfile.activemodel-3.2.x
|
141
|
-
- gemfiles/Gemfile.activemodel-4.0.x
|
142
|
-
- gemfiles/Gemfile.activemodel-4.1.x
|
143
154
|
- gemfiles/Gemfile.activemodel-4.2.x
|
144
|
-
- gemfiles/Gemfile.activemodel-5.
|
155
|
+
- gemfiles/Gemfile.activemodel-5.1.x
|
156
|
+
- gemfiles/Gemfile.activemodel-5.2.x
|
157
|
+
- gemfiles/Gemfile.activemodel-6.0.x
|
158
|
+
- gemfiles/Gemfile.activemodel-6.1.x
|
145
159
|
- images/rest_in_peace.gif
|
146
160
|
- lib/rest-in-peace.rb
|
147
161
|
- lib/rest_in_peace.rb
|
@@ -186,19 +200,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
200
|
- !ruby/object:Gem::Version
|
187
201
|
version: '0'
|
188
202
|
requirements: []
|
189
|
-
|
190
|
-
rubygems_version: 2.5.1
|
203
|
+
rubygems_version: 3.0.3.1
|
191
204
|
signing_key:
|
192
205
|
specification_version: 4
|
193
206
|
summary: REST in peace
|
194
|
-
test_files:
|
195
|
-
- spec/rest_in_peace/active_model_api_spec.rb
|
196
|
-
- spec/rest_in_peace/api_call_spec.rb
|
197
|
-
- spec/rest_in_peace/definition_proxy/attributes_definitions_spec.rb
|
198
|
-
- spec/rest_in_peace/definition_proxy/collection_method_definitions_spec.rb
|
199
|
-
- spec/rest_in_peace/definition_proxy/resource_method_definitions_spec.rb
|
200
|
-
- spec/rest_in_peace/definition_proxy_spec.rb
|
201
|
-
- spec/rest_in_peace/response_converter_spec.rb
|
202
|
-
- spec/rest_in_peace/template_sanitizer_spec.rb
|
203
|
-
- spec/rest_in_peace_spec.rb
|
204
|
-
- spec/spec_helper.rb
|
207
|
+
test_files: []
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.3.1
|
data/.travis.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
rvm:
|
4
|
-
- 2.0.0
|
5
|
-
- 2.1.2
|
6
|
-
- 2.2.5
|
7
|
-
- 2.3.1
|
8
|
-
gemfile:
|
9
|
-
- gemfiles/Gemfile.activemodel-3.2.x
|
10
|
-
- gemfiles/Gemfile.activemodel-4.0.x
|
11
|
-
- gemfiles/Gemfile.activemodel-4.1.x
|
12
|
-
- gemfiles/Gemfile.activemodel-4.2.x
|
13
|
-
- gemfiles/Gemfile.activemodel-5.0.x
|
14
|
-
script:
|
15
|
-
- bundle exec rake spec
|
16
|
-
before_install: gem install bundler
|
17
|
-
matrix:
|
18
|
-
exclude:
|
19
|
-
- rvm: 2.0.0
|
20
|
-
gemfile: gemfiles/Gemfile.activemodel-5.0.x
|
21
|
-
- rvm: 2.1.2
|
22
|
-
gemfile: gemfiles/Gemfile.activemodel-5.0.x
|