Created
December 9, 2009 18:11
-
-
Save evanworley/252643 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ $# -lt 2 ]; then | |
echo "Usage testFastPath.sh CONSUMER_KEY CONSUMER_SECRET" | |
exit | |
fi | |
# Create a fresh rails project | |
rails testFastPath | |
cd testFastPath | |
# Get the fastpath ruby library | |
wget http://getsatisfaction.com/fastpass/ruby.tar.gz | |
tar xvf ruby.tar.gz | |
mv ruby/fastpass.rb lib | |
# Clean up | |
rm -rf ruby | |
rm ruby.tar.gz | |
# Install OAuth | |
sudo gem install oauth | |
# Create the fastpath initializer | |
echo "require 'fastpass'" > config/initializers/fastpath.rb | |
echo "CONSUMER_KEY = \"$1\"" >> config/initializers/fastpath.rb | |
echo "CONSUMER_SECRET = \"$2\"" >> config/initializers/fastpath.rb | |
# Create a view which makes the fastpath script request | |
rm public/index.html | |
script/generate controller root | |
echo "Making a request for the fastpath script.." > app/views/root/index.html.erb | |
echo "<%= FastPass.script(CONSUMER_KEY, CONSUMER_SECRET, 'fake@email.org', 'username', 1) %>" >> app/views/root/index.html.erb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment