lhs 25.0.4 → 26.0.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/rubocop.yml +16 -0
- data/.github/workflows/test-active-support-5.yml +20 -0
- data/.github/workflows/test.yml +16 -0
- data/.ruby-version +1 -1
- data/lhs.gemspec +1 -1
- data/lib/lhs/concerns/item/save.rb +1 -1
- data/lib/lhs/interceptors/auto_oauth/interceptor.rb +1 -1
- data/lib/lhs/version.rb +1 -1
- data/spec/auto_oauth_spec.rb +41 -0
- data/spec/dummy/app/controllers/automatic_authentication_controller.rb +7 -0
- data/spec/dummy/app/controllers/request_cycle_cache_controller.rb +4 -4
- data/spec/dummy/config/initializers/lhs.rb +5 -0
- data/spec/dummy/config/routes.rb +2 -1
- data/spec/record/create_spec.rb +53 -13
- data/spec/request_cycle_cache_spec.rb +1 -1
- metadata +13 -21
- data/Gemfile.activesupport4 +0 -5
- data/cider-ci/bin/bundle +0 -51
- data/cider-ci/bin/ruby_install +0 -8
- data/cider-ci/bin/ruby_version +0 -25
- data/cider-ci/jobs/rspec-activesupport-4.yml +0 -27
- data/cider-ci/jobs/rspec-activesupport-5.yml +0 -26
- data/cider-ci/jobs/rspec-activesupport-latest.yml +0 -24
- data/cider-ci/jobs/rubocop.yml +0 -18
- data/cider-ci/task_components/bundle.yml +0 -22
- data/cider-ci/task_components/rspec.yml +0 -37
- data/cider-ci/task_components/rubocop.yml +0 -29
- data/cider-ci/task_components/ruby.yml +0 -15
- data/cider-ci.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e54866cbfede61b6c11e099598cd0a8c742d96d58ab7e428f0cf5510713212a
|
4
|
+
data.tar.gz: b4f35820a23216b95316508a2b83d3b90293d575c15f55abd2c8e25807d28451
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1de279d402f15a73842204180d3810250e911ab399c4d4636fb7672e3512f3f4f6aed25024594fb483b7bcca690964f2e49858157058a231cae231338b46618
|
7
|
+
data.tar.gz: 607ca09eafde7d9586e01c4c9e1978b97bfc9b8837fda2eec62ddc3e2ec87dc3700687cb5bd3422c3254204bbd86a08cb4636976600e04dba03af097c99106da
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Test ActiveSupport v5
|
2
|
+
|
3
|
+
on: push
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
rspec:
|
7
|
+
runs-on: ubuntu-18.04
|
8
|
+
|
9
|
+
steps:
|
10
|
+
- uses: actions/checkout@v2
|
11
|
+
- uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
bundler-cache: true
|
14
|
+
env:
|
15
|
+
BUNDLE_GEMFILE: Gemfile.activesupport5
|
16
|
+
- name: Run Tests
|
17
|
+
env:
|
18
|
+
BUNDLE_GEMFILE: Gemfile.activesupport5
|
19
|
+
run: |
|
20
|
+
bundle exec rspec
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.7.2
|
data/lhs.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
|
25
25
|
s.add_dependency 'activemodel'
|
26
26
|
s.add_dependency 'activesupport', '>= 4.2.11'
|
27
|
-
s.add_dependency 'lhc', '>= 12.1.1', '<
|
27
|
+
s.add_dependency 'lhc', '>= 12.1.1', '< 16'
|
28
28
|
s.add_dependency 'local_uri'
|
29
29
|
|
30
30
|
s.add_development_dependency 'capybara'
|
@@ -45,7 +45,7 @@ class LHS::Item < LHS::Proxy
|
|
45
45
|
_data.merge_raw!(response_data.unwrap(:item_created_key))
|
46
46
|
response_headers = response_data._request.response.headers
|
47
47
|
end
|
48
|
-
if response_headers && response_headers['Location']
|
48
|
+
if options.fetch(:followlocation, true) && response_headers && response_headers['Location']
|
49
49
|
location_data = record.request(options.merge(url: response_headers['Location'], method: :get, body: nil))
|
50
50
|
_data.merge_raw!(location_data.unwrap(:item_created_key))
|
51
51
|
end
|
data/lib/lhs/version.rb
CHANGED
data/spec/auto_oauth_spec.rb
CHANGED
@@ -165,5 +165,46 @@ describe 'Auto OAuth Authentication', type: :request, dummy_models: true do
|
|
165
165
|
expect(records_request).to have_been_requested
|
166
166
|
end
|
167
167
|
end
|
168
|
+
|
169
|
+
context 'overriding auth options with provider enabled for auto oauth' do
|
170
|
+
|
171
|
+
let(:token) { ApplicationController::ACCESS_TOKEN }
|
172
|
+
let(:overridden_token) { 'ACCESS_TOKEN' }
|
173
|
+
|
174
|
+
let(:record_request) do
|
175
|
+
stub_request(:get, "http://internalservice/v2/records/1")
|
176
|
+
.with(
|
177
|
+
headers: { 'Authorization' => "Bearer #{overridden_token}" }
|
178
|
+
).to_return(status: 200, body: { name: 'Record' }.to_json)
|
179
|
+
end
|
180
|
+
|
181
|
+
let(:records_request) do
|
182
|
+
stub_request(:get, "http://internalservice/v2/records?color=blue")
|
183
|
+
.with(
|
184
|
+
headers: { 'Authorization' => "Bearer #{overridden_token}" }
|
185
|
+
).to_return(status: 200, body: { items: [{ name: 'Record' }] }.to_json)
|
186
|
+
end
|
187
|
+
|
188
|
+
before do
|
189
|
+
LHS.configure do |config|
|
190
|
+
config.auto_oauth = -> { access_token }
|
191
|
+
end
|
192
|
+
LHC.configure do |config|
|
193
|
+
config.interceptors = [LHC::Auth]
|
194
|
+
end
|
195
|
+
record_request
|
196
|
+
records_request
|
197
|
+
end
|
198
|
+
|
199
|
+
after do
|
200
|
+
LHC.config.reset
|
201
|
+
end
|
202
|
+
|
203
|
+
it 'applies OAuth credentials for the individual request automatically' do
|
204
|
+
get '/automatic_authentication/oauth_with_provider_override', params: { access_token: overridden_token }
|
205
|
+
expect(record_request).to have_been_requested
|
206
|
+
expect(records_request).to have_been_requested
|
207
|
+
end
|
208
|
+
end
|
168
209
|
end
|
169
210
|
end
|
@@ -26,4 +26,11 @@ class AutomaticAuthenticationController < ApplicationController
|
|
26
26
|
records: DummyRecordWithAutoOauthProvider.where(color: 'blue').as_json
|
27
27
|
}
|
28
28
|
end
|
29
|
+
|
30
|
+
def o_auth_with_provider_override
|
31
|
+
render json: {
|
32
|
+
record: DummyRecordWithAutoOauthProvider.options(auth: { bearer: params[:access_token] }).find(1).as_json,
|
33
|
+
records: DummyRecordWithAutoOauthProvider.options(auth: { bearer: params[:access_token] }).where(color: 'blue').as_json
|
34
|
+
}
|
35
|
+
end
|
29
36
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
class RequestCycleCacheController < ApplicationController
|
4
4
|
def simple
|
5
5
|
User.find(1) # first request
|
6
|
-
user = User.find(1) # second request that should be
|
6
|
+
user = User.find(1) # second request that should be served from request cycle cache
|
7
7
|
render json: user.to_json
|
8
8
|
end
|
9
9
|
|
@@ -15,13 +15,13 @@ class RequestCycleCacheController < ApplicationController
|
|
15
15
|
|
16
16
|
def parallel
|
17
17
|
User.find(1, 2) # first request
|
18
|
-
users = User.find(1, 2) # second request that should be
|
18
|
+
users = User.find(1, 2) # second request that should be served from request cycle cache
|
19
19
|
render json: users.to_json
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
22
|
+
def different_headers
|
23
23
|
User.find(1) # first request
|
24
|
-
user = User.options(headers: { 'Authentication' => 'Bearer 123' }).find(1) # second request that should NOT be
|
24
|
+
user = User.options(headers: { 'Authentication' => 'Bearer 123' }).find(1) # second request that should NOT be served from request cycle cache as the headers are different
|
25
25
|
render json: user.to_json
|
26
26
|
end
|
27
27
|
end
|
data/spec/dummy/config/routes.rb
CHANGED
@@ -7,12 +7,13 @@ Rails.application.routes.draw do
|
|
7
7
|
get 'automatic_authentication/oauth' => 'automatic_authentication#o_auth'
|
8
8
|
get 'automatic_authentication/oauth_with_multiple_providers' => 'automatic_authentication#o_auth_with_multiple_providers'
|
9
9
|
get 'automatic_authentication/oauth_with_provider' => 'automatic_authentication#o_auth_with_provider'
|
10
|
+
get 'automatic_authentication/oauth_with_provider_override' => 'automatic_authentication#o_auth_with_provider_override'
|
10
11
|
|
11
12
|
# Request Cycle Cache
|
12
13
|
get 'request_cycle_cache/simple' => 'request_cycle_cache#simple'
|
13
14
|
get 'request_cycle_cache/no_caching_interceptor' => 'request_cycle_cache#no_caching_interceptor'
|
14
15
|
get 'request_cycle_cache/parallel' => 'request_cycle_cache#parallel'
|
15
|
-
get 'request_cycle_cache/
|
16
|
+
get 'request_cycle_cache/different_headers' => 'request_cycle_cache#different_headers'
|
16
17
|
|
17
18
|
# Error handling with chains
|
18
19
|
get 'error_handling_with_chains/fetch_in_controller' => 'error_handling_with_chains#fetch_in_controller'
|
data/spec/record/create_spec.rb
CHANGED
@@ -135,25 +135,65 @@ describe LHS::Record do
|
|
135
135
|
end
|
136
136
|
|
137
137
|
context 'location header' do
|
138
|
-
before do
|
139
|
-
class ContactPerson < LHS::Record
|
140
|
-
endpoint 'http://datastore/contact_persons'
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
let(:location) { 'http://datastore/contact_persons/1' }
|
145
138
|
let(:created_at) { '2017-12-21' }
|
139
|
+
let(:location) { 'http://datastore/contact_persons/1' }
|
146
140
|
let(:name) { 'Sebastian' }
|
147
|
-
|
148
|
-
it 'Loads the data from the "Location" header after creation' do
|
141
|
+
let!(:create_contact_person_request) do
|
149
142
|
stub_request(:post, "http://datastore/contact_persons")
|
150
143
|
.to_return(status: 204, headers: { Location: location })
|
144
|
+
end
|
145
|
+
let!(:fetch_contact_person_request) do
|
151
146
|
stub_request(:get, "http://datastore/contact_persons/1")
|
152
147
|
.to_return(body: { href: location, name: name, created_at: created_at }.to_json)
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
148
|
+
end
|
149
|
+
|
150
|
+
context 'without `followlocation` option' do
|
151
|
+
before do
|
152
|
+
class ContactPerson < LHS::Record
|
153
|
+
endpoint 'http://datastore/contact_persons'
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
it 'loads the data from the "Location" header after creation' do
|
158
|
+
contact_person = ContactPerson.create!(name: name)
|
159
|
+
expect(create_contact_person_request).to have_been_made.once
|
160
|
+
expect(fetch_contact_person_request).to have_been_made.once
|
161
|
+
expect(contact_person.href).to eq location
|
162
|
+
expect(contact_person.created_at).to eq Date.parse(created_at)
|
163
|
+
expect(contact_person.name).to eq name
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
context 'when `followlocation` is set to `true`' do
|
168
|
+
before do
|
169
|
+
class ContactPerson < LHS::Record
|
170
|
+
endpoint 'http://datastore/contact_persons', followlocation: true
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
it 'loads the data from the "Location" header after creation' do
|
175
|
+
contact_person = ContactPerson.create!(name: name)
|
176
|
+
expect(create_contact_person_request).to have_been_made.once
|
177
|
+
expect(fetch_contact_person_request).to have_been_made.once
|
178
|
+
expect(contact_person.href).to eq location
|
179
|
+
expect(contact_person.created_at).to eq Date.parse(created_at)
|
180
|
+
expect(contact_person.name).to eq name
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
context 'when `followlocation` is set to `false`' do
|
185
|
+
before do
|
186
|
+
class ContactPerson < LHS::Record
|
187
|
+
endpoint 'http://datastore/contact_persons', followlocation: false
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
it 'does not load the data from the "Location" header after creation' do
|
192
|
+
contact_person = ContactPerson.create!(name: name)
|
193
|
+
expect(create_contact_person_request).to have_been_made.once
|
194
|
+
expect(fetch_contact_person_request).not_to have_been_made
|
195
|
+
expect(contact_person.name).to eq name
|
196
|
+
end
|
157
197
|
end
|
158
198
|
end
|
159
199
|
end
|
@@ -85,7 +85,7 @@ describe 'Request Cycle Cache', type: :request do
|
|
85
85
|
context 'headers' do
|
86
86
|
it 'considers the request headers when setting the cache key',
|
87
87
|
dummy_models: true, request_cycle_cache: true do
|
88
|
-
get '/request_cycle_cache/
|
88
|
+
get '/request_cycle_cache/different_headers'
|
89
89
|
expect(request).to have_been_made.times(2)
|
90
90
|
end
|
91
91
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 26.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhs/graphs/contributors
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: 12.1.1
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '
|
50
|
+
version: '16'
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: 12.1.1
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '16'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: local_uri
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,28 +241,18 @@ extensions: []
|
|
241
241
|
extra_rdoc_files: []
|
242
242
|
files:
|
243
243
|
- ".bundler-version"
|
244
|
+
- ".github/workflows/rubocop.yml"
|
245
|
+
- ".github/workflows/test-active-support-5.yml"
|
246
|
+
- ".github/workflows/test.yml"
|
244
247
|
- ".gitignore"
|
245
248
|
- ".rubocop.localch.yml"
|
246
249
|
- ".rubocop.yml"
|
247
250
|
- ".ruby-version"
|
248
251
|
- Gemfile
|
249
|
-
- Gemfile.activesupport4
|
250
252
|
- Gemfile.activesupport5
|
251
253
|
- LICENSE
|
252
254
|
- README.md
|
253
255
|
- Rakefile
|
254
|
-
- cider-ci.yml
|
255
|
-
- cider-ci/bin/bundle
|
256
|
-
- cider-ci/bin/ruby_install
|
257
|
-
- cider-ci/bin/ruby_version
|
258
|
-
- cider-ci/jobs/rspec-activesupport-4.yml
|
259
|
-
- cider-ci/jobs/rspec-activesupport-5.yml
|
260
|
-
- cider-ci/jobs/rspec-activesupport-latest.yml
|
261
|
-
- cider-ci/jobs/rubocop.yml
|
262
|
-
- cider-ci/task_components/bundle.yml
|
263
|
-
- cider-ci/task_components/rspec.yml
|
264
|
-
- cider-ci/task_components/rubocop.yml
|
265
|
-
- cider-ci/task_components/ruby.yml
|
266
256
|
- docs/accessing-data-in-lhs.png
|
267
257
|
- friday.yml
|
268
258
|
- lhs.gemspec
|
@@ -419,6 +409,7 @@ files:
|
|
419
409
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
420
410
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
421
411
|
- spec/dummy/config/initializers/inflections.rb
|
412
|
+
- spec/dummy/config/initializers/lhs.rb
|
422
413
|
- spec/dummy/config/initializers/mime_types.rb
|
423
414
|
- spec/dummy/config/initializers/rollbar.rb
|
424
415
|
- spec/dummy/config/initializers/session_store.rb
|
@@ -557,7 +548,7 @@ homepage: https://github.com/local-ch/lhs
|
|
557
548
|
licenses:
|
558
549
|
- GPL-3.0
|
559
550
|
metadata: {}
|
560
|
-
post_install_message:
|
551
|
+
post_install_message:
|
561
552
|
rdoc_options: []
|
562
553
|
require_paths:
|
563
554
|
- lib
|
@@ -573,8 +564,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
573
564
|
version: '0'
|
574
565
|
requirements:
|
575
566
|
- Ruby >= 2.3.0
|
576
|
-
rubygems_version: 3.
|
577
|
-
signing_key:
|
567
|
+
rubygems_version: 3.1.4
|
568
|
+
signing_key:
|
578
569
|
specification_version: 4
|
579
570
|
summary: 'REST services accelerator: Rails gem providing an easy, active-record-like
|
580
571
|
interface for http (hypermedia) json services'
|
@@ -652,6 +643,7 @@ test_files:
|
|
652
643
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
653
644
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
654
645
|
- spec/dummy/config/initializers/inflections.rb
|
646
|
+
- spec/dummy/config/initializers/lhs.rb
|
655
647
|
- spec/dummy/config/initializers/mime_types.rb
|
656
648
|
- spec/dummy/config/initializers/rollbar.rb
|
657
649
|
- spec/dummy/config/initializers/session_store.rb
|
data/Gemfile.activesupport4
DELETED
data/cider-ci/bin/bundle
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -eux
|
3
|
-
|
4
|
-
export PATH=~/.rubies/$RUBY/bin:$PATH
|
5
|
-
rm -f .bundle/config
|
6
|
-
|
7
|
-
if [ ! -f ~/.rubies/$RUBY/bin/bundle ]; then
|
8
|
-
gem install bundler
|
9
|
-
fi
|
10
|
-
|
11
|
-
# install bundler v. 1.17.3 in order to be able to run the tests with
|
12
|
-
# ACTIVESUPPORT=4 because rails (= 4.2.0) depends on bundler (< 2.0, >= 1.3.0)
|
13
|
-
gem install bundler:1.17.3
|
14
|
-
|
15
|
-
sed "s/^source 'https:\/\/rubygems\.intra\.local\.ch'*/source 'http\:\/\/52.29.7.59:9292'/g" Gemfile > Gemfile.tmp
|
16
|
-
mv Gemfile.tmp Gemfile
|
17
|
-
|
18
|
-
DIGEST=$(git ls-tree HEAD --\
|
19
|
-
cider-ci.yml cider-ci Gemfile.lock \
|
20
|
-
| openssl dgst -sha1 | cut -d ' ' -f 2)
|
21
|
-
|
22
|
-
if [ ! -z ${ACTIVESUPPORT:-} ]; then
|
23
|
-
DIGEST=$(echo "$DIGEST $ACTIVESUPPORT")
|
24
|
-
fi
|
25
|
-
|
26
|
-
DIGEST=$(echo "$DIGEST $PATH" \
|
27
|
-
| openssl dgst -sha1 | cut -d ' ' -f 2)
|
28
|
-
|
29
|
-
echo "DIGEST"
|
30
|
-
echo "${DIGEST}"
|
31
|
-
|
32
|
-
CACHE_SIGNATURE_FILE="/tmp/bundle_cache_signature_${DIGEST}"
|
33
|
-
|
34
|
-
if [ ! -f $CACHE_SIGNATURE_FILE ] ; then
|
35
|
-
if [ ! -z ${ACTIVESUPPORT:-} ]; then
|
36
|
-
if [ ! -z ${BUNDLER:-} ]; then
|
37
|
-
echo "BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle $BUNDLER install"
|
38
|
-
BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle $BUNDLER install
|
39
|
-
else
|
40
|
-
echo "BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle install"
|
41
|
-
BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle install
|
42
|
-
fi
|
43
|
-
else
|
44
|
-
echo "bundle install"
|
45
|
-
bundle $BUNDLER install
|
46
|
-
fi
|
47
|
-
touch $CACHE_SIGNATURE_FILE
|
48
|
-
fi
|
49
|
-
|
50
|
-
echo "bundle install"
|
51
|
-
bundle $BUNDLER install
|
data/cider-ci/bin/ruby_install
DELETED
data/cider-ci/bin/ruby_version
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -eux
|
3
|
-
|
4
|
-
if [ -f ./.ruby-version ]; then
|
5
|
-
echo ".ruby-version file found"
|
6
|
-
fi
|
7
|
-
|
8
|
-
if [ ! -f ./.ruby-version ]; then
|
9
|
-
echo ".ruby-version file not found"
|
10
|
-
exit 1
|
11
|
-
fi
|
12
|
-
|
13
|
-
IFS='-' read -ra EXPLODED_RUBY <<< "$RUBY"
|
14
|
-
|
15
|
-
if [ "${#EXPLODED_RUBY[@]}" == "1" ]; then
|
16
|
-
echo 'No engine/version separator "-" found in .ruby-version file.'
|
17
|
-
exit 1
|
18
|
-
fi
|
19
|
-
|
20
|
-
if [ "${#EXPLODED_RUBY[@]}" != "1" ] && [ "${#EXPLODED_RUBY[@]}" != "2" ]; then
|
21
|
-
echo "Unknown format of .ruby-version file"
|
22
|
-
exit 1
|
23
|
-
fi
|
24
|
-
|
25
|
-
echo $RUBY
|
@@ -1,27 +0,0 @@
|
|
1
|
-
rspec-active-support-v4:
|
2
|
-
name: 'rspec with ActiveSupport v4'
|
3
|
-
|
4
|
-
run_when:
|
5
|
-
'some HEAD has been updated':
|
6
|
-
type: branch
|
7
|
-
include_match: ^.*$
|
8
|
-
|
9
|
-
context:
|
10
|
-
|
11
|
-
script_defaults:
|
12
|
-
template_environment_variables: true
|
13
|
-
|
14
|
-
task_defaults:
|
15
|
-
environment_variables:
|
16
|
-
ACTIVESUPPORT: '4'
|
17
|
-
BUNDLER: '_1.17.3_'
|
18
|
-
max_trials: 2
|
19
|
-
dispatch_storm_delay_duration: 1 Seconds
|
20
|
-
include:
|
21
|
-
- cider-ci/task_components/ruby.yml
|
22
|
-
- cider-ci/task_components/bundle.yml
|
23
|
-
- cider-ci/task_components/rspec.yml
|
24
|
-
|
25
|
-
tasks:
|
26
|
-
all-rspec:
|
27
|
-
name: All rspec tests, using ActiveSupport v4
|
@@ -1,26 +0,0 @@
|
|
1
|
-
rspec-active-support-v5:
|
2
|
-
name: 'rspec with ActiveSupport v5'
|
3
|
-
|
4
|
-
run_when:
|
5
|
-
'some HEAD has been updated':
|
6
|
-
type: branch
|
7
|
-
include_match: ^.*$
|
8
|
-
|
9
|
-
context:
|
10
|
-
|
11
|
-
script_defaults:
|
12
|
-
template_environment_variables: true
|
13
|
-
|
14
|
-
task_defaults:
|
15
|
-
environment_variables:
|
16
|
-
ACTIVESUPPORT: '5'
|
17
|
-
max_trials: 2
|
18
|
-
dispatch_storm_delay_duration: 1 Seconds
|
19
|
-
include:
|
20
|
-
- cider-ci/task_components/ruby.yml
|
21
|
-
- cider-ci/task_components/bundle.yml
|
22
|
-
- cider-ci/task_components/rspec.yml
|
23
|
-
|
24
|
-
tasks:
|
25
|
-
all-rspec:
|
26
|
-
name: All rspec tests, using ActiveSupport v5
|
@@ -1,24 +0,0 @@
|
|
1
|
-
rspec-active-support-latest:
|
2
|
-
name: 'rspec with ActiveSupport latest'
|
3
|
-
|
4
|
-
run_when:
|
5
|
-
'some HEAD has been updated':
|
6
|
-
type: branch
|
7
|
-
include_match: ^.*$
|
8
|
-
|
9
|
-
context:
|
10
|
-
|
11
|
-
script_defaults:
|
12
|
-
template_environment_variables: true
|
13
|
-
|
14
|
-
task_defaults:
|
15
|
-
max_trials: 2
|
16
|
-
dispatch_storm_delay_duration: 1 Seconds
|
17
|
-
include:
|
18
|
-
- cider-ci/task_components/ruby.yml
|
19
|
-
- cider-ci/task_components/bundle.yml
|
20
|
-
- cider-ci/task_components/rspec.yml
|
21
|
-
|
22
|
-
tasks:
|
23
|
-
all-rspec:
|
24
|
-
name: All rspec tests, using ActiveSupport latest
|
data/cider-ci/jobs/rubocop.yml
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
rubocop:
|
2
|
-
name: 'Rubocop'
|
3
|
-
|
4
|
-
run_when:
|
5
|
-
'some HEAD has been updated':
|
6
|
-
type: branch
|
7
|
-
include_match: ^.*$
|
8
|
-
|
9
|
-
context:
|
10
|
-
|
11
|
-
tasks:
|
12
|
-
|
13
|
-
rubocop:
|
14
|
-
|
15
|
-
include:
|
16
|
-
- cider-ci/task_components/ruby.yml
|
17
|
-
- cider-ci/task_components/bundle.yml
|
18
|
-
- cider-ci/task_components/rubocop.yml
|
@@ -1,22 +0,0 @@
|
|
1
|
-
traits:
|
2
|
-
ruby-install: true
|
3
|
-
Bash: true
|
4
|
-
|
5
|
-
trial_attachments:
|
6
|
-
gemfile:
|
7
|
-
include_match: Gemfile
|
8
|
-
content_type: text/plain
|
9
|
-
|
10
|
-
environment_variables:
|
11
|
-
BUNDLER:
|
12
|
-
read_and_replace_with: .bundler-version
|
13
|
-
|
14
|
-
scripts:
|
15
|
-
|
16
|
-
bundle:
|
17
|
-
exclusive_executor_resource: ruby-install_{{$RUBY}}
|
18
|
-
timeout: 20 Minutes
|
19
|
-
body: cider-ci/bin/bundle
|
20
|
-
start_when:
|
21
|
-
'ruby installed':
|
22
|
-
script_key: ruby-install
|
@@ -1,37 +0,0 @@
|
|
1
|
-
ports:
|
2
|
-
CAPYBARA_PORT:
|
3
|
-
min: 8000
|
4
|
-
max: 8999
|
5
|
-
PHANTOMJS_PORT:
|
6
|
-
min: 44600
|
7
|
-
max: 44999
|
8
|
-
|
9
|
-
environment_variables:
|
10
|
-
RUBY:
|
11
|
-
read_and_replace_with: .ruby-version
|
12
|
-
BUNDLER:
|
13
|
-
read_and_replace_with: .bundler-version
|
14
|
-
|
15
|
-
scripts:
|
16
|
-
rspec:
|
17
|
-
body: |
|
18
|
-
#!/usr/bin/env bash
|
19
|
-
set -eux
|
20
|
-
mkdir -p tmp/cache
|
21
|
-
export PATH=~/.rubies/$RUBY/bin:$PATH
|
22
|
-
if [ ! -z ${ACTIVESUPPORT:-} ]; then BUNDLE_GEMFILE=Gemfile.activesupport$ACTIVESUPPORT bundle $BUNDLER exec rspec; else bundle exec rspec; fi
|
23
|
-
|
24
|
-
start_when:
|
25
|
-
'bundled':
|
26
|
-
script_key: bundle
|
27
|
-
|
28
|
-
trial_attachments:
|
29
|
-
logs:
|
30
|
-
include_match: log\/.*\.log$
|
31
|
-
content_type: text/plain
|
32
|
-
image-screenshots:
|
33
|
-
include_match: tmp\/capybara\/.*\.png$
|
34
|
-
content_type: image/png
|
35
|
-
html-screenshots:
|
36
|
-
include_match: tmp\/capybara\/.*\.html$
|
37
|
-
content_type: text/html
|
@@ -1,29 +0,0 @@
|
|
1
|
-
trial_attachments:
|
2
|
-
logs:
|
3
|
-
include_match: tmp\/checkstyle.json$
|
4
|
-
content_type: application/json
|
5
|
-
|
6
|
-
tree_attachments:
|
7
|
-
logs:
|
8
|
-
include_match: tmp\/checkstyle.json$
|
9
|
-
content_type: application/json
|
10
|
-
|
11
|
-
environment_variables:
|
12
|
-
RUBY:
|
13
|
-
read_and_replace_with: .ruby-version
|
14
|
-
RESULT_PATH: 'tmp/checkstyle.json'
|
15
|
-
|
16
|
-
max_trials: 1
|
17
|
-
|
18
|
-
scripts:
|
19
|
-
rubocop:
|
20
|
-
start_when:
|
21
|
-
'bundled':
|
22
|
-
script_key: bundle
|
23
|
-
body: |
|
24
|
-
#!/usr/bin/env bash
|
25
|
-
set -eux
|
26
|
-
mkdir -p tmp/cache
|
27
|
-
export PATH=~/.rubies/$RUBY/bin:$PATH
|
28
|
-
bundle exec rubocop --config .rubocop.yml \
|
29
|
-
--format json --out $RESULT_PATH --format progress
|
@@ -1,15 +0,0 @@
|
|
1
|
-
environment_variables:
|
2
|
-
RUBY:
|
3
|
-
read_and_replace_with: .ruby-version
|
4
|
-
|
5
|
-
scripts:
|
6
|
-
ruby-version:
|
7
|
-
body: cider-ci/bin/ruby_version
|
8
|
-
ruby-install:
|
9
|
-
exclusive_executor_resource: ruby-install_{{$RUBY}}
|
10
|
-
timeout: 20 Minutes
|
11
|
-
body: cider-ci/bin/ruby_install
|
12
|
-
start_when:
|
13
|
-
'ruby version checked':
|
14
|
-
script_key: ruby-version
|
15
|
-
|