em_rugged 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,9 +25,10 @@
25
25
 
26
26
  module EMRugged
27
27
  module Delegator
28
- def delegate(method)
28
+ def delegate(method, target = nil)
29
+ target ||= method
29
30
  define_method(method) do |*args|
30
- subject.send(method, *args)
31
+ subject.send(target, *args)
31
32
  end
32
33
  end
33
34
  end
@@ -39,6 +39,7 @@ module EMRugged
39
39
 
40
40
  delegate :bare?
41
41
  delegate :path
42
+ delegate :rev_parse_oid_sync, :rev_parse_oid
42
43
  defer :rev_parse
43
44
  defer :refs
44
45
  defer :lookup
@@ -24,5 +24,5 @@
24
24
  #++
25
25
 
26
26
  module EMRugged
27
- VERSION = "0.2.0"
27
+ VERSION = "0.3.0"
28
28
  end
@@ -54,6 +54,14 @@ describe EMRugged::Repository do
54
54
  end
55
55
  end
56
56
 
57
+ describe "#rev_parse_oid_sync" do
58
+ it "returns ref" do
59
+ expected = "b170eb4da91d95a08d07df3f76b2dab198e203f0"
60
+ repo = EMRugged::Repository.new(".")
61
+ assert_equal expected, repo.rev_parse_oid_sync("v0.1.2")
62
+ end
63
+ end
64
+
57
65
  describe "#refs" do
58
66
  it "returns deferrable" do
59
67
  deferrable = EMRugged::Repository.new(".").refs
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em_rugged
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christian Johansen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-10-12 00:00:00 +02:00
18
+ date: 2012-10-15 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -41,7 +41,7 @@ dependencies:
41
41
  requirements:
42
42
  - - "="
43
43
  - !ruby/object:Gem::Version
44
- hash: -1411674208
44
+ hash: -2615577696
45
45
  segments:
46
46
  - 0
47
47
  - 17