Sha256: 855968b288531bee21b6a6282e5dfe2f85822e63816e6ade37ac3a20701be1e2
Contents?: true
Size: 453 Bytes
Versions: 1
Compression:
Stored size: 453 Bytes
Contents
require "rake" require_relative "parser" namespace :vendorise do desc "Installs a gem from the specified url to /vendor/gems" task :gem, :url do |t, args| url = Vendorise::Parser.gem_url(args[:url]) or raise "Please specify a valid url for the gem" path = "vendor/gems/#{Vendorise::Parser.gem_name(args[:url])}" cmd = Dir.exist?(path) ? "pull" : "add" system("git subtree #{cmd} --prefix #{path} #{url} master --squash") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vendorise-0.1.1 | lib/vendorise/tasks.rb |