bin/ec in easycomments-1.0.1 vs bin/ec in easycomments-1.0.2
- old
+ new
@@ -3,11 +3,11 @@
require 'fileutils'
local_path = File.expand_path("../../", __FILE__)
users_path = Dir.pwd
-files = %w(ec.rb dashboard.rb config.ru _config.yml Rakefile Gemfile)
+files = %w(ec.rb dashboard.rb config.ru _config.yml Rakefile Gemfile README.md LICENSE)
def copy_files(local_path, users_path, files, dev=false)
files.each do |filename|
FileUtils.cp_r local_path + '/' + filename, users_path, :verbose => true
end
@@ -15,10 +15,13 @@
FileUtils.cp_r local_path + "/public", users_path, :verbose => true
FileUtils.cp_r local_path + "/views", users_path, :verbose => true
if dev
FileUtils.cp_r local_path + "/spec", users_path, :verbose => true
FileUtils.cp_r local_path + '/.rspec', users_path, :verbose => true
+ if ARGV[0] == 'install'
+ FileUtils.cp_r local_path + '/Gemfile.dev', users_path + "/Gemfile", :verbose => true
+ end
end
end
if ARGV[0] == 'install'
if ARGV[1] == '--dev'
@@ -34,12 +37,12 @@
copy_files(local_path, users_path, files, true)
else
copy_files(local_path, users_path, files)
end
puts "done!"
-end
-
-if ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].nil?
+elsif ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].nil?
puts 'ec install, copies all the required files in the current directory.'
puts 'ec update, same as install but skips _config.yml and Gemfile.'
puts 'pass the --dev flag to "ec install" or "ec update" to also copy the test suite.'
+else
+ puts "Uknown command : #{ARGV[0]}, see ec --help for available commands."
end
\ No newline at end of file