coalescing_panda 4.2.2 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/coalescing_panda/oauth2_controller.rb +8 -6
- data/app/models/coalescing_panda/canvas_api_auth.rb +4 -0
- data/db/migrate/20151209155923_add_refresh_settings_to_canvas_api_auth.rb +6 -0
- data/lib/coalescing_panda/controller_helpers.rb +55 -16
- data/lib/coalescing_panda/version.rb +1 -1
- data/spec/controllers/coalescing_panda/oauth2_controller_spec.rb +5 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +10890 -78447
- data/spec/factories/canvas_api_auths.rb +9 -0
- data/spec/models/coalescing_panda/canvas_api_auth_spec.rb +11 -1
- metadata +52 -54
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -1573
@@ -6,6 +6,16 @@ describe CoalescingPanda::CanvasApiAuth do
|
|
6
6
|
it { should validate_presence_of(:user_id)}
|
7
7
|
it {should validate_presence_of(:api_domain)}
|
8
8
|
|
9
|
+
describe '#expired?' do
|
10
|
+
let(:auth) { FactoryGirl.create :canvas_api_auth }
|
9
11
|
|
12
|
+
it 'is not expired if expires_at is null or in the future' do
|
13
|
+
auth.expires_at = nil
|
14
|
+
expect(auth.expired?).to be_falsey
|
15
|
+
auth.expires_at = 1.hour.ago
|
16
|
+
expect(auth.expired?).to be_truthy
|
17
|
+
auth.expires_at = 1.hour.from_now
|
18
|
+
expect(auth.expired?).to be_falsey
|
19
|
+
end
|
20
|
+
end
|
10
21
|
end
|
11
|
-
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coalescing_panda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Mills
|
@@ -10,36 +10,36 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-10
|
13
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 4.2.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: 4.2.1
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: bearcat
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - ~>
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 1.0
|
35
|
+
version: 1.2.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - ~>
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.0
|
42
|
+
version: 1.2.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: macaddr
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,266 +58,266 @@ dependencies:
|
|
58
58
|
name: ims-lti
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - '>='
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - '>='
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: haml-rails
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- -
|
82
|
+
- - '>='
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: sass-rails
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- -
|
89
|
+
- - '>='
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '3.2'
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- -
|
96
|
+
- - '>='
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '3.2'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: jquery-rails
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - '>='
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- -
|
110
|
+
- - '>='
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: coffee-rails
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - '>='
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
type: :runtime
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- -
|
124
|
+
- - '>='
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: p3p
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
|
-
- -
|
138
|
+
- - '>='
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: useragent
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
|
-
- -
|
145
|
+
- - '>='
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
type: :runtime
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
|
-
- -
|
152
|
+
- - '>='
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0'
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
156
|
name: delayed_job_active_record
|
157
157
|
requirement: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
159
|
-
- -
|
159
|
+
- - '>='
|
160
160
|
- !ruby/object:Gem::Version
|
161
161
|
version: '0'
|
162
162
|
type: :runtime
|
163
163
|
prerelease: false
|
164
164
|
version_requirements: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
|
-
- -
|
166
|
+
- - '>='
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
- !ruby/object:Gem::Dependency
|
170
170
|
name: open_uri_redirections
|
171
171
|
requirement: !ruby/object:Gem::Requirement
|
172
172
|
requirements:
|
173
|
-
- -
|
173
|
+
- - '>='
|
174
174
|
- !ruby/object:Gem::Version
|
175
175
|
version: '0'
|
176
176
|
type: :runtime
|
177
177
|
prerelease: false
|
178
178
|
version_requirements: !ruby/object:Gem::Requirement
|
179
179
|
requirements:
|
180
|
-
- -
|
180
|
+
- - '>='
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '0'
|
183
183
|
- !ruby/object:Gem::Dependency
|
184
184
|
name: sqlite3
|
185
185
|
requirement: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
|
-
- -
|
187
|
+
- - '>='
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
190
|
type: :development
|
191
191
|
prerelease: false
|
192
192
|
version_requirements: !ruby/object:Gem::Requirement
|
193
193
|
requirements:
|
194
|
-
- -
|
194
|
+
- - '>='
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
- !ruby/object:Gem::Dependency
|
198
198
|
name: rspec-rails
|
199
199
|
requirement: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
|
-
- -
|
201
|
+
- - '>='
|
202
202
|
- !ruby/object:Gem::Version
|
203
203
|
version: '0'
|
204
204
|
type: :development
|
205
205
|
prerelease: false
|
206
206
|
version_requirements: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
|
-
- -
|
208
|
+
- - '>='
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: '0'
|
211
211
|
- !ruby/object:Gem::Dependency
|
212
212
|
name: factory_girl_rails
|
213
213
|
requirement: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
|
-
- -
|
215
|
+
- - '>='
|
216
216
|
- !ruby/object:Gem::Version
|
217
217
|
version: '0'
|
218
218
|
type: :development
|
219
219
|
prerelease: false
|
220
220
|
version_requirements: !ruby/object:Gem::Requirement
|
221
221
|
requirements:
|
222
|
-
- -
|
222
|
+
- - '>='
|
223
223
|
- !ruby/object:Gem::Version
|
224
224
|
version: '0'
|
225
225
|
- !ruby/object:Gem::Dependency
|
226
226
|
name: shoulda-matchers
|
227
227
|
requirement: !ruby/object:Gem::Requirement
|
228
228
|
requirements:
|
229
|
-
- -
|
229
|
+
- - '>='
|
230
230
|
- !ruby/object:Gem::Version
|
231
231
|
version: '0'
|
232
232
|
type: :development
|
233
233
|
prerelease: false
|
234
234
|
version_requirements: !ruby/object:Gem::Requirement
|
235
235
|
requirements:
|
236
|
-
- -
|
236
|
+
- - '>='
|
237
237
|
- !ruby/object:Gem::Version
|
238
238
|
version: '0'
|
239
239
|
- !ruby/object:Gem::Dependency
|
240
240
|
name: nokogiri
|
241
241
|
requirement: !ruby/object:Gem::Requirement
|
242
242
|
requirements:
|
243
|
-
- -
|
243
|
+
- - '>='
|
244
244
|
- !ruby/object:Gem::Version
|
245
245
|
version: '0'
|
246
246
|
type: :development
|
247
247
|
prerelease: false
|
248
248
|
version_requirements: !ruby/object:Gem::Requirement
|
249
249
|
requirements:
|
250
|
-
- -
|
250
|
+
- - '>='
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
- !ruby/object:Gem::Dependency
|
254
254
|
name: simplecov
|
255
255
|
requirement: !ruby/object:Gem::Requirement
|
256
256
|
requirements:
|
257
|
-
- -
|
257
|
+
- - '>='
|
258
258
|
- !ruby/object:Gem::Version
|
259
259
|
version: '0'
|
260
260
|
type: :development
|
261
261
|
prerelease: false
|
262
262
|
version_requirements: !ruby/object:Gem::Requirement
|
263
263
|
requirements:
|
264
|
-
- -
|
264
|
+
- - '>='
|
265
265
|
- !ruby/object:Gem::Version
|
266
266
|
version: '0'
|
267
267
|
- !ruby/object:Gem::Dependency
|
268
268
|
name: byebug
|
269
269
|
requirement: !ruby/object:Gem::Requirement
|
270
270
|
requirements:
|
271
|
-
- -
|
271
|
+
- - '>='
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
type: :development
|
275
275
|
prerelease: false
|
276
276
|
version_requirements: !ruby/object:Gem::Requirement
|
277
277
|
requirements:
|
278
|
-
- -
|
278
|
+
- - '>='
|
279
279
|
- !ruby/object:Gem::Version
|
280
280
|
version: '0'
|
281
281
|
- !ruby/object:Gem::Dependency
|
282
282
|
name: pry
|
283
283
|
requirement: !ruby/object:Gem::Requirement
|
284
284
|
requirements:
|
285
|
-
- -
|
285
|
+
- - '>='
|
286
286
|
- !ruby/object:Gem::Version
|
287
287
|
version: '0'
|
288
288
|
type: :development
|
289
289
|
prerelease: false
|
290
290
|
version_requirements: !ruby/object:Gem::Requirement
|
291
291
|
requirements:
|
292
|
-
- -
|
292
|
+
- - '>='
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: '0'
|
295
295
|
- !ruby/object:Gem::Dependency
|
296
296
|
name: webmock
|
297
297
|
requirement: !ruby/object:Gem::Requirement
|
298
298
|
requirements:
|
299
|
-
- -
|
299
|
+
- - '>='
|
300
300
|
- !ruby/object:Gem::Version
|
301
301
|
version: '0'
|
302
302
|
type: :development
|
303
303
|
prerelease: false
|
304
304
|
version_requirements: !ruby/object:Gem::Requirement
|
305
305
|
requirements:
|
306
|
-
- -
|
306
|
+
- - '>='
|
307
307
|
- !ruby/object:Gem::Version
|
308
308
|
version: '0'
|
309
309
|
- !ruby/object:Gem::Dependency
|
310
310
|
name: lol_dba
|
311
311
|
requirement: !ruby/object:Gem::Requirement
|
312
312
|
requirements:
|
313
|
-
- -
|
313
|
+
- - '>='
|
314
314
|
- !ruby/object:Gem::Version
|
315
315
|
version: '0'
|
316
316
|
type: :development
|
317
317
|
prerelease: false
|
318
318
|
version_requirements: !ruby/object:Gem::Requirement
|
319
319
|
requirements:
|
320
|
-
- -
|
320
|
+
- - '>='
|
321
321
|
- !ruby/object:Gem::Version
|
322
322
|
version: '0'
|
323
323
|
description:
|
@@ -399,6 +399,7 @@ files:
|
|
399
399
|
- db/migrate/20150709192717_add_leader_id_to_groups.rb
|
400
400
|
- db/migrate/20150714205405_create_coalescing_panda_group_categories.rb
|
401
401
|
- db/migrate/20150811140030_add_fields_to_users.rb
|
402
|
+
- db/migrate/20151209155923_add_refresh_settings_to_canvas_api_auth.rb
|
402
403
|
- lib/coalescing_panda.rb
|
403
404
|
- lib/coalescing_panda/bearcat_uri.rb
|
404
405
|
- lib/coalescing_panda/controller_helpers.rb
|
@@ -439,10 +440,8 @@ files:
|
|
439
440
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
440
441
|
- spec/dummy/config/locales/en.yml
|
441
442
|
- spec/dummy/config/routes.rb
|
442
|
-
- spec/dummy/db/development.sqlite3
|
443
443
|
- spec/dummy/db/schema.rb
|
444
444
|
- spec/dummy/db/test.sqlite3
|
445
|
-
- spec/dummy/log/development.log
|
446
445
|
- spec/dummy/log/test.log
|
447
446
|
- spec/dummy/public/404.html
|
448
447
|
- spec/dummy/public/422.html
|
@@ -451,6 +450,7 @@ files:
|
|
451
450
|
- spec/factories/accounts.rb
|
452
451
|
- spec/factories/assignment_groups.rb
|
453
452
|
- spec/factories/assignments.rb
|
453
|
+
- spec/factories/canvas_api_auths.rb
|
454
454
|
- spec/factories/canvas_batches.rb
|
455
455
|
- spec/factories/courses.rb
|
456
456
|
- spec/factories/enrollments.rb
|
@@ -485,17 +485,17 @@ require_paths:
|
|
485
485
|
- lib
|
486
486
|
required_ruby_version: !ruby/object:Gem::Requirement
|
487
487
|
requirements:
|
488
|
-
- -
|
488
|
+
- - '>='
|
489
489
|
- !ruby/object:Gem::Version
|
490
490
|
version: '0'
|
491
491
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
492
492
|
requirements:
|
493
|
-
- -
|
493
|
+
- - '>='
|
494
494
|
- !ruby/object:Gem::Version
|
495
495
|
version: '0'
|
496
496
|
requirements: []
|
497
497
|
rubyforge_project:
|
498
|
-
rubygems_version: 2.4.
|
498
|
+
rubygems_version: 2.4.6
|
499
499
|
signing_key:
|
500
500
|
specification_version: 4
|
501
501
|
summary: Canvas LTI and OAUTH2 mountable engine
|
@@ -531,10 +531,8 @@ test_files:
|
|
531
531
|
- spec/dummy/config/locales/en.yml
|
532
532
|
- spec/dummy/config/routes.rb
|
533
533
|
- spec/dummy/config.ru
|
534
|
-
- spec/dummy/db/development.sqlite3
|
535
534
|
- spec/dummy/db/schema.rb
|
536
535
|
- spec/dummy/db/test.sqlite3
|
537
|
-
- spec/dummy/log/development.log
|
538
536
|
- spec/dummy/log/test.log
|
539
537
|
- spec/dummy/public/404.html
|
540
538
|
- spec/dummy/public/422.html
|
@@ -545,6 +543,7 @@ test_files:
|
|
545
543
|
- spec/factories/accounts.rb
|
546
544
|
- spec/factories/assignment_groups.rb
|
547
545
|
- spec/factories/assignments.rb
|
546
|
+
- spec/factories/canvas_api_auths.rb
|
548
547
|
- spec/factories/canvas_batches.rb
|
549
548
|
- spec/factories/courses.rb
|
550
549
|
- spec/factories/enrollments.rb
|
@@ -570,4 +569,3 @@ test_files:
|
|
570
569
|
- spec/models/coalescing_panda/workers/course_miner_spec.rb
|
571
570
|
- spec/rails_helper.rb
|
572
571
|
- spec/spec_helper.rb
|
573
|
-
has_rdoc:
|