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 +4 -4
- data/lib/utilrb/array/to_s.rb +0 -12
- data/lib/utilrb/hash/to_s.rb +0 -12
- data/lib/utilrb/pkgconfig.rb +9 -4
- data/lib/utilrb/set/to_s.rb +0 -11
- data/lib/utilrb/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30f3b27613076cc9f327bccee358f2bc55bcd826
|
4
|
+
data.tar.gz: ef980585fef480c37de10056afec1bd714df4683
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df1fab4bfabbe73e7d657a7564022042d3f16c84293474ed441c1c9b1452481c2393aa76d38b820a398731fc605aa5d0a8ea6e30c089b7ef3b2ca2279145bbd2
|
7
|
+
data.tar.gz: 1efd86909aff5ea2802c1ff9a04db0e5eb052cbed3412858d1d051245b47baf82d329a200102318e8067396f1175f319247062942bd4bab4d22a72818ac06408
|
data/lib/utilrb/array/to_s.rb
CHANGED
@@ -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
|
-
|
data/lib/utilrb/hash/to_s.rb
CHANGED
@@ -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
|
-
|
data/lib/utilrb/pkgconfig.rb
CHANGED
@@ -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 =
|
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
|
data/lib/utilrb/set/to_s.rb
CHANGED
data/lib/utilrb/version.rb
CHANGED
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.
|
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:
|
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.
|
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
|