osvt 1.3.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/osvt +8 -4
  2. data/lib/osvt.rb +1 -1
  3. 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
- FileUtils::mkdir_p OSVT_D, :mode => 0700 unless test ?d, OSVT_D
64
- test ?e, CONFIG_F
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
- system edit or puts "edit '#{CONFIG_F}'"
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
 
@@ -1,3 +1,3 @@
1
1
  class Osvt
2
- VERSION = '1.3.0'
2
+ VERSION = '1.5.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osvt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team FOSS