vendorificator 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/.gitignore +3 -0
  2. data/CHANGELOG.md +40 -0
  3. data/Gemfile +2 -2
  4. data/README.md +18 -17
  5. data/Rakefile +15 -1
  6. data/features/edgecases.feature +34 -0
  7. data/features/environment.feature +17 -0
  8. data/features/fixtures/git/testrepo/objects/53/ac1a96882e666cee31504179abc21eac522f8d +2 -0
  9. data/features/fixtures/git/testrepo/refs/tags/email-v0 +1 -0
  10. data/features/git.feature +19 -1
  11. data/features/status.feature +1 -1
  12. data/features/step_definitions/basic.rb +11 -0
  13. data/features/step_definitions/git.rb +12 -0
  14. data/features/support/env.rb +3 -4
  15. data/features/support/minigit.rb +4 -0
  16. data/lib/vendorificator/cli.rb +32 -44
  17. data/lib/vendorificator/config.rb +63 -15
  18. data/lib/vendorificator/environment.rb +123 -16
  19. data/lib/vendorificator/errors.rb +3 -0
  20. data/lib/vendorificator/hooks/chef_cookbook.rb +1 -1
  21. data/lib/vendorificator/vendor/archive.rb +69 -65
  22. data/lib/vendorificator/vendor/chef_cookbook.rb +45 -39
  23. data/lib/vendorificator/vendor/download.rb +30 -26
  24. data/lib/vendorificator/vendor/git.rb +43 -32
  25. data/lib/vendorificator/vendor.rb +83 -91
  26. data/lib/vendorificator/version.rb +1 -1
  27. data/lib/vendorificator.rb +1 -0
  28. data/spec/spec_helper.rb +20 -22
  29. data/spec/vendorificator/config_spec.rb +64 -0
  30. data/spec/vendorificator/environment_spec.rb +81 -0
  31. data/spec/vendorificator/fixtures/vendorfiles/empty_vendor.rb +1 -0
  32. data/spec/vendorificator/fixtures/vendorfiles/vendor.rb +15 -0
  33. data/spec/vendorificator/vendor/chef_cookbook_spec.rb +13 -0
  34. data/spec/vendorificator/vendor_spec.rb +29 -33
  35. data/vendorificator.gemspec +3 -3
  36. 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
- @config = Vendorificator::Config
14
- config.environment = self
15
- config.from_file(self.class.find_vendorfile(vendorfile))
16
- Vendorificator::Vendor.compute_dependencies!
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
- def clean?
42
- # copy code from http://stackoverflow.com/a/3879077/16390
43
- git.update_index :q => true, :ignore_submodules => true, :refresh => true
44
- git.diff_files '--quiet', '--ignore-submodules', '--'
45
- git.diff_index '--cached', '--quiet', 'HEAD', '--ignore-submodules', '--'
46
- true
47
- rescue MiniGit::GitError
48
- false
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
- Vendorificator::Vendor.each do |mod|
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, remote_head.name) unless options[:dry_run]
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
- def self.find_vendorfile(given=nil)
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
@@ -0,0 +1,3 @@
1
+ module Vendorificator
2
+ class DirtyRepoError < StandardError; end
3
+ 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
- Vendorificator::Vendor.instances.any? do |vi|
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
- class Vendorificator::Vendor::Archive < Vendorificator::Vendor
11
- arg_reader :url, :strip_root, :type, :checksum, :filename, :basename, :extname, :unpack
12
- attr_reader :conjured_checksum
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
- def initialize(environment, name, args={}, &block)
15
- no_url_given = !args[:url]
15
+ def initialize(environment, name, args={}, &block)
16
+ no_url_given = !args[:url]
16
17
 
17
- args[:url] ||= name
18
- args[:filename] ||= URI::parse(args[:url]).path.split('/').last
18
+ args[:url] ||= name
19
+ args[:filename] ||= URI::parse(args[:url]).path.split('/').last
19
20
 
