Skip to content

Commit

Permalink
Attempt rails 6 w/ zeitwerk
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgal authored and indirect committed Apr 20, 2020
1 parent 23e8f8c commit e27d816
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 25 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions lib/milia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require File.dirname(__FILE__) + '/milia/password_generator'
require File.dirname(__FILE__) + '/milia/invite_member'

require File.dirname(__FILE__) + '/milia/railtie' if defined?(Rails::Railtie)
require File.dirname(__FILE__) + '/milia/engine' if defined?(Rails::Engine)

module Milia

Expand Down Expand Up @@ -67,9 +67,9 @@ def self.whitelist_coupon_params()
mattr_accessor :trace_on
@@trace_on = false

# Default way to setup milia.
# Default way to setup milia.
def self.setup
yield self
end

end # module Milia
20 changes: 20 additions & 0 deletions lib/milia/engine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require 'milia'

module Milia
class Engine < Rails::Engine
initializer 'milia.include' do

ActiveSupport.on_load(:active_record) do
include Milia::Base
end

ActiveSupport.on_load(:action_controller_base) do
include Milia::Control
end
end

rake_tasks do
load 'milia/tasks.rb'
end
end
end
21 changes: 0 additions & 21 deletions lib/milia/railtie.rb

This file was deleted.

2 changes: 1 addition & 1 deletion milia.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.platform = Gem::Platform::RUBY
spec.require_paths = ['lib']

spec.add_runtime_dependency 'rails', '~> 5.0'
spec.add_runtime_dependency 'rails', '>= 5.0'
spec.add_runtime_dependency 'devise', '~> 4.2'

spec.add_development_dependency "bundler", "~> 1.7"
Expand Down

0 comments on commit e27d816

Please sign in to comment.