librarian 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/librarian/source/git.rb +1 -1
- data/lib/librarian/source/git/repository.rb +4 -10
- data/lib/librarian/version.rb +1 -1
- metadata +18 -18
data/CHANGELOG.md
CHANGED
data/lib/librarian/source/git.rb
CHANGED
@@ -83,7 +83,7 @@ module Librarian
|
|
83
83
|
repository.fetch!(:tags => true)
|
84
84
|
repository.fetch!
|
85
85
|
repository.merge_all_remote_branches!
|
86
|
-
repository.
|
86
|
+
repository.checkout!(repository.hash_from(sha || ref), :force => true)
|
87
87
|
@sha ||= repository.current_commit_hash
|
88
88
|
end
|
89
89
|
end
|
@@ -40,20 +40,14 @@ module Librarian
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
def checkout!(reference)
|
43
|
+
def checkout!(reference, options ={ })
|
44
44
|
within do
|
45
45
|
command = "checkout #{reference}"
|
46
|
+
command << " --force" if options[:force]
|
46
47
|
run!(command)
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
50
|
-
def reset_hard!(reference)
|
51
|
-
within do
|
52
|
-
command = "reset --hard #{reference}"
|
53
|
-
run!(command, false)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
51
|
def fetch!(options = { })
|
58
52
|
within do
|
59
53
|
command = "fetch"
|
@@ -72,7 +66,7 @@ module Librarian
|
|
72
66
|
def hash_from(reference)
|
73
67
|
within do
|
74
68
|
command = "rev-parse #{reference}"
|
75
|
-
run!(command)
|
69
|
+
run!(command).strip
|
76
70
|
end
|
77
71
|
end
|
78
72
|
|
@@ -85,7 +79,7 @@ module Librarian
|
|
85
79
|
|
86
80
|
def merge_all_remote_branches!
|
87
81
|
remote_branches.each do |branch|
|
88
|
-
checkout!(branch.slice(%r{[^/]+$}))
|
82
|
+
checkout!(branch.slice(%r{[^/]+$}), :force => true)
|
89
83
|
merge! branch
|
90
84
|
end
|
91
85
|
end
|
data/lib/librarian/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librarian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &15281700 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *15281700
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &15281180 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *15281180
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &15280600 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *15280600
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: cucumber
|
49
|
-
requirement: &
|
49
|
+
requirement: &15279900 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *15279900
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: aruba
|
60
|
-
requirement: &
|
60
|
+
requirement: &15278980 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *15278980
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
|
-
requirement: &
|
71
|
+
requirement: &15278400 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *15278400
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: chef
|
82
|
-
requirement: &
|
82
|
+
requirement: &15277240 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0.10'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *15277240
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: highline
|
93
|
-
requirement: &
|
93
|
+
requirement: &15276740 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *15276740
|
102
102
|
description: Librarian
|
103
103
|
email:
|
104
104
|
- y_feldblum@yahoo.com
|