siba 0.5.7 → 0.6.0
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 +7 -0
- data/.gitignore +1 -0
- data/lib/siba/helpers/test/helper.rb +9 -6
- data/lib/siba/helpers/test/require.rb +1 -0
- data/lib/siba/helpers/test/siba_minitest_plugin.rb +15 -0
- data/lib/siba/version.rb +1 -1
- data/scaffolds/project/.gitignore +1 -0
- data/scaffolds/project/siba-c6y-demo.gemspec +3 -3
- data/siba.gemspec +4 -4
- data/test/integration/i9n_siba_file.rb +3 -1
- metadata +90 -24
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 129899e974b65eeb4830e0c832537e9c793d14fc
|
4
|
+
data.tar.gz: 96786b89e09838db5a54240c6ee5e515460bded1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d2769825f0f2cd24cc53a36b3ab277405e91bfb707c4c938bf4f8197ffd64c03dea0396bf5734f81d08287e6d1bb5ca69072bfe5d25449a4e4c2d9ef13a149dd
|
7
|
+
data.tar.gz: 65f6c009d2e5d05e72f9b1103d0cc74b9794cdb4688f0816daa7fbb546ff618ec4de0fb1d861550c3387cb63f8a7263b2574f116bb297001bf17aa7e8978da7a
|
data/.gitignore
CHANGED
@@ -8,13 +8,18 @@ module SibaTest
|
|
8
8
|
class << self
|
9
9
|
include Siba::TmpDirPlug
|
10
10
|
|
11
|
+
attr_accessor :setup_hooks
|
12
|
+
attr_accessor :teardown_hooks
|
13
|
+
|
11
14
|
def init
|
12
15
|
require 'minitest/pride' unless SibaTest::IS_WINDOWS
|
13
16
|
|
14
17
|
@loaded_options = {}
|
15
18
|
@current_dir = siba_file.file_utils_pwd
|
19
|
+
@setup_hooks = []
|
20
|
+
@teardown_hooks = []
|
16
21
|
|
17
|
-
|
22
|
+
@setup_hooks << -> do
|
18
23
|
Siba::SibaLogger.quiet = true
|
19
24
|
Siba::SibaLogger.no_log = true
|
20
25
|
Siba::LoggerPlug.create "Test", nil
|
@@ -25,14 +30,12 @@ module SibaTest
|
|
25
30
|
SibaTest::KernelMock.mock_all_methods # prevents tests from accessing Kernel methods
|
26
31
|
end
|
27
32
|
|
28
|
-
|
29
|
-
Siba::LoggerPlug.close
|
30
|
-
end
|
33
|
+
@teardown_hooks << -> { Siba::LoggerPlug.close }
|
31
34
|
end
|
32
35
|
|
33
36
|
def init_unit
|
34
37
|
init
|
35
|
-
|
38
|
+
@setup_hooks << -> do
|
36
39
|
SibaTest::FileMock.mock_all_methods # prevents tests from doing file operations
|
37
40
|
Siba.class_eval {@tmp_dir = SibaTest::TmpDirMocked}
|
38
41
|
end
|
@@ -40,7 +43,7 @@ module SibaTest
|
|
40
43
|
|
41
44
|
def init_integration
|
42
45
|
init
|
43
|
-
|
46
|
+
@teardown_hooks << -> do
|
44
47
|
# cleanup after each integration test
|
45
48
|
Siba.current_dir = @current_dir
|
46
49
|
Siba.cleanup_tmp_dir
|
@@ -7,6 +7,7 @@ require 'minitest/autorun'
|
|
7
7
|
require 'siba'
|
8
8
|
require 'siba/helpers/test/file_mock'
|
9
9
|
require 'siba/helpers/test/kernel_mock'
|
10
|
+
require 'siba/helpers/test/siba_minitest_plugin'
|
10
11
|
require 'siba/helpers/test/extend_test'
|
11
12
|
require 'siba/helpers/test/removable_constants'
|
12
13
|
require 'siba/helpers/test/helper'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SibaMinitestPlugin
|
2
|
+
def before_setup
|
3
|
+
super
|
4
|
+
SibaTest.setup_hooks.each { |hook| hook.call }
|
5
|
+
end
|
6
|
+
|
7
|
+
def after_teardown
|
8
|
+
SibaTest.teardown_hooks.each { |hook| hook.call }
|
9
|
+
super
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class MiniTest::Unit::TestCase
|
14
|
+
include SibaMinitestPlugin
|
15
|
+
end
|
data/lib/siba/version.rb
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.add_runtime_dependency 'siba', '~>siba_version'
|
21
21
|
|
22
|
-
s.add_development_dependency 'minitest', '~>
|
23
|
-
s.add_development_dependency 'rake', '~>0
|
24
|
-
s.add_development_dependency 'guard-minitest', '~>0.
|
22
|
+
s.add_development_dependency 'minitest', '~>4.7'
|
23
|
+
s.add_development_dependency 'rake', '~>10.0'
|
24
|
+
s.add_development_dependency 'guard-minitest', '~>0.5'
|
25
25
|
end
|
data/siba.gemspec
CHANGED
@@ -17,11 +17,11 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
|
20
|
-
s.required_rubygems_version = '
|
20
|
+
s.required_rubygems_version = '>=1.8.0'
|
21
21
|
|
22
|
-
s.add_development_dependency 'minitest', '~>
|
23
|
-
s.add_development_dependency 'rake', '~>0
|
24
|
-
s.add_development_dependency 'guard-minitest', '~>0.
|
22
|
+
s.add_development_dependency 'minitest', '~>4.7'
|
23
|
+
s.add_development_dependency 'rake', '~>10.0'
|
24
|
+
s.add_development_dependency 'guard-minitest', '~>0.5'
|
25
25
|
|
26
26
|
# specify any dependencies here; for example:
|
27
27
|
# s.add_development_dependency "rspec"
|
@@ -22,9 +22,11 @@ describe Siba::Backup do
|
|
22
22
|
three.must_equal File.expand_path(dirname), "Should show absolute path"
|
23
23
|
@siba_file.file_expand_path("~/#{dirname}").must_equal File.expand_path("~/#{dirname}"), "Path relative to home folder"
|
24
24
|
tmp_dir = mkdir_in_tmp_dir "f-e-p"
|
25
|
+
FileUtils.cd tmp_dir
|
26
|
+
tmp_dir = File.expand_path('')
|
25
27
|
Siba.current_dir = tmp_dir
|
26
28
|
tmp_dir2 = mkdir_in_tmp_dir "f-e-p2"
|
27
29
|
siba_file.file_utils_cd tmp_dir2
|
28
|
-
@siba_file.file_expand_path(
|
30
|
+
@siba_file.file_expand_path(dirname).must_equal File.join(tmp_dir,dirname), "Path relative to Siba.current_dir"
|
29
31
|
end
|
30
32
|
end
|
metadata
CHANGED
@@ -1,65 +1,58 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: siba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.6.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Evgeny Neumerzhitskiy
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-04-20 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: minitest
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
19
|
+
version: '4.7'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
26
|
+
version: '4.7'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: '0
|
33
|
+
version: '10.0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '0
|
40
|
+
version: '10.0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: guard-minitest
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
47
|
+
version: '0.5'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
62
|
-
description:
|
54
|
+
version: '0.5'
|
55
|
+
description: 'SIBA is a backup and restore utility. It implements daily backup rotation
|
63
56
|
scheme. It retains full year history of backups by keeping 23 files in total: for
|
64
57
|
the last 6 days, 5 weeks and 12 months. Backups are archived and encrypted. Various
|
65
58
|
backup sources and destinations can be added through extension gems.'
|
@@ -95,6 +88,7 @@ files:
|
|
95
88
|
- lib/siba/helpers/test/kernel_mock.rb
|
96
89
|
- lib/siba/helpers/test/removable_constants.rb
|
97
90
|
- lib/siba/helpers/test/require.rb
|
91
|
+
- lib/siba/helpers/test/siba_minitest_plugin.rb
|
98
92
|
- lib/siba/logger_plug.rb
|
99
93
|
- lib/siba/options_backup.rb
|
100
94
|
- lib/siba/options_loader.rb
|
@@ -231,26 +225,98 @@ files:
|
|
231
225
|
homepage: https://github.com/evgenyneu/siba
|
232
226
|
licenses:
|
233
227
|
- MIT
|
228
|
+
metadata: {}
|
234
229
|
post_install_message:
|
235
230
|
rdoc_options: []
|
236
231
|
require_paths:
|
237
232
|
- lib
|
238
233
|
required_ruby_version: !ruby/object:Gem::Requirement
|
239
|
-
none: false
|
240
234
|
requirements:
|
241
|
-
- -
|
235
|
+
- - '>='
|
242
236
|
- !ruby/object:Gem::Version
|
243
237
|
version: '0'
|
244
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
|
-
none: false
|
246
239
|
requirements:
|
247
|
-
- -
|
240
|
+
- - '>='
|
248
241
|
- !ruby/object:Gem::Version
|
249
|
-
version:
|
242
|
+
version: 1.8.0
|
250
243
|
requirements: []
|
251
244
|
rubyforge_project:
|
252
|
-
rubygems_version:
|
245
|
+
rubygems_version: 2.0.3
|
253
246
|
signing_key:
|
254
|
-
specification_version:
|
247
|
+
specification_version: 4
|
255
248
|
summary: Simple backup and restore utility.
|
256
|
-
test_files:
|
249
|
+
test_files:
|
250
|
+
- test/helper/require_integration.rb
|
251
|
+
- test/helper/require_unit.rb
|
252
|
+
- test/integration/helpers/i9n_file_helper.rb
|
253
|
+
- test/integration/i9n_backup.rb
|
254
|
+
- test/integration/i9n_console.rb
|
255
|
+
- test/integration/i9n_generator.rb
|
256
|
+
- test/integration/i9n_options_backup.rb
|
257
|
+
- test/integration/i9n_scaffold.rb
|
258
|
+
- test/integration/i9n_siba_file.rb
|
259
|
+
- test/integration/i9n_test_unicode_files.rb
|
260
|
+
- test/integration/i9n_tmp_dir.rb
|
261
|
+
- test/integration/plugins/archive/tar/i9n_archive.rb
|
262
|
+
- test/integration/plugins/destination/dir/i9n_dest_dir.rb
|
263
|
+
- test/integration/plugins/encryption/gpg/i9n_encryption.rb
|
264
|
+
- test/integration/plugins/i9n_installed_plugins.rb
|
265
|
+
- test/integration/plugins/source/files/i9n_files.rb
|
266
|
+
- test/integration/tasks/i9n_siba_tasks.rb
|
267
|
+
- test/integration/yml/valid.yml
|
268
|
+
- test/unit/helpers/test_encoding_helper.rb
|
269
|
+
- test/unit/helpers/test_gem_helper.rb
|
270
|
+
- test/unit/helpers/test_security_helper.rb
|
271
|
+
- test/unit/helpers/test_string_helper.rb
|
272
|
+
- test/unit/plugins/archive/tar/test_archive.rb
|
273
|
+
- test/unit/plugins/archive/tar/test_init.rb
|
274
|
+
- test/unit/plugins/archive/tar/yml/archive/check_installed.yml
|
275
|
+
- test/unit/plugins/archive/tar/yml/init/default_compression.yml
|
276
|
+
- test/unit/plugins/archive/tar/yml/init/invalid_compression.yml
|
277
|
+
- test/unit/plugins/archive/tar/yml/init/valid.yml
|
278
|
+
- test/unit/plugins/destination/dir/test_dest_dir.rb
|
279
|
+
- test/unit/plugins/destination/dir/test_init.rb
|
280
|
+
- test/unit/plugins/destination/dir/yml/init/valid.yml
|
281
|
+
- test/unit/plugins/encryption/gpg/test_encryption.rb
|
282
|
+
- test/unit/plugins/encryption/gpg/test_init.rb
|
283
|
+
- test/unit/plugins/source/files/test_files.rb
|
284
|
+
- test/unit/plugins/source/files/test_init.rb
|
285
|
+
- test/unit/plugins/source/files/test_path_match.rb
|
286
|
+
- test/unit/plugins/source/files/yml/ignore_list.yml
|
287
|
+
- test/unit/plugins/source/files/yml/ignore_not_array.yml
|
288
|
+
- test/unit/plugins/source/files/yml/include_not_array.yml
|
289
|
+
- test/unit/plugins/source/files/yml/include_subdirs_false.yml
|
290
|
+
- test/unit/plugins/source/files/yml/include_subdirs_missing.yml
|
291
|
+
- test/unit/plugins/source/files/yml/no_ignore.yml
|
292
|
+
- test/unit/plugins/source/files/yml/no_include.yml
|
293
|
+
- test/unit/plugins/source/files/yml/valid.yml
|
294
|
+
- test/unit/plugins/test_installed_plugins.rb
|
295
|
+
- test/unit/plugins/test_plugin_loader.rb
|
296
|
+
- test/unit/plugins/test_plugins.rb
|
297
|
+
- test/unit/tasks/test_siba_task.rb
|
298
|
+
- test/unit/tasks/test_siba_tasks.rb
|
299
|
+
- test/unit/tasks/yml/task/invalid.yml
|
300
|
+
- test/unit/tasks/yml/task/valid.yml
|
301
|
+
- test/unit/test_backup.rb
|
302
|
+
- test/unit/test_console.rb
|
303
|
+
- test/unit/test_generator.rb
|
304
|
+
- test/unit/test_globals.rb
|
305
|
+
- test/unit/test_log_message.rb
|
306
|
+
- test/unit/test_logger_plug.rb
|
307
|
+
- test/unit/test_options_backup.rb
|
308
|
+
- test/unit/test_options_loader.rb
|
309
|
+
- test/unit/test_password_strength.rb
|
310
|
+
- test/unit/test_restore.rb
|
311
|
+
- test/unit/test_scaffold.rb
|
312
|
+
- test/unit/test_siba_check.rb
|
313
|
+
- test/unit/test_siba_logger.rb
|
314
|
+
- test/unit/test_tmp_dir.rb
|
315
|
+
- test/unit/yml/options_loader/array.yml
|
316
|
+
- test/unit/yml/options_loader/empty.yml
|
317
|
+
- test/unit/yml/options_loader/invalid.yml
|
318
|
+
- test/unit/yml/options_loader/string.yml
|
319
|
+
- test/unit/yml/options_loader/utf8_with_bom.yml
|
320
|
+
- test/unit/yml/options_loader/valid.yml
|
321
|
+
- test/unit/yml/siba_options_backup.yml
|
322
|
+
- test/unit/yml/valid.yml
|