legacy_column 0.1.0 → 0.1.1

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: 4f9f7f8aae1c7e54444ac728bd65800583b8dba9c0ced595cebfe6ce61609bc5
4
- data.tar.gz: 524f49a0d6a9e99cf75eda7274d044597f11c51815756236c8b66f75aaf0915f
3
+ metadata.gz: bcf97a196196ce89036abf0ddb356e4c221d27ba39cc0a6123a28b6eb4ec1143
4
+ data.tar.gz: 825a0c57501491b7061f4acb307e2198fb378ade1c72da4092fc91858b6e7bb0
5
5
  SHA512:
6
- metadata.gz: 263844b58944bf35870e664e5cb4a4e3ec45c1ad055baf16f8e94c7c2c13cae382d4c1c829f59f7e9f832c217960a17d910d77e7da7332842532fa978b04a107
7
- data.tar.gz: fd37196e959a15199e2c64feb56d03f13c14a3cab9f9858b8507048c9a4a0a78274cb8e3f864281e9a1dfbbf44e492c8dfe400fcb35911b150ac6d467661a9cf
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.0)
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.2)
12
- activesupport (= 6.0.3.2)
13
- activerecord (6.0.3.2)
14
- activemodel (= 6.0.3.2)
15
- activesupport (= 6.0.3.2)
16
- activesupport (6.0.3.2)
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.7)
22
+ concurrent-ruby (1.1.8)
23
23
  diff-lcs (1.4.4)
24
- i18n (1.8.5)
24
+ i18n (1.8.10)
25
25
  concurrent-ruby (~> 1.0)
26
- minitest (5.14.1)
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.7)
43
+ tzinfo (1.2.9)
44
44
  thread_safe (~> 0.1)
45
- zeitwerk (2.4.0)
45
+ zeitwerk (2.4.2)
46
46
 
47
47
  PLATFORMS
48
48
  ruby
data/Rakefile CHANGED
@@ -3,4 +3,4 @@ require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
@@ -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 = Dir["{lib,spec}/**/*", "[A-Z]*", "init.rb"]
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.keys.include? column.to_s
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
@@ -1,3 +1,3 @@
1
1
  module LegacyColumn
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  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.0
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: 2020-08-13 00:00:00.000000000 Z
11
+ date: 2021-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport