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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee9118a9365d2a74dd802218b0b0b36286c6494ecffe4f81cbf9bfed35597057
4
- data.tar.gz: f85ffe0e1f182667b5b9b522746a85b45cc9cd3452270f583549a0616d06337c
3
+ metadata.gz: 2a9a2ee5b7e8889bc07acdb01d4bf1fad93cf412fe3a0109cb63ab547ccb1255
4
+ data.tar.gz: 4a4f1ede48123fa774e7ccbd55d1eadd19476292558f73ed09b1dee0234c2e4b
5
5
  SHA512:
6
- metadata.gz: '08e1ab969f1681fca948bdfb4ae98fb919e7caef4e95a1cf5a3a2dffc6fa79a59c73655927be759408f951ad0846ff5c1dea6b7396220801f31c179730e9d6e3'
7
- data.tar.gz: 72f485499631b46912293650672cd79e8df364ebbc7b18144731c1077e7fa8157be8b20e4078212b04dfb539a3de19af99abcca720163785c3132f51bf574968
6
+ metadata.gz: d59b03b2a163d831bee9766892fe59c3a19c6b771f297bbbf564d30f5c007bd94f2e96357f0ec6b30d602572b8d4de636c3124eebcba2b46f86ffabc69d545dc
7
+ data.tar.gz: 24a9efa3d116ed97a6113e855457a7f13ac41d8ea6669010794b973615c425ce6b1aef5fbfc327e76156b909cb52035747fe28cdc70ed4d817431a2bf34a4563
data/Changelog.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Master
4
4
 
5
+ ## 0.4.1
6
+
7
+ - Do not make Glacier a required dependency if not used
8
+
5
9
  ## 0.4.0
6
10
 
7
11
  - Add Glacier remote storage support to upload data before deleting it
data/Gemfile.lock CHANGED
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tartarus-rb (0.4.0)
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
@@ -1,5 +1,5 @@
1
1
  class Tartarus
2
2
  module Rb
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
@@ -1,2 +1,4 @@
1
1
  module Tartarus::RemoteStorage
2
+ autoload :Glacier, "tartarus/remote_storage/glacier"
3
+ autoload :Null, "tartarus/remote_storage/null"
2
4
  end
@@ -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
- spec.add_dependency "aws-sdk-glacier"
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.0
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-02-08 00:00:00.000000000 Z
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