legacy_column 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -12
- data/Rakefile +1 -1
- data/legacy_column.gemspec +1 -2
- data/lib/legacy_column.rb +2 -2
- data/lib/legacy_column/version.rb +1 -1
- data/spec/db/test.sqlite3 +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bcf97a196196ce89036abf0ddb356e4c221d27ba39cc0a6123a28b6eb4ec1143
|
|
4
|
+
data.tar.gz: 825a0c57501491b7061f4acb307e2198fb378ade1c72da4092fc91858b6e7bb0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92dabc01b57911388b11d822a2a5601cfc6688b4d63917a4e3294e608a37c174f04c910025b3453441b43fa879c08f8a41724a58f49ef9d6adbb6f0efbd120c2
|
|
7
|
+
data.tar.gz: cf3d4a3506ccac7978de886bc56f543abdf836752818c5f10eeb400918317226a38000a00c9dd578e42810f471357ac9937e66aaae0dc5e96e1373872df6cf9a
|
data/Gemfile.lock
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
legacy_column (0.1.
|
|
4
|
+
legacy_column (0.1.1)
|
|
5
5
|
activerecord (>= 4.0.0)
|
|
6
6
|
activesupport (>= 4.0.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: http://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activemodel (6.0.3.
|
|
12
|
-
activesupport (= 6.0.3.
|
|
13
|
-
activerecord (6.0.3.
|
|
14
|
-
activemodel (= 6.0.3.
|
|
15
|
-
activesupport (= 6.0.3.
|
|
16
|
-
activesupport (6.0.3.
|
|
11
|
+
activemodel (6.0.3.6)
|
|
12
|
+
activesupport (= 6.0.3.6)
|
|
13
|
+
activerecord (6.0.3.6)
|
|
14
|
+
activemodel (= 6.0.3.6)
|
|
15
|
+
activesupport (= 6.0.3.6)
|
|
16
|
+
activesupport (6.0.3.6)
|
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
18
|
i18n (>= 0.7, < 2)
|
|
19
19
|
minitest (~> 5.1)
|
|
20
20
|
tzinfo (~> 1.1)
|
|
21
21
|
zeitwerk (~> 2.2, >= 2.2.2)
|
|
22
|
-
concurrent-ruby (1.1.
|
|
22
|
+
concurrent-ruby (1.1.8)
|
|
23
23
|
diff-lcs (1.4.4)
|
|
24
|
-
i18n (1.8.
|
|
24
|
+
i18n (1.8.10)
|
|
25
25
|
concurrent-ruby (~> 1.0)
|
|
26
|
-
minitest (5.14.
|
|
26
|
+
minitest (5.14.4)
|
|
27
27
|
rake (13.0.1)
|
|
28
28
|
rspec (3.9.0)
|
|
29
29
|
rspec-core (~> 3.9.0)
|
|
@@ -40,9 +40,9 @@ GEM
|
|
|
40
40
|
rspec-support (3.9.3)
|
|
41
41
|
sqlite3 (1.4.2)
|
|
42
42
|
thread_safe (0.3.6)
|
|
43
|
-
tzinfo (1.2.
|
|
43
|
+
tzinfo (1.2.9)
|
|
44
44
|
thread_safe (~> 0.1)
|
|
45
|
-
zeitwerk (2.4.
|
|
45
|
+
zeitwerk (2.4.2)
|
|
46
46
|
|
|
47
47
|
PLATFORMS
|
|
48
48
|
ruby
|
data/Rakefile
CHANGED
data/legacy_column.gemspec
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
lib = File.expand_path("../lib", __FILE__)
|
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
3
|
require "legacy_column/version"
|
|
@@ -14,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
|
14
13
|
spec.homepage = "https://github.com/logicalgroove/legacy_column"
|
|
15
14
|
spec.license = "MIT"
|
|
16
15
|
|
|
17
|
-
spec.files
|
|
16
|
+
spec.files = Dir["{lib,spec}/**/*", "[A-Z]*", "init.rb"]
|
|
18
17
|
spec.require_paths = ["lib"]
|
|
19
18
|
|
|
20
19
|
spec.required_rubygems_version = ">= 1.3.4"
|
data/lib/legacy_column.rb
CHANGED
|
@@ -15,7 +15,7 @@ module LegacyColumn
|
|
|
15
15
|
module ClassMethods
|
|
16
16
|
DEFAULT_MESSAGE = 'This column is set as legacy and should not be used anymore.'
|
|
17
17
|
|
|
18
|
-
def legacy_column(*columns, message:nil)
|
|
18
|
+
def legacy_column(*columns, message: nil)
|
|
19
19
|
return unless columns
|
|
20
20
|
|
|
21
21
|
self.legacy_column_names = columns
|
|
@@ -27,7 +27,7 @@ module LegacyColumn
|
|
|
27
27
|
|
|
28
28
|
def legacy_column
|
|
29
29
|
legacy_column_names.each do |column|
|
|
30
|
-
if changed_attributes.
|
|
30
|
+
if changed_attributes.key?(column.to_s)
|
|
31
31
|
puts "\n\nUSE of legacy column detected.\n #{self.class} => #{column}\n #{legacy_column_message}\n\n"
|
|
32
32
|
end
|
|
33
33
|
end
|
data/spec/db/test.sqlite3
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: legacy_column
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aleksander Lopez Yazikov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|