Sha256: b9ec579cb8fba117620dcf75ef7dcfa0d3f83471db078b3b02a74da41cb0a31b

Contents?: true

Size: 877 Bytes

Versions: 2

Compression:

Stored size: 877 Bytes

Contents

# Don't load anything when running the gems:* tasks.
# Otherwise, projectlocker-pulse will be considered a framework gem.
# https://thoughtbot.lighthouseapp.com/projects/14221/tickets/629
unless ARGV.any? {|a| a =~ /^gems/}

  Dir[File.join(Rails.root, 'vendor', 'gems', 'projectlocker-pulse-*')].each do |vendored_notifier|
    $: << File.join(vendored_notifier, 'lib')
  end

  begin
    require 'pulse/tasks'
  rescue LoadError => exception
    namespace :pulse do
      %w(deploy test log_stdout).each do |task_name|
        desc "Missing dependency for pulse:#{task_name}"
        task task_name do
          $stderr.puts "Failed to run pulse:#{task_name} because of missing dependency."
          $stderr.puts "You probably need to run `rake gems:install` to install the projectlocker-pulse gem"
          abort exception.inspect
        end
      end
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
projectlocker_pulse-1.0.0 generators/pulse/templates/pulse_tasks.rake
projectlocker_pulse-0.2.1 generators/pulse/templates/pulse_tasks.rake