From 91205d6a580580ab2d713b7b89785cd88a657ff2 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 26 Jun 2013 23:58:45 -0700 Subject: [PATCH] Move tasks out of lib/ to avoid namespace pollution Issue #566 --- Rakefile | 2 +- {lib/tasks => tasks}/corpus.rake | 2 +- {lib/tasks => tasks}/ragel.rake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename {lib/tasks => tasks}/corpus.rake (97%) rename {lib/tasks => tasks}/ragel.rake (96%) diff --git a/Rakefile b/Rakefile index 8c6e7b082..ca55be212 100644 --- a/Rakefile +++ b/Rakefile @@ -18,4 +18,4 @@ RSpec::Core::RakeTask.new(:spec) do |t| end # load custom rake tasks -Dir["#{File.dirname(__FILE__)}/lib/tasks/**/*.rake"].sort.each { |ext| load ext } +Dir["#{File.dirname(__FILE__)}/tasks/**/*.rake"].sort.each { |ext| load ext } diff --git a/lib/tasks/corpus.rake b/tasks/corpus.rake similarity index 97% rename from lib/tasks/corpus.rake rename to tasks/corpus.rake index 7a8b41808..39f80dfda 100644 --- a/lib/tasks/corpus.rake +++ b/tasks/corpus.rake @@ -1,7 +1,7 @@ namespace :corpus do task :load_mail do - require File.expand_path('../../../spec/environment') + require File.expand_path('../../spec/environment', __FILE__) require 'mail' end diff --git a/lib/tasks/ragel.rake b/tasks/ragel.rake similarity index 96% rename from lib/tasks/ragel.rake rename to tasks/ragel.rake index 9c8b4bdf0..23f21ee08 100644 --- a/lib/tasks/ragel.rake +++ b/tasks/ragel.rake @@ -1,6 +1,6 @@ require 'erb' -MAIL_ROOT = File.expand_path("../../..", __FILE__) +MAIL_ROOT = File.expand_path("../..", __FILE__) require "#{MAIL_ROOT}/lib/mail/parsers/ragel/parser_info" namespace :ragel do