lti_provider_engine 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +145 -0
  3. data/Rakefile +28 -0
  4. data/app/controllers/lti_provider/application_controller.rb +5 -0
  5. data/app/controllers/lti_provider/lti_controller.rb +61 -0
  6. data/app/models/lti_provider/launch.rb +105 -0
  7. data/app/views/layouts/lti_provider/application.html.erb +12 -0
  8. data/app/views/lti_provider/lti/cookie_test.html.erb +4 -0
  9. data/config/lti.yml.example +13 -0
  10. data/config/lti_xml.yml.example +22 -0
  11. data/config/routes.rb +6 -0
  12. data/db/migrate/20130319050003_create_lti_provider_launches.rb +11 -0
  13. data/lib/lti_provider.rb +20 -0
  14. data/lib/lti_provider/config.rb +1 -0
  15. data/lib/lti_provider/engine.rb +19 -0
  16. data/lib/lti_provider/lti_application.rb +56 -0
  17. data/lib/lti_provider/lti_config.rb +28 -0
  18. data/lib/lti_provider/lti_xml_config.rb +23 -0
  19. data/lib/lti_provider/version.rb +3 -0
  20. data/lib/lti_provider/xml_config.rb +1 -0
  21. data/lib/tasks/lti_provider_tasks.rake +4 -0
  22. data/spec/controllers/lti_provider/lti_controller_spec.rb +141 -0
  23. data/spec/dummy/Rakefile +7 -0
  24. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  25. data/spec/dummy/app/controllers/welcome_controller.rb +5 -0
  26. data/spec/dummy/config.ru +4 -0
  27. data/spec/dummy/config/application.rb +58 -0
  28. data/spec/dummy/config/boot.rb +10 -0
  29. data/spec/dummy/config/cucumber.yml +8 -0
  30. data/spec/dummy/config/database.yml +25 -0
  31. data/spec/dummy/config/environment.rb +5 -0
  32. data/spec/dummy/config/environments/development.rb +37 -0
  33. data/spec/dummy/config/environments/production.rb +67 -0
  34. data/spec/dummy/config/environments/test.rb +37 -0
  35. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/spec/dummy/config/initializers/inflections.rb +15 -0
  37. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  38. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  39. data/spec/dummy/config/initializers/session_store.rb +8 -0
  40. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  41. data/spec/dummy/config/locales/en.yml +5 -0
  42. data/spec/dummy/config/lti.yml +13 -0
  43. data/spec/dummy/config/lti_xml.yml +24 -0
  44. data/spec/dummy/config/routes.rb +4 -0
  45. data/spec/dummy/db/development.sqlite3 +0 -0
  46. data/spec/dummy/db/migrate/20130319050206_create_lti_provider_launches.lti_provider.rb +12 -0
  47. data/spec/dummy/db/schema.rb +24 -0
  48. data/spec/dummy/db/test.sqlite3 +0 -0
  49. data/spec/dummy/log/development.log +266 -0
  50. data/spec/dummy/log/test.log +3643 -0
  51. data/spec/dummy/public/404.html +26 -0
  52. data/spec/dummy/public/422.html +26 -0
  53. data/spec/dummy/public/500.html +25 -0
  54. data/spec/dummy/public/favicon.ico +0 -0
  55. data/spec/dummy/public/robots.txt +5 -0
  56. data/spec/dummy/script/rails +6 -0
  57. data/spec/models/lti_provider/launch_spec.rb +80 -0
  58. data/spec/spec_helper.rb +55 -0
  59. metadata +337 -0
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,37 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Raise exception on mass assignment protection for Active Record models
26
+ config.active_record.mass_assignment_sanitizer = :strict
27
+
28
+ # Log the query plan for queries taking more than this (works
29
+ # with SQLite, MySQL, and PostgreSQL)
30
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
31
+
32
+ # Do not compress assets
33
+ config.assets.compress = false
34
+
35
+ # Expands the lines which load the assets
36
+ config.assets.debug = true
37
+ end
@@ -0,0 +1,67 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to nil and saved in location specified by config.assets.prefix
24
+ # config.assets.manifest = YOUR_PATH
25
+
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
45
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
+ # config.action_controller.asset_host = "http://assets.example.com"
47
+
48
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
+ # config.assets.precompile += %w( search.js )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
+ # the I18n.default_locale when a translation can not be found)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
64
+ # Log the query plan for queries taking more than this (works
65
+ # with SQLite, MySQL, and PostgreSQL)
66
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
+ end
@@ -0,0 +1,37 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+ # Raise exception on mass assignment protection for Active Record models
33
+ config.active_record.mass_assignment_sanitizer = :strict
34
+
35
+ # Print deprecation notices to the stderr
36
+ config.active_support.deprecation = :stderr
37
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,15 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = '8f96a1f3e47ab183a6d3c4c5ac4c1ae9f1b271effdba9e1e9ebfbb7cba9bf0fad6182c716dc62c604cbaaae6d86e93c26b867262a04ef0ad770ece90161ede0e'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,13 @@
1
+ default: &default
2
+ key: 12345
3
+ secret: secret
4
+ require_canvas: true
5
+
6
+ development:
7
+ <<: *default
8
+
9
+ test:
10
+ <<: *default
11
+
12
+ cucumber:
13
+ <<: *default
@@ -0,0 +1,24 @@
1
+ default: &default
2
+ tool_title: 'Dummy App'
3
+ tool_description: 'A very handy dummy application for testing LtiProvider engine integration.'
4
+ tool_id: 'dummy'
5
+ privacy_level: 'public'
6
+ account_navigation:
7
+ text: 'Dummy'
8
+ visibility: 'admins'
9
+ course_navigation:
10
+ text: 'Dummy'
11
+ visibility: 'admins'
12
+ url: 'http://override.example.com/launch'
13
+ environments:
14
+ test_domain: 'text.example.com'
15
+ beta_domain: 'beta.example.com'
16
+
17
+ development:
18
+ <<: *default
19
+
20
+ test:
21
+ <<: *default
22
+
23
+ cucumber:
24
+ <<: *default
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+ root to: "welcome#index"
3
+ mount LtiProvider::Engine => "/"
4
+ end
Binary file
@@ -0,0 +1,12 @@
1
+ # This migration comes from lti_provider (originally 20130319050003)
2
+ class CreateLtiProviderLaunches < ActiveRecord::Migration
3
+ def change
4
+ create_table "lti_provider_launches", :force => true do |t|
5
+ t.string "canvas_url"
6
+ t.string "nonce"
7
+ t.text "provider_params"
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,24 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20130319050206) do
15
+
16
+ create_table "lti_provider_launches", :force => true do |t|
17
+ t.string "canvas_url"
18
+ t.string "nonce"
19
+ t.text "provider_params"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ end
23
+
24
+ end
Binary file
@@ -0,0 +1,266 @@
1
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
2
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
3
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
4
+
5
+
6
+ Started GET "/" for 127.0.0.1 at 2013-09-26 16:49:23 -0600
7
+ Connecting to database specified by database.yml
8
+ Processing by WelcomeController#index as HTML
9
+ Rendered text template (0.0ms)
10
+ Filter chain halted as :require_lti_launch rendered or redirected
11
+ Completed 200 OK in 11ms (Views: 10.7ms | ActiveRecord: 0.0ms)
12
+
13
+
14
+ Started GET "/favicon.ico" for 127.0.0.1 at 2013-09-26 16:49:24 -0600
15
+
16
+ ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
17
+ actionpack (3.2.14) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
18
+ actionpack (3.2.14) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
19
+ railties (3.2.14) lib/rails/rack/logger.rb:32:in `call_app'
20
+ railties (3.2.14) lib/rails/rack/logger.rb:16:in `block in call'
21
+ activesupport (3.2.14) lib/active_support/tagged_logging.rb:22:in `tagged'
22
+ railties (3.2.14) lib/rails/rack/logger.rb:16:in `call'
23
+ actionpack (3.2.14) lib/action_dispatch/middleware/request_id.rb:22:in `call'
24
+ rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
25
+ rack (1.4.5) lib/rack/runtime.rb:17:in `call'
26
+ activesupport (3.2.14) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
27
+ rack (1.4.5) lib/rack/lock.rb:15:in `call'
28
+ actionpack (3.2.14) lib/action_dispatch/middleware/static.rb:63:in `call'
29
+ railties (3.2.14) lib/rails/engine.rb:484:in `call'
30
+ railties (3.2.14) lib/rails/application.rb:231:in `call'
31
+ rack (1.4.5) lib/rack/content_length.rb:14:in `call'
32
+ railties (3.2.14) lib/rails/rack/log_tailer.rb:17:in `call'
33
+ rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
34
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
35
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
36
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
37
+
38
+
39
+ Rendered /Users/simonista/Instructure/lti_provider_engine/.bundle/gems/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (7.6ms)
40
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
41
+
42
+
43
+ Started GET "/" for 127.0.0.1 at 2013-09-26 16:51:37 -0600
44
+ Connecting to database specified by database.yml
45
+ Processing by WelcomeController#index as HTML
46
+ Rendered text template (0.0ms)
47
+ Filter chain halted as :require_lti_launch rendered or redirected
48
+ Completed 200 OK in 8ms (Views: 7.6ms | ActiveRecord: 0.0ms)
49
+
50
+
51
+ Started GET "/configure.xml" for 127.0.0.1 at 2013-09-26 16:52:19 -0600
52
+
53
+ ActionController::RoutingError (No route matches [GET] "/configure.xml"):
54
+ actionpack (3.2.14) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
55
+ actionpack (3.2.14) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
56
+ railties (3.2.14) lib/rails/rack/logger.rb:32:in `call_app'
57
+ railties (3.2.14) lib/rails/rack/logger.rb:16:in `block in call'
58
+ activesupport (3.2.14) lib/active_support/tagged_logging.rb:22:in `tagged'
59
+ railties (3.2.14) lib/rails/rack/logger.rb:16:in `call'
60
+ actionpack (3.2.14) lib/action_dispatch/middleware/request_id.rb:22:in `call'
61
+ rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
62
+ rack (1.4.5) lib/rack/runtime.rb:17:in `call'
63
+ activesupport (3.2.14) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
64
+ rack (1.4.5) lib/rack/lock.rb:15:in `call'
65
+ actionpack (3.2.14) lib/action_dispatch/middleware/static.rb:63:in `call'
66
+ railties (3.2.14) lib/rails/engine.rb:484:in `call'
67
+ railties (3.2.14) lib/rails/application.rb:231:in `call'
68
+ rack (1.4.5) lib/rack/content_length.rb:14:in `call'
69
+ railties (3.2.14) lib/rails/rack/log_tailer.rb:17:in `call'
70
+ rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
71
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
72
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
73
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
74
+
75
+
76
+ Rendered /Users/simonista/Instructure/lti_provider_engine/.bundle/gems/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (2.2ms)
77
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
78
+
79
+
80
+ Started GET "/configure.xml" for 127.0.0.1 at 2013-09-26 16:54:03 -0600
81
+ Connecting to database specified by database.yml
82
+ Processing by LtiProvider::LtiController#configure as XML
83
+ Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 0.0ms)
84
+
85
+
86
+ Started GET "/" for 127.0.0.1 at 2013-09-26 16:54:06 -0600
87
+ Processing by WelcomeController#index as HTML
88
+ Rendered text template (0.0ms)
89
+ Filter chain halted as :require_lti_launch rendered or redirected
90
+ Completed 200 OK in 8ms (Views: 7.7ms | ActiveRecord: 0.0ms)
91
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
92
+
93
+
94
+ Started GET "/configure.xml" for 127.0.0.1 at 2013-09-26 16:58:05 -0600
95
+ Connecting to database specified by database.yml
96
+ Processing by LtiProvider::LtiController#configure as XML
97
+ Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 0.0ms)
98
+
99
+
100
+ Started GET "/configure.xml" for 127.0.0.1 at 2013-09-26 16:58:05 -0600
101
+ Processing by LtiProvider::LtiController#configure as XML
102
+ Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
103
+
104
+
105
+ Started GET "/configure.xml" for 127.0.0.1 at 2013-09-26 16:58:06 -0600
106
+ Processing by LtiProvider::LtiController#configure as XML
107
+ Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
108
+
109
+
110
+ Started GET "/configure.xml" for 127.0.0.1 at 2013-09-26 16:58:06 -0600
111
+ Processing by LtiProvider::LtiController#configure as XML
112
+ Completed 200 OK in 2ms (Views: 0.1ms | ActiveRecord: 0.0ms)
113
+
114
+
115
+ Started POST "/launch" for 127.0.0.1 at 2013-09-26 16:58:21 -0600
116
+ Processing by LtiProvider::LtiController#launch as HTML
117
+ Parameters: {"oauth_consumer_key"=>"12345", "oauth_signature_method"=>"HMAC-SHA1", "oauth_timestamp"=>"1380236301", "oauth_nonce"=>"qlwqKi8SUQPVsmCT2JajtxlnbRqo5RZKIQxB10QOKjc", "oauth_version"=>"1.0", "context_id"=>"4029f7e861f63ccd8b8b604cccf5acc4fde74d8a", "context_label"=>"Testing", "context_title"=>"Testing Course", "custom_canvas_api_domain"=>"localhost", "custom_canvas_course_id"=>"2", "custom_canvas_enrollment_state"=>"active", "custom_canvas_user_id"=>"1", "custom_canvas_user_login_id"=>"simon@instructure.com", "launch_presentation_document_target"=>"iframe", "launch_presentation_height"=>"400", "launch_presentation_locale"=>"en", "launch_presentation_return_url"=>"http://localhost:3000/courses/2", "launch_presentation_width"=>"800", "lis_person_contact_email_primary"=>"simon@instructure.com", "lis_person_name_family"=>"", "lis_person_name_full"=>"simon@instructure.com", "lis_person_name_given"=>"simon@instructure.com", "lti_message_type"=>"basic-lti-launch-request", "lti_version"=>"LTI-1p0", "oauth_callback"=>"about:blank", "resource_link_id"=>"4029f7e861f63ccd8b8b604cccf5acc4fde74d8a", "resource_link_title"=>"LTI Provider", "roles"=>"Instructor,urn:lti:instrole:ims/lis/Administrator", "tool_consumer_info_product_family_code"=>"canvas", "tool_consumer_info_version"=>"cloud", "tool_consumer_instance_contact_email"=>"notifications@unknowndomain.example.com", "tool_consumer_instance_guid"=>"82ef4c4479c3a07a02d4396f95097507af448ed6.localhost:3000", "tool_consumer_instance_name"=>"Simon Development", "user_id"=>"5a6e3f44886dc7294b61ae391c216f9d16b7cda8", "user_image"=>"https://secure.gravatar.com/avatar/2284bced4cd86cf65cec3876a9021b5c?s=50&d=http%3A%2F%2Fcanvas.instructure.com%3A3000%2Fimages%2Fmessages%2Favatar-50.png", "oauth_signature"=>"YacWb4/XrJwobCLgz2w5e8koj0Y="}
118
+ Completed 500 Internal Server Error in 35ms
119
+
120
+ ActiveRecord::StatementInvalid (Could not find table 'lti_provider_launches'):
121
+ activerecord (3.2.14) lib/active_record/connection_adapters/sqlite_adapter.rb:472:in `table_structure'
122
+ activerecord (3.2.14) lib/active_record/connection_adapters/sqlite_adapter.rb:346:in `columns'
123
+ activerecord (3.2.14) lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize'
124
+ activerecord (3.2.14) lib/active_record/model_schema.rb:229:in `yield'
125
+ activerecord (3.2.14) lib/active_record/model_schema.rb:229:in `default'
126
+ activerecord (3.2.14) lib/active_record/model_schema.rb:229:in `columns'
127
+ activerecord (3.2.14) lib/active_record/model_schema.rb:244:in `column_defaults'
128
+ activerecord (3.2.14) lib/active_record/base.rb:482:in `initialize'
129
+ /Users/simonista/Instructure/lti_provider_engine/app/models/lti_provider/launch.rb:12:in `new'
130
+ /Users/simonista/Instructure/lti_provider_engine/app/models/lti_provider/launch.rb:12:in `initialize_from_request'
131
+ /Users/simonista/Instructure/lti_provider_engine/app/controllers/lti_provider/lti_controller.rb:9:in `launch'
132
+ actionpack (3.2.14) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
133
+ actionpack (3.2.14) lib/abstract_controller/base.rb:167:in `process_action'
134
+ actionpack (3.2.14) lib/action_controller/metal/rendering.rb:10:in `process_action'
135
+ actionpack (3.2.14) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
136
+ activesupport (3.2.14) lib/active_support/callbacks.rb:403:in `_run__2020360029404163652__process_action__1422311094428903085__callbacks'
137
+ activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `__run_callback'
138
+ activesupport (3.2.14) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
139
+ activesupport (3.2.14) lib/active_support/callbacks.rb:81:in `run_callbacks'
140
+ actionpack (3.2.14) lib/abstract_controller/callbacks.rb:17:in `process_action'
141
+ actionpack (3.2.14) lib/action_controller/metal/rescue.rb:29:in `process_action'
142
+ actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
143
+ activesupport (3.2.14) lib/active_support/notifications.rb:123:in `block in instrument'
144
+ activesupport (3.2.14) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
145
+ activesupport (3.2.14) lib/active_support/notifications.rb:123:in `instrument'
146
+ actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
147
+ actionpack (3.2.14) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
148
+ activerecord (3.2.14) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
149
+ actionpack (3.2.14) lib/abstract_controller/base.rb:121:in `process'
150
+ actionpack (3.2.14) lib/abstract_controller/rendering.rb:45:in `process'
151
+ actionpack (3.2.14) lib/action_controller/metal.rb:203:in `dispatch'
152
+ actionpack (3.2.14) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
153
+ actionpack (3.2.14) lib/action_controller/metal.rb:246:in `block in action'
154
+ actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:73:in `call'
155
+ actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
156
+ actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:36:in `call'
157
+ journey (1.0.4) lib/journey/router.rb:68:in `block in call'
158
+ journey (1.0.4) lib/journey/router.rb:56:in `each'
159
+ journey (1.0.4) lib/journey/router.rb:56:in `call'
160
+ actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:608:in `call'
161
+ railties (3.2.14) lib/rails/engine.rb:484:in `call'
162
+ railties (3.2.14) lib/rails/railtie/configurable.rb:30:in `method_missing'
163
+ journey (1.0.4) lib/journey/router.rb:68:in `block in call'
164
+ journey (1.0.4) lib/journey/router.rb:56:in `each'
165
+ journey (1.0.4) lib/journey/router.rb:56:in `call'
166
+ actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:608:in `call'
167
+ actionpack (3.2.14) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
168
+ rack (1.4.5) lib/rack/etag.rb:23:in `call'
169
+ rack (1.4.5) lib/rack/conditionalget.rb:35:in `call'
170
+ actionpack (3.2.14) lib/action_dispatch/middleware/head.rb:14:in `call'
171
+ actionpack (3.2.14) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
172
+ actionpack (3.2.14) lib/action_dispatch/middleware/flash.rb:242:in `call'
173
+ rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
174
+ rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
175
+ actionpack (3.2.14) lib/action_dispatch/middleware/cookies.rb:341:in `call'
176
+ activerecord (3.2.14) lib/active_record/query_cache.rb:64:in `call'
177
+ activerecord (3.2.14) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
178
+ actionpack (3.2.14) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
179
+ activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `_run__2358984166821573666__call__534996777588375431__callbacks'
180
+ activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `__run_callback'
181
+ activesupport (3.2.14) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
182
+ activesupport (3.2.14) lib/active_support/callbacks.rb:81:in `run_callbacks'
183
+ actionpack (3.2.14) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
184
+ actionpack (3.2.14) lib/action_dispatch/middleware/reloader.rb:65:in `call'
185
+ actionpack (3.2.14) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
186
+ actionpack (3.2.14) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
187
+ actionpack (3.2.14) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
188
+ railties (3.2.14) lib/rails/rack/logger.rb:32:in `call_app'
189
+ railties (3.2.14) lib/rails/rack/logger.rb:16:in `block in call'
190
+ activesupport (3.2.14) lib/active_support/tagged_logging.rb:22:in `tagged'
191
+ railties (3.2.14) lib/rails/rack/logger.rb:16:in `call'
192
+ actionpack (3.2.14) lib/action_dispatch/middleware/request_id.rb:22:in `call'
193
+ rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
194
+ rack (1.4.5) lib/rack/runtime.rb:17:in `call'
195
+ activesupport (3.2.14) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
196
+ rack (1.4.5) lib/rack/lock.rb:15:in `call'
197
+ actionpack (3.2.14) lib/action_dispatch/middleware/static.rb:63:in `call'
198
+ railties (3.2.14) lib/rails/engine.rb:484:in `call'
199
+ railties (3.2.14) lib/rails/application.rb:231:in `call'
200
+ rack (1.4.5) lib/rack/content_length.rb:14:in `call'
201
+ railties (3.2.14) lib/rails/rack/log_tailer.rb:17:in `call'
202
+ rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
203
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
204
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
205
+ /Users/simonista/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
206
+
207
+
208
+ Rendered /Users/simonista/Instructure/lti_provider_engine/.bundle/gems/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.1ms)
209
+ Rendered /Users/simonista/Instructure/lti_provider_engine/.bundle/gems/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.0ms)
210
+ Rendered /Users/simonista/Instructure/lti_provider_engine/.bundle/gems/ruby/1.9.1/gems/actionpack-3.2.14/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (92.9ms)
211
+ Connecting to database specified by database.yml
212
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
213
+  (0.1ms) select sqlite_version(*)
214
+  (3.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
215
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
216
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
217
+ Migrating to CreateLtiProviderLaunches (20130319050206)
218
+  (0.0ms) begin transaction
219
+  (0.3ms) CREATE TABLE "lti_provider_launches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_url" varchar(255), "nonce" varchar(255), "provider_params" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
220
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130319050206')
221
+  (1.4ms) commit transaction
222
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
223
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
224
+
225
+
226
+ Started POST "/launch" for 127.0.0.1 at 2013-09-26 16:59:53 -0600
227
+ Connecting to database specified by database.yml
228
+ Processing by LtiProvider::LtiController#launch as HTML
229
+ Parameters: {"oauth_consumer_key"=>"12345", "oauth_signature_method"=>"HMAC-SHA1", "oauth_timestamp"=>"1380236392", "oauth_nonce"=>"9PriqXcKKPOP7cFUbjNkewYKlxAZLZ8rr6xrIE0i3A", "oauth_version"=>"1.0", "context_id"=>"4029f7e861f63ccd8b8b604cccf5acc4fde74d8a", "context_label"=>"Testing", "context_title"=>"Testing Course", "custom_canvas_api_domain"=>"localhost", "custom_canvas_course_id"=>"2", "custom_canvas_enrollment_state"=>"active", "custom_canvas_user_id"=>"1", "custom_canvas_user_login_id"=>"simon@instructure.com", "launch_presentation_document_target"=>"iframe", "launch_presentation_height"=>"400", "launch_presentation_locale"=>"en", "launch_presentation_return_url"=>"http://localhost:3000/courses/2", "launch_presentation_width"=>"800", "lis_person_contact_email_primary"=>"simon@instructure.com", "lis_person_name_family"=>"", "lis_person_name_full"=>"simon@instructure.com", "lis_person_name_given"=>"simon@instructure.com", "lti_message_type"=>"basic-lti-launch-request", "lti_version"=>"LTI-1p0", "oauth_callback"=>"about:blank", "resource_link_id"=>"4029f7e861f63ccd8b8b604cccf5acc4fde74d8a", "resource_link_title"=>"LTI Provider", "roles"=>"Instructor,urn:lti:instrole:ims/lis/Administrator", "tool_consumer_info_product_family_code"=>"canvas", "tool_consumer_info_version"=>"cloud", "tool_consumer_instance_contact_email"=>"notifications@unknowndomain.example.com", "tool_consumer_instance_guid"=>"82ef4c4479c3a07a02d4396f95097507af448ed6.localhost:3000", "tool_consumer_instance_name"=>"Simon Development", "user_id"=>"5a6e3f44886dc7294b61ae391c216f9d16b7cda8", "user_image"=>"https://secure.gravatar.com/avatar/2284bced4cd86cf65cec3876a9021b5c?s=50&d=http%3A%2F%2Fcanvas.instructure.com%3A3000%2Fimages%2Fmessages%2Favatar-50.png", "oauth_signature"=>"WRLybxwKbHD7N9nxnIxQrDGJ1pI="}
230
+  (0.0ms) begin transaction
231
+ SQL (3.8ms) INSERT INTO "lti_provider_launches" ("canvas_url", "created_at", "nonce", "provider_params", "updated_at") VALUES (?, ?, ?, ?, ?) [["canvas_url", "http://localhost:3000"], ["created_at", Thu, 26 Sep 2013 22:59:53 UTC +00:00], ["nonce", "9PriqXcKKPOP7cFUbjNkewYKlxAZLZ8rr6xrIE0i3A"], ["provider_params", "---\ncontext_id: 4029f7e861f63ccd8b8b604cccf5acc4fde74d8a\ncontext_label: Testing\ncontext_title: Testing Course\nlaunch_presentation_document_target: iframe\nlaunch_presentation_height: '400'\nlaunch_presentation_locale: en\nlaunch_presentation_return_url: http://localhost:3000/courses/2\nlaunch_presentation_width: '800'\nlis_person_contact_email_primary: simon@instructure.com\nlis_person_name_family: ''\nlis_person_name_full: simon@instructure.com\nlis_person_name_given: simon@instructure.com\nlti_message_type: basic-lti-launch-request\nlti_version: LTI-1p0\noauth_callback: about:blank\noauth_consumer_key: '12345'\noauth_nonce: 9PriqXcKKPOP7cFUbjNkewYKlxAZLZ8rr6xrIE0i3A\noauth_signature: WRLybxwKbHD7N9nxnIxQrDGJ1pI=\noauth_signature_method: HMAC-SHA1\noauth_timestamp: '1380236392'\noauth_version: '1.0'\nresource_link_id: 4029f7e861f63ccd8b8b604cccf5acc4fde74d8a\nresource_link_title: LTI Provider\nroles: Instructor,Urn:lti:instrole:ims/lis/administrator\ntool_consumer_info_product_family_code: canvas\ntool_consumer_info_version: cloud\ntool_consumer_instance_contact_email: notifications@unknowndomain.example.com\ntool_consumer_instance_guid: 82ef4c4479c3a07a02d4396f95097507af448ed6.localhost:3000\ntool_consumer_instance_name: Simon Development\nuser_id: 5a6e3f44886dc7294b61ae391c216f9d16b7cda8\nuser_image: https://secure.gravatar.com/avatar/2284bced4cd86cf65cec3876a9021b5c?s=50&d=http%3A%2F%2Fcanvas.instructure.com%3A3000%2Fimages%2Fmessages%2Favatar-50.png\ncustom_canvas_api_domain: localhost\ncustom_canvas_course_id: '2'\ncustom_canvas_enrollment_state: active\ncustom_canvas_user_id: '1'\ncustom_canvas_user_login_id: simon@instructure.com\n"], ["updated_at", Thu, 26 Sep 2013 22:59:53 UTC +00:00]]
232
+  (2.1ms) commit transaction
233
+ Redirected to http://localhost:3003/cookie_test?nonce=9PriqXcKKPOP7cFUbjNkewYKlxAZLZ8rr6xrIE0i3A
234
+ Completed 302 Found in 56ms (ActiveRecord: 7.5ms)
235
+
236
+
237
+ Started GET "/cookie_test?nonce=9PriqXcKKPOP7cFUbjNkewYKlxAZLZ8rr6xrIE0i3A" for 127.0.0.1 at 2013-09-26 16:59:53 -0600
238
+ Processing by LtiProvider::LtiController#cookie_test as HTML
239
+ Parameters: {"nonce"=>"9PriqXcKKPOP7cFUbjNkewYKlxAZLZ8rr6xrIE0i3A"}
240
+ LtiProvider::Launch Load (0.2ms) SELECT "lti_provider_launches".* FROM "lti_provider_launches" WHERE "lti_provider_launches"."nonce" = '9PriqXcKKPOP7cFUbjNkewYKlxAZLZ8rr6xrIE0i3A' AND (created_at > '2013-09-26 22:54:53.934606') LIMIT 1
241
+  (0.0ms) begin transaction
242
+ SQL (0.3ms) DELETE FROM "lti_provider_launches" WHERE "lti_provider_launches"."id" = ? [["id", 1]]
243
+  (1.6ms) commit transaction
244
+ Redirected to http://localhost:3003/
245
+ Completed 302 Found in 16ms (ActiveRecord: 2.1ms)
246
+
247
+
248
+ Started GET "/" for 127.0.0.1 at 2013-09-26 16:59:53 -0600
249
+ Processing by WelcomeController#index as HTML
250
+ Rendered text template (0.0ms)
251
+ Completed 200 OK in 8ms (Views: 7.8ms | ActiveRecord: 0.0ms)
252
+ Connecting to database specified by database.yml
253
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
254
+  (0.1ms) select sqlite_version(*)
255
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
256
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
257
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
258
+ Migrating to CreateLtiProviderLaunches (20130319050206)
259
+  (0.0ms) begin transaction
260
+  (0.3ms) CREATE TABLE "lti_provider_launches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_url" varchar(255), "nonce" varchar(255), "provider_params" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
261
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130319050206')
262
+  (1.4ms) commit transaction
263
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
264
+ Initializing LTI key and secret using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti.yml
265
+ Initializing LTI XML config using configuration in /Users/simonista/Instructure/lti_provider_engine/spec/dummy/config/lti_xml.yml
266
+ Connecting to database specified by database.yml