Permalink
Browse files

[#35] Improve instructions

  • Loading branch information...
1 parent b66b162 commit 99870382ebf7a48d3f517e60affe91abd137ba18 @croaky croaky committed Mar 16, 2012
Showing with 29 additions and 15 deletions.
  1. +13 −10 README.md
  2. +1 −1 lib/tasks/copycopter.rake
  3. +15 −4 lib/wood_hick.rb
View
@@ -21,13 +21,21 @@ Setup
bundle
bundle exec rake setup
-Creating a Project
-------------------
+Deploy
+------
- rake copycopter:create_project NAME=Crowdtap USERNAME=Constantine PASSWORD=Mavromoustakos
+Deploy Copycopter Server like any other Rails app. Heroku example:
-Development
------------
+ heroku create --stack cedar
+ git push heroku master
+ heroku run rake db:migrate
+ heroku restart
+ heroku run rake copycopter:project NAME=Iora USERNAME=Copy PASSWORD=Copter
+
+Contribute
+----------
+
+See the [style guide](https://github.com/copycopter/style-guide).
Run the test suite:
@@ -42,11 +50,6 @@ Automatically regenerate CSS when you edit Sass files:
sass --watch public/stylesheets/sass:public/stylesheets \
-r ./public/stylesheets/sass/bourbon/lib/bourbon.rb
-Contributing
-------------
-
-See the [style guide](https://github.com/copycopter/style-guide).
-
Credits
-------
@@ -3,7 +3,7 @@ namespace :copycopter do
Project.regenerate_caches
end
- task :create_project => :environment do
+ task :project => :environment do
project = Project.new(:name => ENV['NAME'], :password => ENV['PASSWORD'], :username => ENV['USERNAME'])
if project.save
View
@@ -1,9 +1,18 @@
class WoodHick < ActiveSupport::LogSubscriber
def process_action(event)
payload = event.payload
- log payload[:status] if payload[:status]
- log payload[:exception].join('\n') if payload[:exception]
- log payload[:path] if payload[:path]
+
+ if payload[:status]
+ log payload[:status]
+ end
+
+ if payload[:exception]
+ log payload[:exception].join('\n')
+ end
+
+ if payload[:path]
+ log payload[:path]
+ end
end
def log(message)
@@ -15,4 +24,6 @@ def logger
end
end
-WoodHick.attach_to :action_controller if ENV['DEBUG']
+if ENV['DEBUG']
+ WoodHick.attach_to :action_controller
+end

0 comments on commit 9987038

Please sign in to comment.