File: version-fix.patch

package info (click to toggle)
ruby-uuid 2.3.8%2Bdebian-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 160 kB
  • ctags: 90
  • sloc: ruby: 386; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 858 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: determine version from debian installed gemspec

This library tries to read a bundled gemspec file, instead we use
version from the gemspec file name created by gem2deb.

This is debian specific.

Author: Pirate Praveen <praveen@debian.org>
Last-Updated: 2014-10-22

Index: ruby-uuid-2.3.7/lib/uuid.rb
===================================================================
--- ruby-uuid-2.3.7.orig/lib/uuid.rb
+++ ruby-uuid-2.3.7/lib/uuid.rb
@@ -63,7 +63,7 @@ class UUID
 
   # Version number.
   module Version
-    version = Gem::Specification.load(File.expand_path("../uuid.gemspec", File.dirname(__FILE__))).version.to_s.split(".").map { |i| i.to_i }
+    version = "Dir[../../../share/rubygems-integration/all/specifications/uuid*.gemspec].to_s.match /.*-(.*)\.gemspec/"
     MAJOR = version[0]
     MINOR = version[1]
     PATCH = version[2]