rack-payment 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/rack-payment/request.rb +3 -4
  2. metadata +1 -1
@@ -59,6 +59,7 @@ module Rack #:nodoc:
59
59
  end
60
60
 
61
61
  def session
62
+ raise "Rack env['#{rack_session_variable}'] is nil. Has a Rack::Session middleware be enabled?" if env[rack_session_variable].nil?
62
63
  env[rack_session_variable][session_variable] ||= {}
63
64
  end
64
65
 
@@ -194,9 +195,7 @@ module Rack #:nodoc:
194
195
  new_env.delete 'action_controller.rescue.response'
195
196
 
196
197
  new_env['PATH_INFO'] = on_success if request.path_info == express_ok_path # if express, we render on_success
197
- resp = app.call(new_env)
198
- puts resp.inspect
199
- resp
198
+ app.call(new_env)
200
199
  end
201
200
  end
202
201
 
@@ -209,7 +208,7 @@ module Rack #:nodoc:
209
208
  app.call new_env
210
209
  else
211
210
  # on_success has not been overriden ... let's just display out own info
212
- [ 200, {}, ["Order successful. You should have been charged #{ payment.amount }" ]]
211
+ [ 200, {'Content-Type' => 'text/html'}, ["Order successful. You should have been charged #{ payment.amount }" ]]
213
212
  end
214
213
  end
215
214
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - remi