Class: Nib::CodeClimate

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/nib/code_climate.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Command

#execute, included, #initialize

Class Method Details

.execute(args, options = '') ⇒ Object



6
7
8
9
10
11
# File 'lib/nib/code_climate.rb', line 6

def self.execute(args, options = '')
  # Discard service name because codeclimate is run on local path
  args.shift

  new(nil, args.join(' '), options).execute
end

Instance Method Details

#scriptObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/nib/code_climate.rb', line 13

def script
  @script ||= <<~SCRIPT
    docker-compose \
      -f #{compose_file.path} \
      run \
      --rm \
      codeclimate \
      #{command}
  SCRIPT
end