derelict 0.6.1.travis.147 → 0.6.1.travis.149

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjFiMzA3NDkwY2EyZjQ1MjAxZDgwOGQyNGJhNGFjZGY4ZDg3NGY2Nw==
4
+ YTBiM2Y4OGEwZWQyMjljMDAxYjZhYmFkYWQ3NTU5NTFkZjg2YjM5NQ==
5
5
  data.tar.gz: !binary |-
6
- MWRkNGEzZDFjY2M1MjE2NzE0YzZmNzljNmIzMTA1MWU5N2ZkZmEzNQ==
6
+ NGZiNWEzMWNhYzcwYTU5YTE4ZThiYjA4ODhmZTg1NGIwYjIyYzM3Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZmVhYjgzYTgxNTg0N2Q3Y2M5MzUwNjg4OTNkMmEwNGU3YTAyMTQ5M2VkYzNl
10
- ZWI0YzQyOWFhYjI1OGEwNmQzMjNlYWY4YjMxZTQwOTViYTZiNmE1NDI0MGRk
11
- ZjJlNDI4YTUzNDBhNTJjZWVjNTcxYjRjZmM3MmM2YTAxODMzNTg=
9
+ ZDgzYzY1NjQ0MWNiNGU0YjE5NWM2MmNjY2VhNTEwNDZmYmIzN2M5NWIzODY2
10
+ YWE1ZjNiNjQxMGZiNTkzNDE2ZWIxNGI2YzFlZTQ5YzVmOGNkNmMxMjM1YjYx
11
+ MDY0YmQ0NmFiMDY1MmFjOWE5ZThkYzQxZjJhZGY4OTdkMDk5NjY=
12
12
  data.tar.gz: !binary |-
13
- Zjc3ODJkYTJmMGFiOGVlYTA0MWUyODFlNWRiODkzZGQ1NzczMTEwNDAzZTdm
14
- ZWMxYmNjZmMxN2Y5MjU1Mjg1ZmU0Yzc1NDMxYTU0OWVjNzIzZWYxMTFhM2Iy
15
- NTQ1NjU3ZjkzNjlkZDAyZTkzYjliMzA2MmZiZmQzOGNhYTQyZTI=
13
+ ZWQyNDJkMjZlZjNhNDViN2JhZDI0ZWJlOTg0OWJlODdkYTRhMjM5YWMwZjMw
14
+ YmY5YzljMGUyZjRiMDdjZGIwMmIwMDkwM2NiZTU3MWJhN2YxMjJjZWNjMWJl
15
+ MDljNTViY2RjMjhkMTk0ODkwZTA4YTQ3ZTYwNmE3ODEwYjA2ZmQ=
@@ -20,7 +20,8 @@ module Derelict
20
20
  PARSE_BOX = %r[
21
21
  ^(.*?) # Box name starts at the start of the line
22
22
  \ +\( # Provider is separated by spaces and open-parenthesis
23
- (.*) # Provider name
23
+ (\w+) # Provider name
24
+ (:?,.+)? # Version, ignored
24
25
  \)$ # Ends with close-parenthesis and end-of-line
25
26
  ]x # Ignore whitespace to allow these comments
26
27
 
@@ -27,18 +27,27 @@ describe Derelict::Parser::BoxList do
27
27
  let(:foobar) { Derelict::Box.new "foobar", "provider_one" }
28
28
  let(:baz) { Derelict::Box.new "baz", "provider_two" }
29
29
  it { should eq Set[foobar, baz] }
30
+
31
+ context "with versioned boxes" do
32
+ let(:output) { "qux (foo, 0)" }
33
+ let(:qux) { Derelict::Box.new "qux", "foo" }
34
+ it { should eq Set[qux] }
35
+ end
30
36
  end
31
37
 
32
38
  context "with invalid output" do
33
- let(:output) {
34
- <<-END.gsub /^ +/, ""
35
- foobar (provider_one) lolwut
36
- baz with no brackets
37
- END
38
- }
39
+ context "with text after brackets" do
40
+ let(:output) { "foobar (provider_one) lolwut" }
41
+ it "should raise InvalidFormat" do
42
+ expect { subject }.to raise_error Derelict::Parser::BoxList::InvalidFormat
43
+ end
44
+ end
39
45
 
40
- it "should raise InvalidFormat" do
41
- expect { subject }.to raise_error Derelict::Parser::BoxList::InvalidFormat
46
+ context "with no brackets" do
47
+ let(:output) { "baz with no brackets" }
48
+ it "should raise InvalidFormat" do
49
+ expect { subject }.to raise_error Derelict::Parser::BoxList::InvalidFormat
50
+ end
42
51
  end
43
52
  end
44
53
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: derelict
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1.travis.147
4
+ version: 0.6.1.travis.149
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Feehan