diff --git a/lti2_tc/Gemfile.lock b/lti2_tc/Gemfile.lock deleted file mode 100644 index e42d6d9..0000000 --- a/lti2_tc/Gemfile.lock +++ /dev/null @@ -1,94 +0,0 @@ -PATH - remote: . - specs: - lti2_tc (0.0.2) - mysql2 (~> 0.3.13) - rails (~> 4.1.1) - -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.1.5) - actionpack (= 4.1.5) - actionview (= 4.1.5) - mail (~> 2.5.4) - actionpack (4.1.5) - actionview (= 4.1.5) - activesupport (= 4.1.5) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - actionview (4.1.5) - activesupport (= 4.1.5) - builder (~> 3.1) - erubis (~> 2.7.0) - activemodel (4.1.5) - activesupport (= 4.1.5) - builder (~> 3.1) - activerecord (4.1.5) - activemodel (= 4.1.5) - activesupport (= 4.1.5) - arel (~> 5.0.0) - activesupport (4.1.5) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.1) - tzinfo (~> 1.1) - arel (5.0.1.20140414130214) - builder (3.2.2) - erubis (2.7.0) - hike (1.2.3) - i18n (0.6.11) - json (1.8.1) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.25.1) - minitest (5.4.1) - multi_json (1.10.1) - mysql2 (0.3.16) - polyglot (0.3.5) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - rails (4.1.5) - actionmailer (= 4.1.5) - actionpack (= 4.1.5) - actionview (= 4.1.5) - activemodel (= 4.1.5) - activerecord (= 4.1.5) - activesupport (= 4.1.5) - bundler (>= 1.3.0, < 2.0) - railties (= 4.1.5) - sprockets-rails (~> 2.0) - railties (4.1.5) - actionpack (= 4.1.5) - activesupport (= 4.1.5) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.3.2) - sprockets (2.12.2) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.1.4) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (~> 2.8) - sqlite3 (1.3.8) - thor (0.19.1) - thread_safe (0.3.4) - tilt (1.4.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - lti2_tc! - sqlite3 diff --git a/lti2_tc/lti2_tc.gemspec b/lti2_tc/lti2_tc.gemspec index 29cb9ee..1b54fee 100644 --- a/lti2_tc/lti2_tc.gemspec +++ b/lti2_tc/lti2_tc.gemspec @@ -5,7 +5,6 @@ require 'lti2_tc/version' # Describe your gem and declare its dependencies: Gem::Specification.new do |s| - s.name = 'lti2_tc' s.version = Lti2Tc::VERSION s.authors = ['John Tibbetts'] @@ -20,8 +19,6 @@ Gem::Specification.new do |s| s.required_ruby_version = '~> 2.0.0' s.add_dependency 'rails' - s.add_dependency 'mysql2', '~> 0.3.13' s.add_development_dependency 'sqlite3' - end diff --git a/lti2_tp/Gemfile.lock b/lti2_tp/Gemfile.lock deleted file mode 100644 index 184fc5b..0000000 --- a/lti2_tp/Gemfile.lock +++ /dev/null @@ -1,94 +0,0 @@ -PATH - remote: . - specs: - lti2_tp (0.0.2) - mysql2 (~> 0.3.13) - rails (~> 4.1.1) - -GEM - remote: https://rubygems.org/ - specs: - actionmailer (4.1.5) - actionpack (= 4.1.5) - actionview (= 4.1.5) - mail (~> 2.5.4) - actionpack (4.1.5) - actionview (= 4.1.5) - activesupport (= 4.1.5) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - actionview (4.1.5) - activesupport (= 4.1.5) - builder (~> 3.1) - erubis (~> 2.7.0) - activemodel (4.1.5) - activesupport (= 4.1.5) - builder (~> 3.1) - activerecord (4.1.5) - activemodel (= 4.1.5) - activesupport (= 4.1.5) - arel (~> 5.0.0) - activesupport (4.1.5) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.1) - tzinfo (~> 1.1) - arel (5.0.1.20140414130214) - builder (3.2.2) - erubis (2.7.0) - hike (1.2.3) - i18n (0.6.11) - json (1.8.1) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.25.1) - minitest (5.4.1) - multi_json (1.10.1) - mysql2 (0.3.16) - polyglot (0.3.5) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - rails (4.1.5) - actionmailer (= 4.1.5) - actionpack (= 4.1.5) - actionview (= 4.1.5) - activemodel (= 4.1.5) - activerecord (= 4.1.5) - activesupport (= 4.1.5) - bundler (>= 1.3.0, < 2.0) - railties (= 4.1.5) - sprockets-rails (~> 2.0) - railties (4.1.5) - actionpack (= 4.1.5) - activesupport (= 4.1.5) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.3.2) - sprockets (2.12.2) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.1.4) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (~> 2.8) - sqlite3 (1.3.8) - thor (0.19.1) - thread_safe (0.3.4) - tilt (1.4.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) - tzinfo (1.2.2) - thread_safe (~> 0.1) - -PLATFORMS - ruby - -DEPENDENCIES - lti2_tp! - sqlite3 diff --git a/lti2_tp/app/controllers/lti2_tp/registrations_controller.rb b/lti2_tp/app/controllers/lti2_tp/registrations_controller.rb index 069ec10..3530190 100644 --- a/lti2_tp/app/controllers/lti2_tp/registrations_controller.rb +++ b/lti2_tp/app/controllers/lti2_tp/registrations_controller.rb @@ -99,8 +99,9 @@ def index registration = Lti2Tp::Registration.find( params[:id] ) final_hash = params.select { |k,v| [ :status, :tool_guid, :lti_errormsg, :lti_errorlog ].include? k.to_sym } final_qs = final_hash.to_query + tool_proxy_guid = params[:tool_proxy_guid] if params.has_key? :tool_proxy_guid - guid_addend = (tool_proxy_guid.empty?) ? '' : "&tool_proxy_guid=#{tool_proxy_guid}" + guid_addend = (tool_proxy_guid.nil? || tool_proxy_guid.empty?) ? '' : "&tool_proxy_guid=#{tool_proxy_guid}" final_url = "#{get_adjusted_baseurl(registration.launch_presentation_return_url)}#{final_qs}#{guid_addend}" redirect_to final_url diff --git a/lti2_tp/app/models/lti2_tp/registration.rb b/lti2_tp/app/models/lti2_tp/registration.rb index 543c681..993acfa 100644 --- a/lti2_tp/app/models/lti2_tp/registration.rb +++ b/lti2_tp/app/models/lti2_tp/registration.rb @@ -1,5 +1,6 @@ module Lti2Tp class Registration < ActiveRecord::Base + include Lti2Commons::MessageSupport ACKNOWLEDGE_URL = 'VND-IMS-CONFIRM-URL' HTTP_ACKNOWLEDGE_URL = 'HTTP_VND_IMS_CONFIRM_URL' diff --git a/lti2_tp/config/initializers/lti2_tp.rb b/lti2_tp/config/initializers/lti2_tp.rb index 1e58478..4d065ed 100644 --- a/lti2_tp/config/initializers/lti2_tp.rb +++ b/lti2_tp/config/initializers/lti2_tp.rb @@ -8,4 +8,4 @@ Rails.application.config.tool_provider_registry = Lti2Tp::ToolProviderRegistry.new end -Rails.application.config.wire_log = WireLog.new "ToolProvider", File.expand_path("../tc_sample_app/public/wirelog.html") \ No newline at end of file +Rails.application.config.wire_log = WireLog.new "ToolProvider", File.expand_path("log/wirelog.html") diff --git a/lti2_tp/db/migrate/20151111000001_reload_tp_db.rb b/lti2_tp/db/migrate/20151111000001_reload_tp_db.rb index ea22c95..c8ab378 100644 --- a/lti2_tp/db/migrate/20151111000001_reload_tp_db.rb +++ b/lti2_tp/db/migrate/20151111000001_reload_tp_db.rb @@ -1,4 +1,4 @@ -class CreateLti2TpResources < ActiveRecord::Migration +class ReloadTpDb < ActiveRecord::Migration def up create_table "lti2_tp_registrations", force: true do |t| t.integer "tenant_id" @@ -62,5 +62,6 @@ def down drop_table :lti2_tp_registrations drop_table :lti2_tp_registries drop_table :lti2_tp_tools + drop_table :lti_registration_wips end end diff --git a/lti2_tp/lti2_tp.gemspec b/lti2_tp/lti2_tp.gemspec index da6bcb2..e9cc09a 100644 --- a/lti2_tp/lti2_tp.gemspec +++ b/lti2_tp/lti2_tp.gemspec @@ -5,7 +5,6 @@ require 'lti2_tp/version' # Describe your gem and declare its dependencies: Gem::Specification.new do |s| - s.name = 'lti2_tp' s.version = Lti2Tp::VERSION s.authors = ['John Tibbetts'] @@ -20,8 +19,6 @@ Gem::Specification.new do |s| s.required_ruby_version = '~> 2.0.0' s.add_dependency 'rails' - s.add_dependency 'mysql2', '~> 0.3.13' s.add_development_dependency 'sqlite3' - end