panda_pal 5.3.10 → 5.3.11

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: 42e9ffbf3704935100156e28b5d3f2490fba75a5974b352f0092c14bb8b87ffb
4
- data.tar.gz: 5d511a85fe356dfe659ecaacfc7023315f649947ff483c6969e253802549e825
3
+ metadata.gz: 13d3460a12f31ce93e9fba60f806871ba8e5507b43c8b761b06e34244b528215
4
+ data.tar.gz: c8a288d52fa8927835c8cf59561d9ff15a156631c09d9e556d561da0e55073f3
5
5
  SHA512:
6
- metadata.gz: a4d2a7242e203c4c86866ff7efb3ba211c2b3b7f41463b776785371e06997470fdee569ed4e4ba0025a7eef6198bb067e1fdf71fc8b7c9307bf26c1d343de7db
7
- data.tar.gz: 7c3f0facf0767b7afea02ad0368bf6a0d79c8522109289e463a95719cd7f3762a34b5ad641499ff96871815f2db1ec76f192dd6221936d3af2586399a402bf1f
6
+ metadata.gz: 440a454305b5d1b1ed3c6b34e7ea2c9875be68eaf0bced9e59eef8734cb5590a8643e385d2e00cf11450397ec4e7aa10df08f9e0e57a8fff22fdb352354437a8
7
+ data.tar.gz: 5b89736e51f2cbe46fe6d2ebc088b95ddb24f30e7f2aef4f3b90356f8a13de4b8b728695cdfee9f393a4ff539461462a1944e2592db66038b9be5e86a7b9698f
@@ -56,4 +56,6 @@ module PandaPal
56
56
  Apartment::Tenant.drop name
57
57
  end
58
58
  end
59
+
60
+ Organization.sync_schedules if Organization.respond_to?(:sync_schedules)
59
61
  end
@@ -168,13 +168,17 @@ module PandaPal
168
168
  return nil unless cron_time.present?
169
169
 
170
170
  cron_time = instance_exec(&cron_time) if cron_time.is_a?(Proc)
171
- if !Rufus::Scheduler.parse(cron_time).zone.present? && settings && settings[:timezone]
172
- cron_time += " #{settings[:timezone]}"
171
+ if !Rufus::Scheduler.parse(cron_time).zone.present? && settings && settings_timezone
172
+ cron_time += " #{settings_timezone}"
173
173
  end
174
174
 
175
175
  cron_time
176
176
  end
177
177
 
178
+ def settings_timezone
179
+ settings[:timezone] || settings.dig(:canvas, :root_account_timezone).presence || nil
180
+ end
181
+
178
182
  class ScheduledTaskExecutor
179
183
  include Sidekiq::Worker
180
184
 
@@ -10,10 +10,10 @@ Apartment.configure do |config|
10
10
  end
11
11
 
12
12
  Rails.application.config.middleware.use Apartment::Elevators::Generic, lambda { |request|
13
- if request.path.starts_with?('/rails/active_storage/blobs/')
14
- PandaPal::Organization.find_by(id: request.params['organization_id']).try(:name)
15
- elsif match = request.path.match(/\/(?:orgs?|organizations?)\/(\d+)/)
13
+ if match = request.path.match(/\/(?:orgs?|organizations?)\/(\d+)/)
16
14
  PandaPal::Organization.find_by(id: match[1]).try(:name)
15
+ elsif request.path.starts_with?('/rails/active_storage/blobs/')
16
+ PandaPal::Organization.find_by(id: request.params['organization_id']).try(:name)
17
17
  end
18
18
  }
19
19
 
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "5.3.10"
2
+ VERSION = "5.3.11"
3
3
  end
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.10
4
+ version: 5.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure ProServe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-05 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails