diff --git a/examples/css3/bootstrap.rb b/examples/css3/bootstrap.rb new file mode 100644 index 00000000..f16a99aa --- /dev/null +++ b/examples/css3/bootstrap.rb @@ -0,0 +1,3 @@ +require File.join(File.dirname(__FILE__), '..', 'downloader') + +install_from_github('chriseppstein', 'compass-colors', 'compass-colors') diff --git a/examples/css3/clean.rb b/examples/css3/clean.rb new file mode 100644 index 00000000..3fdd688a --- /dev/null +++ b/examples/css3/clean.rb @@ -0,0 +1,2 @@ +require 'fileutils' +FileUtils.rm_rf "#{File.dirname(__FILE__)}/extensions/compass-colors" diff --git a/examples/downloader.rb b/examples/downloader.rb index 1bc37f9f..c735b87f 100644 --- a/examples/downloader.rb +++ b/examples/downloader.rb @@ -28,10 +28,10 @@ def install_from_github(user, project, ext_name, branch = "master", working_dire download_link = "http://github.com/#{user}/#{project}/zipball/#{branch}" extdir = File.join(working_directory,'extensions') - if !File.exists?(extdir) + if !File.exists?("#{extdir}/#{ext_name}") begin puts "Downloading the #{ext_name} plugin into #{extdir}." - FileUtils.mkdir(extdir) + FileUtils.mkdir_p("#{extdir}/#{ext_name}") zipfile = File.join(extdir, "#{ext_name}.zip") open(zipfile, "wb") do |tgz| tgz << fetch(download_link).body