mumuki-laboratory 6.4.1 → 6.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5f61c0972720fad49773ce961e0d22bf5ccbe278227acf8c774b96c2496c700
4
- data.tar.gz: 6a0f37e73b932e93103875147c87a26655db669ca3bc8596b07e7c7f088f9de0
3
+ metadata.gz: c70e70c721988ae2a17c12556ceb48438c3eb7d45e1c43f186f61f1db8a7eb68
4
+ data.tar.gz: 243fe0ce527986bbb37b0557cdfb1141762a183d139cebe670a9001fafc95e1d
5
5
  SHA512:
6
- metadata.gz: 41e106589d3de950b94ccdc08c61c391426a24d0221ade64ad360bf05f475f40105aa669ecc79e01f4af988103e393efe7ed0515800d24b62def8df4dd193dee
7
- data.tar.gz: 06fac5ebb2ee4bf166b9fd05d137d79ad8b2d9c00178b43fbef3496f697ef025c778dbebe380c12af3ffe3485617871d89069d274c059ae598afdcb9ca811ab8
6
+ metadata.gz: 39077b3aabe2b22aa8c0e9aa4886e1ae1a9f196badbe84e5779c48fe85130870a13b499a27ee845160669231b60c7031957271d3407e247928f333f521699a00
7
+ data.tar.gz: ac16e9e2804ea667bf2cde6857b41bb7f11cdc3e759d058210bdd1e0075195f901d80b41a6cc9fb437f49d8933768fc64c03891f326942fdc52b304c650ef880
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Laboratory
3
- VERSION = '6.4.1'
3
+ VERSION = '6.4.2'
4
4
  end
5
5
  end
@@ -1,27 +1,29 @@
1
- namespace :assignments do
2
- task :notify_all, [:organization_name, :date_since] => :select_organization do |t, args|
3
- args.with_defaults(date_since: '2014-01-01')
4
- Organization.current.notify_recent_assignments! Date.parse(args[:date_since])
5
- end
1
+ namespace :laboratory do
2
+ namespace :assignments do
3
+ task :notify_all, [:organization_name, :date_since] => :select_organization do |t, args|
4
+ args.with_defaults(date_since: '2014-01-01')
5
+ Organization.current.notify_recent_assignments! Date.parse(args[:date_since])
6
+ end
6
7
 
7
- task :notify_user, [:organization_name, :user_uid] => :select_organization do |t, args|
8
- user = User.find_by(uid: args[:user_uid])
9
- puts "Found user #{user.name}."
8
+ task :notify_user, [:organization_name, :user_uid] => :select_organization do |t, args|
9
+ user = User.find_by(uid: args[:user_uid])
10
+ puts "Found user #{user.name}."
10
11
 
11
- Organization.current.notify_assignments_by! user
12
- end
12
+ Organization.current.notify_assignments_by! user
13
+ end
13
14
 
14
- task :notify_recent, [:organization_name] => :select_organization do |t, args|
15
- Organization
16
- .current
17
- .assignments
18
- .where(submitter: User.where(last_organization: Organization.current))
19
- .where('assignments.created_at > ?', 1.month.ago)
20
- .each(&:notify!)
21
- end
15
+ task :notify_recent, [:organization_name] => :select_organization do |t, args|
16
+ Organization
17
+ .current
18
+ .assignments
19
+ .where(submitter: User.where(last_organization: Organization.current))
20
+ .where('assignments.created_at > ?', 1.month.ago)
21
+ .each(&:notify!)
22
+ end
22
23
 
23
- # This task should not be called directly (because it "does nothing"), it's just a prerrequisite for the others.
24
- task :select_organization, [:organization_name] => :environment do |t, args|
25
- Organization.find_by!(name: args[:organization_name]).switch!
24
+ # This task should not be called directly (because it "does nothing"), it's just a prerrequisite for the others.
25
+ task :select_organization, [:organization_name] => :environment do |t, args|
26
+ Organization.find_by!(name: args[:organization_name]).switch!
27
+ end
26
28
  end
27
29
  end
@@ -5,13 +5,15 @@ module Mumukit::Nuntius::EventConsumer
5
5
  end
6
6
 
7
7
  logger = Mumukit::Nuntius::Logger
