utilrb 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: becf09fee88559811629a72aee4fe627a86f2231
4
- data.tar.gz: 1f690f7883cf11362a8f1656a3e04cdfc6f98da1
3
+ metadata.gz: 30f3b27613076cc9f327bccee358f2bc55bcd826
4
+ data.tar.gz: ef980585fef480c37de10056afec1bd714df4683
5
5
  SHA512:
6
- metadata.gz: 2aeaf57d6ab7deeab1027b82e796127e23adc2acf2291df450f1b4b76f466ef12acc9f74a2e9cc1c2727c6732c50b7e5d2d9ad553f277c70cd583c971bfc3c62
7
- data.tar.gz: 52766e2bc24e6c27c27af4d5410da75e86077bc7c476240ab0f82116ac6b9847c92ecf8cb38e7e88d6913932eb786db60968cc2cac011a9920900650a267a802
6
+ metadata.gz: df1fab4bfabbe73e7d657a7564022042d3f16c84293474ed441c1c9b1452481c2393aa76d38b820a398731fc605aa5d0a8ea6e30c089b7ef3b2ca2279145bbd2
7
+ data.tar.gz: 1efd86909aff5ea2802c1ff9a04db0e5eb052cbed3412858d1d051245b47baf82d329a200102318e8067396f1175f319247062942bd4bab4d22a72818ac06408
@@ -1,12 +0,0 @@
1
- require 'utilrb/enumerable/to_s_helper'
2
- class Array
3
- # Displays arrays as [ a, b, [c, d], ... ] instead of the standard #join
4
- # Unlike #inspect, it calls #to_s on the elements too
5
- undef_method :to_s
6
- def to_s
7
- EnumerableToString.to_s_helper(self, '[', ']') do |obj|
8
- obj.to_s
9
- end
10
- end
11
- end
12
-
@@ -1,12 +0,0 @@
1
- require 'utilrb/enumerable/to_s_helper'
2
- class Hash
3
- # Displays hashes as { a => A, b => B, ... } instead of the standard #join
4
- # Unlike #inspect, it calls #to_s on the elements too
5
- undef_method :to_s
6
- def to_s
7
- EnumerableToString.to_s_helper(self, '{', '}') do |k, v|
8
- "#{k} => #{v}"
9
- end
10
- end
11
- end
12
-
@@ -66,14 +66,19 @@ module Utilrb
66
66
  raise NotFound.new(name), "cannot find the pkg-config specification for #{name}"
67
67
  end
68
68
 
69
- candidates = loaded_packages[name] = Array.new
69
+ candidates = Array.new
70
70
  paths.each do |p|
71
71
  candidates << PkgConfig.load(p, preset_variables)
72
72
  end
73
+ loaded_packages[name] = candidates
73
74
  end
74
75
 
75
76
  # Now try to find a matching spec
76
- find_matching_version(candidates, version_spec)
77
+ if version_match = find_matching_version(candidates, version_spec)
78
+ version_match
79
+ else
80
+ raise NotFound, "found #{candidates.size} packages for #{name}, but none match the version specification #{version_spec}"
81
+ end
77
82
  end
78
83
 
79
84
  # Finds the provided package and optional version and returns its
@@ -461,8 +466,8 @@ module Utilrb
461
466
  end
462
467
 
463
468
 
464
- FOUND_PATH_RX = /Scanning directory '(.*\/)((?:lib|lib64|share)\/.*)'$/
465
- NONEXISTENT_PATH_RX = /Cannot open directory '.*\/((?:lib|lib64|share)\/.*)' in package search path:.*/
469
+ FOUND_PATH_RX = /Scanning directory (?:#\d+ )?'(.*\/)((?:lib|lib64|share)\/.*)'$/
470
+ NONEXISTENT_PATH_RX = /Cannot open directory (?:#\d+ )?'.*\/((?:lib|lib64|share)\/.*)' in package search path:.*/
466
471
 
467
472
  # Returns the system-wide search path that is embedded in pkg-config
468
473
  def self.default_search_path
@@ -1,11 +0,0 @@
1
- require 'utilrb/enumerable/to_s_helper'
2
- require 'set'
3
- class Set
4
- # Displays the set as {a, b, c, d}
5
- def to_s
6
- EnumerableToString.to_s_helper(self, '{', '}') do |obj|
7
- obj.to_s
8
- end
9
- end
10
- end
11
-
@@ -1,4 +1,4 @@
1
1
  module Utilrb
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utilrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-11 00:00:00.000000000 Z
11
+ date: 2016-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facets
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  requirements: []
218
218
  rubyforge_project:
219
- rubygems_version: 2.2.3
219
+ rubygems_version: 2.5.1
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: Utilrb is yet another Ruby toolkit, in the spirit of facets