Sha256: f5612280f136ec6e7c69495b3a7bc309ec426af77e159396cd5dbb1ce422d1a4

Contents?: true

Size: 940 Bytes

Versions: 4

Compression:

Stored size: 940 Bytes

Contents

# Don't load anything when running the gems:* tasks.
# Otherwise, projectlocker_errata 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_errata-*')].each do |vendored_notifier|
    $: << File.join(vendored_notifier, 'lib')
  end

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

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
projectlocker_errata-0.1.1 generators/projectlocker_errata/templates/projectlocker_errata_tasks.rake
projectlocker_errata-0.1.0 generators/projectlocker_errata/templates/projectlocker_errata_tasks.rake
projectlocker_errata-0.0.2 generators/projectlocker_errata/templates/projectlocker_errata_tasks.rake
projectlocker_errata-0.0.1 generators/projectlocker_errata/templates/projectlocker_errata_tasks.rake