panda_pal 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d5061ed11b91c7a47956ecd87066e4567daa56c
4
- data.tar.gz: f46553347bac87bc4597af74d7cca2ca580dfdc3
3
+ metadata.gz: 1164ef591f74187ec2470b392262e36ff6b91ff3
4
+ data.tar.gz: 2f2c732c8b6df412444fa77a5fbd1ba51c611be3
5
5
  SHA512:
6
- metadata.gz: a4dfeffc6f21d03fda3aba545ddf0babbfa9485c80d5a4cf51bcdab794bafad15e2bbddeee01f54b0798da6fc22f98f7ef87b766bbc3e05ecad9aaca39e4e3e2
7
- data.tar.gz: de713f5633972d27c8f7c5809ba03b01e3b78faf1999b8627c5a125fc96ef57581d9e5659d41fa0a3746d63a8e7ffc984f8928bac760c4abc5600af141bee7f1
6
+ metadata.gz: c6236a460d0d220ce7f8218d7c3b3c7baaf2cfdfc0b788c137299957e1e1a6dcf2afedbd5bc14d45c5dafa024f344891c1076c695950c40a9c3a44e0df90b23f
7
+ data.tar.gz: c3958f07c9e2536f3cacb67cd49fd049e00421c37213611b03b7540ebb3cd65f699df065b7b25e926e09cb6bdf00c979bf495431f6b10c17a80d32f31afaa1be
@@ -16,7 +16,7 @@ module PandaPal
16
16
 
17
17
  platform = lti_options.delete(:platform) || 'canvas.instructure.com'
18
18
  host = "#{request.scheme}://#{request.host_with_port}"
19
- tc = IMS::LTI::ToolConfig.new(:title => lti_options[:title], :launch_url => ("#{host}#{lti_options[:launch_route]}") || 'ABC')
19
+ tc = IMS::LTI::Services::ToolConfig.new(:title => lti_options[:title], :launch_url => ("#{host}#{lti_options[:launch_route]}") || 'ABC')
20
20
  tc.set_ext_param(platform, :domain, request.host)
21
21
  tc.set_ext_param(platform, :privacy_level, 'public')
22
22
  lti_custom_params.each do |k, v|
@@ -8,7 +8,7 @@ Apartment.configure do |config|
8
8
  }
9
9
  end
10
10
 
11
- Rails.application.config.middleware.use 'Apartment::Elevators::Generic', lambda { |request|
11
+ Rails.application.config.middleware.use Apartment::Elevators::Generic, lambda { |request|
12
12
  if match = request.path.match(/\/(?:orgs|organizations)\/(\d+)/)
13
13
  PandaPal::Organization.find_by(id: match[1]).try(:name)
14
14
  end
@@ -34,7 +34,7 @@ module PandaPal
34
34
  ActionDispatch::Routing::Mapper.send :include, PandaPal::Helpers::RouteHelper
35
35
  end
36
36
 
37
- initializer 'panda_pal.route_options', :after => :disable_dependency_loading do |app|
37
+ initializer 'panda_pal.route_options' do |app|
38
38
  ActiveSupport.on_load(:action_controller) do
39
39
  Rails.application.reload_routes!
40
40
  PandaPal::propagate_lti_navigation
@@ -25,8 +25,8 @@ module PandaPal::Helpers::ControllerHelper
25
25
  def validate_launch!
26
26
  authorized = false
27
27
  if @organization = params['oauth_consumer_key'] && PandaPal::Organization.find_by_key(params['oauth_consumer_key'])
28
- @tp = IMS::LTI::ToolProvider.new(@organization.key, @organization.secret, params)
29
- authorized = @tp.valid_request?(request)
28
+ authenticator = IMS::LTI::Services::MessageAuthenticator.new(request.original_url, request.request_parameters, @organization.secret)
29
+ authorized = authenticator.valid_signature?
30
30
  end
31
31
  render :text => 'Invalid Credentials, please contact your Administrator.', :status => :unauthorized unless authorized
32
32
  authorized
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
data/panda_pal.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency "pg", '~> 0.18.4'
20
20
  s.add_dependency 'apartment', '~> 1.2.0'
21
21
  s.add_dependency 'delayed_job_active_record'
22
- s.add_dependency 'ims-lti'
22
+ s.add_dependency 'ims-lti', '~> 2.1.0'
23
23
 
24
24
  s.add_development_dependency 'sqlite3'
25
25
  s.add_development_dependency 'rspec-rails'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_pal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Young
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: ims-lti
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 2.1.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 2.1.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sqlite3
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  version: '0'
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.2.2
241
+ rubygems_version: 2.4.5
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: LTI mountable engine