8
- namespace :events do
9
- task listen: :environment do
10
- logger.info 'Loading event handlers....'
11
- require_relative '../events'
12
- logger.info "Loaded handlers #{Mumukit::Nuntius::EventConsumer.handled_events}!"
8
+ namespace :laboratory do
9
+ namespace :events do
10
+ task listen: :environment do
11
+ logger.info 'Loading event handlers....'
12
+ require_relative '../mumuki/laboratory/events/events'
13
+ logger.info "Loaded handlers #{Mumukit::Nuntius::EventConsumer.handled_events}!"
13
14
 
14
- logger.info 'Listening to events...'
15
- Mumukit::Nuntius::EventConsumer.start!
15
+ logger.info 'Listening to events...'
16
+ Mumukit::Nuntius::EventConsumer.start!
17
+ end
16
18
  end
17
19
  end
@@ -1,14 +1,16 @@
1
1
  logger = Mumukit::Nuntius::Logger
2
2
 
3
- namespace :messages do
4
- task listen: :environment do
5
- logger.info 'Listening to messages'
3
+ namespace :laboratory do
4
+ namespace :messages do
5
+ task listen: :environment do
6
+ logger.info 'Listening to messages'
6
7
 
7
- Mumukit::Nuntius::Consumer.start 'teacher-messages', 'teacher-messages' do |_delivery_info, _properties, body|
8
- begin
9
- Message.import_from_resource_h!(body)
10
- rescue ActiveRecord::RecordInvalid => e
11
- logger.info e
8
+ Mumukit::Nuntius::Consumer.start 'teacher-messages', 'teacher-messages' do |_delivery_info, _properties, body|
9
+ begin
10
+ Message.import_from_resource_h!(body)
11
+ rescue ActiveRecord::RecordInvalid => e
12
+ logger.info e
13
+ end
12
14
  end
13
15
  end
14
16
  end
data/lib/tasks/users.rake CHANGED
@@ -1,10 +1,12 @@
1
- namespace :users do
1
+ namespace :laboratory do
2
+ namespace :users do
2
3
 
3
- task notify_reminder: :environment do
4
- BATCH_SIZE = ENV['MUMUKI_JOB_BATCH_SIZE']&.to_i || 1000
4
+ task notify_reminder: :environment do
5
+ BATCH_SIZE = ENV['MUMUKI_JOB_BATCH_SIZE']&.to_i || 1000
5
6
 
6
- User.remindable.find_each(batch_size: BATCH_SIZE) do |user|
7
- user.try_remind_with_lock!
8
- end if ApplicationMailer.environment_variables_set?
7
+ User.remindable.find_each(batch_size: BATCH_SIZE) do |user|
8
+ user.try_remind_with_lock!
9
+ end if ApplicationMailer.environment_variables_set?
10
+ end
9
11
  end
10
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-laboratory
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.1
4
+ version: 6.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-28 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -379,7 +379,6 @@ files:
379
379
  - config/initializers/omniauth.rb
380
380
  - config/initializers/session_store.rb
381
381
  - config/routes.rb
382
- - lib/events.rb
383
382
  - lib/mumuki/laboratory.rb
384
383
  - lib/mumuki/laboratory/controllers.rb
385
384
  - lib/mumuki/laboratory/controllers/authorization.rb
@@ -392,6 +391,7 @@ files:
392
391
  - lib/mumuki/laboratory/controllers/notifications.rb
393
392
  - lib/mumuki/laboratory/controllers/results_rendering.rb
394
393
  - lib/mumuki/laboratory/engine.rb
394
+ - lib/mumuki/laboratory/events/events.rb
395
395
  - lib/mumuki/laboratory/extensions.rb
396
396
  - lib/mumuki/laboratory/extensions/request.rb
397
397
  - lib/mumuki/laboratory/locales/datetime.es.yml
@@ -557,7 +557,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
557
557
  - !ruby/object:Gem::Version
558
558
  version: '0'
559
559
  requirements: []
560
- rubygems_version: 3.0.2
560
+ rubygems_version: 3.0.3
561
561
  signing_key:
562
562
  specification_version: 4
563
563
  summary: Code assement web application for the Mumuki Platform.