netrc 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.txt +5 -0
- data/lib/netrc.rb +8 -9
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff42e907d9e08059eca13e54dac95b5a7247cb02
|
4
|
+
data.tar.gz: d2692d21a8ab3880d2c06135e972e91b17c6455f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92a9c3f6b1e85e748ab46f573eab3cd08b25dab74b82559be56d439f41099476c9b380c2f0ac032b17a01cd0da08696b1380a9935db9c6f2edfda724af56c2e7
|
7
|
+
data.tar.gz: 42e37d26587a9379f712f31f6b9c98923d7b439697e25037cff58bda148501dfcfee4c6441b260a5ae27b9905675141a975ca6e4e27da6b2b6d444110bc277cc
|
data/changelog.txt
CHANGED
data/lib/netrc.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rbconfig'
|
2
2
|
|
3
3
|
class Netrc
|
4
|
-
VERSION = "0.10.
|
4
|
+
VERSION = "0.10.3"
|
5
5
|
|
6
6
|
# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows
|
7
7
|
WINDOWS = RbConfig::CONFIG["host_os"] =~ /mswin|mingw|cygwin/
|
@@ -12,17 +12,16 @@ class Netrc
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.home_path
|
15
|
-
|
15
|
+
home = Dir.respond_to?(:home) ? Dir.home : ENV['HOME']
|
16
|
+
|
16
17
|
if WINDOWS && !CYGWIN
|
17
|
-
home
|
18
|
-
home ||= ENV['HOMEDRIVE'] + ENV['HOMEPATH'] if ENV['HOMEDRIVE'] && ENV['HOMEPATH']
|
18
|
+
home ||= File.join(ENV['HOMEDRIVE'], ENV['HOMEPATH']) if ENV['HOMEDRIVE'] && ENV['HOMEPATH']
|
19
19
|
home ||= ENV['USERPROFILE']
|
20
|
-
|
21
|
-
|
22
|
-
# In some cases, people run master process as "root" user, and run worker processes as "www" user.
|
23
|
-
# Fix "Permission denied" error in worker processes when $HOME is "/root".
|
24
|
-
(ENV['HOME'] && File.exist?(ENV['HOME']) && File.stat(ENV['HOME']).readable?) ? ENV['HOME'] : './'
|
20
|
+
# XXX: old stuff; most likely unnecessary
|
21
|
+
home = home.gsub("\\", "/") unless home.nil?
|
25
22
|
end
|
23
|
+
|
24
|
+
(home && File.readable?(home)) ? home : Dir.pwd
|
26
25
|
rescue ArgumentError
|
27
26
|
return Dir.pwd
|
28
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netrc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Rarick
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: turn
|
@@ -73,4 +73,3 @@ signing_key:
|
|
73
73
|
specification_version: 4
|
74
74
|
summary: Library to read and write netrc files.
|
75
75
|
test_files: []
|
76
|
-
has_rdoc:
|