Permalink
Browse files

Merge branch 'master' of github.com:Tapjoy/wheeler_board

  • Loading branch information...
2 parents 25e048c + ff63eac commit e91131d8d15e4509390b82b32d365a645bece60a @dickeyxxx committed May 9, 2012
View
@@ -13,3 +13,5 @@
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
+/public/uploads
+/config/dev.yml
View
@@ -30,9 +30,11 @@ end
group :test do
gem 'pry-rails'
+ gem 'sqlite3'
end
group :development do
gem 'heroku'
+ gem 'sqlite3'
end
View
@@ -175,6 +175,7 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.6)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
@@ -226,6 +227,7 @@ DEPENDENCIES
rmagick
sass-rails (~> 3.2.3)
simple_form
+ sqlite3
thin
tinder (~> 1.8)
uglifier (>= 1.0.3)
View
@@ -1,2 +1,41 @@
-WheelerBoard
-============
+#WheelerBoard
+
+## Setting up Google API
+1) Apply for [**Google API Access**](https://code.google.com/apis/console/b/0/)
+
+![google api access](http://i.imgur.com/nsMMw.jpg)
+
+2) Point your redirect URL to some fake domain, and don't forget to set up the port numbers, if applicable.
+
+![fake domain](http://i.imgur.com/S8oxx.jpg)
+
+## Setting up the Environment
+1) In order to test locally, put `wheeler.com` (or whatever domain you chose in the previous step) in your `etc/hosts` file:
+
+```
+127.0.0.1 wheeler.com
+```
+
+2) copy over the default yaml file and edit:
+
+```
+$ cp ./config/dev-defaults.yml ./config/dev.yml
+$ vi ./config/dev.yml
+```
+
+3) Replace the Google credentials with yours from previous steps.
+
+4) If you haven't already done this, run `bundle install` and create your database:
+
+```
+$ bundle install
+$ rake db:create
+$ rake db:migrate
+```
+
+## Starting the server
+Be sure to start the rails server with the correct port number from above.
+
+```
+$ rails s -p 3003
+```
@@ -4,9 +4,9 @@ class HomeController < ApplicationController
def index
return render :logged_out unless employee_signed_in?
return redirect_to edit_employee_profile_path unless current_employee.profile
- @current_wheeler = Wheeler.order('created_at desc, created_at desc').first
+ @current_wheeler = Wheeler.order('created_at desc').first
return redirect_to new_wheeler_path unless @current_wheeler
@max_wheeler = Wheeler.order('uptime desc').first
- @wheelers = Wheeler.order('created_at desc, created_at desc').page params[:page]
+ @wheelers = Wheeler.order('created_at desc').page params[:page]
end
end
View
@@ -1,14 +1,12 @@
-development:
- adapter: postgresql
- database: wheeler_board
+development: &default
+ adapter: sqlite3
+ database: db/wheeler_board_development.sqlite3
pool: 5
timeout: 5000
-test:
- adapter: postgresql
- database: wheeler_board_test
- pool: 5
- timeout: 5000
+test: &test
+ <<: *default
+ database: db/wheeler_board_test.sqlite3
production:
adapter: postgresql
View
@@ -0,0 +1,5 @@
+aws_key: AKIAJ7DKVQDPY55BZSHQ
+aws_secret: JsqCPV3LDiUxzvLUw3IFNIDUYRb4vT1LsF+qwUKa
+aws_bucket: wheeler_dev
+google_key: replace this
+google_secret: replace this
@@ -34,4 +34,11 @@
# Expands the lines which load the assets
config.assets.debug = true
+
+ dev = YAML::load_file("#{Rails.root}/config/dev.yml")
+ ENV['AWS_ACCESS_KEY_ID'] = dev['aws_key']
+ ENV['AWS_SECRET_ACCESS_KEY'] = dev['aws_secret']
+ ENV['AWS_BUCKET'] = dev['aws_bucket']
+ ENV['GOOGLE_KEY'] = dev['google_key']
+ ENV['GOOGLE_SECRET'] = dev['google_secret']
end
@@ -0,0 +1,5 @@
+class AddIndexToWheelers < ActiveRecord::Migration
+ def change
+ add_index :wheelers, :created_at
+ end
+end
View
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120504002612) do
+ActiveRecord::Schema.define(:version => 20120508171007) do
create_table "employees", :force => true do |t|
t.string "email", :default => "", :null => false
@@ -52,4 +52,7 @@
t.integer "uptime"
end
+ add_index "wheelers", ["created_at"], :name => "index_wheelers_on_created_at"
+ add_index "wheelers", ["uptime"], :name => "index_wheelers_on_uptime"
+
end

0 comments on commit e91131d

Please sign in to comment.