lib/classiccms/cli.rb in classiccms-0.4.2 vs lib/classiccms/cli.rb in classiccms-0.5.0
- old
+ new
@@ -27,14 +27,13 @@
mongoid = File.read(File.join(Dir.pwd, app_name, 'config/mongoid.yml')).gsub('$', app_name)
File.open(File.join(Dir.pwd, app_name, 'config/mongoid.yml'), 'w') do |f|
f.puts mongoid
end
- #replace database name
- redis = File.read(File.join(Dir.pwd, app_name, 'config/redis.yml')).gsub('$', app_name)
- File.open(File.join(Dir.pwd, app_name, 'config/redis.yml'), 'w') do |f|
- f.puts redis
- end
+ gemfile = File.join(Dir.pwd, app_name, 'Gemfile')
+ gemfile_text = File.read(gemfile)
+ gemfile_text = gemfile_text.gsub(/VERSION/, VERSION)
+ File.open(gemfile, "w") {|file| file.puts gemfile_text}
puts "#{app_name} created!"
end
end
def self.server