ovpn-key 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/ovpn-key +5 -4
  3. data/lib/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da769c59267c3c1bc605a2da314d55b0599e56de6e48dc25ef17ea56ed1af960
4
- data.tar.gz: eb106210d91f8e5ba367d20d94e72e74f27e1a53a8abd3cf58cf61fc7580f0fb
3
+ metadata.gz: 9fde0a6063ccfbd4a7f51ee4d0749ce791999dda0c4d4b5254d21c4de821a1d7
4
+ data.tar.gz: 54d1af5174381b59453545900ecd56d90d8aef8f240c4bd5738393e03374cbeb
5
5
  SHA512:
6
- metadata.gz: 44b34a49e1730f3c9bff11022fa63e8cf1426c85a6f737c84b68cafa50be8c4e05110202d40dc1e1bfbfda36d29df02003b6ebd07c489fa21a76dcd8afea8d94
7
- data.tar.gz: c4370cde04518bc151c64f2fb329718d68eed360080987807ed201103d55f999a84b0fcfd4d96634bc1124e96f419956b2c497046ab9bf957e55590e2882724c
6
+ metadata.gz: f979223351319b4b440c27ded450507a8d13f5a3092fdd7af26150b92cb81ea52911bb729589b0bb50f9c5fe6f22e84bed1f9f88964a88fe3958a6fa1d1e46ef
7
+ data.tar.gz: e5b87efe66c151a90fa3abf209c848c08615f22a6df090c07a3337bb4002fdcb903c5dd652234966b672b1994a13e6f4246af219722c017aa3d4ac8fbfcfc66f
data/bin/ovpn-key CHANGED
@@ -20,7 +20,7 @@ OptionParser.new do |opts|
20
20
  options[:generate_ca] = v
21
21
  end
22
22
  opts.on("--dh", "Generate a DH keyfile (dh.pem)") do |v|
23
- # it's safe to rewrite this file
23
+ # it's safe to overwrite this file
24
24
  options[:generate_dh] = v
25
25
  end
26
26
  opts.on("--server [name]", "Generate a server key (defaults to 'server')") do |v|
@@ -54,7 +54,7 @@ if options[:generate_client] and options[:generate_zip]
54
54
  # I assume that user likely wants one of them and is confused with usage
55
55
  abort "There can be only one: --client or --zip"
56
56
  end
57
- File.umask 0077
57
+ umask = File.umask 0077
58
58
 
59
59
  if options[:init]
60
60
  unless options[:init] == '.'
@@ -68,9 +68,9 @@ if options[:init]
68
68
  puts "Created file: #{file}"
69
69
  end
70
70
  }
71
- elsif !File.exist? 'ovpn-key.yml'
71
+ elsif !File.exist? APP_CONF
72
72
  begin
73
- rc = YAML.load_file(File.expand_path '~/.ovpn-key.yml')
73
+ rc = YAML.load_file(File.expand_path "~/.#{APP_CONF}")
74
74
  rescue Errno::ENOENT
75
75
  # no configuration file in home directory is not an error
76
76
  end
@@ -118,6 +118,7 @@ if options[:generate_zip]
118
118
 
119
119
  zip_file = File.join(File.expand_path(ZIP_DIR), "#{File.basename ovpn_file, '.ovpn'}.tblk.zip")
120
120
  File.delete(zip_file) if File.exist?(zip_file)
121
+ File.umask umask
121
122
  Zip::File.open(zip_file, Zip::File::CREATE) do |zip|
122
123
  zip.get_output_stream(ovpn_file) {|f|
123
124
  File.open(ovpn_file).each {|line| f.write line}
data/lib/version.rb CHANGED
@@ -1 +1 @@
1
- ::Version = '0.7.1'
1
+ ::Version = '0.7.2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ovpn-key
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasily Korytov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-09 00:00:00.000000000 Z
11
+ date: 2018-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip