Sha256: 00d97d26c7319a1c8badee87ec79f532c7fc104e09532c3c88520b516c366295

Contents?: true

Size: 627 Bytes

Versions: 8

Compression:

Stored size: 627 Bytes

Contents

binstubs_template_path = File.expand_path("../../install/binstubs.rb", __dir__).freeze
bin_path = ENV["BUNDLE_BIN"] || Rails.root.join("bin")

namespace :shakapacker do
  desc "Installs Shakapacker binstubs in this application"
  task binstubs: [:check_node, :check_manager] do |task|
    prefix = task.name.split(/#|shakapacker:binstubs/).first

    if Rails::VERSION::MAJOR >= 5
      exec "#{RbConfig.ruby} '#{bin_path}/rails' #{prefix}app:template LOCATION='#{binstubs_template_path}'"
    else
      exec "#{RbConfig.ruby} '#{bin_path}/rake' #{prefix}rails:template LOCATION='#{binstubs_template_path}'"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shakapacker-8.0.2 lib/tasks/shakapacker/binstubs.rake
shakapacker-8.0.1 lib/tasks/shakapacker/binstubs.rake
shakapacker-7.2.3 lib/tasks/shakapacker/binstubs.rake
shakapacker-7.3.0.beta.1 lib/tasks/shakapacker/binstubs.rake
shakapacker-7.2.2 lib/tasks/shakapacker/binstubs.rake
shakapacker-7.2.1 lib/tasks/shakapacker/binstubs.rake
shakapacker-7.2.0 lib/tasks/shakapacker/binstubs.rake
shakapacker-7.2.0.rc.0 lib/tasks/shakapacker/binstubs.rake