pt 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +3 -0
- data/lib/pt.rb +1 -1
- data/lib/pt/ui.rb +8 -0
- metadata +3 -2
data/Changelog.md
CHANGED
data/lib/pt.rb
CHANGED
data/lib/pt/ui.rb
CHANGED
@@ -205,6 +205,7 @@ class PT::UI
|
|
205
205
|
end
|
206
206
|
|
207
207
|
def load_local_config
|
208
|
+
check_local_config_path
|
208
209
|
config = YAML.load(File.read(LOCAL_CONFIG_PATH)) rescue {}
|
209
210
|
if config.empty?
|
210
211
|
message "I can't find info about this project in #{LOCAL_CONFIG_PATH}"
|
@@ -220,6 +221,13 @@ class PT::UI
|
|
220
221
|
config
|
221
222
|
end
|
222
223
|
|
224
|
+
def check_local_config_path
|
225
|
+
if GLOBAL_CONFIG_PATH == LOCAL_CONFIG_PATH
|
226
|
+
error("Please execute .pt inside your project directory and not in your home.")
|
227
|
+
exit
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
223
231
|
def save_config(config, path)
|
224
232
|
File.new(path, 'w') unless File.exists?(path)
|
225
233
|
File.open(path, 'w') {|f| f.write(config.to_yaml) }
|
metadata
CHANGED