lib/generators/chaltron/install_generator.rb in chaltron-2.0.1 vs lib/generators/chaltron/install_generator.rb in chaltron-2.0.2
- old
+ new
@@ -20,11 +20,11 @@
gem 'omniauth'
gem 'omniauth-rails_csrf_protection'
gem 'gitlab_omniauth-ldap'
gem 'cancancan'
- gem 'bootstrap'
+ gem 'bootstrap', '~> 4.6'
gem 'autoprefixer-rails'
gem 'font-awesome-sass'
gem 'jquery-rails'
gem 'jquery-datatables'
@@ -34,10 +34,20 @@
gem 'nprogress-rails'
gem 'simple-navigation'
gem 'rails-i18n'
end
+ def gem_priority
+ # chaltron gem must be loaded after devise to setup the correct view paths
+ chaltron = File.readlines('Gemfile')
+ .select { |l| l.match('chaltron') }
+ .first
+
+ gsub_file 'Gemfile', chaltron, ''
+ append_file 'Gemfile', "\n#{chaltron}"
+ end
+
def db_migrations
rake 'chaltron_engine:install:migrations'
end
def db_seed
@@ -122,13 +132,9 @@
copy_file 'config/initializers/chaltron.rb'
end
def setup_authorization
copy_file 'app/models/ability.rb'
- end
-
- def setup_ajax_datatables
- copy_file 'config/initializers/ajax_datatables_rails.rb'
end
private
def print_banner