backupii 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.2

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: db08b57a1783a56efe5583ab413bf42721a5d2c7c5a4567fe523ddc0068e7874
4
- data.tar.gz: 4858c38e6c35d3c80429bb8a9311f3f152f632551a80eeebbbc27a8aab6c3087
3
+ metadata.gz: 55acc142a5a0af7888183a87cc376d1173c3b0bf2224c87cc01e0213c4e9797b
4
+ data.tar.gz: 9692e585f0b0df923376828f06322b5ddace900dca10b4bbea41b203e8d4c8cd
5
5
  SHA512:
6
- metadata.gz: 9e2361e3b6afd6cc9e34b766fdd4eb4744b47492b97ce9763efb02ed2f60a89abc2c6c2dda95adf9b26ada65dae2286e6c2f9322feffe95d0bfd7c4ccbc3cb7d
7
- data.tar.gz: ee8027246ecb416e99ca09066789b5437a1ff147f29020fe78206e267ffa7389330f374ffc13aca1147b2c900a862c09d451246064c56d6e3dccf2c4844ca71b
6
+ metadata.gz: abb4a36ef5df6770034a83b8583f74564b84d41ae964a6de533fc35cddf6c73f7bbca091c5689404d5e0604d96d6049b6362dd4a854d2ff48260b31e240bc91f
7
+ data.tar.gz: 5679a81cde608d32c62adbc0be6492d2532e9e5aff86c0bd772ffd1a65aeb0c5614f7f1b0ef5b6327c859cff2e0a472c2c89a39a4b0d09c375a758c12060a3b1
data/lib/backup/config.rb CHANGED
@@ -18,6 +18,32 @@ module Backup
18
18
 
19
19
  attr_reader :user, :root_path, :config_file, :data_path, :tmp_path
20
20
 
