osvt 1.3.0 → 1.5.0
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/bin/osvt +8 -4
- data/lib/osvt.rb +1 -1
- metadata +1 -1
data/bin/osvt
CHANGED
@@ -60,16 +60,20 @@ HOME = ENV["HOME"] || ENV["HOMEPATH"] || File::expand_path("~")
|
|
60
60
|
OSVT_D = File::join HOME, ".osvt"
|
61
61
|
CONFIG_F = File::join OSVT_D, "osvt.conf"
|
62
62
|
|
63
|
-
|
64
|
-
|
63
|
+
|
64
|
+
if Dir[OSVT_D] == nil
|
65
|
+
FileUtils::mkdir_p OSVT_D, :mode => 0700 unless test ?d, OSVT_D
|
66
|
+
test ?e, CONFIG_F
|
65
67
|
|
66
68
|
open(CONFIG_F, "w") { |f|
|
67
69
|
f.write "username=username\n"
|
68
70
|
f.write "api_key=api_key\n"
|
69
71
|
}
|
70
72
|
|
71
|
-
edit = (ENV["EDITOR"] || ENV["EDIT"] || "nano") + " '#{CONFIG_F}'"
|
72
|
-
|
73
|
+
edit = (ENV["EDITOR"] || ENV["EDIT"] || "nano") + " '#{CONFIG_F}'"
|
74
|
+
|
75
|
+
system edit or puts "edit '#{CONFIG_F}'"
|
76
|
+
end
|
73
77
|
|
74
78
|
|
75
79
|
|
data/lib/osvt.rb
CHANGED