bin/plezi in plezi-0.9.0 vs bin/plezi in plezi-0.9.1
- old
+ new
@@ -67,11 +67,13 @@
app_tree["environment.rb"] ||= IO.read ::File.expand_path(File.join("..", "..", "resources" ,"environment.rb"), __FILE__)
app_tree["routes.rb"] ||= IO.read ::File.expand_path(File.join("..", "..", "resources" ,"routes.rb"), __FILE__)
app_tree["rakefile"] ||= IO.read ::File.expand_path(File.join("..", "..", "resources" ,"rakefile"), __FILE__)
app_tree["Procfile"] ||= ""
app_tree["Procfile"] << "\nweb: bundle exec ./#{ARGV[1]} -p $PORT\n"
- app_tree["Gemfile"] ||= IO.read ::File.expand_path(File.join("..", "..", "resources" ,"Gemfile"), __FILE__)
+ app_tree["Gemfile"] ||= ''
+ app_tree["Gemfile"] << "source 'https://rubygems.org'\n\n####################\n# core gems\n\n# include the basic plezi framework and server\ngem 'plezi', '~> #{Plezi::VERSION}'\n"
+ app_tree["Gemfile"] << IO.read( ::File.expand_path(File.join("..", "..", "resources" ,"Gemfile"), __FILE__))
# set up config files
app_tree["config"] ||= {}
app_tree["config"]["oauth.rb"] ||= IO.read(::File.expand_path(File.join("..", "..", "resources" ,"oauth_config.rb"), __FILE__))
app_tree["config"]["db_active_record.rb"] ||= IO.read(::File.expand_path(File.join("..", "..", "resources" ,"db_ac_config.rb"), __FILE__))
@@ -215,9 +217,10 @@
# require 'optparser'
if ARGV[0] == 'new' || ARGV[0] == 'n' || ARGV[0] == "force"
#########
## set up building environment
+ require 'plezi/version'
BUILDING_PLEZI_TEMPLATE = true
ARGV[1] = ARGV[1].gsub /[^a-zA-Z0-9]/, '_'
if Dir.exists?(ARGV[1]) && ARGV[0] != "force"
puts ""
puts "WARNING: app/folder alread exists, use `plezi fource #{ARGV[1]}` to attempt rebuild (no files will be overwritten).".red