canvas_sync 0.16.1 → 0.16.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: b7038c74006653dd7e024f38b64df7e73862aab4f6249df28ef9f7ac342700bc
4
- data.tar.gz: 7a485d873c8c76ef54d6bd7fe11bd98d697dd0d8a1954035396da74b414ec105
3
+ metadata.gz: 3c6655d28b3ac244a94cd59da9f76f6878658bff43d1ca071dd7718b82a505ad
4
+ data.tar.gz: e8ee3801761dd8a84d80ea162ff11e079b219e1d1992788aecd49451c59efaf4
5
5
  SHA512:
6
- metadata.gz: 0c1029ad4dc626d9924890d5b7cc9aaac2ae8e5e7b4350965e94e2545a14d29d650db42698bb16bd3cd97c00b6ff8571d4822ac98a9d808b3a7165e23bf449ff
7
- data.tar.gz: 15a90b4b8df330db5fd7d4470d34487956de86a7e1e355ceb65bdfc7deb51174ab94b9feb013fc5b5fd431f6c89e58793f05ab23027d0f35fc7626936b0be7e5
6
+ metadata.gz: 47a9f7e858cb510f191d1c62f99f112384dc62d3d9d62365369bad5b275d0168d1d5ace94a32b7f76921ee072ae49d3b940e6d56c2aeb51601e9daf52c86b36e
7
+ data.tar.gz: 84c5b5c9816a2ff8578bb32892739a8737fb6049526f24ef1416d7a5f404fc385f808ca9a7739b1d971baf06f81fe172351015332fe56a67a2e64417158e60d3
@@ -15,13 +15,14 @@ module CanvasSync::Concerns
15
15
  private
16
16
 
17
17
  def legacy_column_apply(cls)
18
- cid_column = "canvas_#{subclass.name.downcase}_id"
19
- column_names = subclass.columns.map(&:name)
18
+ return if cls.abstract_class
19
+ cid_column = "canvas_#{cls.name.downcase}_id"
20
+ column_names = cls.columns.map(&:name)
20
21
  return if column_names.include?('canvas_id') && column_names.include?(cid_column)
21
22
  if column_names.include?('canvas_id')
22
- subclass.alias_attribute(cid_column.to_sym, :canvas_id)
23
+ cls.alias_attribute(cid_column.to_sym, :canvas_id)
23
24
  elsif column_names.include?(cid_column)
24
- subclass.alias_attribute(:canvas_id, cid_column.to_sym)
25
+ cls.alias_attribute(:canvas_id, cid_column.to_sym)
25
26
  end
26
27
  rescue ActiveRecord::StatementInvalid
27
28
  end
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.16.1".freeze
2
+ VERSION = "0.16.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-28 00:00:00.000000000 Z
11
+ date: 2020-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -304,7 +304,7 @@ dependencies:
304
304
  - - ">="
305
305
  - !ruby/object:Gem::Version
306
306
  version: '0'
307
- description:
307
+ description:
308
308
  email:
309
309
  - ncollings@instructure.com
310
310
  executables: []
@@ -564,7 +564,7 @@ files:
564
564
  homepage: https://instructure.com
565
565
  licenses: []
566
566
  metadata: {}
567
- post_install_message:
567
+ post_install_message:
568
568
  rdoc_options: []
569
569
  require_paths:
570
570
  - lib
@@ -580,7 +580,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
580
580
  version: '0'
581
581
  requirements: []
582
582
  rubygems_version: 3.1.2
583
- signing_key:
583
+ signing_key:
584
584
  specification_version: 4
585
585
  summary: Gem for generating Canvas models and migrations and syncing data from Canvas
586
586
  test_files: