Skip to content

Commit

Permalink
Merge pull request #43 from openstax/wait-for-load
Browse files Browse the repository at this point in the history
Don't autoload ActionController::Base (wait for Rails to load)
  • Loading branch information
Dantemss authored Jan 7, 2025
2 parents 5b9df5b + 0d23718 commit 257c86d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ jobs:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
bundler: latest
bundler-cache: true
ruby-version: 3.1
- name: Setup
run: bundle exec rake --trace db:create db:schema:load db:seed
- name: Test
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# FinePrint

[![Gem Version](https://badge.fury.io/rb/fine_print.svg)](http://badge.fury.io/rb/fine_print)
[![Build Status](https://travis-ci.org/lml/fine_print.svg?branch=master)](https://travis-ci.org/lml/fine_print)
[![Coverage Status](https://coveralls.io/repos/lml/fine_print/badge.svg)](https://coveralls.io/r/lml/fine_print)
[![Tests](https://github.com/lml/fine_print/workflows/Tests/badge.svg)](https://github.com/lml/fine_print/actions?query=workflow:Tests)
[![Code Climate](https://codeclimate.com/github/lml/fine_print/badges/gpa.svg)](https://codeclimate.com/github/lml/fine_print)

FinePrint is a Rails engine in gem form that makes managing web site agreements
Expand Down
3 changes: 1 addition & 2 deletions fine_print.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ Gem::Specification.new do |s|
s.add_dependency 'action_interceptor'
s.add_dependency 'responders'

s.add_development_dependency 'sqlite3'
s.add_development_dependency 'sqlite3', '~> 1.4'
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'factory_bot_rails'
s.add_development_dependency 'rails-controller-testing'
s.add_development_dependency 'faker'
s.add_development_dependency 'coveralls'
end
4 changes: 3 additions & 1 deletion lib/fine_print/action_controller/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,6 @@ def fine_print_skip(*names)
end
end

::ActionController::Base.send :include, FinePrint::ActionController::Base
ActiveSupport.on_load(:action_controller_base) do
::ActionController::Base.send :include, FinePrint::ActionController::Base
end
2 changes: 1 addition & 1 deletion lib/fine_print/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module FinePrint
VERSION = '6.0.1'
VERSION = '6.0.2'
end
3 changes: 0 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
ENV['RAILS_ENV'] ||= 'test'

require 'coveralls'
Coveralls.wear!('rails')

require File.expand_path('../dummy/config/environment.rb', __FILE__)
require 'rspec/rails'
require 'factory_bot_rails'
Expand Down

0 comments on commit 257c86d

Please sign in to comment.