Class: Cadre::CommandLine

Inherits:
Thor
  • Object
show all
Defined in:
lib/cadre/command-line.rb

Instance Method Summary collapse

Instance Method Details

#how_toObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/cadre/command-line.rb', line 7

def how_to
  indent= "      "
  command_name = File::basename($0)
  help_text = "  This is a set of tools for aiding development - to integrate testing and\n  metrics with editors and notifications.\n\n  Try:\n  \#{command_name} vim_plugin > ~/.vim/plugin/cadre.vim\n\n  \#{command_name} rspec_config >> spec/spec_helper.rb\n    or\n  \#{command_name} rspec3_config >> spec/spec_helper.rb\n\n  \#{command_name} simplecov_config >> .simplecov\n\n  echo errors.err >> .gitignore\n\n  echo .cadre >> .gitignore\n\n  Yeah, that's five commands, and you have to do the redirects yourself,\n  but you can review the output before making it live, and put them\n  somewhere else if that's what you want. (I'm considering a single command for all of it...)\n\n  Configuration (including tool config templates) is sourced from:\n   \#{Valise.to_s(\"\\n\#{indent}  \")}\n  EOH\n\n  puts help_text.gsub(/^\#{indent}/, \"\")\nend\n"

#rspec2_configObject



49
50
51
# File 'lib/cadre/command-line.rb', line 49

def rspec2_config
  puts Valise.find("templates/rspec-config").contents
end

#rspec3_configObject



54
55
56
# File 'lib/cadre/command-line.rb', line 54

def rspec3_config
  puts Valise.find("templates/rspec3-config").contents
end

#rspec_configObject



44
45
46
# File 'lib/cadre/command-line.rb', line 44

def rspec_config
  puts Valise.find("templates/rspec-config").contents
end

#simplecov_configObject



59
60
61
# File 'lib/cadre/command-line.rb', line 59

def simplecov_config
  puts Valise.find("templates/simplecov-config").contents
end

#vim_pluginObject



39
40
41
# File 'lib/cadre/command-line.rb', line 39

def vim_plugin
  puts Valise.find("templates/plugin.vim").contents
end