Sha256: 390784573f45f1a3fce52a92ddb6e84f8951c4143b6a698118c1824838f90984

Contents?: true

Size: 565 Bytes

Versions: 6

Compression:

Stored size: 565 Bytes

Contents

module Jasmine
  module Dependencies

    class << self
      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 use_asset_pipeline?
        assets_pipeline_available = (rails4? || rails5?) && Rails.respond_to?(:application) && Rails.application.respond_to?(:assets) && !Rails.application.assets.nil?
        assets_pipeline_available && (rails4? || rails5?)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jasmine-3.5.0 lib/jasmine/dependencies.rb
jasmine-3.4.0 lib/jasmine/dependencies.rb
jasmine-3.3.0 lib/jasmine/dependencies.rb
jasmine-3.2.0 lib/jasmine/dependencies.rb
jasmine-3.1.0 lib/jasmine/dependencies.rb
jasmine-3.0.0 lib/jasmine/dependencies.rb