Module: Jasmine::Dependencies
- Defined in:
- lib/jasmine/dependencies.rb
Class Method Summary collapse
- .legacy_rack? ⇒ Boolean
- .legacy_rails? ⇒ Boolean
- .rails2? ⇒ Boolean
- .rails3? ⇒ Boolean
- .rails_3_asset_pipeline? ⇒ Boolean
- .rspec2? ⇒ Boolean
Class Method Details
.legacy_rack? ⇒ Boolean
21 22 23 |
# File 'lib/jasmine/dependencies.rb', line 21 def legacy_rack? !defined?(Rack::Server) end |
.legacy_rails? ⇒ Boolean
13 14 15 |
# File 'lib/jasmine/dependencies.rb', line 13 def legacy_rails? safe_gem_check("rails", "< 2.3.11") && running_legacy_rails? end |
.rails2? ⇒ Boolean
9 10 11 |
# File 'lib/jasmine/dependencies.rb', line 9 def rails2? safe_gem_check("rails", "~> 2.3") && running_rails2? end |
.rails3? ⇒ Boolean
17 18 19 |
# File 'lib/jasmine/dependencies.rb', line 17 def rails3? safe_gem_check("rails", ">= 3.0") && running_rails3? end |
.rails_3_asset_pipeline? ⇒ Boolean
25 26 27 |
# File 'lib/jasmine/dependencies.rb', line 25 def rails_3_asset_pipeline? rails3? && Rails.respond_to?(:application) && Rails.application.respond_to?(:assets) && Rails.application.assets end |
.rspec2? ⇒ Boolean
5 6 7 |
# File 'lib/jasmine/dependencies.rb', line 5 def rspec2? safe_gem_check("rspec", ">= 2.0") end |