backup-bouchard 4.4.2 → 4.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cacf60227961c7822a31cf085a40db68ab69a7e8
4
- data.tar.gz: eccbbe4860d160144b48738db6b1c57293b39ae1
3
+ metadata.gz: 356988e24af0b4d62bc13c2944c00d01e0e481d1
4
+ data.tar.gz: f8d13c4692e0dbc694e22c988cbae2fd4aebcebf
5
5
  SHA512:
6
- metadata.gz: 2ec97959125b33dbc262aeda9505487bde875872876fc758f5e3f7c0f9e16ae35277c3234c9b714569cde280ee561f650cf910d8e604279c6a107f827aab5892
7
- data.tar.gz: 9b12e68113fe5076e2230703bd86852a604a40c2be826b5ae5cadcd3b576ec1501522039d11c6c0d578174943cfbc2b8c18609289a9f3346795db41bbf3993d0
6
+ metadata.gz: 51d1595c29b1cbf28be01e92a6baccf76e4032aefaf2a982f50545021a9948a4a80f6d2c8ad34196d7a453475190c5a0012ec209d97e37fd9e7e9c0041468fb8
7
+ data.tar.gz: 6feb938a7ed419c5f5f4d6c048d7ea92c8c1d2ab2b7df61367d390086705675f2236296d732739b47e966f045d9ec805541dbca63784ff3fd41281b32d0d00b6
@@ -46,7 +46,6 @@ module Backup
46
46
  autoload :SCP, File.join(STORAGE_PATH, "scp")
47
47
  autoload :RSync, File.join(STORAGE_PATH, "rsync")
48
48
  autoload :Local, File.join(STORAGE_PATH, "local")
49
- autoload :Qiniu, File.join(STORAGE_PATH, "qiniu")
50
49
  end
51
50
 
52
51
  ##
@@ -28,7 +28,7 @@ module Backup
28
28
  ["MySQL", "PostgreSQL", "MongoDB", "Redis", "Riak", "OpenLDAP", "SQLite"],
29
29
  # Storages
30
30
  ["S3", "CloudFiles", "Ninefold", "Dropbox", "FTP",
31
- "SFTP", "SCP", "RSync", "Local", "Qiniu"],
31
+ "SFTP", "SCP", "RSync", "Local"],
32
32
  # Compressors
33
33
  ["Gzip", "Bzip2", "Custom", "Pbzip2", "Lzma"],
34
34
  # Encryptors
@@ -1,3 +1,3 @@
1
1
  module Backup
2
- VERSION = "4.4.2"
2
+ VERSION = "4.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backup-bouchard
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.2
4
+ version: 4.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van Rooijen
@@ -248,20 +248,6 @@ dependencies:
248
248
  - - ">="
249
249
  - !ruby/object:Gem::Version
250
250
  version: 0.5.0
251
- - !ruby/object:Gem::Dependency
252
- name: qiniu
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - ">="
256
- - !ruby/object:Gem::Version
257
- version: 6.5.1
258
- type: :runtime
259
- prerelease: false
260
- version_requirements: !ruby/object:Gem::Requirement
261
- requirements:
262
- - - ">="
263
- - !ruby/object:Gem::Version
264
- version: 6.5.1
265
251
  - !ruby/object:Gem::Dependency
266
252
  name: nokogiri
267
253
  requirement: !ruby/object:Gem::Requirement
@@ -421,7 +407,6 @@ files:
421
407
  - lib/backup/storage/dropbox.rb
422
408
  - lib/backup/storage/ftp.rb
423
409
  - lib/backup/storage/local.rb
424
- - lib/backup/storage/qiniu.rb
425
410
  - lib/backup/storage/rsync.rb
426
411
  - lib/backup/storage/s3.rb
427
412
  - lib/backup/storage/scp.rb
@@ -473,7 +458,6 @@ files:
473
458
  - templates/cli/storages/dropbox
474
459
  - templates/cli/storages/ftp
475
460
  - templates/cli/storages/local
476
- - templates/cli/storages/qiniu
477
461
  - templates/cli/storages/rsync
478
462
  - templates/cli/storages/s3
479
463
  - templates/cli/storages/scp
@@ -1,65 +0,0 @@
1
- require "qiniu"
2
-
3
- module Backup
4
- module Storage
5
- class Qiniu < Base
6
- include Storage::Cycler
7
- class Error < Backup::Error; end
8
-
9
- ##
10
- # Qiniu API credentials
11
- attr_accessor :access_key, :secret_key
12
-
13
- ##
14
- # Qiniu bucket name
15
- attr_accessor :bucket
16
-
17
- def initialize(model, storage_id = nil)
18
- super
19
-
20
- @path ||= "backups"
21
-
22
- check_configuration
23
- config_credentials
24
- end
25
-
26
- private
27
-
28
- def transfer!
29
- package.filenames.each do |filename|
30
- src = File.join(Config.tmp_path, filename)
31
- dest = File.join(remote_path, filename)
32
- Logger.info "Storing '#{dest}'..."
33
-
34
- ::Qiniu.upload_file(uptoken: ::Qiniu.generate_upload_token,
35
- bucket: bucket,
36
- file: src,
37
- key: dest)
38
- end
39
- end
40
-
41
- # Called by the Cycler.
42
- # Any error raised will be logged as a warning.
43
- def remove!(package)
44
- Logger.info "Removing backup package dated #{package.time}..."
45
- remote_path = remote_path_for(package)
46
- package.filenames.each do |filename|
47
- ::Qiniu.delete(bucket, File.join(remote_path, filename))
48
- end
49
- end
50
-
51
- def check_configuration
52
- required = %w(access_key secret_key bucket)
53
-
54
- raise Error, <<-EOS if required.map { |name| send(name) }.any?(&:nil?)
55
- Configuration Error
56
- #{required.map { |name| "##{name}" }.join(", ")} are all required
57
- EOS
58
- end
59
-
60
- def config_credentials
61
- ::Qiniu.establish_connection!(access_key: access_key, secret_key: secret_key)
62
- end
63
- end
64
- end
65
- end
@@ -1,12 +0,0 @@
1
- ##
2
- # Qiniu [Storage]
3
- #
4
- store_with Qiniu do |qiniu|
5
- # Qiniu Credentials
6
- qiniu.access_key = "my_access_key"
7
- qiniu.secret_key = "my_secret_key"
8
-
9
- qiniu.bucket = "bucket-name"
10
- qiniu.keep = 5
11
- qiniu.path = "path/to/backups"
12
- end