21
+ def check_config_version!(config)
22
+ version = Backup::VERSION.split(".").first
23
+
24
+ return if config =~ %r{^# backupii_config_version: #{version}$}
25
+
26
+ if config =~ %r{^# Backup v\d\.x Configuration$}
27
+ raise Error, <<-ERROR_MSG
28
+ Invalid Configuration File.
29
+ The configuration file at '#{config_file}'
30
+ appears to be a Backup 3/4/5 configuration file.
31
+ In order to use it with BackupII, you need to upgrade it.
32
+ Please refer to the BackupII documentation for upgrade instructions.
33
+ ERROR_MSG
34
+ elsif !(config =~ %r{^# backupii_config_version: #{version}$})
35
+ raise Error, <<-ERROR_MSG
36
+ Invalid Configuration File
37
+ The configuration file at '#{config_file}'
38
+ does not appear to be a BackupII v#{version}.x configuration file.
39
+ If you have upgraded to v#{version}.x from a previous version,
40
+ you need to upgrade your configuration file.
41
+ Please see the instructions for upgrading in the BackupII
42
+ documentation.
43
+ ERROR_MSG
44
+ end
45
+ end
46
+
21
47
  # Loads the user's +config.rb+ and all model files.
22
48
  def load(options = {})
23
49
  update(options) # from the command line
@@ -27,17 +53,7 @@ module Backup
27
53
  end
28
54
 
29
55
  config = File.read(config_file)
30
- version = Backup::VERSION.split(".").first
31
- unless config =~ %r{^# Backup v#{version}\.x Configuration$}
32
- raise Error, <<-EOS
33
- Invalid Configuration File
34
- The configuration file at '#{config_file}'
35
- does not appear to be a Backup v#{version}.x configuration file.
36
- If you have upgraded to v#{version}.x from a previous version,
37
- you need to upgrade your configuration file.
38
- Please see the instructions for upgrading in the Backup documentation.
39
- EOS
40
- end
56
+ check_config_version!(config)
41
57
 
42
58
  dsl = DSL.new
43
59
  dsl.instance_eval(config, config_file)
@@ -112,7 +128,7 @@ module Backup
112
128
 
113
129
  def reset!
114
130
  @user = ENV["USER"] || Etc.getpwuid.name
115
- @root_path = File.join(File.expand_path(ENV["HOME"] || ""), "Backup")
131
+ @root_path = File.join(File.expand_path(ENV["HOME"] || ""), "BackupII")
116
132
  update(root_path: @root_path)
117
133
  end
118
134
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Backup
4
- VERSION = "0.1.0-alpha.1"
4
+ VERSION = "0.1.0-alpha.2"
5
5
  end
@@ -10,7 +10,7 @@
10
10
  # archive.exclude "/path/to/an/excluded_directory
11
11
  #
12
12
  # By default, relative paths will be relative to the directory
13
- # where `backup perform` is executed, and they will be expanded
13
+ # where `backupii perform` is executed, and they will be expanded
14
14
  # to the root of the filesystem when added to the archive.
15
15
  #
16
16
  # If a `root` path is set, relative paths will be relative to the
data/templates/cli/config CHANGED
@@ -1,10 +1,11 @@
1
1
  # encoding: utf-8
2
+ # backupii_config_version: <%= Backup::VERSION.split('.').first %>
2
3
 
3
4
  ##
4
- # Backup v<%= Backup::VERSION.split('.').first %>.x Configuration
5
+ # BackupII v<%= Backup::VERSION.split('.').first %>.x Configuration
5
6
  #
6
- # Documentation: http://backup.github.io/backup
7
- # Issue Tracker: https://github.com/backup/backup/issues
7
+ # Documentation: http://backupii.github.io/backupii
8
+ # Issue Tracker: https://github.com/backupii/backupii/issues
8
9
 
9
10
  ##
10
11
  # Config Options
@@ -38,7 +39,7 @@
38
39
  # tmp_path 'my/tmp'
39
40
  #
40
41
  # Sets the path where backup stores persistent information.
41
- # When Backup's Cycler is used, small YAML files are stored here.
42
+ # When BackupII's Cycler is used, small YAML files are stored here.
42
43
  # May be an absolute path, or relative to the current directory or +root_path+.
43
44
  #
44
45
  # data_path 'my/data'
@@ -46,7 +47,7 @@
46
47
  ##
47
48
  # Utilities
48
49
  #
49
- # If you need to use a utility other than the one Backup detects,
50
+ # If you need to use a utility other than the one BackupII detects,
50
51
  # or a utility can not be found in your $PATH.
51
52
  #
52
53
  # Utilities.configure do
@@ -70,7 +71,7 @@
70
71
  # Command line options will override those set here.
71
72
  # For example, the following would override the example settings above
72
73
  # to disable syslog and enable console output.
73
- # backup perform --trigger my_backup --no-syslog --no-quiet
74
+ # backupii perform --trigger my_backup --no-syslog --no-quiet
74
75
 
75
76
  ##
76
77
  # Component Defaults
data/templates/cli/model CHANGED
@@ -1,13 +1,13 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  ##
4
- # Backup Generated: <%= @options[:trigger] %>
4
+ # BackupII Generated: <%= @options[:trigger] %>
5
5
  # Once configured, you can run the backup with the following command:
6
6
  #
7
- # $ backup perform -t <%= @options[:trigger] %> [-c <path_to_configuration_file>]
7
+ # $ backupii perform -t <%= @options[:trigger] %> [-c <path_to_configuration_file>]
8
8
  #
9
- # For more information about Backup's components, see the documentation at:
10
- # http://backup.github.io/backup
9
+ # For more information about BackupII's components, see the documentation at:
10
+ # http://backupii.github.io/backupii
11
11
  #
12
12
  Model.new(:<%= @options[:trigger] %>, 'Description for <%= @options[:trigger] %>') do
13
13
  <% if @options[:splitter] %>
@@ -9,7 +9,7 @@
9
9
  db.api_key = "my_api_key"
10
10
  db.api_secret = "my_api_secret"
11
11
  # Sets the path where the cached authorized session will be stored.
12
- # Relative paths will be relative to ~/Backup, unless the --root-path
12
+ # Relative paths will be relative to ~/.backupii, unless the --root-path
13
13
  # is set on the command line or within your configuration file.
14
14
  db.cache_path = ".cache"
15
15
  # :app_folder (default) or :dropbox
@@ -1,3 +1,3 @@
1
- Project Home: https://github.com/backup/backup
2
- Documentation: http://backup.github.io/backup
3
- Issue Tracker: https://github.com/backup/backup/issues
1
+ Project Home: https://github.com/backupii/backupii
2
+ Documentation: http://backupii.github.io/backupii
3
+ Issue Tracker: https://github.com/backupii/backupii/issues
@@ -1,2 +1,2 @@
1
- Backup v<%= Backup::VERSION %>
1
+ BackupII v<%= Backup::VERSION %>
2
2
  Ruby: <%= RUBY_DESCRIPTION %>
@@ -1,5 +1,5 @@
1
1
 
2
- Visit the following URL to authorize your Dropbox App with Backup:
2
+ Visit the following URL to authorize your Dropbox App with BackupII:
3
3
 
4
4
  <%= @session.get_authorize_url %>
5
5
 
@@ -1,4 +1,4 @@
1
1
 
2
- Backup has successfully been authorized!
2
+ BackupII has successfully been authorized!
3
3
  Writing session cache file to:
4
4
  <%= @cached_file %>
@@ -2,7 +2,7 @@
2
2
  Cache data written! You will no longer need to manually authorize this
3
3
  Dropbox account via an authorization URL on this machine.
4
4
 
5
- Note: If you run Backup with this Dropbox account in another location,
5
+ Note: If you run BackupII with this Dropbox account in another location,
6
6
  or on other machines, you will need to either authorize them the same
7
7
  way, or simply copy over the cache file from:
8
8
  <%= @cached_file %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backupii
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.1
4
+ version: 0.1.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van Rooijen
@@ -284,16 +284,16 @@ dependencies:
284
284
  name: rake
285
285
  requirement: !ruby/object:Gem::Requirement
286
286
  requirements:
287
- - - ">="
287
+ - - "~>"
288
288
  - !ruby/object:Gem::Version
289
- version: '0'
289
+ version: 13.0.0
290
290
  type: :development
291
291
  prerelease: false
292
292
  version_requirements: !ruby/object:Gem::Requirement
293
293
  requirements:
294
- - - ">="
294
+ - - "~>"
295
295
  - !ruby/object:Gem::Version
296
- version: '0'
296
+ version: 13.0.0
297
297
  - !ruby/object:Gem::Dependency
298
298
  name: rspec
299
299
  requirement: !ruby/object:Gem::Requirement
@@ -336,12 +336,12 @@ dependencies:
336
336
  - - '='
337
337
  - !ruby/object:Gem::Version
338
338
  version: 0.9.1
339
- description: Backup is a RubyGem, written for UNIX-like operating systems, that allows
340
- you to easily perform backup operations on both your remote and local environments.
341
- It provides you with an elegant DSL in Ruby for modeling your backups. Backup has
342
- built-in support for various databases, storage protocols/services, syncers, compressors,
343
- encryptors and notifiers which you can mix and match. It was built with modularity,
344
- extensibility and simplicity in mind.
339
+ description: BackupII is a RubyGem, written for UNIX-like operating systems, that
340
+ allows you to easily perform backup operations on both your remote and local environments.
341
+ It provides you with an elegant DSL in Ruby for modeling your backups. BackupII
342
+ has built-in support for various databases, storage protocols/services, syncers,
343
+ compressors, encryptors and notifiers which you can mix and match. It was built
344
+ with modularity, extensibility and simplicity in mind.
345
345
  email: contact@lta.io
346
346
  executables:
347
347
  - backupii
@@ -484,7 +484,9 @@ files:
484
484
  homepage: https://github.com/backupii/backupii
485
485
  licenses:
486
486
  - MIT
487
- metadata: {}
487
+ metadata:
488
+ bug_tracker_uri: https://github.com/backupii/backupii/issues
489
+ source_code_uri: https://github.com/backupii/backupii
488
490
  post_install_message:
489
491
  rdoc_options: []
490
492
  require_paths: