Class: Ataru::CLI::Application

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/ataru/cli/application.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



9
10
11
# File 'lib/ataru/cli/application.rb', line 9

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#check(*filenames) ⇒ Object



26
27
28
29
30
31
32
33
34
35
# File 'lib/ataru/cli/application.rb', line 26

def check(*filenames)
  if filenames.length == 0
    filenames = Dir.glob('**/*md')
  end
  path = Dir.pwd + '/ataru_setup.rb'
  require path if File.exist?(path)
  Ataru::ArgumentChecker.new(filenames).each do |checked_file|
    Ataru::Application.run_test_for_file(checked_file)
  end
end

#setupObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/ataru/cli/application.rb', line 14

def setup
  create_file(Dir.pwd + "/ataru_setup.rb") do
    <<-eos
# "Please require your project source code, with the correct path"

# require "path_to_your_project_source_code"
    eos
  end
  puts "Well done, young Padawan!\nNow, change the created ataru_setup.rb file."
end