lib/oak.rb in oak-0.0.2 vs lib/oak.rb in oak-0.0.3
- old
+ new
@@ -60,11 +60,11 @@
end
end
def dummy_config
File.open('config/config.example.yml', 'w') do |f|
- f.write "secret_token = 'c1cae0f52a3ef8efa369a127c63bd6ede539a4089fd952b33199100a6769c8455ab4969f2eefaf1ebcbe0208bd57531204c77f41f715207f961e7e45f139f4e7'"
+ f.write "secret_token: 'c1cae0f52a3ef8efa369a127c63bd6ede539a4089fd952b33199100a6769c8455ab4969f2eefaf1ebcbe0208bd57531204c77f41f715207f961e7e45f139f4e7'"
end
prepend_to_file 'config/application.rb', "require 'yaml'\nAPP_CONFIG = YAML.load(File.read(File.expand_path('../config.yml', __FILE__)))\n"
# simply copy database.yml to database.example.yml
File.open('config/database.example.yml', 'w') do |f|
@@ -84,10 +84,10 @@
`git checkout -b deploy`
end
def create_config_on_deploy
File.open('config/config.yml', 'w') do |f|
- f.write 'secret_token = ' + secret_token
+ f.write 'secret_token: \'' + secret_token + '\''
end
# remove 'config/config.yml' from .gitignore on deploy branch
ignored = File.binread('.gitignore')
ignored.gsub! /config\/config.yml/, ''