lite-archive 1.0.4 → 1.0.5

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: 873f15c2b22fb7736e415dec8decbcea243a1d424e6b761adde077be80a01d33
4
- data.tar.gz: 91e072b1c993b6af4dd725001e816c9ffd714daf756b401d9f07fca91d1041f4
3
+ metadata.gz: b0ee100b21b96ec00decbaf1f2da244dd51c87fdbee8a30a9605f35f1bffb78f
4
+ data.tar.gz: 515d799acd61a3ae9e70b4bcb3a5200e03410977b1ed3caa3b3757620f25da06
5
5
  SHA512:
6
- metadata.gz: df58d79095d1a2f44c86811f3588526949edeeb98f687e3edc4158209893f5e3d36d117d31e1a21bee8571d15a063404b4d426e243cd0cd0674d56f631f45061
7
- data.tar.gz: a90d9e3b20761c40415ef351a79f1c0f6a92fda35266beb8f2b6c170efef29ebf26dabf10af5d50ee99a81f122d5aaa93975f98145552b3f870be0aef9435a5f
6
+ metadata.gz: 96b03668f8f2657ab4f0b44cccb42e6c940139e2ebba4e823d2caec7e995c519ead7e09e8d218493039644727609e4947771a8fd762e9e7ceacdae86f31290df
7
+ data.tar.gz: 34a7941ab3b34382ccb63c5f1c9d5cb73c3af79bdfd899bbb30b8e8ec9af8ab728e1e73ba1c0984f4fc65492a9667e10c92fc40b727ee1da7bbfd1b147717d3a
data/.rubocop.yml CHANGED
@@ -5,8 +5,6 @@ AllCops:
5
5
  TargetRubyVersion: 2.6
6
6
  DisplayCopNames: true
7
7
  DisplayStyleGuide: true
8
- LineLength:
9
- Max: 100
10
8
  Layout/EmptyLinesAroundBlockBody:
11
9
  Exclude:
12
10
  - 'spec/**/**/*'
@@ -18,6 +16,8 @@ Metrics/BlockLength:
18
16
  Exclude:
19
17
  - 'spec/**/**/*'
20
18
  - '*.gemspec'
19
+ Metrics/LineLength:
20
+ Max: 100
21
21
  Metrics/ModuleLength:
22
22
  Enabled: false
23
23
  RSpec/MultipleExpectations:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-archive (1.0.4)
4
+ lite-archive (1.0.5)
5
5
  activerecord
6
6
  activesupport
7
7
 
@@ -36,29 +36,29 @@ GEM
36
36
  builder (3.2.3)
37
37
  colorize (0.8.1)
38
38
  concurrent-ruby (1.1.5)
39
- crass (1.0.4)
39
+ crass (1.0.5)
40
40
  database_cleaner (1.7.0)
41
41
  diff-lcs (1.3)
42
- erubi (1.8.0)
43
- fasterer (0.6.0)
42
+ erubi (1.9.0)
43
+ fasterer (0.7.1)
44
44
  colorize (~> 0.7)
45
45
  ruby_parser (>= 3.13.0)
46
46
  generator_spec (0.9.4)
47
47
  activesupport (>= 3.0.0)
48
48
  railties (>= 3.0.0)
49
- i18n (1.6.0)
49
+ i18n (1.7.0)
50
50
  concurrent-ruby (~> 1.0)
51
- jaro_winkler (1.5.3)
52
- loofah (2.2.3)
51
+ jaro_winkler (1.5.4)
52
+ loofah (2.3.1)
53
53
  crass (~> 1.0.2)
54
54
  nokogiri (>= 1.5.9)
55
55
  method_source (0.9.2)
56
56
  mini_portile2 (2.4.0)
57
- minitest (5.11.3)
58
- nokogiri (1.10.4)
57
+ minitest (5.13.0)
58
+ nokogiri (1.10.5)
59
59
  mini_portile2 (~> 2.4.0)
60
- parallel (1.17.0)
61
- parser (2.6.3.0)
60
+ parallel (1.18.0)
61
+ parser (2.6.5.0)
62
62
  ast (~> 2.4.0)
63
63
  rack (2.0.7)
64
64
  rack-test (1.1.0)
@@ -66,8 +66,8 @@ GEM
66
66
  rails-dom-testing (2.0.3)
67
67
  activesupport (>= 4.2.0)
68
68
  nokogiri (>= 1.6)
69
- rails-html-sanitizer (1.2.0)
70
- loofah (~> 2.2, >= 2.2.2)
69
+ rails-html-sanitizer (1.3.0)
70
+ loofah (~> 2.3)
71
71
  railties (6.0.0)
72
72
  actionpack (= 6.0.0)
73
73
  activesupport (= 6.0.0)
@@ -75,50 +75,50 @@ GEM
75
75
  rake (>= 0.8.7)
76
76
  thor (>= 0.20.3, < 2.0)
77
77
  rainbow (3.0.0)
