improve code style

This commit is contained in:
Florian Schwab 2018-10-07 15:16:37 +02:00
parent 2fecb87e89
commit afccfdd379
9 changed files with 24 additions and 26 deletions

View File

@ -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

View File

@ -1,3 +1,9 @@
AllCops:
TargetRubyVersion: 2.3
Naming/FileName:
Exclude:
- 'lib/capistrano-rails-console.rb'
Metrics/LineLength:
Max: 120

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
source 'https://rubygems.org'
# Specify your gem's dependencies in capistrano-rails-console.gemspec

View File

@ -1 +1,3 @@
# frozen_string_literal: true
require 'bundler/gem_tasks'

View File

@ -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'

View File

@ -0,0 +1 @@
# frozen_string_literal: true

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'sshkit/interactive'
require 'capistrano/rails/console/version'

View File

@ -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

View File

@ -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