Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- 3.2
- 3.1
rails:
- 8.1
- 8.0
- 7.2
include:
Expand All @@ -39,6 +40,7 @@ jobs:
- { ruby: '2.4', rails: '5' }
exclude:
- { ruby: '3.1', rails: '8.0' }
- { ruby: '3.1', rails: '8.1' }

env:
RAILS_VERSION: "${{ matrix.rails }}"
Expand All @@ -59,12 +61,8 @@ jobs:
rubygems: latest
bundler-cache: true

- name: RSpec & publish code coverage
uses: paambaati/codeclimate-action@v8
env:
CC_TEST_REPORTER_ID: b7ba588af2a540fa96c267b3655a2afe31ea29976dc25905a668dd28d5e88915
with:
coverageCommand: bin/rake
- name: RSpec
run: bin/rake
continue-on-error: ${{ matrix.allow-fail }}
id: test

Expand Down
11 changes: 9 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ else
gem 'rails', "~> #{rails_version}.0"
end

# FIXME: Remove the later condition after `mongoid` supports Rails 8.1
gem 'mongoid' unless
rails_version == 'edge'
rails_version == 'edge' || rails_version == '8.1'
gem 'active_model_serializers'

case RUBY_VERSION
Expand All @@ -49,4 +50,10 @@ end

if RUBY_VERSION < "3.0.0"
gem "concurrent-ruby", "< 1.3.5"
end
end

# FIXME: Use releases gems after they support Rails 8.1
if rails_version.to_s >= '8.1'
gem 'rspec-activerecord-expectations', github: 'y-yagi/rspec-activerecord-expectations', branch: 'support_rails81'
gem 'mongoid', github: 'mongodb/mongoid', ref: 'eac49f0'
end
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Draper: View Models for Rails

[![Actions Status](https://github.com/drapergem/draper/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/drapergem/draper/actions?query=workflow%3Aci+branch%3Amaster)
[![Code Climate](https://codeclimate.com/github/drapergem/draper.svg)](https://codeclimate.com/github/drapergem/draper)
[![Test Coverage](https://api.codeclimate.com/v1/badges/0d40c43951d516bf6985/test_coverage)](https://codeclimate.com/github/drapergem/draper/test_coverage)
[![Inline docs](http://inch-ci.org/github/drapergem/draper.svg?branch=master)](http://inch-ci.org/github/drapergem/draper)

Draper adds an object-oriented layer of presentation logic to your Rails
Expand Down
7 changes: 6 additions & 1 deletion lib/draper/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ def initialize_view_context
Draper::ViewContext.build
end

console { initialize_view_context }
console do
initialize_view_context
if ActiveSupport.gem_version >= Gem::Version.new('8.1.0')
ActiveSupport::ExecutionContext.nestable = false
end
end

runner { initialize_view_context }

Expand Down
Loading