20
- case args[:filename]
21
- when /\.(tar\.|t)gz$/
22
- args[:type] ||= :targz
23
- args[:unpack] ||= 'tar -xzf'
24
- when /\.tar\.bz2$/
25
- args[:type] ||= :tarbz2
26
- args[:unpack] ||= 'tar -xjf'
27
- when /\.zip$/
28
- args[:type] ||= :zip
29
- args[:unpack] ||= 'unzip'
30
- when /\.[^\.][^\.]?[^\.]?[^\.]?$/
31
- args[:type] ||=
32
- begin
33
- unless args[:unpack]
34
- raise RuntimeError,
35
- "Unknown file type #{$&.inspect}, please provide :unpack argument"
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
- end
46
- args[:basename] ||= $`
47
- args[:extname] ||= $&
47
+ args[:basename] ||= $`
48
+ args[:extname] ||= $&
48
49
 
49
- name = args[:basename] if no_url_given
50
+ name = args[:basename] if no_url_given
50
51
 
51
- super(environment, name, args, &block)
52
- end
52
+ super(environment, name, args, &block)
53
+ end
53
54
 
54
- def conjure!
55
- shell.say_status :download, url
56
- archive = Tempfile.new([basename, extname])
57
- archive.write( open(url).read )
58
- archive.close
59
- @conjured_checksum = Digest::SHA256.file(archive.path).hexdigest
60
- raise RuntimeError, "Checksum error" if checksum && checksum!=conjured_checksum
61
- shell.say_status :unpack, filename
62
- system "#{unpack} #{Escape.shell_single_word archive.path}"
63
- if Dir.entries('.').length == 3 && !args[:no_strip_root]
64
- root = (Dir.entries('.') - %w(.. .)).first
65
- root_entries = Dir.entries(root) - %w(.. .)
66
- while root_entries.include?(root)
67
- FileUtils::mv root, root+"~"
68
- root << "~"
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
- FileUtils::mv root_entries.map { |e| File.join(root, e) }, '.'
71
- FileUtils::rmdir root
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
- def upstream_version
80
- filename
81
- end
80
+ def upstream_version
81
+ filename
82
+ end
82
83
 
83
- def conjure_commit_message
84
- rv = "Conjured archive #{name} from #{filename}\nOrigin: #{url}\nChecksum: #{conjured_checksum}\n"
85
- rv << "Version: #{version}\n" if version
86
- rv
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
- install!
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
- require 'json'
3
+ autoload :MultiJson, 'multi_json'
4
4
 
5
5
  require 'vendorificator/vendor/archive'
6
6
  require 'vendorificator/hooks/chef_cookbook'
7
7
 
8
- class Vendorificator::Vendor::ChefCookbook < Vendorificator::Vendor::Archive
9
- include Vendorificator::Hooks::ChefCookbookDependencies
8
+ module Vendorificator
9
+ class Vendor::ChefCookbook < Vendor::Archive
10
+ include Hooks::ChefCookbookDependencies
10
11
 
11
- @method_name = :chef_cookbook
12
- @category = :cookbooks
12
+ @method_name = :chef_cookbook
13
+ @category = :cookbooks
13
14
 
14
- API_PREFIX = 'http://cookbooks.opscode.com/api/v1/cookbooks/'
15
+ API_PREFIX = 'http://cookbooks.opscode.com/api/v1/cookbooks/'
15
16
 
16
- def initialize(environment, name, args={}, &block)
17
- args[:url] ||= true # to avoid having name treated as url
18
- args[:filename] ||= "#{name}.tgz"
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
- super(environment, name, args, &block)
21
- end
21
+ super(environment, name, args, &block)
22
+ end
22
23
 
23
- def api_data(v=nil)
24
- v = v.gsub(/[^0-9]/, '_') if v
25
- @api_data ||= {}
26
- @api_data[v] ||=
27
- begin
28
- url = "#{API_PREFIX}#{name}"
29
- url << "/versions/#{v}" if v
30
- JSON::load(Net::HTTP.get_response(URI.parse(url)).body)
31
- end
32
- end
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
- def cookbook_data
35
- @cookbook_data ||= api_data(version)
36
- end
35
+ def cookbook_data
36
+ @cookbook_data ||= api_data(version)
37
+ end
37
38
 
