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 +4 -4
- data/lib/canvas_sync/concerns/legacy_columns.rb +5 -4
- data/lib/canvas_sync/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c6655d28b3ac244a94cd59da9f76f6878658bff43d1ca071dd7718b82a505ad
|
4
|
+
data.tar.gz: e8ee3801761dd8a84d80ea162ff11e079b219e1d1992788aecd49451c59efaf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
19
|
-
|
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
|
-
|
23
|
+
cls.alias_attribute(cid_column.to_sym, :canvas_id)
|
23
24
|
elsif column_names.include?(cid_column)
|
24
|
-
|
25
|
+
cls.alias_attribute(:canvas_id, cid_column.to_sym)
|
25
26
|
end
|
26
27
|
rescue ActiveRecord::StatementInvalid
|
27
28
|
end
|
data/lib/canvas_sync/version.rb
CHANGED
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.
|
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-
|
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:
|