mirror of
https://gitlab.com/ydkn/capistrano-rails-console.git
synced 2023-02-13 20:54:14 -05:00
improve code style
This commit is contained in:
parent
2fecb87e89
commit
afccfdd379
9 changed files with 24 additions and 26 deletions
|
@ -40,24 +40,3 @@ dependency_scanning:
|
|||
artifacts:
|
||||
paths:
|
||||
- gl-dependency-scanning-report.json
|
||||
|
||||
sast:
|
||||
stage: security
|
||||
dependencies:
|
||||
- build
|
||||
image: docker:stable
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
script:
|
||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
||||
- docker run
|
||||
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
|
||||
--volume "$PWD:/code"
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
|
||||
artifacts:
|
||||
paths:
|
||||
- gl-sast-report.json
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
AllCops:
|
||||
TargetRubyVersion: 2.3
|
||||
|
||||
Naming/FileName:
|
||||
Exclude:
|
||||
- 'lib/capistrano-rails-console.rb'
|
||||
|
||||
Metrics/LineLength:
|
||||
Max: 120
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
# Specify your gem's dependencies in capistrano-rails-console.gemspec
|
||||
|
|
2
Rakefile
2
Rakefile
|
@ -1 +1,3 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'bundler/gem_tasks'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
lib = File.expand_path('lib', __dir__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require 'capistrano/rails/console/version'
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
# frozen_string_literal: true
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'sshkit/interactive'
|
||||
require 'capistrano/rails/console/version'
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
namespace :load do
|
||||
task :defaults do
|
||||
# Add rails to RVM, Rbenv and Chruby bins
|
||||
%i{rvm_map_bins rbenv_map_bins chruby_map_bins}.each do |bins_var|
|
||||
bins = fetch(bins_var, [])
|
||||
set bins_var, bins.push('rails') unless bins.include?('rails')
|
||||
%i[rvm_map_bins rbenv_map_bins chruby_map_bins].each do |bins_var|
|
||||
bins = fetch(bins_var, [])
|
||||
set bins_var, bins.push('rails') unless bins.include?('rails')
|
||||
end
|
||||
|
||||
# Default values
|
||||
|
@ -17,7 +19,7 @@ end
|
|||
namespace :rails do
|
||||
desc 'Interact with a remote rails console'
|
||||
task :console do
|
||||
args = []
|
||||
args = []
|
||||
args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s')
|
||||
|
||||
run_interactively primary(fetch(:console_role)), shell: fetch(:console_shell) do
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Capistrano
|
||||
module Capistrano
|
||||
# Rails
|
||||
|
@ -5,7 +7,7 @@ module Capistrano
|
|||
# Console
|
||||
module Console
|
||||
# Gem version
|
||||
VERSION = '2.3.0'.freeze
|
||||
VERSION = '2.3.0'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue