tacape 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/tacape.rb +2 -0
- data/lib/tacape/cli.rb +12 -11
- data/lib/tacape/oses/fedora.rb +0 -1
- data/lib/tacape/version.rb +1 -1
- metadata +2 -3
data/lib/tacape.rb
CHANGED
@@ -42,9 +42,11 @@ module Tacape
|
|
42
42
|
|
43
43
|
def self.locale
|
44
44
|
I18n.load_path = Dir['config/locales/*.yml']
|
45
|
+
I18n.load_path += Dir["#{Tacape::Belt.current_os.tool_folder}/*/locales/*.yml"]
|
45
46
|
I18n.backend.load_translations
|
46
47
|
|
47
48
|
@locale ||= Belt.current_os.locale
|
49
|
+
#this switch/case must be inside the Belt
|
48
50
|
case @locale
|
49
51
|
when 'pt_BR'
|
50
52
|
I18n.locale = :"pt-BR"
|
data/lib/tacape/cli.rb
CHANGED
@@ -7,11 +7,12 @@ module Tacape
|
|
7
7
|
Dir["#{Tacape::Belt.current_os.tool_folder}/**/*.rb"].each do |tool|
|
8
8
|
load tool
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def initialize(*args)
|
12
12
|
super
|
13
13
|
@current_os=Tacape::Belt.current_os
|
14
14
|
create_folder_structure
|
15
|
+
|
15
16
|
puts I18n.t('greeting')
|
16
17
|
end
|
17
18
|
|
@@ -61,16 +62,13 @@ module Tacape
|
|
61
62
|
shell.instance_of?(Thor::Shell::Color)
|
62
63
|
end
|
63
64
|
|
64
|
-
def self.load_tools
|
65
|
-
Dir["#{Tacape::Belt.current_os.tool_folder}/**/*.rb"].each do |tool|
|
66
|
-
load tool
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
65
|
def update_tools
|
71
|
-
Thread.new {
|
72
|
-
|
73
|
-
}
|
66
|
+
#Thread.new {
|
67
|
+
puts 'Updating Tools repository...'
|
68
|
+
`cd #{@current_os.tool_folder} && git pull`
|
69
|
+
puts 'Installing Tools dependencies...'
|
70
|
+
`cd #{@current_os.tool_folder} && bundle install`
|
71
|
+
#}
|
74
72
|
end
|
75
73
|
|
76
74
|
def create_folder_structure
|
@@ -78,7 +76,10 @@ module Tacape
|
|
78
76
|
FileUtils.mkdir_p(@current_os.config_folder)
|
79
77
|
end
|
80
78
|
unless File.exists? @current_os.tool_folder
|
81
|
-
|
79
|
+
puts 'Cloning Tools repository...'
|
80
|
+
`git clone git@github.com:lucasmartins/tacape-tools.git #{@current_os.tool_folder}`
|
81
|
+
puts 'Installing Tools dependencies...'
|
82
|
+
`cd #{@current_os.tool_folder} && bundle install`
|
82
83
|
end
|
83
84
|
end
|
84
85
|
|
data/lib/tacape/oses/fedora.rb
CHANGED
data/lib/tacape/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tacape
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -239,4 +239,3 @@ test_files:
|
|
239
239
|
- spec/support/helper.rb
|
240
240
|
- spec/support/shared.rb
|
241
241
|
- spec/tacape.rb
|
242
|
-
has_rdoc:
|