aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 19c9cf37..60007fb3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -50,6 +50,29 @@ namespace :molinillo do
end
end
+namespace :thor do
+ task :namespace do
+ files = Dir.glob('lib/bundler/vendor/Thor*/**/*.rb')
+ sh "sed -i.bak 's/Thor/Bundler::Thor/g' #{files.join(' ')}"
+ sh "rm #{files.join('.bak ')}.bak"
+ end
+
+ task :clean do
+ files = Dir.glob('lib/bundler/vendor/Thor*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
+ puts files
+ sh "rm -r #{files.join(' ')}"
+ end
+
+ task :update, [:tag] => [] do |t, args|
+ tag = args[:tag]
+ Dir.chdir 'lib/bundler/vendor' do
+ `curl -L https://github.com/erikhuda/thor/archive/#{tag}.tar.gz | tar -xz`
+ end
+ Rake::Task['thor:namespace'].invoke
+ Rake::Task['thor:clean'].invoke
+ end
+end
+
namespace :spec do
desc "Ensure spec dependencies are installed"
task :deps do