Sha256: 07f2c4bbf4afb86ad5795104eabab0fdfa184ba3d112014e53c6f33799762a95

Contents?: true

Size: 825 Bytes

Versions: 11

Compression:

Stored size: 825 Bytes

Contents

module Jasmine
  module Dependencies

    class << self
      def rails3?
        rails? && Rails.version.to_i == 3
      end

      def rails4?
        rails? && Rails.version.to_i == 4
      end

      def rails5?
        rails? && Rails.version.to_i == 5
      end

      def rails?
        defined?(Rails) && Rails.respond_to?(:version)
      end

      def legacy_rack?
        !defined?(Rack::Server)
      end

      def use_asset_pipeline?
        assets_pipeline_available = (rails3? || rails4? || rails5?) && Rails.respond_to?(:application) && Rails.application.respond_to?(:assets)
        rails3_assets_enabled = rails3? && assets_pipeline_available && Rails.application.config.assets.enabled != false
        assets_pipeline_available && (rails4? || rails5? || rails3_assets_enabled)
      end
    end
  end
end

Version data entries

11 entries across 9 versions & 2 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/jasmine-2.6.0/lib/jasmine/dependencies.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/jasmine-2.5.2/lib/jasmine/dependencies.rb
tdiary-5.0.5 vendor/bundle/gems/jasmine-2.5.2/lib/jasmine/dependencies.rb
jasmine-2.6.0 lib/jasmine/dependencies.rb
tdiary-5.0.4 vendor/bundle/gems/jasmine-2.5.2/lib/jasmine/dependencies.rb
jasmine-2.5.2 lib/jasmine/dependencies.rb
tdiary-5.0.2 vendor/bundle/gems/jasmine-2.4.0/lib/jasmine/dependencies.rb
jasmine-2.5.1 lib/jasmine/dependencies.rb
jasmine-2.5.0 lib/jasmine/dependencies.rb
tdiary-5.0.1 vendor/bundle/gems/jasmine-2.4.0/lib/jasmine/dependencies.rb
jasmine-2.4.0 lib/jasmine/dependencies.rb