diff options
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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 |