Sha256: 024bc7e809d7ff0c1731d7954025fd01e8b243d78f5347fd6445b8e387a03745
Contents?: true
Size: 1.13 KB
Versions: 3
Compression:
Stored size: 1.13 KB
Contents
#!/usr/bin/env ruby # encoding: UTF-8 require 'optparse' $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) options = {} parser = OptionParser.new do |opts| opts.banner = <<BANNER Vendorer keeps your vendor files up to date. Usage: Create a Vendorfile in your project root with: file 'public/javascripts/jquery.min.js' => 'http://code.jquery.com/jquery-latest.min.js' folder 'vendor/plugins/parallel_tests' => 'https://github.com/grosser/parallel_tests.git' Run `vendorer init` to create Vendorfile. Run `vendorer` to install. Run `vendorer update` to update. Options: BANNER opts.on("-v", "--version", "Show Version"){ require 'vendorer/version' puts Vendorer::VERSION exit } opts.on("-h", "--help", "Show this.") { puts opts; exit } end parser.parse! require 'vendorer' v = Vendorer.new(:update => (ARGV[1] || true if ARGV[0] == 'update'), :init => (true if ARGV[0] == 'init')) v.init and exit if ARGV[0] == 'init' config_locations = ['Vendorfile.rb', 'Vendorfile'] config_location = config_locations.detect { |f| File.exist?(f) } || config_locations.last v.parse(File.read(config_location))
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vendorer-0.2.0 | bin/vendorer |
vendorer-0.1.16 | bin/vendorer |
vendorer-0.1.15 | bin/vendorer |