Sha256: e1b21f4e3b4cd1665904fd1569728bd8c368e964e664a86766fe97c43f600e9c

Contents?: true

Size: 871 Bytes

Versions: 2

Compression:

Stored size: 871 Bytes

Contents

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

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

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zenbox-0.0.3 generators/contextify/templates/contextify_tasks.rake
zenbox-0.0.2 generators/contextify/templates/contextify_tasks.rake