Allow same app key in multi environments. #67

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

bongole commented Aug 28, 2012

Allow below situations:

app = Rapns::App.new
app.key = "my_app"
app.certificate = File.read("/path/to/development.pem")
app.environment = "development"
app.password = "certificate password"
app.connections = 1
app.save!

app = Rapns::App.new
app.key = "my_app" # use same app key in production.
app.certificate = File.read("/path/to/production.pem")
app.environment = "production"
app.password = "certificate password"
app.connections = 1
app.save!

This pull request passes (merged a394f1d into 626d31f).

Owner

ileitch commented Aug 28, 2012

This will cause problems as the AppRunner is keyed off the app: https://github.com/ileitch/rapns/blob/master/lib/rapns/daemon/app_runner.rb#L28

Contributor

bongole commented Aug 29, 2012

Oh... It's little bit difficult to fix all app key related code. So, I close this pull request.

bongole closed this Aug 29, 2012

Owner

ileitch commented Sep 3, 2012

This will be possible in 3.0, which I hope to release soon.

dysto93 commented Dec 20, 2012

what should i change about this :
app.certificate = File.read("/path/to/development.pem")

when i type the same , it show error :
Errno::ENOENT: No such file or directory - /path/to/development.pem
from (irb):10:in read' from (irb):10 from /home/gunarto/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.9/lib/rails/commands/console.rb:47:instart'
from /home/gunarto/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.9/lib/rails/commands/console.rb:8:in start' from /home/gunarto/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.9/lib/rails/commands.rb:41:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in

'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment