Module: ActiveAdmin::DependencyChecker
- Defined in:
- lib/active_admin/dependency_checker.rb
Class Method Summary collapse
- .check! ⇒ Object
- .meta_search_1_1? ⇒ Boolean
- .pry_rails_before_0_1_6? ⇒ Boolean
- .rails_3_1? ⇒ Boolean
- .sass_rails_3_1? ⇒ Boolean
Class Method Details
.check! ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/active_admin/dependency_checker.rb', line 6 def check! if rails_3_1? unless && sass_rails_3_1? warn "ActiveAdmin requires meta_search >= 1.1.0.pre and sass-rails ~> 3.1.0.rc to work with rails >= 3.1.0" end end if pry_rails_before_0_1_6? warn "ActiveAdmin is not compatible with pry-rails < 0.1.6. Please upgrade pry-rails." end end |
.meta_search_1_1? ⇒ Boolean
22 23 24 |
# File 'lib/active_admin/dependency_checker.rb', line 22 def Gem.loaded_specs['meta_search'].version.to_s >= "1.1" end |
.pry_rails_before_0_1_6? ⇒ Boolean
33 34 35 36 37 38 39 |
# File 'lib/active_admin/dependency_checker.rb', line 33 def pry_rails_before_0_1_6? begin PryRails::VERSION < "0.1.6" rescue NameError false end end |
.rails_3_1? ⇒ Boolean
18 19 20 |
# File 'lib/active_admin/dependency_checker.rb', line 18 def rails_3_1? Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR >= 1 end |
.sass_rails_3_1? ⇒ Boolean
26 27 28 29 30 31 |
# File 'lib/active_admin/dependency_checker.rb', line 26 def sass_rails_3_1? require 'sass/rails/version' ::Sass::Rails::VERSION >= "3.1" rescue LoadError false end |