Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration fixes for lti2_tp #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 0 additions & 94 deletions lti2_tc/Gemfile.lock

This file was deleted.

3 changes: 0 additions & 3 deletions lti2_tc/lti2_tc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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
94 changes: 0 additions & 94 deletions lti2_tp/Gemfile.lock

This file was deleted.

3 changes: 2 additions & 1 deletion lti2_tp/app/controllers/lti2_tp/registrations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lti2_tp/app/models/lti2_tp/registration.rb
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion lti2_tp/config/initializers/lti2_tp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Rails.application.config.wire_log = WireLog.new "ToolProvider", File.expand_path("log/wirelog.html")
3 changes: 2 additions & 1 deletion lti2_tp/db/migrate/20151111000001_reload_tp_db.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
3 changes: 0 additions & 3 deletions lti2_tp/lti2_tp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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