Permalink
Browse files

Set Heroku remotes without using concat_file

* Fix #227
* Fix space between git host and git repo name.
  • Loading branch information...
1 parent 3486273 commit 4daae93356774f326a313eab195e949b7940a8a5 @croaky croaky committed Nov 25, 2013
Showing with 8 additions and 11 deletions.
  1. +0 −5 lib/suspenders/actions.rb
  2. +8 −6 lib/suspenders/app_builder.rb
@@ -1,10 +1,5 @@
module Suspenders
module Actions
- def concat_file(source, destination)
- contents = IO.read(find_in_source_paths(source))
- append_file destination, contents
- end
-
def replace_in_file(relative_path, find, replace)
path = File.join(destination_root, relative_path)
contents = IO.read(path)
@@ -229,12 +229,14 @@ def create_heroku_apps
end
def set_heroku_remotes
- concat_file(
- 'templates/bin_setup',
- "# Set up staging and production git remotes\r
- git remote add staging git@heroku.com: #{app_name}-staging.git\r
- git remote add production git@heroku.com: #{app_name}-production.git"
- )
+ remotes = <<-RUBY
+
+# Set up staging and production git remotes
+git remote add staging git@heroku.com:#{app_name}-staging.git
+git remote add production git@heroku.com:#{app_name}-production.git
+ RUBY
+
+ append_file 'bin/setup', remotes
end
def create_github_repo(repo_name)

0 comments on commit 4daae93

Please sign in to comment.