Rm .bundle fix literal stngs, incl rubocop.yml
This commit is contained in:
parent
688bddf428
commit
e55cbadec4
|
@ -1,6 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
|
||||||
|
|
||||||
gem 'rubocop', '1.46.0'
|
|
||||||
gem 'json', '2.6.3'
|
|
|
@ -1,35 +0,0 @@
|
||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
ast (2.4.2)
|
|
||||||
json (2.6.3)
|
|
||||||
parallel (1.22.1)
|
|
||||||
parser (3.2.1.0)
|
|
||||||
ast (~> 2.4.1)
|
|
||||||
rainbow (3.1.1)
|
|
||||||
regexp_parser (2.7.0)
|
|
||||||
rexml (3.2.5)
|
|
||||||
rubocop (1.46.0)
|
|
||||||
json (~> 2.3)
|
|
||||||
parallel (~> 1.10)
|
|
||||||
parser (>= 3.2.0.0)
|
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
|
||||||
rexml (>= 3.2.5, < 4.0)
|
|
||||||
rubocop-ast (>= 1.26.0, < 2.0)
|
|
||||||
ruby-progressbar (~> 1.7)
|
|
||||||
unicode-display_width (>= 2.4.0, < 3.0)
|
|
||||||
rubocop-ast (1.26.0)
|
|
||||||
parser (>= 3.2.1.0)
|
|
||||||
ruby-progressbar (1.11.0)
|
|
||||||
unicode-display_width (2.4.2)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
x64-mingw-ucrt
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
json (= 2.6.3)
|
|
||||||
rubocop (= 1.46.0)
|
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
2.4.6
|
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
BUNDLE_PATH: "/home/runner/work/Ru-b2-SQL-Backups/Ru-b2-SQL-Backups/vendor/bundle"
|
|
||||||
BUNDLE_DEPLOYMENT: "true"
|
|
||||||
BUNDLE_JOBS: "4"
|
|
18
.rubocop.yml
Normal file
18
.rubocop.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# .rubocop.yml
|
||||||
|
|
||||||
|
# Enable all cops
|
||||||
|
|
||||||
|
# Target Ruby version
|
||||||
|
|
||||||
|
AllCops:
|
||||||
|
DisabledByDefault: false
|
||||||
|
TargetRubyVersion: 3.2.2
|
||||||
|
|
||||||
|
# Add other configuration options as needed
|
||||||
|
# For example, you can exclude certain files or directories
|
||||||
|
# from being analyzed by Rubocop using the `Exclude` option.
|
||||||
|
|
||||||
|
# AllCops:
|
||||||
|
# Exclude:
|
||||||
|
# - path/to/excluded/file.rb
|
||||||
|
# - path/to/excluded_directory/**
|
6
rub2
Normal file → Executable file
6
rub2
Normal file → Executable file
|
@ -13,7 +13,7 @@ logger = Loggman.new
|
||||||
begin
|
begin
|
||||||
if ARGV[0] == '--restore'
|
if ARGV[0] == '--restore'
|
||||||
unless File.exist?(config_file)
|
unless File.exist?(config_file)
|
||||||
logger.error("Configuration file does not exist. Please run the first time setup.")
|
logger.error('Configuration file does not exist. Please run the first time setup.')
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -25,11 +25,11 @@ begin
|
||||||
remote_backups = b2_enabled ? `./b2 ls #{config['b2']['bucket_name']}`.split("\n") : []
|
remote_backups = b2_enabled ? `./b2 ls #{config['b2']['bucket_name']}`.split("\n") : []
|
||||||
|
|
||||||
if local_backups.empty? && remote_backups.empty?
|
if local_backups.empty? && remote_backups.empty?
|
||||||
logger.error("No backup found. Please ensure a backup exists in the local directory or in the B2 bucket (if B2 is enabled).")
|
logger.error('No backup found. Please ensure a backup exists in the local directory or in the B2 bucket (if B2 is enabled).')
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
logger.info("Restoring backup...")
|
logger.info('Restoring backup...')
|
||||||
restore = MysqlDatabaseRestore.new(config_file, logger)
|
restore = MysqlDatabaseRestore.new(config_file, logger)
|
||||||
restore.restore
|
restore.restore
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user