lib/tacape/cli.rb in tacape-0.0.4 vs lib/tacape/cli.rb in tacape-0.0.6
- old
+ new
@@ -5,15 +5,16 @@
class Cli < Thor
Dir["#{Tacape::Belt.current_os.tool_folder}/**/*.rb"].each do |tool|
load tool
end
-
+
def initialize(*args)
super
@current_os=Tacape::Belt.current_os
create_folder_structure
+
puts I18n.t('greeting')
end
def self.exit_on_failure?
true
@@ -59,27 +60,27 @@
def color?
shell.instance_of?(Thor::Shell::Color)
end
- def self.load_tools
- Dir["#{Tacape::Belt.current_os.tool_folder}/**/*.rb"].each do |tool|
- load tool
- end
- end
-
def update_tools
- Thread.new {
- `cd #{@current_os.tool_folder} && git pull`
- }
+ #Thread.new {
+ puts 'Updating Tools repository...'
+ `cd #{@current_os.tool_folder} && git pull`
+ puts 'Installing Tools dependencies...'
+ `cd #{@current_os.tool_folder} && bundle install`
+ #}
end
def create_folder_structure
unless File.exists? @current_os.config_folder
FileUtils.mkdir_p(@current_os.config_folder)
end
unless File.exists? @current_os.tool_folder
- `git clone git@bitbucket.org:lucasmartins/tacape-tools.git #{@current_os.tool_folder}`
+ puts 'Cloning Tools repository...'
+ `git clone git@github.com:lucasmartins/tacape-tools.git #{@current_os.tool_folder}`
+ puts 'Installing Tools dependencies...'
+ `cd #{@current_os.tool_folder} && bundle install`
end
end
end
end