lib/vendorificator/cli.rb in vendorificator-0.1.0 vs lib/vendorificator/cli.rb in vendorificator-0.1.1
- old
+ new
@@ -31,12 +31,14 @@
end
end
end
desc :sync, "Download new or updated vendor files"
+ method_option :update, :type => :boolean, :default => false
def sync
ensure_clean_repo!
+ conf[:use_upstream_version] = options[:update]
Vendorificator::Config.each_module(*modules) do |mod|
say_status :module, mod.name
begin
shell.padding += 1
mod.run!
@@ -45,12 +47,14 @@
end
end
end
desc "status", "List known vendor modules and their status"
+ method_option :update, :type => :boolean, :default => false
def status
say_status 'WARNING', 'Git repository is not clean', :red unless repo.clean?
+ conf[:use_upstream_version] = options[:update]
Vendorificator::Config.each_module(*modules) do |mod|
status_line = mod.to_s
updatable = mod.updatable?
if updatable
@@ -134,27 +138,27 @@
def pry
require 'pry'
binding.pry
end
- def self.start
+ def self.start(*args)
# Make --git-options always quoted
if i = ARGV.index('--git-options')
ARGV[i+1,0] = '--'
end
if ENV['FIXTURES_DIR']
require 'vcr'
VCR.configure do |c|
- c.cassette_library_dir = File.join(ENV['FIXTURES_DIR'], 'vcr_cassettes')
+ c.cassette_library_dir = File.join(ENV['FIXTURES_DIR'], 'vcr')
c.default_cassette_options = { :record => :new_episodes }
- c.hook_into :fakeweb
+ c.hook_into :webmock
end
VCR.use_cassette(ENV['VCR_CASSETTE'] || 'vendorificator') do
- super
+ super(*args)
end
else
- super
+ super(*args)
end
end
private