GitHub PullRequestReviewCommentEvent at 2014-04-13 13:17:04
Repository: lead_magnet_landing_page
Actor: houndci
Payload: {"comment":{"url":"https://api.github.com/repos/joshteng/lead_magnet_landing_page/pulls/comments/11564827","id":11564827,"diff_hunk":"@@ -0,0 +1,183 @@\n+# STEP 1: mina setup\n+# STEP 2: mina create:db\n+# STEP 3: mina deploy\n+# STEP 4: mina start:all\n+\n+\n+require 'mina/bundler'\n+require 'mina/rails'\n+require 'mina/git'\n+require 'mina/rbenv'  # for rbenv support\n+\n+\n+set :domain, 'lead_magnet.growthautomator.com'\n+set :deploy_to, '/home/deploy/apps' #should already exists\n+set :repository, 'git@github.com:joshteng/lead_magnet_landing_page.git'\n+set :branch, 'deploy-with-mina'\n+set :app_name, 'lead_magnet'\n+set :test_log, \"log/capistrano.test.log\"\n+\n+# Manually create these paths in shared/ (eg: shared/config/database.yml) in your server.\n+# They will be linked in the 'deploy:link_shared_paths' step.\n+set :shared_paths, ['config/database.yml', 'config/application.yml', 'log']\n+\n+set :user, 'deploy'    # Username in the server to SSH to.\n+#   set :port, '30000'     # SSH port number.\n+\n+RYAML = <<-BASH\n+function ryaml {\n+  ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' \"$@\"\n+};\n+BASH\n+\n+task :environment do\n+  invoke :'rbenv:load'\n+end\n+\n+task :restart do\n+  queue 'sudo service nginx restart'\n+  queue 'sudo service postgresql restart'\n+  queue \"sudo service unicorn_#{app_name} restart\"\n+end\n+\n+desc \"Populate database.yml\"\n+task :'setup:db:database_yml' => :environment do\n+  puts \"Enter a user for the new database\"\n+  db_username = STDIN.gets.chomp\n+  puts \"Enter a password for the new database\"\n+  db_pass = STDIN.gets.chomp\n+  # Virtual Host configuration file\n+  database_yml =\n+    \"production:\\n  adapter: postgresql\\n  encoding: unicode \\n  database: #{app_name}_production\\n  username: #{db_username}\\n  password: #{db_pass}\\n  host: localhost\\n  pool: 5\\n\"\n+\n+  puts database_yml\n+  queue! %{\n+    echo \"-----> Populating database.yml\"\n+    echo \"#{database_yml}\" > #{deploy_to}/shared/config/database.yml\n+    echo \"-----> Done\"\n+  }\n+end\n+\n+desc \"Populate application.yml\"\n+task :'setup:application_yml' => :environment do\n+  puts \"Paste how your application.yml file should be like. Type `END` and hit return once your done.\"\n+  $/ = \"END\"\n+  application_yml = STDIN.gets\n+  application_yml.chomp!(\"END\")\n+  queue! %{\n+    echo \"-----> Populating application.yml\"\n+    echo \"#{application_yml}\" > #{deploy_to}/shared/config/application.yml\n+    echo \"-----> Done\"\n+  }\n+end\n+\n+task :setup => :environment do\n+  queue! %[mkdir -p \"#{deploy_to}/shared/log\"]\n+  queue! %[chmod g+rx,u+rwx \"#{deploy_to}/shared/log\"]\n+\n+  queue! %[mkdir -p \"#{deploy_to}/shared/config\"]\n+  queue! %[chmod g+rx,u+rwx \"#{deploy_to}/shared/config\"]\n+\n+  invoke :'setup:db:database_yml'","path":"config/deploy.rb","position":81,"original_position":81,"commit_id":"390a7f2044fbe625faebac15423e3e77397c1e1a","original_commit_id":"390a7f2044fbe625faebac15423e3e77397c1e1a","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?","gravatar_id":"38d9cefd9971a05bf447f07c6cd332cc","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Use snake_case for symbols.","created_at":"2014-04-13T13:17:04Z","updated_at":"2014-04-13T13:17:04Z","html_url":"https://github.com/joshteng/lead_magnet_landing_page/pull/4#discussion_r11564827","pull_request_url":"https://api.github.com/repos/joshteng/lead_magnet_landing_page/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/joshteng/lead_magnet_landing_page/pulls/comments/11564827"},"html":{"href":"https://github.com/joshteng/lead_magnet_landing_page/pull/4#discussion_r11564827"},"pull_request":{"href":"https://api.github.com/repos/joshteng/lead_magnet_landing_page/pulls/4"}}}}