Update rubocop tests #3
4
.bundle/config
Normal file
4
.bundle/config
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
BUNDLE_PATH: "/home/runner/work/Ru-b2-SQL-Backups/Ru-b2-SQL-Backups/vendor/bundle"
|
||||||
|
BUNDLE_DEPLOYMENT: "true"
|
||||||
|
BUNDLE_JOBS: "4"
|
5
.github/workflows/RuboCop-Auto-correct.yml
vendored
5
.github/workflows/RuboCop-Auto-correct.yml
vendored
|
@ -2,7 +2,7 @@ name: RuboCop Auto-correct
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "development" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
autocorrect:
|
autocorrect:
|
||||||
|
@ -15,7 +15,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.RUBOCOP_CHECKS }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0
|
uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0
|
||||||
with:
|
with:
|
||||||
|
@ -37,5 +37,6 @@ jobs:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
title: "Apply RuboCop auto-correct"
|
title: "Apply RuboCop auto-correct"
|
||||||
branch: "rubocop-autocorrect-${{ github.run_number }}"
|
branch: "rubocop-autocorrect-${{ github.run_number }}"
|
||||||
|
base: "development"
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
body: "This PR applies RuboCop auto-corrections to the codebase."
|
body: "This PR applies RuboCop auto-corrections to the codebase."
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'rubocop', '1.46.0'
|
|
||||||
gem 'json', '2.6.3'
|
gem 'json', '2.6.3'
|
||||||
|
gem 'rubocop', '1.46.0'
|
||||||
|
|
|
@ -58,9 +58,7 @@ class Loggman
|
||||||
|
|
||||||
def delete_old_logs
|
def delete_old_logs
|
||||||
Dir.glob(File.join(@log_dir, "#{LOG_PREFIX}-*.log")).each do |logfile|
|
Dir.glob(File.join(@log_dir, "#{LOG_PREFIX}-*.log")).each do |logfile|
|
||||||
if Time.now - File.mtime(logfile) > MAX_LOG_AGE
|
FileUtils.rm(logfile) if Time.now - File.mtime(logfile) > MAX_LOG_AGE
|
||||||
FileUtils.rm(logfile)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -72,7 +72,7 @@ class MysqlDatabaseConfig
|
||||||
private
|
private
|
||||||
|
|
||||||
def prompt(message, default: nil)
|
def prompt(message, default: nil)
|
||||||
print message.to_s
|
print message
|
||||||
print " [#{default}]" if default
|
print " [#{default}]" if default
|
||||||
print ': '
|
print ': '
|
||||||
value = gets.chomp
|
value = gets.chomp
|
||||||
|
|
Loading…
Reference in New Issue
Block a user