pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/ruby/files



Module Name:    pkgsrc
Committed By:   taca
Date:           Fri Jul  6 15:37:09 UTC 2018

Modified Files:
        pkgsrc/lang/ruby/files: update-gemspec.rb

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/ruby/files/update-gemspec.rb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/ruby/files/update-gemspec.rb
diff -u pkgsrc/lang/ruby/files/update-gemspec.rb:1.9 pkgsrc/lang/ruby/files/update-gemspec.rb:1.10
--- pkgsrc/lang/ruby/files/update-gemspec.rb:1.9        Sun Apr  9 15:49:50 2017
+++ pkgsrc/lang/ruby/files/update-gemspec.rb    Fri Jul  6 15:37:09 2018
@@ -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 @@ class GemSpecUpdater
       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