Skip to content

Commit 4133c4e

Browse files
committed
Add 6.1 to circleci
1 parent f671218 commit 4133c4e

File tree

4 files changed

+48
-1
lines changed

4 files changed

+48
-1
lines changed

.circleci/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ jobs:
7070
- setup_remote_docker
7171
- run: docker-compose run --rm test-rails-6.0
7272

73+
test_rails_6_1:
74+
docker:
75+
- image: circleci/buildpack-deps
76+
working_directory: ~/project/meta_request
77+
steps:
78+
- checkout:
79+
path: ~/project
80+
- setup_remote_docker
81+
- run: docker-compose run --rm test-rails-6.1
82+
7383
workflows:
7484
version: 2
7585
test_all:
@@ -81,3 +91,4 @@ workflows:
8191
- test_rails_5_1
8292
- test_rails_5_2
8393
- test_rails_6_0
94+
- test_rails_6_1

meta_request/Dockerfile-rails-6.1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM ruby:2.6-alpine
2+
3+
RUN apk add --update --no-cache \
4+
build-base curl-dev git sqlite-dev \
5+
yaml-dev zlib-dev nodejs yarn tzdata
6+
7+
RUN mkdir /app /gem
8+
WORKDIR /app
9+
10+
RUN gem install rails -v 6.1.0
11+
RUN rails new .
12+
13+
RUN bundle install
14+
15+
COPY . /gem
16+
17+
RUN gem build /gem/meta_request.gemspec
18+
RUN gem install /gem/meta_request-*.gem
19+
RUN bundle add meta_request
20+
RUN bundle install --local
21+
22+
COPY res/routes.rb /app/config/
23+
COPY res/dummy_controller.rb /app/app/controllers/
24+
COPY res/dummy /app/app/views/dummy
25+
COPY res/meta_request_test.rb /app/test/integration/
26+
27+
RUN bundle exec rails db:migrate
28+
29+
ENV PARALLEL_WORKERS 1
30+
31+
CMD ["bin/rake"]

meta_request/docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ services:
2525
build:
2626
context: .
2727
dockerfile: Dockerfile-rails-6.0
28+
test-rails-6.1:
29+
build:
30+
context: .
31+
dockerfile: Dockerfile-rails-6.1

meta_request/lib/meta_request/event.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def json_encodable(payload)
5656

5757
def not_encodable?(value)
5858
(defined?(ActiveRecord) && value.is_a?(ActiveRecord::ConnectionAdapters::AbstractAdapter)) ||
59-
(defined?(ActionDispatch) && (value.is_a?(ActionDispatch::Request)) || value.is_a?(ActionDispatch::Response))
59+
(defined?(ActionDispatch) &&
60+
(value.is_a?(ActionDispatch::Request) || value.is_a?(ActionDispatch::Response)))
6061
end
6162

6263
# https://gist.github.com/dbenhur/1070399

0 commit comments

Comments
 (0)