Sha256: 9b95599658b8251c1835e09c86c1a3bba5e1ad92f9ef3e2384e78aa7d6ff32fc

Contents?: true

Size: 524 Bytes

Versions: 16

Compression:

Stored size: 524 Bytes

Contents

require "shakapacker/mtime_strategy"
require "shakapacker/digest_strategy"

module Shakapacker
  class CompilerStrategy
    def self.from_config
      strategy_from_config = Shakapacker.config.compiler_strategy

      case strategy_from_config
      when "mtime"
        Shakapacker::MtimeStrategy.new
      when "digest"
        Shakapacker::DigestStrategy.new
      else
        raise "Unknown strategy '#{strategy_from_config}'. " \
              "Available options are 'mtime' and 'digest'."
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
shakapacker-8.0.2 lib/shakapacker/compiler_strategy.rb
shakapacker-8.0.1 lib/shakapacker/compiler_strategy.rb
shakapacker-7.2.3 lib/shakapacker/compiler_strategy.rb
shakapacker-7.3.0.beta.1 lib/shakapacker/compiler_strategy.rb
shakapacker-7.2.2 lib/shakapacker/compiler_strategy.rb
shakapacker-7.2.1 lib/shakapacker/compiler_strategy.rb
shakapacker-7.2.0 lib/shakapacker/compiler_strategy.rb
shakapacker-7.2.0.rc.0 lib/shakapacker/compiler_strategy.rb
shakapacker-7.1.0 lib/shakapacker/compiler_strategy.rb
shakapacker-7.0.3 lib/shakapacker/compiler_strategy.rb
shakapacker-7.0.2 lib/shakapacker/compiler_strategy.rb
shakapacker-7.0.1 lib/shakapacker/compiler_strategy.rb
shakapacker-7.0.0 lib/shakapacker/compiler_strategy.rb
shakapacker-7.0.0.rc.2 lib/shakapacker/compiler_strategy.rb
shakapacker-7.0.0.rc.1 lib/shakapacker/compiler_strategy.rb
shakapacker-7.0.0.rc.0 lib/shakapacker/compiler_strategy.rb