panda_pal 2.0.1 → 2.0.2

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: ee6016299d069242332167b82a3eb2fd2425cf5e
4
- data.tar.gz: eaff332533e96acfe82ec40ba2980776d11c9165
3
+ metadata.gz: dec363ec0b5ca735237ea01b194dda78320eadf5
4
+ data.tar.gz: 397cf50a70cac0e961a96f01f95ee2eea8666f9d
5
5
  SHA512:
6
- metadata.gz: '058797c10fc0ea92c292155727184b51d77a291bd02cfaab9ffca948d6cac67a9136d59193dc22803d50d85407d9baa989ecd11991dfe94b01cdb1412d053581'
7
- data.tar.gz: 40c33b478e090f10563eaaf1635e509b5121750ec5cbf8022f530cfa0b6c0172f9b8853f19985fa2c3767006251836cd20d84684031ddc4eebc13d9d4ad8b744
6
+ metadata.gz: 8f3a1e05a1ac97b39816a77f7c29c587ff252b148a683ae1139821c883ecbf7368a9abdf6b21280292c85732df785d132e3e5c474798346be18ab9feff85e1ff
7
+ data.tar.gz: 82789e5edf44b8dd4a1ec30e1f70b70b662f5ed8657265490900d8c3fdcd3c40fa6258805c38057454833ee4efae01b27b0b33a3cdcb8c7a6408ad394000f9e3
@@ -5,6 +5,7 @@ module PandaPal
5
5
 
6
6
  def tool_config
7
7
  lti_options = PandaPal.lti_options
8
+ lti_properties = PandaPal.lti_properties
8
9
  lti_nav = PandaPal.lti_paths
9
10
  lti_environments = PandaPal.lti_environments
10
11
  lti_custom_params = PandaPal.lti_custom_params
@@ -17,8 +18,11 @@ module PandaPal
17
18
  platform = lti_options.delete(:platform) || 'canvas.instructure.com'
18
19
  host = "#{request.scheme}://#{request.host_with_port}"
19
20
  tc = IMS::LTI::Services::ToolConfig.new(:title => lti_options[:title], :launch_url => ("#{host}#{lti_options[:launch_route]}") || 'ABC')
20
- tc.set_ext_param(platform, :domain, request.host)
21
- tc.set_ext_param(platform, :privacy_level, 'public')
21
+ tc.set_ext_param(platform, :domain, request.host) unless lti_properties.has_key?(:domain)
22
+ tc.set_ext_param(platform, :privacy_level, 'public') unless lti_properties.has_key?(:public)
23
+ lti_properties.each do |k, v|
24
+ tc.set_ext_param(platform, k, v)
25
+ end
22
26
  lti_custom_params.each do |k, v|
23
27
  tc.set_custom_param k, v
24
28
  end
@@ -43,7 +47,7 @@ module PandaPal
43
47
 
44
48
  def ext_params(options)
45
49
  url = options.delete(:url)
46
- options[:url] = main_app.send([url,'_url'].join)
50
+ options[:url] = main_app.send([url, '_url'].join)
47
51
  options
48
52
  end
49
53
  end
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
data/lib/panda_pal.rb CHANGED
@@ -9,6 +9,7 @@ module PandaPal
9
9
  @@lti_navigation = {}
10
10
  @@staged_navigation = {}
11
11
  @@lti_options = {}
12
+ @@lti_properties = {}
12
13
  @@lti_environments = {}
13
14
  @@lti_custom_params = {}
14
15
 
@@ -20,6 +21,14 @@ module PandaPal
20
21
  @@lti_options.deep_dup
21
22
  end
22
23
 
24
+ def self.lti_properties= lti_properties
25
+ @@lti_properties = lti_properties
26
+ end
27
+
28
+ def self.lti_properties
29
+ @@lti_properties.deep_dup
30
+ end
31
+
23
32
  def self.lti_environments=(lti_environments)
24
33
  @@lti_environments = lti_environments
25
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_pal
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Young
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-15 00:00:00.000000000 Z
12
+ date: 2017-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  version: '0'
210
210
  requirements: []
211
211
  rubyforge_project:
212
- rubygems_version: 2.5.2
212
+ rubygems_version: 2.2.2
213
213
  signing_key:
214
214
  specification_version: 4
215
215
  summary: LTI mountable engine
@@ -258,3 +258,4 @@ test_files:
258
258
  - spec/models/panda_pal/session_spec.rb
259
259
  - spec/rails_helper.rb
260
260
  - spec/spec_helper.rb
261
+ has_rdoc: