gena 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/lib/cli/cli.rb +3 -0
- data/lib/cli/init.rb +26 -4
- data/lib/constants.rb +2 -2
- data/lib/utils/xcode_utils.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a44fa4e81f553a8c076abdcb11b6adf253fedda
|
4
|
+
data.tar.gz: 0de9caec1fe88d65f58ce703ca19992e31b1b1a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 313387add045ed0b97595fe291ee003c022be9c752e70a51c0c5911a036b63b3f557fdefef914732352356535542970c67ca62046d78241fa5761995674f5c41
|
7
|
+
data.tar.gz: f613c2e97cb7ad580bb04729fc38cbabfc91781c84ee11fbcf8a096d930bfca649667567fd14493004a3c0ae2ce8503181f0359747dff34b0dc5f7cfab995ce3
|
data/lib/cli/cli.rb
CHANGED
@@ -123,6 +123,9 @@ module Gena
|
|
123
123
|
|
124
124
|
if tag_name > VERSION
|
125
125
|
say "New update v#{tag_name} is available for gena.\nSee release notes: #{data['url']}", Color::YELLOW
|
126
|
+
if data['body'].length > 0
|
127
|
+
say "---------------------\n#{data['body']}\n---------------------", Color::YELLOW
|
128
|
+
end
|
126
129
|
say "Please update by:\n#{set_color('gem install gena', Color::GREEN)}", Color::YELLOW
|
127
130
|
end
|
128
131
|
|
data/lib/cli/init.rb
CHANGED
@@ -2,8 +2,29 @@ module Gena
|
|
2
2
|
|
3
3
|
class Application < Thor
|
4
4
|
|
5
|
-
desc '
|
5
|
+
desc 'reconfigure [COMMAND]', 'Restores default parameters for plugin inside gena.plist'
|
6
|
+
def reconfigure(command)
|
7
|
+
|
8
|
+
$config = Gena::Config.new
|
9
|
+
$config.load_plist_config
|
10
|
+
|
11
|
+
data = $config.data[GENA_PLUGINS_CONFIG_KEY] || Hash.new
|
12
|
+
|
13
|
+
Application.plugin_classes.each do |klass|
|
14
|
+
|
15
|
+
plugin_config_name = klass.plugin_config_name
|
16
|
+
if plugin_config_name == command
|
17
|
+
say "Setting defaults for '#{command}'..", Color::GREEN
|
18
|
+
data[plugin_config_name] = klass.plugin_config_defaults
|
19
|
+
$config.data[GENA_PLUGINS_CONFIG_KEY] = data
|
20
|
+
$config.save!
|
21
|
+
return
|
22
|
+
end
|
23
|
+
end
|
24
|
+
say "Can't find plugin with name '#{command}'", Color::RED
|
25
|
+
end
|
6
26
|
|
27
|
+
desc 'init', 'Initialize gena.plist with default parameters'
|
7
28
|
def init
|
8
29
|
|
9
30
|
xcode_project_name = `find . -name *.xcodeproj`
|
@@ -209,10 +230,11 @@ module Gena
|
|
209
230
|
data[plugin_config_name] = defaults
|
210
231
|
elsif !data[plugin_config_name].keys.to_set.eql? defaults.keys.to_set
|
211
232
|
missing_keys = defaults.keys - data[plugin_config_name].keys
|
212
|
-
|
213
|
-
|
233
|
+
if missing_keys.count > 0
|
234
|
+
say "Adding missing config keys #{missing_keys} for plugin '#{plugin_config_name}.'", Color::GREEN
|
235
|
+
missing_keys.each { |key| data[plugin_config_name][key] = defaults[key] }
|
236
|
+
end
|
214
237
|
end
|
215
|
-
|
216
238
|
end
|
217
239
|
|
218
240
|
end
|
data/lib/constants.rb
CHANGED
data/lib/utils/xcode_utils.rb
CHANGED