38
- def upstream_version
39
- URI::parse(api_data['latest_version']).path.split('/').last.gsub('_', '.')
40
- end
39
+ def upstream_version
40
+ URI::parse(api_data['latest_version']).path.split('/').last.gsub('_', '.')
41
+ end
41
42
 
42
- def url
43
- cookbook_data['file']
44
- end
43
+ def url
44
+ cookbook_data['file']
45
+ end
45
46
 
46
- def conjure!
47
- super
48
- # Some Opscode Community tarballs include a confusing .git file,
49
- # we don't want this.
50
- FileUtils::rm_f '.git'
51
- end
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
- install!
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
- class Vendorificator::Vendor::Download < Vendorificator::Vendor
9
- arg_reader :url
10
- attr_reader :conjured_checksum
8
+ module Vendorificator
9
+ class Vendor::Download < Vendor
10
+ arg_reader :url
11
+ attr_reader :conjured_checksum
11
12
 
12
- def initialize(environment, name, args={}, &block)
13
- no_url_given = !args[:url]
13
+ def initialize(environment, name, args={}, &block)
14
+ no_url_given = !args[:url]
14
15
 
15
- args[:url] ||= name
16
- name = URI::parse(args[:url]).path.split('/').last if no_url_given
16
+ args[:url] ||= name
17
+ name = URI::parse(args[:url]).path.split('/').last if no_url_given
17
18
 
18
- super(environment, name, args, &block)
19
- end
19
+ super(environment, name, args, &block)
20
+ end
20
21
 
21
- def path
22
- args[:path] || category
23
- end
22
+ def path
23
+ args[:path] || category
24
+ end
24
25
 
25
- def conjure!
26
- shell.say_status :download, url
27
- File.open name, 'w' do |outf|
28
- outf.write( open(url).read )
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
- def upstream_version
34
- conjured_checksum || Digest::SHA256.hexdigest( open(url).read )
35
- end
34
+ def upstream_version
35
+ conjured_checksum || Digest::SHA256.hexdigest( open(url).read )
36
+ end
36
37
 
37
- def conjure_commit_message
38
- rv = "Conjured #{name} from #{url}\nChecksum: #{conjured_checksum}"
39
- rv << "Version: #{args[:version]}" if args[:version]
40
- rv
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
- install!
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
- class Vendorificator::Vendor::Git < Vendorificator::Vendor
5
- arg_reader :repository, :revision, :branch
6
- attr_reader :git, :conjured_revision
7
-
8
- def initialize(environment, name, args={}, &block)
9
- unless args.include?(:repository)
10
- args[:repository] = name
11
- name = name.split('/').last.sub(/\.git$/, '')
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
- def conjure!
17
- shell.say_status :clone, repository
18
- MiniGit.git :clone, repository, '.'
19
- @git = MiniGit.new('.')
22
+ def conjure!
23
+ shell.say_status :clone, repository
24
+ MiniGit.git :clone, repository, '.'
25
+ local_git = MiniGit.new('.')
20
26
 
21
- if revision
22
- git.checkout({:b => 'vendorified'}, revision)
23
- elsif branch
24
- git.checkout({:b => 'vendorified'}, "origin/#{branch}")
25
- end
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
- super
33
+ super
28
34
 
29
- @conjured_revision = git.capturing.rev_parse('HEAD').strip
30
- FileUtils::rm_rf '.git'
31
- end
35
+ @conjured_revision = local_git.capturing.rev_parse('HEAD').strip
36
+ FileUtils::rm_rf '.git'
37
+ end
32
38
 
33
- def upstream_version
34
- conjured_revision
35
- end
39
+ def upstream_version
40
+ tag || conjured_revision
41
+ end
36
42
 
37
- def conjure_commit_message
38
- rv = "Conjured git module #{name} "
39
- rv << "version #{version} " if version
40
- rv << "revision #{conjured_revision}"
41
- rv
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
- install!
53
+ class Config
54
+ register_module :git, Vendor::Git
55
+ end
45
56
  end