Module: Getme
- Extended by:
- Getme
- Included in:
- Getme
- Defined in:
- lib/getme.rb,
lib/getme/vendors.rb,
lib/getme/version.rb,
lib/getme/utilities.rb,
lib/getme/exceptions.rb
Defined Under Namespace
Classes: Utilities, WgetOrCurlNotAvailableError
Constant Summary collapse
- Vendors =
{ # JavaScripts files: { angular: 'http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.js', angular_min: 'http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js', jQuery: 'http://code.jquery.com/jquery.js', jQuery_min: 'http://code.jquery.com/jquery.min.js', jQuery_Google: 'http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js', jQuery_min_Google: 'http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js', chrome_frame: 'http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js', highlight: 'http://yandex.st/highlightjs/7.3/highlight.min.js', modernizr: 'http://modernizr.com/downloads/modernizr-latest.js', # CSS normalize: 'https://raw.github.com/necolas/normalize.css/master/normalize.css', reset: 'http://meyerweb.com/eric/tools/css/reset/reset.css' }, zips: { twitter_bootstrap: 'https://github.com/twitter/bootstrap/archive/master.zip', html5_boilerplate: 'https://github.com/h5bp/html5-boilerplate/archive/master.zip' } }
- VERSION =
"0.0.2"
Instance Method Summary collapse
Instance Method Details
#the(what = nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/getme.rb', line 10 def the(what=nil) return "What do you want me to download for you?" if what.nil? what = what.to_sym type ||= if Getme::Vendors[:files].has_key? what :files elsif Getme::Vendors[:zips].has_key? what :zips else :not_available end return "Did not find a candidate of #{what}, typo?" if type == :not_available unless Getme::Vendors[type][what].nil? util = Utilities.new util.cmd(util.downloader, Getme::Vendors[type][what]) return 'success!' end end |