Sun Jul 20 01:11:28 2014 UTC ()
Allow '.' in gem name, for http_parser.rb gem.


(obache)
diff -r1.6 -r1.7 pkgsrc/lang/ruby/files/update-gemspec.rb

cvs diff -r1.6 -r1.7 pkgsrc/lang/ruby/files/update-gemspec.rb (expand / switch to unified diff)

--- pkgsrc/lang/ruby/files/update-gemspec.rb 2013/03/08 10:14:18 1.6
+++ pkgsrc/lang/ruby/files/update-gemspec.rb 2014/07/20 01:11:28 1.7
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1#!/usr/pkg/bin/ruby 1#!/usr/pkg/bin/ruby
2# -*- coding: utf-8 -*- 2# -*- coding: utf-8 -*-
3# 3#
4# $NetBSD: update-gemspec.rb,v 1.6 2013/03/08 10:14:18 taca Exp $ 4# $NetBSD: update-gemspec.rb,v 1.7 2014/07/20 01:11:28 obache Exp $
5# 5#
6# Copyright (c) 2011, 2012, 2013 The NetBSD Foundation, Inc. 6# Copyright (c) 2011, 2012, 2013 The NetBSD Foundation, Inc.
7# All rights reserved. 7# All rights reserved.
8# 8#
9# This code is derived from software contributed to The NetBSD Foundation 9# This code is derived from software contributed to The NetBSD Foundation
10# by Takahiro Kambe. 10# by Takahiro Kambe.
11# 11#
12# Redistribution and use in source and binary forms, with or without 12# Redistribution and use in source and binary forms, with or without
13# modification, are permitted provided that the following conditions 13# modification, are permitted provided that the following conditions
14# are met: 14# are met:
15# 15#
16# 1. Redistributions of source code must retain the above copyright 16# 1. Redistributions of source code must retain the above copyright
17# notice, this list of conditions and the following disclaimer. 17# notice, this list of conditions and the following disclaimer.
@@ -67,27 +67,27 @@ class GemSpecUpdater @@ -67,27 +67,27 @@ class GemSpecUpdater
67 rules.each do |s| 67 rules.each do |s|
68 s.split.each do |ru| 68 s.split.each do |ru|
69 if key.nil? and /^:([a-z_]+)=(\S+)*/ =~ ru 69 if key.nil? and /^:([a-z_]+)=(\S+)*/ =~ ru
70 key = $1 70 key = $1
71 var = $2 71 var = $2
72 @attr[key] = var 72 @attr[key] = var
73 key = nil 73 key = nil
74 elsif /^:([a-z_]+)+/ =~ ru 74 elsif /^:([a-z_]+)+/ =~ ru
75 key = $1 75 key = $1
76 @attr[key] = [] 76 @attr[key] = []
77 elsif not key.nil? 77 elsif not key.nil?
78 @attr[key].push ru unless key.nil? 78 @attr[key].push ru unless key.nil?
79 else 79 else
80 if /([a-z0-9_:-]+)([=!><\~][=>]*)(.*)/ =~ ru 80 if /([a-z0-9_.:-]+)([=!><\~][=>]*)(.*)/ =~ ru
81 names = $1 81 names = $1
82 op = $2 82 op = $2
83 ver = $3 83 ver = $3
84 r = Gem::Version.new ver 84 r = Gem::Version.new ver
85 name, new_name = names.split(/:/, 2) 85 name, new_name = names.split(/:/, 2)
86 @requirements[name] = { 86 @requirements[name] = {
87 :method => :update, 87 :method => :update,
88 :op => op, 88 :op => op,
89 :version => r, 89 :version => r,
90 :name => new_name 90 :name => new_name
91 } 91 }
92 elsif /([a-z0-9_-]+):$/ =~ ru 92 elsif /([a-z0-9_-]+):$/ =~ ru
93 name = $1 93 name = $1