backup2qiniu 3.11.0 → 4.2.0

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
  SHA1:
3
- metadata.gz: 82e295432931ffab3e289e6aaae20b30160aaca3
4
- data.tar.gz: 4d6478e6fee62871e05712e9dcd29058237d935e
3
+ metadata.gz: a1907de155547a1a31f750f3c030d47f1a90594b
4
+ data.tar.gz: 8dacddfb7f99ad425a59fa7fec6a3802ddc80144
5
5
  SHA512:
6
- metadata.gz: feca92f31bbc2b3ecc813e13610f6083ddafdf2011838956ffe9ba7835e77ca5d98cdd3e1f346d8ce37e85cc2763ac428e25d7b7f01db60ba12460a19452cf7b
7
- data.tar.gz: 5ea7da1eb92b3d4524874e5480b1d6b69a101056c1284f3635b25e97d9ac96cde60d1a1ca5eafa805e8ec47c5629aeb99ed0f43a30ef9d948673817b1f50e354
6
+ metadata.gz: 85c154142ae806a4a44ceb2977cc26d3dd1de4fb398412ffa499d50f262bb77622be2550e2f37ed93afe1946eeb8624a1b256ae73bdc84a643a6a44f08a9f23c
7
+ data.tar.gz: c53842de35f450cd97181ef40d802d3fe4878844b1652e951a3be7ba3e33f3c0cfaf7cb55df41ff69214566f568f66c8243a2a13554aece716eb5cbc15cdf406
@@ -1,99 +1,251 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- backup2qiniu (3.11.0)
5
- backup (~> 3.4)
4
+ backup2qiniu (4.2.0)
5
+ backup (~> 4.2)
6
6
  qiniu-rs (~> 3.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- backup (3.11.0)
11
+ CFPropertyList (2.3.1)
12
+ addressable (2.3.5)
13
+ atomic (1.1.14)
14
+ aws-ses (0.5.0)
15
+ builder
16
+ mail (> 2.2.5)
17
+ mime-types
18
+ xml-simple
19
+ backup (4.2.2)
20
+ CFPropertyList (= 2.3.1)
21
+ addressable (= 2.3.5)
22
+ atomic (= 1.1.14)
23
+ aws-ses (= 0.5.0)
24
+ buftok (= 0.2.0)
12
25
  builder (= 3.2.2)
26
+ descendants_tracker (= 0.0.3)
27
+ dogapi (= 1.11.0)
13
28
  dropbox-sdk (= 1.5.1)
14
- excon (= 0.25.3)
15
- faraday (= 0.8.7)
16
- fog (= 1.13.0)
17
- formatador (= 0.2.4)
18
- hipchat (= 0.11.0)
19
- httparty (= 0.11.0)
20
- json (= 1.8.0)
29
+ equalizer (= 0.0.9)
30
+ excon (= 0.44.4)
31
+ faraday (= 0.8.8)
32
+ fission (= 0.5.0)
33
+ flowdock (= 0.4.0)
34
+ fog (= 1.28.0)
35
+ fog-atmos (= 0.1.0)
36
+ fog-aws (= 0.1.1)
37
+ fog-brightbox (= 0.7.1)
38
+ fog-core (= 1.29.0)
39
+ fog-ecloud (= 0.0.2)
40
+ fog-json (= 1.0.0)
41
+ fog-profitbricks (= 0.0.2)
42
+ fog-radosgw (= 0.0.3)
43
+ fog-riakcs (= 0.1.0)
44
+ fog-sakuracloud (= 1.0.0)
45
+ fog-serverlove (= 0.1.1)
46
+ fog-softlayer (= 0.4.1)
47
+ fog-storm_on_demand (= 0.1.0)
48
+ fog-terremark (= 0.0.4)
49
+ fog-vmfusion (= 0.0.1)
50
+ fog-voxel (= 0.0.2)
51
+ fog-xml (= 0.1.1)
52
+ formatador (= 0.2.5)
53
+ hipchat (= 1.0.1)
54
+ http (= 0.5.0)
55
+ http_parser.rb (= 0.6.0)
56
+ httparty (= 0.12.0)
57
+ inflecto (= 0.0.2)
58
+ ipaddress (= 0.8.0)
59
+ json (= 1.8.2)
21
60
  mail (= 2.5.4)
22
- mime-types (= 1.23)
23
- multi_json (= 1.7.7)
24
- multi_xml (= 0.5.4)
61
+ memoizable (= 0.4.0)
62
+ mime-types (= 1.25.1)
63
+ mini_portile (= 0.6.2)
64
+ multi_json (= 1.10.1)
65
+ multi_xml (= 0.5.5)
25
66
  multipart-post (= 1.2.0)
26
- net-scp (= 1.1.2)
67
+ net-scp (= 1.2.1)
27
68
  net-sftp (= 2.1.2)
28
- net-ssh (= 2.6.8)
29
- nokogiri (= 1.5.10)
69
+ net-ssh (= 2.9.2)
70
+ nokogiri (= 1.6.6.2)
30
71
  open4 (= 1.3.0)
72
+ pagerduty (= 2.0.0)
31
73
  polyglot (= 0.3.3)
32
- ruby-hmac (= 0.4.0)
33
74
  simple_oauth (= 0.2.0)
34
75
  thor (= 0.18.1)
35
- treetop (= 1.4.14)
36
- twitter (= 4.8.1)
76
+ thread_safe (= 0.1.3)
77
+ treetop (= 1.4.15)
78
+ twitter (= 5.5.0)
79
+ unf (= 0.1.3)
80
+ unf_ext (= 0.0.6)
81
+ xml-simple (= 1.1.4)
82
+ buftok (0.2.0)
37
83
  builder (3.2.2)
84
+ descendants_tracker (0.0.3)
85
+ dogapi (1.11.0)
86
+ json (>= 1.5.1)
38
87
  dropbox-sdk (1.5.1)
39
88
  json
40
- excon (0.25.3)
41
- faraday (0.8.7)
42
- multipart-post (~> 1.1)
43
- fog (1.13.0)
89
+ equalizer (0.0.9)
90
+ excon (0.44.4)
91
+ faraday (0.8.8)
92
+ multipart-post (~> 1.2.0)
93
+ fission (0.5.0)
94
+ CFPropertyList (~> 2.2)
95
+ flowdock (0.4.0)
96
+ httparty (~> 0.7)
97
+ multi_json
98
+ fog (1.28.0)
99
+ fog-atmos
100
+ fog-aws (~> 0.0)
101
+ fog-brightbox (~> 0.4)
102
+ fog-core (~> 1.27, >= 1.27.3)
103
+ fog-ecloud
104
+ fog-json
105
+ fog-profitbricks
106
+ fog-radosgw (>= 0.0.2)
107
+ fog-riakcs
108
+ fog-sakuracloud (>= 0.0.4)
109
+ fog-serverlove
110
+ fog-softlayer
111
+ fog-storm_on_demand
112
+ fog-terremark
113
+ fog-vmfusion
114
+ fog-voxel
115
+ fog-xml (~> 0.1.1)
116
+ ipaddress (~> 0.5)
117
+ nokogiri (~> 1.5, >= 1.5.11)
118
+ fog-atmos (0.1.0)
119
+ fog-core
120
+ fog-xml
121
+ fog-aws (0.1.1)
122
+ fog-core (~> 1.27)
123
+ fog-json (~> 1.0)
124
+ fog-xml (~> 0.1)
125
+ ipaddress (~> 0.8)
126
+ fog-brightbox (0.7.1)
127
+ fog-core (~> 1.22)
128
+ fog-json
129
+ inflecto (~> 0.0.2)
130
+ fog-core (1.29.0)
44
131
  builder
45
- excon (~> 0.25.0)
46
- formatador (~> 0.2.0)
132
+ excon (~> 0.38)
133
+ formatador (~> 0.2)
47
134
  mime-types
48
- multi_json (~> 1.0)
49
135
  net-scp (~> 1.1)
50
136
  net-ssh (>= 2.1.3)
51
- nokogiri (~> 1.5.0)
52
- ruby-hmac
53
- formatador (0.2.4)
54
- hipchat (0.11.0)
55
- httparty
56
- httparty (0.11.0)
137
+ fog-ecloud (0.0.2)
138
+ fog-core
139
+ fog-xml
140
+ fog-json (1.0.0)
57
141
  multi_json (~> 1.0)
142
+ fog-profitbricks (0.0.2)
143
+ fog-core
144
+ fog-xml
145
+ nokogiri
146
+ fog-radosgw (0.0.3)
147
+ fog-core (>= 1.21.0)
148
+ fog-json
149
+ fog-xml (>= 0.0.1)
150
+ fog-riakcs (0.1.0)
151
+ fog-core
152
+ fog-json
153
+ fog-xml
154
+ fog-sakuracloud (1.0.0)
155
+ fog-core
156
+ fog-json
157
+ fog-serverlove (0.1.1)
158
+ fog-core
159
+ fog-json
160
+ fog-softlayer (0.4.1)
161
+ fog-core
162
+ fog-json
163
+ fog-storm_on_demand (0.1.0)
164
+ fog-core
165
+ fog-json
166
+ fog-terremark (0.0.4)
167
+ fog-core
168
+ fog-xml
169
+ fog-vmfusion (0.0.1)
170
+ fission
171
+ fog-core
172
+ fog-voxel (0.0.2)
173
+ fog-core
174
+ fog-xml
175
+ fog-xml (0.1.1)
176
+ fog-core
177
+ nokogiri (~> 1.5, >= 1.5.11)
178
+ formatador (0.2.5)
179
+ hipchat (1.0.1)
180
+ httparty
181
+ http (0.5.0)
182
+ http_parser.rb
183
+ http_parser.rb (0.6.0)
184
+ httparty (0.12.0)
185
+ json (~> 1.8)
58
186
  multi_xml (>= 0.5.2)
59
- json (1.8.0)
187
+ inflecto (0.0.2)
188
+ ipaddress (0.8.0)
189
+ json (1.8.2)
60
190
  mail (2.5.4)
61
191
  mime-types (~> 1.16)
62
192
  treetop (~> 1.4.8)
63
- mime-types (1.23)
64
- multi_json (1.7.7)
65
- multi_xml (0.5.4)
193
+ memoizable (0.4.0)
194
+ thread_safe (~> 0.1.3)
195
+ mime-types (1.25.1)
196
+ mini_portile (0.6.2)
197
+ multi_json (1.10.1)
198
+ multi_xml (0.5.5)
66
199
  multipart-post (1.2.0)
67
- net-scp (1.1.2)
200
+ net-scp (1.2.1)
68
201
  net-ssh (>= 2.6.5)
69
202
  net-sftp (2.1.2)
70
203
  net-ssh (>= 2.6.5)
71
- net-ssh (2.6.8)
72
- netrc (0.8.0)
73
- nokogiri (1.5.10)
204
+ net-ssh (2.9.2)
205
+ nokogiri (1.6.6.2)
206
+ mini_portile (~> 0.6.0)
74
207
  open4 (1.3.0)
208
+ pagerduty (2.0.0)
209
+ json (>= 1.7.7)
75
210
  polyglot (0.3.3)
76
211
  qiniu-rs (3.4.10)
77
212
  json (~> 1.7)
78
213
  mime-types (~> 1.19)
79
214
  rest-client (~> 1.6)
80
215
  ruby-hmac (~> 0.4)
81
- rest-client (1.7.2)
82
- mime-types (>= 1.16, < 3.0)
83
- netrc (~> 0.7)
216
+ rdoc (4.2.0)
217
+ rest-client (1.6.8)
218
+ mime-types (~> 1.16)
219
+ rdoc (>= 2.4.2)
84
220
  ruby-hmac (0.4.0)
85
221
  simple_oauth (0.2.0)
86
222
  thor (0.18.1)
87
- treetop (1.4.14)
223
+ thread_safe (0.1.3)
224
+ atomic
225
+ treetop (1.4.15)
88
226
  polyglot
89
227
  polyglot (>= 0.3.1)
90
- twitter (4.8.1)
91
- faraday (~> 0.8, < 0.10)
92
- multi_json (~> 1.0)
93
- simple_oauth (~> 0.2)
228
+ twitter (5.5.0)
229
+ addressable (~> 2.3)
230
+ buftok (~> 0.2.0)
231
+ descendants_tracker (~> 0.0.3)
232
+ equalizer (~> 0.0.9)
233
+ faraday (>= 0.8, < 0.10)
234
+ http (~> 0.5.0)
235
+ http_parser.rb (~> 0.6.0)
236
+ json (~> 1.8)
237
+ memoizable (~> 0.4.0)
238
+ simple_oauth (~> 0.2.0)
239
+ unf (0.1.3)
240
+ unf_ext
241
+ unf_ext (0.0.6)
242
+ xml-simple (1.1.4)
94
243
 
95
244
  PLATFORMS
96
245
  ruby
97
246
 
98
247
  DEPENDENCIES
99
248
  backup2qiniu!
249
+
250
+ BUNDLED WITH
251
+ 1.11.2
data/NEWS.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # NEWS
2
2
 
3
+ ## 4.2.0 (2015-12-16)
4
+
5
+ * [#8] now support backup 4
6
+
7
+ ## 3.11.0 (2014-11-13)
8
+
9
+ * backup2qiniu does not support backup 4
10
+
3
11
  ## 3.5.0 (2013-05-08)
4
12
 
5
13
  * works for backup 3.5.X
data/README.md CHANGED
@@ -7,9 +7,7 @@
7
7
  * 运行 gem install backup2qiniu
8
8
  * 运行 backup generate:config
9
9
  * 运行 backup generate:model --trigger=mysql_backup_qiniu
10
- * 获取上传秘钥
11
- * 运行 backup2qiniu gen_token
12
- * 如果不担心黑客入侵后通过你的备份配置删除你的备份,那么可以直接访问 https://portal.qiniu.com/setting/key, 找到你的 "ACCESS KEY" 和 "SECRET KEY"
10
+ * 运行 backup2qiniu gen_token 来生成配置文件
13
11
  * 修改 ~/Backup/models/mysql_backup_qiniu.rb, 改为如下的形式
14
12
 
15
13
  ```ruby
@@ -30,6 +28,7 @@ Backup::Model.new(:mysql_backup_qiniu, 'example backup to qiniu') do
30
28
  db.socket = "/tmp/mysql.sock"
31
29
  end
32
30
 
31
+ # 把这段替换为你刚刚生成的配置文件
33
32
  store_with Qiniu do |q|
34
33
  ## when using uploadToken, you can not delete the old backup (for security concern)
35
34
  # q.keep = 7
@@ -38,26 +37,28 @@ Backup::Model.new(:mysql_backup_qiniu, 'example backup to qiniu') do
38
37
  q.path = 'BACKUP_DIR1'
39
38
  end
40
39
 
41
- store_with Qiniu do |q|
42
- q.keep = 7
43
- q.access_key = 'REPLACE WITH ACCESS KEY'
44
- q.access_secret = 'REPLACE WITH ACCESS SECRET'
45
- q.bucket = 'BUCKET_NAME'
46
- q.path = 'BACKUP_DIR2'
47
- end
40
+ # 如果需要自动删除过期的备份,那么需要直接使用 https://portal.qiniu.com/setting/key 拿到的 AK 和 SK
41
+ # store_with Qiniu do |q|
42
+ # q.keep = 7
43
+ # q.access_key = 'REPLACE WITH ACCESS KEY' # 从网页拿到的 AK
44
+ # q.access_secret = 'REPLACE WITH ACCESS SECRET' # 从网页拿到的 SK
45
+ # q.bucket = 'BUCKET_NAME'
46
+ # q.path = 'BACKUP_DIR2'
47
+ # end
48
48
 
49
- # more info: https://github.com/meskyanichi/backup/wiki/Encryptors
50
- encrypt_with GPG do |encryption|
51
- encryption.keys = {}
52
- encryption.keys['YOUR EMAIL'] = <<-KEY
53
- -----BEGIN PGP PUBLIC KEY BLOCK-----
54
- Version: GnuPG v1.4.12 (Darwin)
55
-
56
- YOUR KEY
57
- -----END PGP PUBLIC KEY BLOCK-----
58
- KEY
59
- encryption.recipients = ['YOUR EMAIL']
60
- end
49
+ # 为安全起见我们推荐你生成一对 GPG 秘钥,用公钥来加密你的数据库备份
50
+ # 更多信息: https://github.com/meskyanichi/backup/wiki/Encryptors
51
+ # encrypt_with GPG do |encryption|
52
+ # encryption.keys = {}
53
+ # encryption.keys['YOUR EMAIL'] = <<-KEY
54
+ # -----BEGIN PGP PUBLIC KEY BLOCK-----
55
+ # Version: GnuPG v1.4.12 (Darwin)
56
+ #
57
+ # YOUR KEY
58
+ # -----END PGP PUBLIC KEY BLOCK-----
59
+ # KEY
60
+ # encryption.recipients = ['YOUR EMAIL']
61
+ # end
61
62
  end
62
63
  ```
63
64
 
@@ -14,6 +14,6 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "backup2qiniu"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Backup2qiniu::VERSION
17
- gem.add_dependency 'backup', '~> 3.4'
17
+ gem.add_dependency 'backup', '~> 4.2'
18
18
  gem.add_dependency 'qiniu-rs', '~> 3.1'
19
19
  end
@@ -1,6 +1,8 @@
1
1
  module Backup
2
2
  module Config
3
- module Qiniu
3
+ class DSL
4
+ module Qiniu
5
+ end
4
6
  end
5
7
  end
6
8
  end
@@ -6,19 +6,16 @@ require 'base64'
6
6
  module Backup
7
7
  module Storage
8
8
  class Qiniu < Base
9
-
10
9
  attr_accessor :access_key, :access_secret
11
10
  attr_accessor :upload_token
12
11
  attr_accessor :bucket
13
12
  attr_accessor :path
14
13
 
15
- def initialize(model, storage_id = nil, &block)
14
+ def initialize(model, storage_id = nil)
16
15
  super(model, storage_id)
17
16
 
18
17
  @bucket ||= 'backups'
19
18
  @path ||= ''
20
-
21
- instance_eval(&block) if block_given?
22
19
  end
23
20
 
24
21
  def remove!(pkg)
@@ -1,4 +1,4 @@
1
- require 'backup/config/qiniu'
1
+ require 'backup/config/dsl/qiniu'
2
2
 
3
3
  module Backup
4
4
  module Storage
@@ -1,3 +1,3 @@
1
1
  module Backup2qiniu
2
- VERSION = "3.11.0"
2
+ VERSION = "4.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backup2qiniu
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LI Daobing
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-13 00:00:00.000000000 Z
11
+ date: 2015-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backup
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.4'
19
+ version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.4'
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: qiniu-rs
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -55,7 +55,7 @@ files:
55
55
  - Rakefile
56
56
  - backup2qiniu.gemspec
57
57
  - bin/backup2qiniu
58
- - lib/backup/config/qiniu.rb
58
+ - lib/backup/config/dsl/qiniu.rb
59
59
  - lib/backup/storage/qiniu.rb
60
60
  - lib/backup2qiniu.rb
61
61
  - lib/backup2qiniu/cli.rb
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.4.2
82
+ rubygems_version: 2.4.8
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: backup to qiniu.com