canvas_sync 0.6.3 → 0.6.4

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: 9ba297d1cd2d6d8a87e5b1e82b79d33ce0090d941ab43c3473e9b71e0aaf2b50
4
- data.tar.gz: fe0186bc010ff6a6cf3d11874ee1cd1ebebeca59c2ebd4714bcf1a67d5b0704c
3
+ metadata.gz: a57e57d039eb1106619e3cd1019942b7a51e707df471cc7e8c46fe69840189ba
4
+ data.tar.gz: 0702bf4968ffe18532759d0c6a03d7e6ca73eb0a23b675825ee12939325e9f33
5
5
  SHA512:
6
- metadata.gz: aedc33de02a58e7d066f19c061ffb1436ef196dcc9e9c06a725db70b389529e518e8857a6343938e87de9b43114fe1ebb04e242f050e995b3d0e98f7421b493d
7
- data.tar.gz: 37b20e20a49e312209d92839757c7b4e8cb646ad1a6596c4124d6dc9715188cf9a948a786fea280fd70af574296f4c388d8a56ea8109281927f89ed08c6a0acb
6
+ metadata.gz: 46f2fde7c43f048bfe531116311f8794da7f27a3de4cd31efda024a08f7421f77b3b95fd84fb31067fa62a4b4d4ac12e44b923f45bc61bed37e10bddea1ab2cf
7
+ data.tar.gz: ea5acb8a77a3a187dabe416b4d6debdd52f10e3c4b4136e7958988868af97734c79498faaec8046dd5cdb0c34cda24095cb1184f4695cee0a95978b5ffb40dcd
@@ -5,12 +5,16 @@
5
5
  # * https://github.com/influitive/apartment/issues/508
6
6
 
7
7
  Rails.application.config.after_initialize do
8
- Rails.application.eager_load!
9
- ActiveRecord::Base.descendants.each do |model|
10
- seq_name = model.sequence_name
11
- if seq_name.present?
12
- tenant, seq_name = seq_name.include?(".") ? seq_name.split(".") : [nil, seq_name]
13
- model.sequence_name = seq_name if tenant != "public"
8
+ begin
9
+ Rails.application.eager_load!
10
+ ActiveRecord::Base.descendants.each do |model|
11
+ seq_name = model.sequence_name
12
+ if seq_name.present?
13
+ tenant, seq_name = seq_name.include?(".") ? seq_name.split(".") : [nil, seq_name]
14
+ model.sequence_name = seq_name if tenant != "public"
15
+ end
14
16
  end
17
+ rescue PG::ConnectionBad
18
+ # no-op if there is no database setup
15
19
  end
16
20
  end
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.6.3".freeze
2
+ VERSION = "0.6.4".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings