Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 6 suppport #21

Merged
merged 3 commits into from
Oct 2, 2023
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
13 changes: 10 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in pageflow-vr.gemspec
gemspec

group :development, :test do
# Help Bundler resolve dependencies
gem 'rails', '~> 5.2.0'
if ENV['PAGEFLOW_DEPENDENCIES'] == 'experimental'
git 'https://github.com/codevise/pageflow', branch: 'edge', glob: '**/*.gemspec' do
gem 'pageflow'
gem 'pageflow-support'
end
else
group :development, :test do
# Help Bundler resolve dependencies
gem 'rails', '~> 5.2.0'
end
end
1 change: 1 addition & 0 deletions lib/pageflow-vr.rb → lib/pageflow/vr.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'pageflow/vr/engine'
require 'pageflow/vr/version'

module Pageflow
module Vr
Expand Down
17 changes: 16 additions & 1 deletion lib/pageflow/vr/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,22 @@ module Vr
class Engine < Rails::Engine
isolate_namespace Pageflow::Vr

config.autoload_paths << File.join(config.root, 'lib')
if Rails.respond_to?(:autoloaders)
lib = root.join('lib')

config.autoload_paths << lib
config.eager_load_paths << lib

initializer 'pageflow_vr.autoloading' do
Rails.autoloaders.main.ignore(
lib.join('pageflow/vr/version.rb'),
lib.join('generators')
)
end
else
config.autoload_paths << File.join(config.root, 'lib')
end

config.i18n.load_path += Dir[config.root.join('config', 'locales', '**', '*.yml').to_s]

initializer "pageflow-vr.add_watchable_files", group: :all do |app|
Expand Down
10 changes: 8 additions & 2 deletions pageflow-vr.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@ Gem::Specification.new do |spec|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.require_paths = ['lib']

spec.required_ruby_version = '~> 2.1'
spec.required_ruby_version = '>= 2.1'

spec.add_dependency 'pageflow', ['>= 12.0', '< 17']
spec.add_dependency 'pageflow-public-i18n', '~> 1.10'

spec.add_development_dependency 'bundler', ['>= 1.12', '< 3']
spec.add_development_dependency 'pageflow-support', ['>= 14', '< 17']
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rspec-rails', '~> 3.0'

if ENV['PAGEFLOW_DEPENDENCIES'] == 'experimental'
spec.add_development_dependency 'rspec-rails', '~> 6.0'
else
spec.add_development_dependency 'rspec-rails', '~> 3.0'
end

spec.add_development_dependency 'semmy', '~> 1.0'
end
Loading