netrc 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/netrc.rb +2 -2
- data/test/test_lex.rb +2 -2
- data/test/test_netrc.rb +3 -2
- data/test/test_parse.rb +2 -2
- metadata +2 -2
data/lib/netrc.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Netrc
|
2
|
-
VERSION = "0.
|
2
|
+
VERSION = "0.4"
|
3
3
|
Windows = (RUBY_PLATFORM =~ /win32|mingw32/i)
|
4
4
|
|
5
5
|
def self.default_path
|
@@ -29,7 +29,7 @@ class Netrc
|
|
29
29
|
tokens = []
|
30
30
|
for line in lines
|
31
31
|
content, comment = line.split(/(\s*#.*)/m)
|
32
|
-
tokens += content.split(/
|
32
|
+
tokens += content.split(/\b/)
|
33
33
|
if comment
|
34
34
|
tokens << comment
|
35
35
|
end
|
data/test/test_lex.rb
CHANGED
data/test/test_netrc.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
$VERBOSE = true
|
2
|
-
require '
|
2
|
+
require 'test/unit'
|
3
|
+
require 'fileutils'
|
3
4
|
|
4
5
|
require '../netrc/lib/netrc'
|
5
6
|
|
6
|
-
class TestNetrc <
|
7
|
+
class TestNetrc < Test::Unit::TestCase
|
7
8
|
def setup
|
8
9
|
File.chmod(0600, "data/sample.netrc")
|
9
10
|
File.chmod(0644, "data/permissive.netrc")
|
data/test/test_parse.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
$VERBOSE = true
|
2
|
-
require '
|
2
|
+
require 'test/unit'
|
3
3
|
|
4
4
|
require '../netrc/lib/netrc'
|
5
5
|
|
6
|
-
class TestParse <
|
6
|
+
class TestParse < Test::Unit::TestCase
|
7
7
|
def test_parse_empty
|
8
8
|
pre, items = Netrc.parse([])
|
9
9
|
assert_equal("", pre)
|
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.
|
4
|
+
version: '0.4'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-23 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: This library can read and update netrc files, preserving formatting including
|
15
15
|
comments and whitespace.
|