netrc 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ 0.7.2 05/23/12
2
+ =============
3
+
4
+ * use length instead of count on Array, provides compatibility with 1.8.6
5
+
6
+
1
7
  0.7.1 03/13/12
2
8
  ==============
3
9
 
@@ -1,5 +1,5 @@
1
1
  class Netrc
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  WINDOWS = (RUBY_PLATFORM =~ /win32|mingw32/i)
4
4
 
5
5
  def self.default_path
@@ -68,7 +68,7 @@ class Netrc
68
68
  cur, item = [], []
69
69
 
70
70
  def ts.take
71
- if count < 1
71
+ if length < 1
72
72
  raise Error, "unexpected EOF"
73
73
  end
74
74
  shift
@@ -76,14 +76,14 @@ class Netrc
76
76
 
77
77
  def ts.readto
78
78
  l = []
79
- while count > 0 && ! yield(self[0])
79
+ while length > 0 && ! yield(self[0])
80
80
  l << shift
81
81
  end
82
82
  return l.join
83
83
  end
84
84
 
85
85
  pre = ts.readto{|t| t == "machine"}
86
- while ts.count > 0
86
+ while ts.length > 0
87
87
  cur << ts.take + ts.readto{|t| ! skip?(t)}
88
88
  cur << ts.take
89
89
  cur << ts.readto{|t| t == "login"} + ts.take + ts.readto{|t| ! skip?(t)}
@@ -120,8 +120,8 @@ class Netrc
120
120
  end
121
121
  end
122
122
 
123
- def count
124
- @data.count
123
+ def length
124
+ @data.length
125
125
  end
126
126
 
127
127
  def delete(key)
@@ -31,7 +31,7 @@ class TestNetrc < Test::Unit::TestCase
31
31
 
32
32
  def test_missing_file
33
33
  n = Netrc.read("data/nonexistent.netrc")
34
- assert_equal(0, n.count)
34
+ assert_equal(0, n.length)
35
35
  end
36
36
 
37
37
  def test_permission_error
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.7.1
4
+ version: 0.7.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-03-13 00:00:00.000000000 Z
13
+ date: 2012-05-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: turn
17
- requirement: &70193810670960 !ruby/object:Gem::Requirement
17
+ requirement: &70325610509140 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: '0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70193810670960
25
+ version_requirements: *70325610509140
26
26
  description: This library can read and update netrc files, preserving formatting including
27
27
  comments and whitespace.
28
28
  email: geemus@gmail.com
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  version: '0'
60
60
  requirements: []
61
61
  rubyforge_project:
62
- rubygems_version: 1.8.10
62
+ rubygems_version: 1.8.15
63
63
  signing_key:
64
64
  specification_version: 3
65
65
  summary: Library to read and write netrc files.