Skip to content

Instantly share code, notes, and snippets.

@pierrevalade
Created November 3, 2012 13:40
Show Gist options
  • Save pierrevalade/4007411 to your computer and use it in GitHub Desktop.
Save pierrevalade/4007411 to your computer and use it in GitHub Desktop.
# make a new app with foursquare inside
run "rm public/index.html"
require 'rubygems'
require 'active_support'
# gem('launchy')
# require 'launchy'
app_name = File.basename(Dir.getwd).to_s.parameterize
puts "your app's name: #{app_name}"
puts "Download / welcome page url: http://#{app_name}.herokuapp.com"
puts "Callback url: http://#{app_name}.herokuapp.com/clients/foursquare/callback"
puts "Push url: https://#{app_name}.herokuapp.com/checkins"
# Launchy.open("https://foursquare.com/developers/register")
yes?("please register your app #{app_name} on https://foursquare.com/developers/register")
client_id = ask("what is your client_id (https://foursquare.com/oauth) ?")
client_secret = ask("what is your client_secret?")
gem('foursquare_rails_generators')
run "bundle install"
generate('foursquare:authentication', "client_id:#{client_id} client_secret:#{client_secret}")
generate('foursquare:push')
run "git init ."
run "git add ."
run "git commit -m 'initial commit'"
run "heroku apps:create #{app_name}"
run "git push heroku master"
run "heroku run rake db:migrate"
run "heroku open"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment