lti_provider_engine 0.0.6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/lti_provider/lti_controller.rb +3 -3
- data/db/migrate/20130319050003_create_lti_provider_launches.rb +1 -1
- data/lib/lti_provider/lti_application.rb +3 -3
- data/lib/lti_provider/version.rb +1 -1
- data/spec/controllers/lti_provider/lti_controller_spec.rb +16 -11
- data/spec/dummy/db/migrate/20130319050206_create_lti_provider_launches.lti_provider.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +7107 -737
- data/spec/models/lti_provider/launch_spec.rb +8 -18
- data/spec/spec_helper.rb +1 -9
- metadata +22 -27
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -32
@@ -1,18 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe LtiProvider::Launch do
|
4
|
-
describe "validations" do
|
5
|
-
subject(:launch) do
|
6
|
-
l = LtiProvider::Launch.new
|
7
|
-
l.provider_params = {}
|
8
|
-
l
|
9
|
-
end
|
10
|
-
|
11
|
-
it { is_expected.to validate_presence_of :canvas_url }
|
12
|
-
it { is_expected.to validate_presence_of :nonce }
|
13
|
-
it { is_expected.to validate_presence_of :provider_params }
|
14
|
-
end
|
15
|
-
|
16
4
|
describe ".initialize_from_request" do
|
17
5
|
let(:provider) do
|
18
6
|
p = double('provider')
|
@@ -40,12 +28,14 @@ describe LtiProvider::Launch do
|
|
40
28
|
|
41
29
|
subject(:launch) { LtiProvider::Launch.initialize_from_request(provider, request) }
|
42
30
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
31
|
+
it "parses params" do
|
32
|
+
expect(subject.course_id).to eq 1
|
33
|
+
expect(subject.tool_consumer_instance_guid).to eq '123abc'
|
34
|
+
expect(subject.user_id).to eq 2
|
35
|
+
expect(subject.nonce).to eq 'nonce'
|
36
|
+
expect(subject.account_id).to be_nil
|
37
|
+
expect(subject.canvas_url).to eq 'http://example.com'
|
38
|
+
end
|
49
39
|
end
|
50
40
|
|
51
41
|
describe "xml_config" do
|
data/spec/spec_helper.rb
CHANGED
@@ -2,10 +2,9 @@
|
|
2
2
|
ENV["RAILS_ENV"] ||= 'test'
|
3
3
|
require File.expand_path("../dummy/config/environment", __FILE__)
|
4
4
|
require 'rspec/rails'
|
5
|
-
require 'rspec/its'
|
6
5
|
require 'webmock/rspec'
|
7
|
-
require 'shoulda/matchers'
|
8
6
|
require 'nokogiri'
|
7
|
+
require 'byebug'
|
9
8
|
|
10
9
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
11
10
|
# in spec/support/ and its subdirectories.
|
@@ -23,13 +22,6 @@ module LtiProvider
|
|
23
22
|
end
|
24
23
|
end
|
25
24
|
|
26
|
-
Shoulda::Matchers.configure do |config|
|
27
|
-
config.integrate do |with|
|
28
|
-
with.test_framework :rspec
|
29
|
-
with.library :rails
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
25
|
RSpec.configure do |config|
|
34
26
|
# ## Mock Framework
|
35
27
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lti_provider_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Donahue
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-08-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -18,34 +18,34 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '4.2'
|
22
22
|
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: '
|
24
|
+
version: '5.2'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
28
|
requirements:
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: '
|
31
|
+
version: '4.2'
|
32
32
|
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '5.2'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: ims-lti
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.
|
41
|
+
version: '1.2'
|
42
42
|
type: :runtime
|
43
43
|
prerelease: false
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.
|
48
|
+
version: '1.2'
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: sqlite3
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,7 +89,7 @@ dependencies:
|
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
|
-
name: rspec-
|
92
|
+
name: rspec-rails
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - ">="
|
@@ -103,7 +103,7 @@ dependencies:
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
|
-
name: rspec-rails
|
106
|
+
name: rspec-rails-mocha
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - ">="
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
|
-
name:
|
120
|
+
name: webmock
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - ">="
|
@@ -131,7 +131,7 @@ dependencies:
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
|
-
name:
|
134
|
+
name: guard-rspec
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - ">="
|
@@ -145,21 +145,21 @@ dependencies:
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
|
-
name:
|
148
|
+
name: listen
|
149
149
|
requirement: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- - "
|
151
|
+
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
153
|
+
version: 3.0.6
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
156
|
version_requirements: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- - "
|
158
|
+
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
160
|
+
version: 3.0.6
|
161
161
|
- !ruby/object:Gem::Dependency
|
162
|
-
name:
|
162
|
+
name: rb-fsevent
|
163
163
|
requirement: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
165
|
- - ">="
|
@@ -173,7 +173,7 @@ dependencies:
|
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
- !ruby/object:Gem::Dependency
|
176
|
-
name:
|
176
|
+
name: byebug
|
177
177
|
requirement: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
179
|
- - ">="
|
@@ -238,11 +238,9 @@ files:
|
|
238
238
|
- spec/dummy/config/lti.yml
|
239
239
|
- spec/dummy/config/lti_xml.yml
|
240
240
|
- spec/dummy/config/routes.rb
|
241
|
-
- spec/dummy/db/development.sqlite3
|
242
241
|
- spec/dummy/db/migrate/20130319050206_create_lti_provider_launches.lti_provider.rb
|
243
242
|
- spec/dummy/db/schema.rb
|
244
243
|
- spec/dummy/db/test.sqlite3
|
245
|
-
- spec/dummy/log/development.log
|
246
244
|
- spec/dummy/log/test.log
|
247
245
|
- spec/dummy/public/404.html
|
248
246
|
- spec/dummy/public/422.html
|
@@ -272,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
272
270
|
version: '0'
|
273
271
|
requirements: []
|
274
272
|
rubyforge_project:
|
275
|
-
rubygems_version: 2.
|
273
|
+
rubygems_version: 2.6.12
|
276
274
|
signing_key:
|
277
275
|
specification_version: 4
|
278
276
|
summary: LtiProvider is a mountable engine for handling the LTI launch and exposing
|
@@ -300,11 +298,9 @@ test_files:
|
|
300
298
|
- spec/dummy/config/lti_xml.yml
|
301
299
|
- spec/dummy/config/routes.rb
|
302
300
|
- spec/dummy/config.ru
|
303
|
-
- spec/dummy/db/development.sqlite3
|
304
301
|
- spec/dummy/db/migrate/20130319050206_create_lti_provider_launches.lti_provider.rb
|
305
302
|
- spec/dummy/db/schema.rb
|
306
303
|
- spec/dummy/db/test.sqlite3
|
307
|
-
- spec/dummy/log/development.log
|
308
304
|
- spec/dummy/log/test.log
|
309
305
|
- spec/dummy/public/404.html
|
310
306
|
- spec/dummy/public/422.html
|
@@ -315,4 +311,3 @@ test_files:
|
|
315
311
|
- spec/dummy/script/rails
|
316
312
|
- spec/models/lti_provider/launch_spec.rb
|
317
313
|
- spec/spec_helper.rb
|
318
|
-
has_rdoc:
|
Binary file
|
@@ -1,32 +0,0 @@
|
|
1
|
-
Initializing LTI key and secret using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti.yml
|
2
|
-
Initializing LTI XML config using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti_xml.yml
|
3
|
-
Initializing LTI key and secret using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti.yml
|
4
|
-
Initializing LTI XML config using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti_xml.yml
|
5
|
-
Initializing LTI key and secret using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti.yml
|
6
|
-
Initializing LTI XML config using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti_xml.yml
|
7
|
-
[1m[36m (1.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
8
|
-
[1m[35m (0.4ms)[0m select sqlite_version(*)
|
9
|
-
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
10
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
11
|
-
Migrating to CreateLtiProviderLaunches (20130319050206)
|
12
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
13
|
-
DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/ngupta/Documents/lti_provider_engine/spec/dummy/db/migrate/20130319050206_create_lti_provider_launches.lti_provider.rb:9)
|
14
|
-
[1m[35m (0.3ms)[0m CREATE TABLE "lti_provider_launches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_url" varchar, "nonce" varchar, "provider_params" text, "created_at" datetime, "updated_at" datetime)
|
15
|
-
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20130319050206"]]
|
16
|
-
[1m[35m (0.8ms)[0m commit transaction
|
17
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.0ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
18
|
-
Initializing LTI key and secret using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti.yml
|
19
|
-
Initializing LTI XML config using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti_xml.yml
|
20
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
21
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.0ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
22
|
-
Initializing LTI key and secret using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti.yml
|
23
|
-
Initializing LTI XML config using configuration in /Users/ngupta/Documents/lti_provider_engine/spec/dummy/config/lti_xml.yml
|
24
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
25
|
-
Migrating to CreateLtiProviderLaunches (20130319050003)
|
26
|
-
[1m[35m (0.1ms)[0m begin transaction
|
27
|
-
DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/ngupta/Documents/lti_provider_engine/db/migrate/20130319050003_create_lti_provider_launches.rb:8)
|
28
|
-
[1m[36m (1.3ms)[0m [1mDROP TABLE "lti_provider_launches"[0m
|
29
|
-
[1m[35m (0.1ms)[0m CREATE TABLE "lti_provider_launches" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_url" varchar, "nonce" varchar, "provider_params" text, "created_at" datetime, "updated_at" datetime)
|
30
|
-
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20130319050003"]]
|
31
|
-
[1m[35m (0.8ms)[0m commit transaction
|
32
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.0ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|