Skip to content

Commit fadea58

Browse files
author
Mattia Roccoberton
authored
Merge pull request #10 from blocknotes/minor-internal-changes
Set minimum Ruby version to 2.6 + minor internal changes
2 parents 534f724 + 5f677df commit fadea58

13 files changed

+99
-41
lines changed

.rubocop.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,9 @@ AllCops:
1818
- vendor/**/*
1919
NewCops: enable
2020

21-
Gemspec/RequiredRubyVersion:
22-
Enabled: false
23-
24-
Naming/FileName:
25-
Enabled: false
26-
27-
Layout/LineLength:
28-
Enabled: true
29-
Max: 120
21+
Style/OpenStructUse:
22+
Enabled: false # TODO: fix me
3023

3124
RSpec/ExampleLength:
32-
Max: 8
33-
34-
RSpec/MultipleExpectations:
35-
Max: 5
36-
37-
Style/HashEachMethods:
38-
Enabled: true
39-
40-
Style/HashTransformKeys:
41-
Enabled: true
42-
43-
Style/HashTransformValues:
44-
Enabled: true
25+
# default 5
26+
Max: 10

activeadmin_active_resource.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Gem::Specification.new do |spec|
2121
spec.files = Dir['{lib}/**/*', 'LICENSE.txt', 'Rakefile', 'README.md']
2222
spec.require_paths = ['lib']
2323

24+
spec.required_ruby_version = '>= 2.6.0'
25+
2426
spec.add_runtime_dependency 'activeadmin', '~> 2.0'
2527
spec.add_runtime_dependency 'activeresource', '>= 5.1'
2628

extra/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
COMPOSE_PROJECT_NAME=activeadmin_active_resource

extra/Dockerfile_26

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ruby:2.6-alpine
2+
3+
RUN apk add --no-cache --update build-base dpkg gcompat sqlite sqlite-dev tzdata
4+
RUN gem install bundler
5+
6+
# App setup
7+
WORKDIR /usr/src/app
8+
COPY .. .

extra/Dockerfile_27

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ruby:2.7-alpine
2+
3+
RUN apk add --no-cache --update build-base dpkg gcompat sqlite sqlite-dev tzdata
4+
5+
# App setup
6+
WORKDIR /usr/src/app
7+
COPY .. .

extra/Dockerfile_30

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ruby:3.0-alpine
2+
3+
RUN apk add --no-cache --update build-base dpkg gcompat sqlite sqlite-dev tzdata
4+
5+
# App setup
6+
WORKDIR /usr/src/app
7+
COPY .. .

extra/docker-compose.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
version: "3.3"
3+
4+
x-defaults:
5+
test_app: &test_app
6+
command:
7+
- |
8+
bundle install --gemfile=gemfiles/rails$${RAILS}_activeadmin_activeresource.gemfile
9+
bin/appraisal rails$${RAILS}-activeadmin-activeresource rspec
10+
entrypoint: ["/bin/sh", "-c"]
11+
volumes:
12+
- ..:/usr/src/app:delegated
13+
14+
services:
15+
tests_26:
16+
<<: *test_app
17+
build:
18+
context: ..
19+
dockerfile: extra/Dockerfile_26
20+
environment:
21+
RAILS: 61
22+
23+
tests_27:
24+
<<: *test_app
25+
build:
26+
context: ..
27+
dockerfile: extra/Dockerfile_27
28+
environment:
29+
RAILS: 61
30+
31+
tests_30:
32+
<<: *test_app
33+
build:
34+
context: ..
35+
dockerfile: extra/Dockerfile_30
36+
environment:
37+
RAILS: 61

gemfiles/rails61_activeadmin_activeresource.gemfile.lock

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,14 @@ GEM
158158
matrix (0.4.2)
159159
method_source (1.0.0)
160160
mini_mime (1.1.2)
161+
mini_portile2 (2.8.0)
161162
minitest (5.15.0)
162163
nio4r (2.5.8)
164+
nokogiri (1.13.3)
165+
mini_portile2 (~> 2.8.0)
166+
racc (~> 1.4)
167+
nokogiri (1.13.3-aarch64-linux)
168+
racc (~> 1.4)
163169
nokogiri (1.13.3-x86_64-darwin)
164170
racc (~> 1.4)
165171
nokogiri (1.13.3-x86_64-linux)
@@ -294,6 +300,8 @@ GEM
294300
zeitwerk (2.5.4)
295301

296302
PLATFORMS
303+
aarch64-linux
304+
ruby
297305
x86_64-darwin-21
298306
x86_64-linux
299307

@@ -321,4 +329,4 @@ DEPENDENCIES
321329
webmock
322330

323331
BUNDLED WITH
324-
2.2.33
332+
2.3.8

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
config.filter_run focus: true
66
config.filter_run_excluding changes_filesystem: true
77
config.run_all_when_everything_filtered = true
8-
config.color = true
8+
99
config.order = :random
1010
config.example_status_persistence_file_path = '.rspec_failures'
1111
config.shared_context_metadata_behavior = :apply_to_host_groups

spec/support/output.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
RSpec.configure do |config|
4+
config.color = true
5+
config.tty = true
6+
end

0 commit comments

Comments
 (0)