active_record_anonymizer 0.1.0 → 0.2.0

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: 2595896543324c7c02e7876dc7094a6cef95453a782183426ce433e846e1e395
4
- data.tar.gz: 01ddfc4df3b6a1458cb692e256951f96e3bd8995d098b5b263bc6671ac465ad7
3
+ metadata.gz: accaa24dbcdc414be0593165f5a3bca83f768e16ad61a480118a4967d90febf3
4
+ data.tar.gz: 5156c1f4e640a004a3ec724e2328712ba7aa8e2eb5456d714906044d6eaaad9f
5
5
  SHA512:
6
- metadata.gz: 99e3e06eeac716238b5690011905e5b9633b7bd88eb82693bed0c27c142f4614b6b8daeef4030719a6e79126a54ed26672e4a8741a01c0f5c18f22a3c5c11b60
7
- data.tar.gz: '09b7bc01508b9c320cfa15f2857707bfc5556df6dd2af696143eeeb29790a11b7235a6137a58d34dff76151bb4b1b9feb606a8d8029119c9b449149641ec6776'
6
+ metadata.gz: e0d564e874192ad8e7b96e532a31ba2deb9eddf34b9cf59a23ec9215c3473be25d80def9f0cdf864493e1c058c846d5f3c203824894399a14e54a52e1e358872
7
+ data.tar.gz: eb34e64d248a9329fca5cdeccd6c2a1efe5603febde87cf96341a1e897f31f842b48826af3c4e1094e5b2ba5733c91e014f57b375b8e22667af21ad62f89c10b
data/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ ## Version 0.1.1
2
+
3
+ ### New Fixes
4
+
5
+ #### Fixed migration_version not getting generated in Rails v5+
6
+
7
+ * [GitHub PR](https://github.com/keshavbiswa/active_record_anonymizer/pull/6)
8
+
9
+ ## Version 0.2.0
10
+
11
+ ### New Fixes
12
+
13
+ #### Removed index from migration
14
+
15
+ * [GitHub PR](https://github.com/keshavbiswa/active_record_anonymizer/pull/7)
16
+
17
+ #### Fixed incorrect generator name in README.md
data/README.md CHANGED
@@ -34,7 +34,7 @@ Install the gem using the following command:
34
34
  You must have anonymized columns in your Model to store the anonymized data.
35
35
  You can use the following migration generator to add anonymized columns to your existing table:
36
36
 
37
- $ bin/rails generate anonymize User first_name last_name
37
+ $ bin/rails generate active_record_anonymizer:anonymize User first_name last_name
38
38
  This will generate a migration file similar to the following:
39
39
 
40
40
  ```ruby
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordAnonymizer
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -38,7 +38,9 @@ module ActiveRecordAnonymizer
38
38
  end
39
39
 
40
40
  def migration_version
41
- "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" if Rails.version.start_with? "5"
41
+ if Gem::Version.new(Rails.version) >= Gem::Version.new("5.0.0")
42
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
43
+ end
42
44
  end
43
45
  end
44
46
  end
@@ -3,7 +3,7 @@
3
3
  class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
4
4
  def self.up
5
5
  <% attributes.each do |column| -%>
6
- add_column :<%= table_name %>, :<%= "anonymized_#{column.name}" %>, :<%= column.type %>, index: <%= column.has_index? %>, unique: <%= column.has_uniq_index? %>
6
+ add_column :<%= table_name %>, :<%= "anonymized_#{column.name}" %>, :<%= column.type %>
7
7
  <% end -%>
8
8
  end
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_anonymizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keshav Biswa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-06 00:00:00.000000000 Z
11
+ date: 2024-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -75,6 +75,7 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - ".rubocop.yml"
78
+ - CHANGELOG.md
78
79
  - Gemfile
79
80
  - LICENSE.txt
80
81
  - README.md
@@ -116,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  - !ruby/object:Gem::Version
117
118
  version: '0'
118
119
  requirements: []
119
- rubygems_version: 3.4.10
120
+ rubygems_version: 3.5.6
120
121
  signing_key:
121
122
  specification_version: 4
122
123
  summary: Anonymize your ActiveRecord attributes with ease.