78
- rake (12.3.3)
79
- rspec (3.8.0)
80
- rspec-core (~> 3.8.0)
81
- rspec-expectations (~> 3.8.0)
82
- rspec-mocks (~> 3.8.0)
83
- rspec-core (3.8.2)
84
- rspec-support (~> 3.8.0)
85
- rspec-expectations (3.8.4)
78
+ rake (13.0.0)
79
+ rspec (3.9.0)
80
+ rspec-core (~> 3.9.0)
81
+ rspec-expectations (~> 3.9.0)
82
+ rspec-mocks (~> 3.9.0)
83
+ rspec-core (3.9.0)
84
+ rspec-support (~> 3.9.0)
85
+ rspec-expectations (3.9.0)
86
86
  diff-lcs (>= 1.2.0, < 2.0)
87
- rspec-support (~> 3.8.0)
88
- rspec-mocks (3.8.1)
87
+ rspec-support (~> 3.9.0)
88
+ rspec-mocks (3.9.0)
89
89
  diff-lcs (>= 1.2.0, < 2.0)
90
- rspec-support (~> 3.8.0)
91
- rspec-rails (3.8.2)
90
+ rspec-support (~> 3.9.0)
91
+ rspec-rails (3.9.0)
92
92
  actionpack (>= 3.0)
93
93
  activesupport (>= 3.0)
94
94
  railties (>= 3.0)
95
- rspec-core (~> 3.8.0)
96
- rspec-expectations (~> 3.8.0)
97
- rspec-mocks (~> 3.8.0)
98
- rspec-support (~> 3.8.0)
99
- rspec-support (3.8.2)
100
- rubocop (0.74.0)
95
+ rspec-core (~> 3.9.0)
96
+ rspec-expectations (~> 3.9.0)
97
+ rspec-mocks (~> 3.9.0)
98
+ rspec-support (~> 3.9.0)
99
+ rspec-support (3.9.0)
100
+ rubocop (0.76.0)
101
101
  jaro_winkler (~> 1.5.1)
102
102
  parallel (~> 1.10)
103
103
  parser (>= 2.6)
104
104
  rainbow (>= 2.2.2, < 4.0)
105
105
  ruby-progressbar (~> 1.7)
106
106
  unicode-display_width (>= 1.4.0, < 1.7)
107
- rubocop-performance (1.4.1)
107
+ rubocop-performance (1.5.0)
108
108
  rubocop (>= 0.71.0)
109
- rubocop-rspec (1.35.0)
110
- rubocop (>= 0.60.0)
109
+ rubocop-rspec (1.36.0)
110
+ rubocop (>= 0.68.1)
111
111
  ruby-progressbar (1.10.1)
112
- ruby_parser (3.13.1)
112
+ ruby_parser (3.14.1)
113
113
  sexp_processor (~> 4.9)
114
- sexp_processor (4.12.1)
114
+ sexp_processor (4.13.0)
115
115
  sqlite3 (1.4.1)
116
116
  thor (0.20.3)
117
117
  thread_safe (0.3.6)
118
118
  tzinfo (1.2.5)
119
119
  thread_safe (~> 0.1)
120
120
  unicode-display_width (1.6.0)
121
- zeitwerk (2.1.9)
121
+ zeitwerk (2.2.1)
122
122
 
123
123
  PLATFORMS
124
124
  ruby
@@ -138,4 +138,4 @@ DEPENDENCIES
138
138
  sqlite3
139
139
 
140
140
  BUNDLED WITH
141
- 2.0.1
141
+ 2.0.2
data/README.md CHANGED
@@ -40,6 +40,7 @@ Or install it yourself as:
40
40
  ```ruby
41
41
  Lite::Archive.configure do |config|
42
42
  config.all_records_archivable = false
43
+ config.sync_updated_at = true
43
44
  end
44
45
  ```
45
46
 
@@ -2,4 +2,5 @@
2
2
 
3
3
  Lite::Archive.configure do |config|
4
4
  config.all_records_archivable = false
5
+ config.sync_updated_at = true
5
6
  end
@@ -146,6 +146,8 @@ module Lite
146
146
  end
147
147
 
148
148
  def updatable?
149
+ return false unless Lite::Archive.configuration.sync_updated_at == true
150
+
149
151
  respond_to?(:updated_at)
150
152
  end
151
153
 
@@ -5,10 +5,11 @@ module Lite
5
5
 
6
6
  class Configuration
7
7
 
8
- attr_accessor :all_records_archivable
8
+ attr_accessor :all_records_archivable, :sync_updated_at
9
9
 
10
10
  def initialize
11
11
  @all_records_archivable = false
12
+ @sync_updated_at = true
12
13
  end
13
14
 
14
15
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Archive
5
5
 
6
- VERSION ||= '1.0.4'
6
+ VERSION ||= '1.0.5'
7
7
 
8
8
  end
9
9
  end
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
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-24 00:00:00.000000000 Z
11
+ date: 2019-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  - !ruby/object:Gem::Version
246
246
  version: '0'
247
247
  requirements: []
248
- rubygems_version: 3.0.4
248
+ rubygems_version: 3.0.6
249
249
  signing_key:
250
250
  specification_version: 4
251
251
  summary: Archive (soft-delete) ActiveRecord database records