Module: Autowow::Commands::Gem

Includes:
ReflectionUtils::CreateModuleFunctions
Included in:
Features::Gem
Defined in:
lib/autowow/commands/gem.rb

Instance Method Summary collapse

Instance Method Details

#beObject



29
30
31
# File 'lib/autowow/commands/gem.rb', line 29

def be
  ["bundle", "exec"]
end

#bump(version = nil) ⇒ Object



16
17
18
# File 'lib/autowow/commands/gem.rb', line 16

def bump(version = nil)
  (["gem", "bump", "--no-commit"] + [version]).reject(&:nil?)
end

#cleanObject



8
9
10
# File 'lib/autowow/commands/gem.rb', line 8

def clean
  ["gem", "clean"]
end

#releaseObject



4
5
6
# File 'lib/autowow/commands/gem.rb', line 4

def release
  be + ["rake", "release"]
end

#rubocop_autocorrect(files) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/autowow/commands/gem.rb', line 20

def rubocop_autocorrect(files)
  cmd = be + ["rubocop", "--auto-correct"]
  if files.kind_of?(Array)
    cmd + files
  else
    cmd + files.split(" ")
  end
end

#rubocop_parallelObject



12
13
14
# File 'lib/autowow/commands/gem.rb', line 12

def rubocop_parallel
  be + ["rubocop", "--parallel"]
end