tartarus-rb 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +4 -0
- data/Gemfile.lock +2 -2
- data/README.md +5 -0
- data/lib/tartarus.rb +0 -8
- data/lib/tartarus/rb/version.rb +1 -1
- data/lib/tartarus/remote_storage.rb +2 -0
- data/lib/tartarus/remote_storage/glacier.rb +7 -0
- data/tartarus-rb.gemspec +2 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a9a2ee5b7e8889bc07acdb01d4bf1fad93cf412fe3a0109cb63ab547ccb1255
|
4
|
+
data.tar.gz: 4a4f1ede48123fa774e7ccbd55d1eadd19476292558f73ed09b1dee0234c2e4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d59b03b2a163d831bee9766892fe59c3a19c6b771f297bbbf564d30f5c007bd94f2e96357f0ec6b30d602572b8d4de636c3124eebcba2b46f86ffabc69d545dc
|
7
|
+
data.tar.gz: 24a9efa3d116ed97a6113e855457a7f13ac41d8ea6669010794b973615c425ce6b1aef5fbfc327e76156b909cb52035747fe28cdc70ed4d817431a2bf34a4563
|
data/Changelog.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tartarus-rb (0.4.
|
5
|
-
aws-sdk-glacier
|
4
|
+
tartarus-rb (0.4.1)
|
6
5
|
sidekiq (>= 5)
|
7
6
|
sidekiq-cron (~> 1)
|
8
7
|
|
@@ -141,6 +140,7 @@ PLATFORMS
|
|
141
140
|
|
142
141
|
DEPENDENCIES
|
143
142
|
activerecord (~> 6)
|
143
|
+
aws-sdk-glacier
|
144
144
|
dotenv
|
145
145
|
pg
|
146
146
|
postgres-copy
|
data/README.md
CHANGED
@@ -64,6 +64,7 @@ if File.exist?(schedule_file) && Sidekiq.server?
|
|
64
64
|
root_path: Rails.root.to_s,
|
65
65
|
archive_registry_factory: ArchiveRegistry,
|
66
66
|
)
|
67
|
+
# don't forget about installing `aws-sdk-glacier` gem
|
67
68
|
|
68
69
|
tartarus.register do |item|
|
69
70
|
item.model = YetAnotherModel
|
@@ -99,6 +100,7 @@ Currently, only `Glacier` (for AWS Glacier) is supported. Also, it works only wi
|
|
99
100
|
To take advantage of this feature you will need a couple of things:
|
100
101
|
1. Apply `acts_as_copy_target` to the archivable model (from `postgres-copy` gem).
|
101
102
|
2. Create a model that will be used as a registry for all uploads that happened.
|
103
|
+
3. Install `aws-sdk-glacier` gem.
|
102
104
|
|
103
105
|
If you want to make `Version` model archivable and use `ArchiveRegistry` as the registry, you will need the following models and tables:
|
104
106
|
|
@@ -155,6 +157,9 @@ glacier_configuration = Tartarus::RemoteStorage::Glacier::Configuration.build(
|
|
155
157
|
Tartarus::RemoteStorage::Glacier.new(glacier_configuration)
|
156
158
|
```
|
157
159
|
|
160
|
+
**Important** - do not use Glacier Storage for large batches (> 4 GB) as multipart uploads are not supported yet.
|
161
|
+
|
162
|
+
|
158
163
|
If you know what you are doing, you can add your own storage, as long as it complies with the following interface:
|
159
164
|
|
160
165
|
``` rb
|
data/lib/tartarus.rb
CHANGED
@@ -19,15 +19,7 @@ require "tartarus/registry"
|
|
19
19
|
require "tartarus/repository"
|
20
20
|
require "tartarus/schedule_archiving_model"
|
21
21
|
require "tartarus/remote_storage"
|
22
|
-
require "tartarus/remote_storage/null"
|
23
|
-
require "tartarus/remote_storage/glacier"
|
24
|
-
require "tartarus/remote_storage/glacier/client"
|
25
|
-
require "tartarus/remote_storage/glacier/file"
|
26
|
-
require "tartarus/remote_storage/glacier/csv_export"
|
27
|
-
require "tartarus/remote_storage/glacier/register_upload"
|
28
|
-
require "tartarus/remote_storage/glacier/configuration"
|
29
22
|
require "sidekiq/cron/job"
|
30
|
-
require "aws-sdk-glacier"
|
31
23
|
require "sidekiq"
|
32
24
|
|
33
25
|
class Tartarus
|
data/lib/tartarus/rb/version.rb
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
require "aws-sdk-glacier"
|
2
|
+
require "tartarus/remote_storage/glacier/client"
|
3
|
+
require "tartarus/remote_storage/glacier/file"
|
4
|
+
require "tartarus/remote_storage/glacier/csv_export"
|
5
|
+
require "tartarus/remote_storage/glacier/register_upload"
|
6
|
+
require "tartarus/remote_storage/glacier/configuration"
|
7
|
+
|
1
8
|
class Tartarus
|
2
9
|
module RemoteStorage
|
3
10
|
class Glacier
|
data/tartarus-rb.gemspec
CHANGED
@@ -29,11 +29,12 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
spec.add_dependency "sidekiq", ">= 5"
|
31
31
|
spec.add_dependency "sidekiq-cron", "~> 1"
|
32
|
-
|
32
|
+
|
33
33
|
|
34
34
|
spec.add_development_dependency "rake", "~> 13.0"
|
35
35
|
spec.add_development_dependency "rspec", "~> 3.0"
|
36
36
|
spec.add_development_dependency "rspec-sidekiq"
|
37
|
+
spec.add_development_dependency "aws-sdk-glacier"
|
37
38
|
|
38
39
|
spec.add_development_dependency "activerecord", "~> 6"
|
39
40
|
spec.add_development_dependency "pg"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tartarus-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karol Galanciak
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: aws-sdk-glacier
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rake
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +80,20 @@ dependencies:
|
|
94
80
|
- - ">="
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: aws-sdk-glacier
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: activerecord
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|