Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
Added: heroku-deploy button
Browse files Browse the repository at this point in the history
  • Loading branch information
mallowlabs committed Aug 18, 2014
1 parent 87dc1fb commit 0aa01d8
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
AsakusaSatellite
===================

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

[![Build Status](https://secure.travis-ci.org/codefirst/AsakusaSatellite.png?branch=master)](http://travis-ci.org/codefirst/AsakusaSatellite) [![Code Climate](https://codeclimate.com/github/codefirst/AsakusaSatellite.png)](https://codeclimate.com/github/codefirst/AsakusaSatellite) [![Coverage Status](https://coveralls.io/repos/codefirst/AsakusaSatellite/badge.png?branch=master)](https://coveralls.io/r/codefirst/AsakusaSatellite) [![wercker status](https://app.wercker.com/status/b901326474567a915d89a93aed4b1ad5/s/ "wercker status")](https://app.wercker.com/project/bykey/b901326474567a915d89a93aed4b1ad5)

Overview
Expand Down
25 changes: 25 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "asakusa-satellite",
"description": "A realtime chat application for developers",
"repository": "https://github.com/codefirst/AsakusaSatellite/",
"logo": "https://raw.githubusercontent.com/codefirst/AsakusaSatellite/master/app/assets/images/logo.png",
"env": {
"FILTER_NAME": {
"description": "Filter file name",
"value": "filter"
},
"MESSAGE_PUSHER_ENGINE": {
"description": "Message pusher type",
"value": "pusher"
},
"QUOTEIT_URL": {
"description": "QuoteIt URL",
"value": "https://quoteit.herokuapp.com"
}
},
"addons": [
"pusher",
"mongohq"
]
}

6 changes: 3 additions & 3 deletions config/message_pusher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ default: <%= ENV['MESSAGE_PUSHER_ENGINE'] || 'socky' %>

engines:
pusher:
app_id: <%= ENV['MESSAGE_PUSHER_PUSHER_APP_ID'] || 'your_app_id' %>
key: <%= ENV['MESSAGE_PUSHER_PUSHER_KEY'] || 'your_key' %>
secret: <%= ENV['MESSAGE_PUSHER_PUSHER_SECRET'] || 'your_secret' %>
app_id: <%= ENV['MESSAGE_PUSHER_PUSHER_APP_ID'] %>
key: <%= ENV['MESSAGE_PUSHER_PUSHER_KEY'] %>
secret: <%= ENV['MESSAGE_PUSHER_PUSHER_SECRET'] %>
keima:
url: <%= ENV['MESSAGE_PUSHER_KEIMA_URL'] || 'http://localhost:3001' %>
key: <%= ENV['MESSAGE_PUSHER_KEIMA_KEY'] || '4e7c45a1a2cb660517000001' %>
Expand Down
3 changes: 3 additions & 0 deletions config/mongoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ test:
database: asakusa_satellite_test

production:
# if uri is available, uri has priority
uri: <%= ENV['MONGODB_URI'] || ENV['MONGOHQ_URL'] || ENV['MONGOLAB_URI'] %>
# if uri is not available, use below configuration
host: <%= ENV['MONGODB_HOST'] || 'localhost' %>
port: <%= ENV['MONGODB_PORT'] || 27017 %>
database: <%= ENV['MONGODB_DATABASE'] || 'asakusa_satellite_production' %>
Expand Down
10 changes: 6 additions & 4 deletions lib/asakusa_satellite/message_pusher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ class Pusher < Engine
secrets :secret
def initialize(opt)
super(opt)
::Pusher.app_id = opt['app_id']
::Pusher.key = opt['key']
::Pusher.secret = opt['secret']
unless ENV['PUSHER_URL']
::Pusher.app_id = opt['app_id']
::Pusher.key = opt['key']
::Pusher.secret = opt['secret']
end
end

def trigger(channel, event, data)
Expand All @@ -51,7 +53,7 @@ def jsFiles
end

def jsClass
key = @opt['key']
key = @opt['key'] || URI.parse(ENV['PUSHER_URL']).user
"new Pusher('#{key}')"
end
end
Expand Down

0 comments on commit 0aa01d8

Please sign in to comment.