lite-archive 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +22 -3
- data/.travis.yml +1 -0
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +68 -63
- data/lib/lite/archive/railtie.rb +1 -1
- data/lib/lite/archive/table_definition.rb +3 -3
- data/lib/lite/archive/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee885d2a0188a5dcb40a19ed614d3d8b28db57093496a27f37b7ab2fcddd5a8b
|
4
|
+
data.tar.gz: 85975fb0e8438f2b5401470ee2eeab069033e23ab3c434ac09a96b2469e1e41c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fcf6320a6825a97e3858551f0761419a0bd907c23692a898bea10a75951e9dbdfe02814eb9a96c7bed8220dffd7a3c94cb3a64ff109c782a3202e3b2a8f8ff6
|
7
|
+
data.tar.gz: '0180f91ac8a834c63f38182adce1107dcf3e793e20cb00953691b1bad1a26a7195722faf536b50a7f2dd046e7d6abd3397417203dcc31f28c83ab6876ccf56f0'
|
data/.rubocop.yml
CHANGED
@@ -2,9 +2,12 @@ require:
|
|
2
2
|
- rubocop-performance
|
3
3
|
- rubocop-rspec
|
4
4
|
AllCops:
|
5
|
-
TargetRubyVersion: 2.
|
5
|
+
TargetRubyVersion: 2.7
|
6
|
+
NewCops: enable
|
6
7
|
DisplayCopNames: true
|
7
8
|
DisplayStyleGuide: true
|
9
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
10
|
+
Enabled: true
|
8
11
|
Layout/EmptyLinesAroundBlockBody:
|
9
12
|
Exclude:
|
10
13
|
- 'spec/**/**/*'
|
@@ -12,12 +15,18 @@ Layout/EmptyLinesAroundClassBody:
|
|
12
15
|
EnforcedStyle: empty_lines_except_namespace
|
13
16
|
Layout/EmptyLinesAroundModuleBody:
|
14
17
|
EnforcedStyle: empty_lines_except_namespace
|
18
|
+
Layout/LineLength:
|
19
|
+
Max: 100
|
20
|
+
Layout/SpaceAroundMethodCallOperator:
|
21
|
+
Enabled: true
|
22
|
+
Lint/RaiseException:
|
23
|
+
Enabled: true
|
24
|
+
Lint/StructNewOverride:
|
25
|
+
Enabled: true
|
15
26
|
Metrics/BlockLength:
|
16
27
|
Exclude:
|
17
28
|
- 'spec/**/**/*'
|
18
29
|
- '*.gemspec'
|
19
|
-
Metrics/LineLength:
|
20
|
-
Max: 100
|
21
30
|
Metrics/ModuleLength:
|
22
31
|
Enabled: false
|
23
32
|
RSpec/MultipleExpectations:
|
@@ -26,3 +35,13 @@ Style/Documentation:
|
|
26
35
|
Enabled: false
|
27
36
|
Style/ExpandPathArguments:
|
28
37
|
Enabled: false
|
38
|
+
Style/ExponentialNotation:
|
39
|
+
Enabled: true
|
40
|
+
Style/HashEachMethods:
|
41
|
+
Enabled: true
|
42
|
+
Style/HashTransformKeys:
|
43
|
+
Enabled: true
|
44
|
+
Style/HashTransformValues:
|
45
|
+
Enabled: true
|
46
|
+
Style/SlicingWithRange:
|
47
|
+
Enabled: false
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,9 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.0.6] - 2020-07-03
|
10
|
+
### Removed
|
11
|
+
- Removed Ruby 2.7 deprecation warnings
|
12
|
+
|
13
|
+
## [1.0.5] - 2019-11-02
|
14
|
+
### Added
|
15
|
+
- Add `sync_updated_at` option
|
16
|
+
|
9
17
|
## [1.0.4] - 2019-08-24
|
10
18
|
### Changed
|
11
|
-
-
|
19
|
+
- Improved how configuration works
|
12
20
|
|
13
21
|
## [1.0.3] - 2019-08-15
|
14
22
|
### Changed
|
data/Gemfile.lock
CHANGED
@@ -1,66 +1,65 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lite-archive (1.0.
|
4
|
+
lite-archive (1.0.6)
|
5
5
|
activerecord
|
6
6
|
activesupport
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionpack (6.0.
|
12
|
-
actionview (= 6.0.
|
13
|
-
activesupport (= 6.0.
|
14
|
-
rack (~> 2.0)
|
11
|
+
actionpack (6.0.3.2)
|
12
|
+
actionview (= 6.0.3.2)
|
13
|
+
activesupport (= 6.0.3.2)
|
14
|
+
rack (~> 2.0, >= 2.0.8)
|
15
15
|
rack-test (>= 0.6.3)
|
16
16
|
rails-dom-testing (~> 2.0)
|
17
17
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
18
|
-
actionview (6.0.
|
19
|
-
activesupport (= 6.0.
|
18
|
+
actionview (6.0.3.2)
|
19
|
+
activesupport (= 6.0.3.2)
|
20
20
|
builder (~> 3.1)
|
21
21
|
erubi (~> 1.4)
|
22
22
|
rails-dom-testing (~> 2.0)
|
23
23
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
24
|
-
activemodel (6.0.
|
25
|
-
activesupport (= 6.0.
|
26
|
-
activerecord (6.0.
|
27
|
-
activemodel (= 6.0.
|
28
|
-
activesupport (= 6.0.
|
29
|
-
activesupport (6.0.
|
24
|
+
activemodel (6.0.3.2)
|
25
|
+
activesupport (= 6.0.3.2)
|
26
|
+
activerecord (6.0.3.2)
|
27
|
+
activemodel (= 6.0.3.2)
|
28
|
+
activesupport (= 6.0.3.2)
|
29
|
+
activesupport (6.0.3.2)
|
30
30
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
31
31
|
i18n (>= 0.7, < 2)
|
32
32
|
minitest (~> 5.1)
|
33
33
|
tzinfo (~> 1.1)
|
34
|
-
zeitwerk (~> 2.
|
35
|
-
ast (2.4.
|
36
|
-
builder (3.2.
|
34
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
35
|
+
ast (2.4.1)
|
36
|
+
builder (3.2.4)
|
37
37
|
colorize (0.8.1)
|
38
|
-
concurrent-ruby (1.1.
|
39
|
-
crass (1.0.
|
40
|
-
database_cleaner (1.
|
41
|
-
diff-lcs (1.
|
38
|
+
concurrent-ruby (1.1.6)
|
39
|
+
crass (1.0.6)
|
40
|
+
database_cleaner (1.8.5)
|
41
|
+
diff-lcs (1.4.4)
|
42
42
|
erubi (1.9.0)
|
43
|
-
fasterer (0.
|
43
|
+
fasterer (0.8.3)
|
44
44
|
colorize (~> 0.7)
|
45
|
-
ruby_parser (>= 3.
|
45
|
+
ruby_parser (>= 3.14.1)
|
46
46
|
generator_spec (0.9.4)
|
47
47
|
activesupport (>= 3.0.0)
|
48
48
|
railties (>= 3.0.0)
|
49
|
-
i18n (1.
|
49
|
+
i18n (1.8.3)
|
50
50
|
concurrent-ruby (~> 1.0)
|
51
|
-
|
52
|
-
loofah (2.3.1)
|
51
|
+
loofah (2.6.0)
|
53
52
|
crass (~> 1.0.2)
|
54
53
|
nokogiri (>= 1.5.9)
|
55
|
-
method_source (0.
|
54
|
+
method_source (1.0.0)
|
56
55
|
mini_portile2 (2.4.0)
|
57
|
-
minitest (5.
|
58
|
-
nokogiri (1.10.
|
56
|
+
minitest (5.14.1)
|
57
|
+
nokogiri (1.10.9)
|
59
58
|
mini_portile2 (~> 2.4.0)
|
60
|
-
parallel (1.
|
61
|
-
parser (2.
|
62
|
-
ast (~> 2.4.
|
63
|
-
rack (2.
|
59
|
+
parallel (1.19.2)
|
60
|
+
parser (2.7.1.4)
|
61
|
+
ast (~> 2.4.1)
|
62
|
+
rack (2.2.3)
|
64
63
|
rack-test (1.1.0)
|
65
64
|
rack (>= 1.0, < 3)
|
66
65
|
rails-dom-testing (2.0.3)
|
@@ -68,57 +67,63 @@ GEM
|
|
68
67
|
nokogiri (>= 1.6)
|
69
68
|
rails-html-sanitizer (1.3.0)
|
70
69
|
loofah (~> 2.3)
|
71
|
-
railties (6.0.
|
72
|
-
actionpack (= 6.0.
|
73
|
-
activesupport (= 6.0.
|
70
|
+
railties (6.0.3.2)
|
71
|
+
actionpack (= 6.0.3.2)
|
72
|
+
activesupport (= 6.0.3.2)
|
74
73
|
method_source
|
75
74
|
rake (>= 0.8.7)
|
76
75
|
thor (>= 0.20.3, < 2.0)
|
77
76
|
rainbow (3.0.0)
|
78
|
-
rake (13.0.
|
77
|
+
rake (13.0.1)
|
78
|
+
regexp_parser (1.7.1)
|
79
|
+
rexml (3.2.4)
|
79
80
|
rspec (3.9.0)
|
80
81
|
rspec-core (~> 3.9.0)
|
81
82
|
rspec-expectations (~> 3.9.0)
|
82
83
|
rspec-mocks (~> 3.9.0)
|
83
|
-
rspec-core (3.9.
|
84
|
-
rspec-support (~> 3.9.
|
85
|
-
rspec-expectations (3.9.
|
84
|
+
rspec-core (3.9.2)
|
85
|
+
rspec-support (~> 3.9.3)
|
86
|
+
rspec-expectations (3.9.2)
|
86
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
87
88
|
rspec-support (~> 3.9.0)
|
88
|
-
rspec-mocks (3.9.
|
89
|
+
rspec-mocks (3.9.1)
|
89
90
|
diff-lcs (>= 1.2.0, < 2.0)
|
90
91
|
rspec-support (~> 3.9.0)
|
91
|
-
rspec-rails (
|
92
|
-
actionpack (>=
|
93
|
-
activesupport (>=
|
94
|
-
railties (>=
|
95
|
-
rspec-core (~> 3.9
|
96
|
-
rspec-expectations (~> 3.9
|
97
|
-
rspec-mocks (~> 3.9
|
98
|
-
rspec-support (~> 3.9
|
99
|
-
rspec-support (3.9.
|
100
|
-
rubocop (0.
|
101
|
-
jaro_winkler (~> 1.5.1)
|
92
|
+
rspec-rails (4.0.1)
|
93
|
+
actionpack (>= 4.2)
|
94
|
+
activesupport (>= 4.2)
|
95
|
+
railties (>= 4.2)
|
96
|
+
rspec-core (~> 3.9)
|
97
|
+
rspec-expectations (~> 3.9)
|
98
|
+
rspec-mocks (~> 3.9)
|
99
|
+
rspec-support (~> 3.9)
|
100
|
+
rspec-support (3.9.3)
|
101
|
+
rubocop (0.86.0)
|
102
102
|
parallel (~> 1.10)
|
103
|
-
parser (>= 2.
|
103
|
+
parser (>= 2.7.0.1)
|
104
104
|
rainbow (>= 2.2.2, < 4.0)
|
105
|
+
regexp_parser (>= 1.7)
|
106
|
+
rexml
|
107
|
+
rubocop-ast (>= 0.0.3, < 1.0)
|
105
108
|
ruby-progressbar (~> 1.7)
|
106
|
-
unicode-display_width (>= 1.4.0, <
|
107
|
-
rubocop-
|
109
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
110
|
+
rubocop-ast (0.1.0)
|
111
|
+
parser (>= 2.7.0.1)
|
112
|
+
rubocop-performance (1.6.1)
|
108
113
|
rubocop (>= 0.71.0)
|
109
|
-
rubocop-rspec (1.
|
114
|
+
rubocop-rspec (1.41.0)
|
110
115
|
rubocop (>= 0.68.1)
|
111
116
|
ruby-progressbar (1.10.1)
|
112
|
-
ruby_parser (3.14.
|
117
|
+
ruby_parser (3.14.2)
|
113
118
|
sexp_processor (~> 4.9)
|
114
|
-
sexp_processor (4.
|
115
|
-
sqlite3 (1.4.
|
116
|
-
thor (0.
|
119
|
+
sexp_processor (4.15.0)
|
120
|
+
sqlite3 (1.4.2)
|
121
|
+
thor (1.0.1)
|
117
122
|
thread_safe (0.3.6)
|
118
|
-
tzinfo (1.2.
|
123
|
+
tzinfo (1.2.7)
|
119
124
|
thread_safe (~> 0.1)
|
120
|
-
unicode-display_width (1.
|
121
|
-
zeitwerk (2.
|
125
|
+
unicode-display_width (1.7.0)
|
126
|
+
zeitwerk (2.3.1)
|
122
127
|
|
123
128
|
PLATFORMS
|
124
129
|
ruby
|
@@ -138,4 +143,4 @@ DEPENDENCIES
|
|
138
143
|
sqlite3
|
139
144
|
|
140
145
|
BUNDLED WITH
|
141
|
-
2.
|
146
|
+
2.1.4
|
data/lib/lite/archive/railtie.rb
CHANGED
@@ -6,7 +6,7 @@ module Lite
|
|
6
6
|
module Archive
|
7
7
|
class Railtie < ::Rails::Railtie
|
8
8
|
|
9
|
-
initializer 'lite-archive' do |app|
|
9
|
+
initializer 'lite-archive.setup' do |app|
|
10
10
|
Lite::Archive::Railtie.instance_eval do
|
11
11
|
[app.config.i18n.available_locales].flatten.each do |locale|
|
12
12
|
path = File.expand_path("../../../config/locales/#{locale}.yml", __FILE__)
|
@@ -7,14 +7,14 @@ module Lite
|
|
7
7
|
def timestamps(*args)
|
8
8
|
options = args.extract_options!
|
9
9
|
|
10
|
-
column(:created_at, :datetime, options)
|
11
|
-
column(:updated_at, :datetime, options)
|
10
|
+
column(:created_at, :datetime, **options)
|
11
|
+
column(:updated_at, :datetime, **options)
|
12
12
|
|
13
13
|
return unless Lite::Archive.configuration.all_records_archivable == true
|
14
14
|
return if options[:archive] == false
|
15
15
|
|
16
16
|
options[:null] = true
|
17
|
-
column(:archived_at, :datetime, options)
|
17
|
+
column(:archived_at, :datetime, **options)
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
data/lib/lite/archive/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-archive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -192,7 +192,7 @@ dependencies:
|
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
|
-
description:
|
195
|
+
description:
|
196
196
|
email:
|
197
197
|
- j.gomez@drexed.com
|
198
198
|
executables: []
|
@@ -230,7 +230,7 @@ homepage: http://drexed.github.io/lite-archive
|
|
230
230
|
licenses:
|
231
231
|
- MIT
|
232
232
|
metadata: {}
|
233
|
-
post_install_message:
|
233
|
+
post_install_message:
|
234
234
|
rdoc_options: []
|
235
235
|
require_paths:
|
236
236
|
- lib
|
@@ -245,8 +245,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
- !ruby/object:Gem::Version
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
|
-
rubygems_version: 3.
|
249
|
-
signing_key:
|
248
|
+
rubygems_version: 3.1.4
|
249
|
+
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: Archive (soft-delete) ActiveRecord database records
|
252
252
|
test_files: []
|