panda_pal 5.3.6 → 5.3.7

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_pal
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.6
4
+ version: 5.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure ProServe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-26 00:00:00.000000000 Z
11
+ date: 2021-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -198,7 +198,7 @@ dependencies:
198
198
  - - ">="
199
199
  - !ruby/object:Gem::Version
200
200
  version: '0'
201
- description:
201
+ description:
202
202
  email:
203
203
  - pseng@instructure.com
204
204
  executables: []
@@ -220,7 +220,6 @@ files:
220
220
  - app/lib/lti_xml/base_platform.rb
221
221
  - app/lib/lti_xml/bridge_platform.rb
222
222
  - app/lib/lti_xml/canvas_platform.rb
223
- - app/lib/panda_pal/batch_processor.rb
224
223
  - app/lib/panda_pal/launch_url_helpers.rb
225
224
  - app/lib/panda_pal/lti_jwt_validator.rb
226
225
  - app/lib/panda_pal/misc_helper.rb
@@ -236,6 +235,10 @@ files:
236
235
  - config/dev_lti_key.key
237
236
  - config/initializers/apartment.rb
238
237
  - config/routes.rb
238
+ - db/618eef7c0380ba654ad16f867a919e72.sqlite3
239
+ - db/9ff93d4f7e0e9dc80a43f68997caf4a1.sqlite3
240
+ - db/a3fda4044a7215bc2c9eb01a4b9e517a.sqlite3
241
+ - db/daa0e6378a5ec76fcce83b7070dad219.sqlite3
239
242
  - db/migrate/20160412205931_create_panda_pal_organizations.rb
240
243
  - db/migrate/20160413135653_create_panda_pal_sessions.rb
241
244
  - db/migrate/20160425130344_add_panda_pal_organization_to_session.rb
@@ -282,7 +285,9 @@ files:
282
285
  - spec/dummy/config/locales/en.yml
283
286
  - spec/dummy/config/routes.rb
284
287
  - spec/dummy/config/secrets.yml
288
+ - spec/dummy/db/development.sqlite3
285
289
  - spec/dummy/db/schema.rb
290
+ - spec/dummy/db/test.sqlite3
286
291
  - spec/dummy/log/development.log
287
292
  - spec/dummy/log/test.log
288
293
  - spec/dummy/public/404.html
@@ -301,7 +306,7 @@ homepage: http://instructure.com
301
306
  licenses:
302
307
  - MIT
303
308
  metadata: {}
304
- post_install_message:
309
+ post_install_message:
305
310
  rdoc_options: []
306
311
  require_paths:
307
312
  - lib
@@ -316,8 +321,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
321
  - !ruby/object:Gem::Version
317
322
  version: '0'
318
323
  requirements: []
319
- rubygems_version: 3.0.3
320
- signing_key:
324
+ rubygems_version: 3.1.2
325
+ signing_key:
321
326
  specification_version: 4
322
327
  summary: LTI mountable engine
323
328
  test_files:
@@ -355,6 +360,8 @@ test_files:
355
360
  - spec/dummy/public/500.html
356
361
  - spec/dummy/public/404.html
357
362
  - spec/dummy/db/schema.rb
363
+ - spec/dummy/db/test.sqlite3
364
+ - spec/dummy/db/development.sqlite3
358
365
  - spec/dummy/log/test.log
359
366
  - spec/dummy/log/development.log
360
367
  - spec/dummy/README.rdoc
@@ -1,41 +0,0 @@
1
- module PandaPal
2
- # An array that "processes" after so many items are added.
3
- #
4
- # Example Usage:
5
- # batches = BatchProcessor.new(of: 1000) do |batch|
6
- # # Process the batch somehow
7
- # end
8
- # enumerator_of_some_kind.each { |item| batches << item }
9
- # batches.flush
10
- class BatchProcessor
11
- attr_reader :batch_size
12
-
13
- def initialize(of: 1000, &blk)
14
- @batch_size = of
15
- @block = blk
16
- @current_batch = []
17
- end
18
-
19
- def <<(item)
20
- @current_batch << item
21
- process_batch if @current_batch.count >= batch_size
22
- end
23
-
24
- def add_all(items)
25
- items.each do |i|
26
- self << i
27
- end
28
- end
29
-
30
- def flush
31
- process_batch if @current_batch.present?
32
- end
33
-
34
- protected
35
-
36
- def process_batch
37
- @block.call(@current_batch)
38
- @current_batch = []
39
- end
40
- end
41
- end