pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ruby/files lang/ruby/files: improve update-gemspe...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/45cc3624f45c
branches:  trunk
changeset: 310146:45cc3624f45c
user:      taca <taca%pkgsrc.org@localhost>
date:      Fri Jul 06 15:37:09 2018 +0000

description:
lang/ruby/files: improve update-gemspec.rb

Improve update-gemspec.rb script which handles OVERRIDE_GEMSPEC.

When overriding depending versions, clear completely old dependencies.
Previously, it replace first dependency only and it cause incomplete
ruby gem's dependency in a few case.

diffstat:

 lang/ruby/files/update-gemspec.rb |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r 0257c0e138b0 -r 45cc3624f45c lang/ruby/files/update-gemspec.rb
--- a/lang/ruby/files/update-gemspec.rb Fri Jul 06 15:33:57 2018 +0000
+++ b/lang/ruby/files/update-gemspec.rb Fri Jul 06 15:37:09 2018 +0000
@@ -1,9 +1,10 @@
 #!/usr/pkg/bin/ruby
 # -*- coding: utf-8 -*-
 #
-# $NetBSD: update-gemspec.rb,v 1.9 2017/04/09 15:49:50 taca Exp $
+# $NetBSD: update-gemspec.rb,v 1.10 2018/07/06 15:37:09 taca Exp $
 #
-# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016 The NetBSD Foundation, Inc.
+# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
+# The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # This code is derived from software contributed to The NetBSD Foundation
@@ -106,8 +107,8 @@
       update = @requirements[dep.name]
       if not update.nil? and update[:method] == :update
         r = dep.requirement.requirements
-        r[0][0] = update[:op]
-        r[0][1] = update[:version]
+        r.clear
+        r[0] = [update[:op], update[:version]]
         unless update[:name].nil?
           dep.name = update[:name]
         end



Home | Main Index | Thread Index | Old Index