vendorificator 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/CHANGELOG.md +40 -0
- data/Gemfile +2 -2
- data/README.md +18 -17
- data/Rakefile +15 -1
- data/features/edgecases.feature +34 -0
- data/features/environment.feature +17 -0
- data/features/fixtures/git/testrepo/objects/53/ac1a96882e666cee31504179abc21eac522f8d +2 -0
- data/features/fixtures/git/testrepo/refs/tags/email-v0 +1 -0
- data/features/git.feature +19 -1
- data/features/status.feature +1 -1
- data/features/step_definitions/basic.rb +11 -0
- data/features/step_definitions/git.rb +12 -0
- data/features/support/env.rb +3 -4
- data/features/support/minigit.rb +4 -0
- data/lib/vendorificator/cli.rb +32 -44
- data/lib/vendorificator/config.rb +63 -15
- data/lib/vendorificator/environment.rb +123 -16
- data/lib/vendorificator/errors.rb +3 -0
- data/lib/vendorificator/hooks/chef_cookbook.rb +1 -1
- data/lib/vendorificator/vendor/archive.rb +69 -65
- data/lib/vendorificator/vendor/chef_cookbook.rb +45 -39
- data/lib/vendorificator/vendor/download.rb +30 -26
- data/lib/vendorificator/vendor/git.rb +43 -32
- data/lib/vendorificator/vendor.rb +83 -91
- data/lib/vendorificator/version.rb +1 -1
- data/lib/vendorificator.rb +1 -0
- data/spec/spec_helper.rb +20 -22
- data/spec/vendorificator/config_spec.rb +64 -0
- data/spec/vendorificator/environment_spec.rb +81 -0
- data/spec/vendorificator/fixtures/vendorfiles/empty_vendor.rb +1 -0
- data/spec/vendorificator/fixtures/vendorfiles/vendor.rb +15 -0
- data/spec/vendorificator/vendor/chef_cookbook_spec.rb +13 -0
- data/spec/vendorificator/vendor_spec.rb +29 -33
- data/vendorificator.gemspec +3 -3
- metadata +45 -30
@@ -7,13 +7,16 @@ require 'vendorificator/config'
|
|
7
7
|
module Vendorificator
|
8
8
|
class Environment
|
9
9
|
attr_reader :config
|
10
|
-
attr_accessor :shell
|
10
|
+
attr_accessor :shell, :vendor_instances
|
11
11
|
|
12
12
|
def initialize(vendorfile=nil)
|
13
|
-
@
|
14
|
-
|
15
|
-
config.
|
16
|
-
|
13
|
+
@vendor_instances = []
|
14
|
+
|
15
|
+
@config = Vendorificator::Config.new
|
16
|
+
@config.environment = self
|
17
|
+
@config.read_file(find_vendorfile(vendorfile).to_s)
|
18
|
+
|
19
|
+
self.each_vendor_instance{ |mod| mod.compute_dependencies! }
|
17
20
|
end
|
18
21
|
|
19
22
|
def say_status(*args)
|
@@ -38,16 +41,26 @@ module Vendorificator
|
|
38
41
|
git.capturing.merge_base(to, from).strip == from
|
39
42
|
end
|
40
43
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
44
|
+
# Public: Pulls all the remotes specified in options[:remote] or the config.
|
45
|
+
#
|
46
|
+
# options - The Hash of options.
|
47
|
+
#
|
48
|
+
# Returns nothing.
|
49
|
+
def pull_all(options = {})
|
50
|
+
ensure_clean!
|
51
|
+
remotes = options[:remote] ? options[:remote].split(',') : config[:remotes]
|
52
|
+
remotes.each do |remote|
|
53
|
+
indent 'remote', remote do
|
54
|
+
pull(remote, options)
|
55
|
+
end
|
56
|
+
end
|
49
57
|
end
|
50
58
|
|
59
|
+
# Public: Pulls a single remote and updates the branches.
|
60
|
+
#
|
61
|
+
# options - The Hash of options.
|
62
|
+
#
|
63
|
+
# Returns nothing.
|
51
64
|
def pull(remote, options={})
|
52
65
|
raise RuntimeError, "Unknown remote #{remote}" unless remotes.include?(remote)
|
53
66
|
|
@@ -61,13 +74,13 @@ module Vendorificator
|
|
61
74
|
map { |sha, name| name =~ ref_rx ? [$', sha] : nil }.
|
62
75
|
compact ]
|
63
76
|
|
64
|
-
|
77
|
+
each_vendor_instance do |mod|
|
65
78
|
ours = mod.head
|
66
79
|
theirs = remote_branches[mod.branch_name]
|
67
80
|
if theirs
|
68
81
|
if not ours
|
69
82
|
say_status 'new', mod.branch_name, :yellow
|
70
|
-
git.branch({:track=>true}, mod.branch_name,
|
83
|
+
git.branch({:track => true}, mod.branch_name, theirs) unless options[:dry_run]
|
71
84
|
elsif ours == theirs
|
72
85
|
say_status 'unchanged', mod.branch_name
|
73
86
|
elsif fast_forwardable?(theirs, ours)
|
@@ -82,10 +95,85 @@ module Vendorificator
|
|
82
95
|
say_status 'unknown', mod.branch_name
|
83
96
|
end
|
84
97
|
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Public: Push changes on module branches.
|
101
|
+
#
|
102
|
+
# options - The Hash containing options
|
103
|
+
#
|
104
|
+
# Returns nothing.
|
105
|
+
def push(options = {})
|
106
|
+
ensure_clean!
|
107
|
+
|
108
|
+
pushable = []
|
109
|
+
each_vendor_instance{ |mod| pushable += mod.pushable_refs }
|
110
|
+
|
111
|
+
remotes = options[:remote] ? options[:remote].split(',') : config[:remotes]
|
112
|
+
remotes.each{ |remote| git.push remote, pushable }
|
85
113
|
|
114
|
+
git.push :tags => true
|
115
|
+
end
|
116
|
+
|
117
|
+
# Public: Runs all the vendor modules.
|
118
|
+
#
|
119
|
+
# options - The Hash of options.
|
120
|
+
#
|
121
|
+
# Returns nothing.
|
122
|
+
def sync(options = {})
|
123
|
+
ensure_clean!
|
124
|
+
config[:use_upstream_version] = options[:update]
|
125
|
+
|
126
|
+
each_vendor_instance(*options[:modules]) do |mod|
|
127
|
+
say_status :module, mod.name
|
128
|
+
indent do
|
129
|
+
mod.run!
|
130
|
+
end
|
131
|
+
end
|
86
132
|
end
|
87
133
|
|
88
|
-
|
134
|
+
# Public: Goes through all the Vendor instances and runs the block
|
135
|
+
#
|
136
|
+
# modules - ?
|
137
|
+
#
|
138
|
+
# Returns nothing.
|
139
|
+
def each_vendor_instance(*modules)
|
140
|
+
modpaths = modules.map { |m| File.expand_path(m) }
|
141
|
+
|
142
|
+
# We don't use @vendor_instances.each here, because Vendor#run! is
|
143
|
+
# explicitly allowed to append to instantiate new dependencies, and #each
|
144
|
+
# fails to catch up on some Ruby implementations.
|
145
|
+
i = 0
|
146
|
+
while true
|
147
|
+
break if i >= @vendor_instances.length
|
148
|
+
mod = @vendor_instances[i]
|
149
|
+
yield mod if modules.empty? ||
|
150
|
+
modules.include?(mod.name) ||
|
151
|
+
modpaths.include?(mod.work_dir)
|
152
|
+
i += 1
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
# Public: Checks if the repository is clean.
|
157
|
+
#
|
158
|
+
# Returns boolean answer to the question.
|
159
|
+
def clean?
|
160
|
+
# copy code from http://stackoverflow.com/a/3879077/16390
|
161
|
+
git.update_index '-q', '--ignore-submodules', '--refresh'
|
162
|
+
git.diff_files '--quiet', '--ignore-submodules', '--'
|
163
|
+
git.diff_index '--cached', '--quiet', 'HEAD', '--ignore-submodules', '--'
|
164
|
+
true
|
165
|
+
rescue MiniGit::GitError
|
166
|
+
false
|
167
|
+
end
|
168
|
+
|
169
|
+
private
|
170
|
+
|
171
|
+
# Private: Finds the vendorfile to use.
|
172
|
+
#
|
173
|
+
# given - the optional String containing vendorfile path.
|
174
|
+
#
|
175
|
+
# Returns a String containing the vendorfile path.
|
176
|
+
def find_vendorfile(given=nil)
|
89
177
|
given = [ given, ENV['VENDORFILE'] ].find do |candidate|
|
90
178
|
candidate && !(candidate.respond_to?(:empty?) && candidate.empty?)
|
91
179
|
end
|
@@ -107,5 +195,24 @@ module Vendorificator
|
|
107
195
|
|
108
196
|
raise ArgumentError, "Vendorfile not found"
|
109
197
|
end
|
198
|
+
|
199
|
+
# Private: Aborts on a dirty repository.
|
200
|
+
#
|
201
|
+
# Returns nothing.
|
202
|
+
def ensure_clean!
|
203
|
+
raise DirtyRepoError unless clean?
|
204
|
+
end
|
205
|
+
|
206
|
+
# Private: Indents the output.
|
207
|
+
#
|
208
|
+
# Returns nothing.
|
209
|
+
def indent(*args, &block)
|
210
|
+
say_status *args unless args.empty?
|
211
|
+
shell.padding += 1 if shell
|
212
|
+
yield
|
213
|
+
ensure
|
214
|
+
shell.padding -= 1 if shell
|
215
|
+
end
|
216
|
+
|
110
217
|
end
|
111
218
|
end
|
@@ -44,7 +44,7 @@ module Vendorificator::Hooks
|
|
44
44
|
# Reject dependencies that already have a module
|
45
45
|
deps.reject! do |dep|
|
46
46
|
dir = basedir.join(dep).to_s
|
47
|
-
|
47
|
+
environment.vendor_instances.any? do |vi|
|
48
48
|
vi.work_dir == dir
|
49
49
|
end
|
50
50
|
end
|
@@ -7,84 +7,88 @@ require 'escape'
|
|
7
7
|
|
8
8
|
require 'vendorificator/vendor'
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
module Vendorificator
|
11
|
+
class Vendor::Archive < Vendor
|
12
|
+
arg_reader :url, :strip_root, :type, :checksum, :filename, :basename, :extname, :unpack
|
13
|
+
attr_reader :conjured_checksum
|
13
14
|
|
14
|
-
|
15
|
-
|
15
|
+
def initialize(environment, name, args={}, &block)
|
16
|
+
no_url_given = !args[:url]
|
16
17
|
|
17
|
-
|
18
|
-
|
18
|
+
args[:url] ||= name
|
19
|
+
args[:filename] ||= URI::parse(args[:url]).path.split('/').last
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
21
|
+
case args[:filename]
|
22
|
+
when /\.(tar\.|t)gz$/
|
23
|
+
args[:type] ||= :targz
|
24
|
+
args[:unpack] ||= 'tar -xzf'
|
25
|
+
when /\.tar\.bz2$/
|
26
|
+
args[:type] ||= :tarbz2
|
27
|
+
args[:unpack] ||= 'tar -xjf'
|
28
|
+
when /\.zip$/
|
29
|
+
args[:type] ||= :zip
|
30
|
+
args[:unpack] ||= 'unzip'
|
31
|
+
when /\.[^\.][^\.]?[^\.]?[^\.]?$/
|
32
|
+
args[:type] ||=
|
33
|
+
begin
|
34
|
+
unless args[:unpack]
|
35
|
+
raise RuntimeError,
|
36
|
+
"Unknown file type #{$&.inspect}, please provide :unpack argument"
|
37
|
+
end
|
38
|
+
$&
|
36
39
|
end
|
37
|
-
|
40
|
+
else
|
41
|
+
args[:basename] ||= args[:filename]
|
42
|
+
args[:extname] ||= ''
|
43
|
+
unless args[:unpack] || [:targz, :tarbz2, :zip].include?(args[:type])
|
44
|
+
raise RuntimeError, "Unknown file type for #{args[:filename].inspect}, please provide :unpack or :type argument"
|
38
45
|
end
|
39
|
-
else
|
40
|
-
args[:basename] ||= args[:filename]
|
41
|
-
args[:extname] ||= ''
|
42
|
-
unless args[:unpack] || [:targz, :tarbz2, :zip].include?(args[:type])
|
43
|
-
raise RuntimeError, "Unknown file type for #{args[:filename].inspect}, please provide :unpack or :type argument"
|
44
46
|
end
|
45
|
-
|
46
|
-
|
47
|
-
args[:extname] ||= $&
|
47
|
+
args[:basename] ||= $`
|
48
|
+
args[:extname] ||= $&
|
48
49
|
|
49
|
-
|
50
|
+
name = args[:basename] if no_url_given
|
50
51
|
|
51
|
-
|
52
|
-
|
52
|
+
super(environment, name, args, &block)
|
53
|
+
end
|
53
54
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
55
|
+
def conjure!
|
56
|
+
shell.say_status :download, url
|
57
|
+
archive = Tempfile.new([basename, extname])
|
58
|
+
archive.write( open(url).read )
|
59
|
+
archive.close
|
60
|
+
@conjured_checksum = Digest::SHA256.file(archive.path).hexdigest
|
61
|
+
raise RuntimeError, "Checksum error" if checksum && checksum!=conjured_checksum
|
62
|
+
shell.say_status :unpack, filename
|
63
|
+
system "#{unpack} #{Escape.shell_single_word archive.path}"
|
64
|
+
if Dir.entries('.').length == 3 && !args[:no_strip_root]
|
65
|
+
root = (Dir.entries('.') - %w(.. .)).first
|
66
|
+
root_entries = Dir.entries(root) - %w(.. .)
|
67
|
+
while root_entries.include?(root)
|
68
|
+
FileUtils::mv root, root+"~"
|
69
|
+
root << "~"
|
70
|
+
end
|
71
|
+
FileUtils::mv root_entries.map { |e| File.join(root, e) }, '.'
|
72
|
+
FileUtils::rmdir root
|
69
73
|
end
|
70
|
-
|
71
|
-
|
74
|
+
super
|
75
|
+
ensure
|
76
|
+
archive.close
|
77
|
+
archive.unlink
|
72
78
|
end
|
73
|
-
super
|
74
|
-
ensure
|
75
|
-
archive.close
|
76
|
-
archive.unlink
|
77
|
-
end
|
78
79
|
|
79
|
-
|
80
|
-
|
81
|
-
|
80
|
+
def upstream_version
|
81
|
+
filename
|
82
|
+
end
|
82
83
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
84
|
+
def conjure_commit_message
|
85
|
+
rv = "Conjured archive #{name} from #{filename}\nOrigin: #{url}\nChecksum: #{conjured_checksum}\n"
|
86
|
+
rv << "Version: #{version}\n" if version
|
87
|
+
rv
|
88
|
+
end
|
87
89
|
end
|
88
90
|
|
89
|
-
|
91
|
+
class Config
|
92
|
+
register_module :archive, Vendor::Archive
|
93
|
+
end
|
90
94
|
end
|
@@ -1,58 +1,64 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
require 'uri'
|
3
|
-
|
3
|
+
autoload :MultiJson, 'multi_json'
|
4
4
|
|
5
5
|
require 'vendorificator/vendor/archive'
|
6
6
|
require 'vendorificator/hooks/chef_cookbook'
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
module Vendorificator
|
9
|
+
class Vendor::ChefCookbook < Vendor::Archive
|
10
|
+
include Hooks::ChefCookbookDependencies
|
10
11
|
|
11
|
-
|
12
|
-
|
12
|
+
@method_name = :chef_cookbook
|
13
|
+
@category = :cookbooks
|
13
14
|
|
14
|
-
|
15
|
+
API_PREFIX = 'http://cookbooks.opscode.com/api/v1/cookbooks/'
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
def initialize(environment, name, args={}, &block)
|
18
|
+
args[:url] ||= true # to avoid having name treated as url
|
19
|
+
args[:filename] ||= "#{name}.tgz"
|
19
20
|
|
20
|
-
|
21
|
-
|
21
|
+
super(environment, name, args, &block)
|
22
|
+
end
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
def api_data(v=nil)
|
25
|
+
v = v.gsub(/[^0-9]/, '_') if v
|
26
|
+
@api_data ||= {}
|
27
|
+
@api_data[v] ||=
|
28
|
+
begin
|
29
|
+
url = "#{API_PREFIX}#{name}"
|
30
|
+
url << "/versions/#{v}" if v
|
31
|
+
MultiJson::load(Net::HTTP.get_response(URI.parse(url)).body)
|
32
|
+
end
|
33
|
+
end
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
35
|
+
def cookbook_data
|
36
|
+
@cookbook_data ||= api_data(version)
|
37
|
+
end
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
def upstream_version
|
40
|
+
URI::parse(api_data['latest_version']).path.split('/').last.gsub('_', '.')
|
41
|
+
end
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
def url
|
44
|
+
cookbook_data['file']
|
45
|
+
end
|
45
46
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
47
|
+
def conjure!
|
48
|
+
super
|
49
|
+
# Some Opscode Community tarballs include a confusing .git file,
|
50
|
+
# we don't want this.
|
51
|
+
FileUtils::rm_f '.git'
|
52
|
+
end
|
53
|
+
|
54
|
+
def conjure_commit_message
|
55
|
+
"Conjured cookbook #{name} version #{version}\nOrigin: #{url}\nChecksum: #{conjured_checksum}\n"
|
56
|
+
end
|
52
57
|
|
53
|
-
def conjure_commit_message
|
54
|
-
"Conjured cookbook #{name} version #{version}\nOrigin: #{url}\nChecksum: #{conjured_checksum}\n"
|
55
58
|
end
|
56
59
|
|
57
|
-
|
60
|
+
class Config
|
61
|
+
register_module :chef_cookbook, Vendor::ChefCookbook
|
62
|
+
option :chef_cookbook_ignore_dependencies
|
63
|
+
end
|
58
64
|
end
|
@@ -5,40 +5,44 @@ require 'uri'
|
|
5
5
|
|
6
6
|
require 'vendorificator/vendor'
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
module Vendorificator
|
9
|
+
class Vendor::Download < Vendor
|
10
|
+
arg_reader :url
|
11
|
+
attr_reader :conjured_checksum
|
11
12
|
|
12
|
-
|
13
|
-
|
13
|
+
def initialize(environment, name, args={}, &block)
|
14
|
+
no_url_given = !args[:url]
|
14
15
|
|
15
|
-
|
16
|
-
|
16
|
+
args[:url] ||= name
|
17
|
+
name = URI::parse(args[:url]).path.split('/').last if no_url_given
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
super(environment, name, args, &block)
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
def path
|
23
|
+
args[:path] || category
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
def conjure!
|
27
|
+
shell.say_status :download, url
|
28
|
+
File.open name, 'w' do |outf|
|
29
|
+
outf.write( open(url).read )
|
30
|
+
end
|
31
|
+
@conjured_checksum = Digest::SHA256.file(name).hexdigest
|
29
32
|
end
|
30
|
-
@conjured_checksum = Digest::SHA256.file(name).hexdigest
|
31
|
-
end
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
34
|
+
def upstream_version
|
35
|
+
conjured_checksum || Digest::SHA256.hexdigest( open(url).read )
|
36
|
+
end
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
def conjure_commit_message
|
39
|
+
rv = "Conjured #{name} from #{url}\nChecksum: #{conjured_checksum}"
|
40
|
+
rv << "Version: #{args[:version]}" if args[:version]
|
41
|
+
rv
|
42
|
+
end
|
41
43
|
end
|
42
44
|
|
43
|
-
|
45
|
+
class Config
|
46
|
+
register_module :download, Vendor::Download
|
47
|
+
end
|
44
48
|
end
|
@@ -1,45 +1,56 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'vendorificator/vendor'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
args[:
|
11
|
-
|
4
|
+
module Vendorificator
|
5
|
+
class Vendor::Git < Vendor
|
6
|
+
arg_reader :repository, :revision, :tag, :branch
|
7
|
+
attr_reader :conjured_revision
|
8
|
+
|
9
|
+
def initialize(environment, name, args={}, &block)
|
10
|
+
args[:version] ||= args[:tag] if args[:tag]
|
11
|
+
if [:revision, :tag, :branch].select { |key| args.key?(key) }.count > 1
|
12
|
+
raise ArgumentError, "You can provide only one of: :revision, :tag, :branch"
|
13
|
+
end
|
14
|
+
|
15
|
+
unless args.include?(:repository)
|
16
|
+
args[:repository] = name
|
17
|
+
name = name.split('/').last.sub(/\.git$/, '')
|
18
|
+
end
|
19
|
+
super(environment, name, args, &block)
|
12
20
|
end
|
13
|
-
super(environment, name, args, &block)
|
14
|
-
end
|
15
21
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
def conjure!
|
23
|
+
shell.say_status :clone, repository
|
24
|
+
MiniGit.git :clone, repository, '.'
|
25
|
+
local_git = MiniGit.new('.')
|
20
26
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
27
|
+
if tag||revision
|
28
|
+
local_git.checkout({:b => 'vendorified'}, tag||revision)
|
29
|
+
elsif branch
|
30
|
+
local_git.checkout({:b => 'vendorified'}, "origin/#{branch}")
|
31
|
+
end
|
26
32
|
|
27
|
-
|
33
|
+
super
|
28
34
|
|
29
|
-
|
30
|
-
|
31
|
-
|
35
|
+
@conjured_revision = local_git.capturing.rev_parse('HEAD').strip
|
36
|
+
FileUtils::rm_rf '.git'
|
37
|
+
end
|
32
38
|
|
33
|
-
|
34
|
-
|
35
|
-
|
39
|
+
def upstream_version
|
40
|
+
tag || conjured_revision
|
41
|
+
end
|
36
42
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
43
|
+
def conjure_commit_message
|
44
|
+
rv = "Conjured git module #{name} "
|
45
|
+
rv << "version #{version} " if version
|
46
|
+
rv << "from tag #{tag} " if tag
|
47
|
+
rv << "from branch #{branch} " if branch
|
48
|
+
rv << "at revision #{conjured_revision}"
|
49
|
+
rv
|
50
|
+
end
|
42
51
|
end
|
43
52
|
|
44
|
-
|
53
|
+
class Config
|
54
|
+
register_module :git, Vendor::Git
|
55
|
+
end
|
45
56
|
end
|