lite-archive 1.0.1 → 1.0.2
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +8 -2
- data/lib/lite/archive/railtie.rb +2 -0
- data/lib/lite/archive/version.rb +1 -1
- 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: 6ae94a3221795e257a1006b97f1767d323e6ab228d8db1e96f058aa7543c7bfb
|
|
4
|
+
data.tar.gz: 0e32473ec68a788d6b97140e5ca38c70b5bc41f80f64afc63b76cf771b551aff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5433996f33421d704bcf3d38edf9f80569166a2d792247e099e279b1bf62269471a4f47f59246cf5dd003f4b06cd7baf19d26c04b9ad1fc20cd85a7fbf78cc8a
|
|
7
|
+
data.tar.gz: 27823bf54b46c332963f8a1d768742bb4c2f570112312e2aeca268bc1735c3003867b08077cc22c98700a7ed62c031bb87cc63a4607a6cf6857ce7d0bf26c192
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
|
+
## [1.0.2] - 2019-07-08
|
|
9
|
+
### Added
|
|
10
|
+
- Require rails/railtie in railtie
|
|
11
|
+
|
|
8
12
|
## [1.0.1] - 2019-07-01
|
|
9
13
|
### Changed
|
|
10
14
|
- Rename `timestamp` to `archival_timestamp`
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -49,17 +49,23 @@ An `archived_at` column must be added to tables where you do not want records de
|
|
|
49
49
|
If the table does not have this column, records will be destroy instead of archived.
|
|
50
50
|
|
|
51
51
|
```ruby
|
|
52
|
-
class
|
|
52
|
+
class AddArchivedAtColumn < ActiveRecord::Migration
|
|
53
53
|
def change
|
|
54
54
|
# Adds archived_at automatically (if all_records_archivable is set to true)
|
|
55
55
|
t.timestamp
|
|
56
56
|
|
|
57
|
+
# - or -
|
|
58
|
+
|
|
57
59
|
# Adds archived_at timestamp
|
|
58
60
|
t.timestamp archive: true
|
|
59
61
|
|
|
62
|
+
# - or -
|
|
63
|
+
|
|
60
64
|
# Does NOT add archived_at timestamp
|
|
61
65
|
t.timestamp archive: false
|
|
62
66
|
|
|
67
|
+
# - or -
|
|
68
|
+
|
|
63
69
|
# Manual column (null constraint must be false)
|
|
64
70
|
add_column :your_model, :archived_at, :datetime
|
|
65
71
|
end
|
|
@@ -103,7 +109,7 @@ User.unarchived.all #=> Returns only unarchived records
|
|
|
103
109
|
|
|
104
110
|
## Port
|
|
105
111
|
|
|
106
|
-
`Lite::Archive` is compatible port of [ActiveArchive](https://github.com/drexed/active_archive).
|
|
112
|
+
`Lite::Archive` is a compatible port of [ActiveArchive](https://github.com/drexed/active_archive).
|
|
107
113
|
|
|
108
114
|
Switching is as easy as renaming `ActiveArchive` to `Lite::Archive`.
|
|
109
115
|
|
data/lib/lite/archive/railtie.rb
CHANGED
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.2
|
|
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-07-
|
|
11
|
+
date: 2019-07-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|