Class: Gitdummy::Cli
- Inherits:
-
Thor
- Object
- Thor
- Gitdummy::Cli
- Defined in:
- lib/gitdummy.rb
Constant Summary collapse
- CONFIG_FILE =
'.gitdummyrc'
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(*args) ⇒ Cli
constructor
A new instance of Cli.
Constructor Details
#initialize(*args) ⇒ Cli
Returns a new instance of Cli.
15 16 17 18 19 20 |
# File 'lib/gitdummy.rb', line 15 def initialize(*args) super $repo = Grit::Repo.new('.') $config = YAML.load_file(CONFIG_FILE) if File.readable?(CONFIG_FILE) end |
Instance Method Details
#check ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/gitdummy.rb', line 24 def check system('git fetch') if ['auto-fetch'] test_dir = File.realpath('../lib/gitdummy/tests', File.dirname(__FILE__)) Dir["#{test_dir}/**/*_test.rb"].each do |file| require file end MiniTest::Unit.new.run end |