lib/rack/lti/config.rb in rack-lti-0.1.1 vs lib/rack/lti/config.rb in rack-lti-0.2.0
- old
+ new
@@ -11,10 +11,11 @@
redirect: true,
success: ->(lti, req, res) {
req.session['launch_params'] = lti if req.env['rack.session']
},
time_limit: 60*60,
+ future_time_limit: nil,
title: 'LTI App'
}
def initialize(options = {})
DEFAULT.merge(options).each { |k, v| self[k] = v }
@@ -22,10 +23,12 @@
end
[:consumer_key, :consumer_secret, :nonce_validator].each do |method|
define_method(method) do |*args|
if self[method].respond_to?(:call)
- self[method].call(*args)
+ # Only pass the arguments supported by this lambda
+ supported_args = args.take(self[method].parameters.length)
+ self[method].call(*supported_args)
else
self[method]
end
end
end