dep 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dep.rb +2 -2
- data/test/dep.rb +3 -3
- metadata +2 -2
data/lib/dep.rb
CHANGED
@@ -34,7 +34,7 @@ module Dep
|
|
34
34
|
|
35
35
|
class Lib < Struct.new(:name, :version)
|
36
36
|
def self.[](line)
|
37
|
-
if line =~ /^(\S+) -v (\S+)$/
|
37
|
+
if line.strip =~ /^(\S+) -v (\S+)$/
|
38
38
|
return new($1, $2)
|
39
39
|
else
|
40
40
|
abort("Invalid requirement found: #{line}")
|
@@ -55,4 +55,4 @@ module Dep
|
|
55
55
|
to_s == other.to_s
|
56
56
|
end
|
57
57
|
end
|
58
|
-
end
|
58
|
+
end
|
data/test/dep.rb
CHANGED
@@ -12,7 +12,7 @@ scope do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
test "availability of existing gem" do
|
15
|
-
lib = Dep::Lib.new("cutest", "1.
|
15
|
+
lib = Dep::Lib.new("cutest", "1.2.0")
|
16
16
|
assert lib.available?
|
17
17
|
end
|
18
18
|
|
@@ -35,7 +35,7 @@ scope do
|
|
35
35
|
|
36
36
|
test do |list|
|
37
37
|
lib1 = Dep::Lib.new("ohm-contrib", "1.0.rc1")
|
38
|
-
lib2 = Dep::Lib.new("cutest", "1.
|
38
|
+
lib2 = Dep::Lib.new("cutest", "1.2.0")
|
39
39
|
|
40
40
|
assert list.libraries.include?(lib1)
|
41
41
|
assert list.libraries.include?(lib2)
|
@@ -50,4 +50,4 @@ scope do
|
|
50
50
|
assert ! list.libraries.include?(Dep::Lib.new("cutest", "1.1.3"))
|
51
51
|
assert list.libraries.include?(Dep::Lib.new("cutest", "2.0"))
|
52
52
|
end
|
53
|
-
end
|
53
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-01-
|
13
|
+
date: 2013-01-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: clap
|