Hello community,
here is the log from the commit of package rubygem-netrc for openSUSE:Factory
checked in at 2015-10-30 21:52:57
Comparing /work/SRC/openSUSE:Factory/rubygem-netrc (Old)
and /work/SRC/openSUSE:Factory/.rubygem-netrc.new (New)
Package is "rubygem-netrc"
Changes:
--- /work/SRC/openSUSE:Factory/rubygem-netrc/rubygem-netrc.changes
2015-03-03 11:14:40.0 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-netrc.new/rubygem-netrc.changes
2015-10-30 21:52:58.0 +0100
@@ -1,0 +2,12 @@
+Fri Oct 30 05:33:05 UTC 2015 - co...@suse.com
+
+- updated to version 0.11.0
+ see installed changelog.txt
+
+ 0.11.0 10/29/15
+ ===
+
+ Respect NETRC environment variable
+ Fix for JRuby PernGen Space
+
+---
Old:
netrc-0.10.3.gem
New:
netrc-0.11.0.gem
Other differences:
--
++ rubygem-netrc.spec ++
--- /var/tmp/diff_new_pack.JxdWH1/_old 2015-10-30 21:52:59.0 +0100
+++ /var/tmp/diff_new_pack.JxdWH1/_new 2015-10-30 21:52:59.0 +0100
@@ -24,7 +24,7 @@
#
Name: rubygem-netrc
-Version:0.10.3
+Version:0.11.0
Release:0
%define mod_name netrc
%define mod_full_name %{mod_name}-%{version}
++ netrc-0.10.3.gem -> netrc-0.11.0.gem ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Readme.md new/Readme.md
--- old/Readme.md 2015-02-25 00:25:25.0 +0100
+++ new/Readme.md 2015-10-29 23:08:28.0 +0100
@@ -1,7 +1,7 @@
# Netrc
This library reads and writes
-[`.netrc`
files](http://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-File.html).
+[`.netrc`
files](http://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html).
## API
@@ -13,8 +13,11 @@
the filename ends in ".gpg", it will be decrypted using
[GPG](http://www.gnupg.org/).
-Read the user's default netrc file. On Unix: `$HOME/.netrc`.
-On Windows: `%HOME%\_netrc`, `%HOMEDRIVE%%HOMEPATH%\_netrc`, or
`%USERPROFILE%\_netrc` (whichever is set first).
+Read the user's default netrc file.
+
+**On Unix:** `$NETRC/.netrc` or `$HOME/.netrc` (whichever is set first).
+
+**On Windows:** `%NETRC%\_netrc`, `%HOME%\_netrc`,
`%HOMEDRIVE%%HOMEPATH%\_netrc`, or `%USERPROFILE%\_netrc` (whichever is set
first).
n = Netrc.read
@@ -47,4 +50,4 @@
## Running Tests
$ bundle install
-$ bundle exec turn test
+$ bundle exec ruby -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/changelog.txt new/changelog.txt
--- old/changelog.txt 2015-02-25 00:25:25.0 +0100
+++ new/changelog.txt 2015-10-29 23:08:28.0 +0100
@@ -1,3 +1,9 @@
+0.11.0 10/29/15
+===
+
+Respect NETRC environment variable
+Fix for JRuby PernGen Space
+
0.10.3 02/24/15
===
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/netrc.rb new/lib/netrc.rb
--- old/lib/netrc.rb2015-02-25 00:25:25.0 +0100
+++ new/lib/netrc.rb2015-10-29 23:08:28.0 +0100
@@ -1,14 +1,14 @@
require 'rbconfig'
class Netrc
- VERSION = "0.10.3"
+ VERSION = "0.11.0"
# see
http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows
WINDOWS = RbConfig::CONFIG["host_os"] =~ /mswin|mingw|cygwin/
CYGWIN = RbConfig::CONFIG["host_os"] =~ /cygwin/
def self.default_path
-File.join(home_path, netrc_filename)
+File.join(ENV['NETRC'] || home_path, netrc_filename)
end
def self.home_path
@@ -18,7 +18,7 @@
home ||= File.join(ENV['HOMEDRIVE'], ENV['HOMEPATH']) if
ENV['HOMEDRIVE'] && ENV['HOMEPATH']
home ||= ENV['USERPROFILE']
# XXX: old stuff; most likely unnecessary
- home = home.gsub("\\", "/") unless home.nil?
+ home = home.tr("\\", "/") unless home.nil?
end
(home && File.readable?(home)) ? home : Dir.pwd
@@ -65,8 +65,25 @@
new(path, parse(lex([])))
end
+ class TokenArray < Array
+def take
+ if length < 1
+raise Error, "unexpected EOF"
+ end
+ shift
+end
+
+def readto
+ l = []
+ while length > 0 && ! yield(self[0])
+l << shift
+ end
+ return l.join
+end
+ end
+
def self.lex(lines)
-tokens = []
+tokens = TokenArray.new
for line in lines
content, comment = line.split(/(\s*#.*)/m)
content.each_char do |char|
@@ -96,6 +113,8 @@
s =~ /^\s/
end
+
+
# Returns two values, a header and a list of items.