Skip to content

Commit

Permalink
Add 6.1 to circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
alpaca-tc committed Dec 31, 2020
1 parent f671218 commit 4133c4e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ jobs:
- setup_remote_docker
- run: docker-compose run --rm test-rails-6.0

test_rails_6_1:
docker:
- image: circleci/buildpack-deps
working_directory: ~/project/meta_request
steps:
- checkout:
path: ~/project
- setup_remote_docker
- run: docker-compose run --rm test-rails-6.1

workflows:
version: 2
test_all:
Expand All @@ -81,3 +91,4 @@ workflows:
- test_rails_5_1
- test_rails_5_2
- test_rails_6_0
- test_rails_6_1
31 changes: 31 additions & 0 deletions meta_request/Dockerfile-rails-6.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ruby:2.6-alpine

RUN apk add --update --no-cache \
build-base curl-dev git sqlite-dev \
yaml-dev zlib-dev nodejs yarn tzdata

RUN mkdir /app /gem
WORKDIR /app

RUN gem install rails -v 6.1.0
RUN rails new .

RUN bundle install

COPY . /gem

RUN gem build /gem/meta_request.gemspec
RUN gem install /gem/meta_request-*.gem
RUN bundle add meta_request
RUN bundle install --local

COPY res/routes.rb /app/config/
COPY res/dummy_controller.rb /app/app/controllers/
COPY res/dummy /app/app/views/dummy
COPY res/meta_request_test.rb /app/test/integration/

RUN bundle exec rails db:migrate

ENV PARALLEL_WORKERS 1

CMD ["bin/rake"]
4 changes: 4 additions & 0 deletions meta_request/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ services:
build:
context: .
dockerfile: Dockerfile-rails-6.0
test-rails-6.1:
build:
context: .
dockerfile: Dockerfile-rails-6.1
3 changes: 2 additions & 1 deletion meta_request/lib/meta_request/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def json_encodable(payload)

def not_encodable?(value)
(defined?(ActiveRecord) && value.is_a?(ActiveRecord::ConnectionAdapters::AbstractAdapter)) ||
(defined?(ActionDispatch) && (value.is_a?(ActionDispatch::Request)) || value.is_a?(ActionDispatch::Response))
(defined?(ActionDispatch) &&
(value.is_a?(ActionDispatch::Request) || value.is_a?(ActionDispatch::Response)))
end

# https://gist.github.com/dbenhur/1070399
Expand Down

0 comments on commit 4133c4e

Please sign in to comment.