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

#alternate_compose_file, #entrypoint, #execute, included, #initialize

Class Method Details

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



4
5
6
7
8
9
# File 'lib/nib/code_climate.rb', line 4

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



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

def script
  @script ||= "    docker run \\\n      --interactive \\\n      --tty \\\n      --rm \\\n      --env CODECLIMATE_CODE=\"$PWD\" \\\n      --volume \"$PWD\":/code \\\n      --volume /var/run/docker.sock:/var/run/docker.sock \\\n      --volume /tmp/cc:/tmp/cc \\\n      codeclimate/codeclimate \#{command || 'help'}\n  SCRIPT\nend\n"