Skip to content

Commit

Permalink
fix db config
Browse files Browse the repository at this point in the history
  • Loading branch information
xdite committed Oct 11, 2012
1 parent 5ae2104 commit 618179d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,5 @@
0.0.8 (Oct 12, 2012)
* fix db config replace problem
0.0.7 (Oct 10, 2012)
* fix typo, add more guides
0.0.6 (Oct 10, 2012)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -70,7 +70,7 @@ If you have problems, please create a [Github issue](https://github.com/xdite/bo

Bootstrappers is maintained and funded by [@xdite](http://github.com/xdite)

some codes of bootstrappers were borrowed from [suspenders](https://github.com/thoughtbot/suspenders)
some codes of bootstrappers were borrowed from [suspenders](https://github.com/thoughtbot/suspendersus)


License
Expand Down
7 changes: 3 additions & 4 deletions lib/bootstrappers/app_builder.rb
Expand Up @@ -72,11 +72,10 @@ def use_mysql_config_template
template 'mysql_database.yml.erb', 'config/database.yml.example', :force => true

db_user_name = ask("What is your local database user name? [root]")
db_user_name = "root" if db_user_name.blank?
db_password = ask("What is your local database password? ['']")
db_password = "''" if db_password.blank?
replace_in_file 'config/database.yml', 'username: root', "username: #{db_user_name}"
replace_in_file 'config/database.yml', 'password: ""', "password: '#{db_password}'"

replace_in_file 'config/database.yml', 'username: root', "username: #{db_user_name}" if db_user_name.present?
replace_in_file 'config/database.yml', 'password: ""', "password: '#{db_password}'" if db_password.present?


end
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrappers/version.rb
@@ -1,3 +1,3 @@
module Bootstrappers
VERSION = "0.0.7"
VERSION = "0.0.8"
end
6 changes: 3 additions & 3 deletions templates/common/_menu.html.erb
Expand Up @@ -16,9 +16,9 @@
<div class="nav-collapse">

<%= render_list :class => "nav" do |li|
li << link_to("Link-1","Link-1")
li << link_to("Link-2","Link-2")
li << link_to("Link-3","Link-3")
li << link_to("Link-1","#")
li << link_to("Link-2","#")
li << link_to("Link-3","#")
end %>
<%= render :partial => "common/user_nav"%>
Expand Down

0 comments on commit 618179d

Please sign in to comment.