vendorificator 0.4.0 → 0.5.git.v0.4.0.17.g26d50d8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YmMwNmEwMDhlYTI0Y2Q1MmQxY2E3MmFkZmNmYjE2Zjg3YTdiNGZlZQ==
5
+ data.tar.gz: !binary |-
6
+ NzY3ZmNkZTRjOTNjMWQzNWJmMGFmZTJjNGJlYTViZTJmZmQ2NmZjYQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NDNmZGIwYzNhZGJjZjIwNTk3NzhlZDRjYWRkMDZlZmJhNmM4ODA2YWQ4MTBj
10
+ MGUwZTFiZWNjZjI4ZmViNzQ5YmQ4OGU2ODdlYTNhNTg5OWQ5NmU5YWE0ZTM3
11
+ NjJmODhkOGIxZTQzYTk0M2Y5ZmM4M2NmMTI0NWQ3OWQzMjE0NjM=
12
+ data.tar.gz: !binary |-
13
+ ODdlNmQzODdjNTA0MjBkZWFkYTMzMjkwZTdjNzNhNTE1ZmEzYzZhOTI3MTU4
14
+ MjJmNjBmZTgwMTU4MjczNmYyZTFhMjUyNDQ2ZTEwZTUzYmNlODA2NDg2NjRl
15
+ NDNlOTc5OTZlNmQ4ZWRhZDQzZjUwMDc2M2ExMWMyZDM5ZmMxNmU=
data/.travis.yml CHANGED
@@ -8,4 +8,5 @@ rvm:
8
8
  - jruby-head
9
9
  - rbx-19mode
10
10
  notifications:
11
- hipchat: secure: "bds8WNPnAmnj2ommhDk2JNclAY1Ei/bGeWONRhhKNv1zwrqMvZ7B6M5UapEZ\n6K8z70vFMrdIDEJjzuf+ATYS0BVWKnXCYaofiIfJ7V2hiBm7/xNZ15m2bIrM\nQFIMR/Lrkd+wFA0O8z6SaPjvdEgZC6im4zAAuRq7LpH3NTy6qaA="
11
+ hipchat:
12
+ secure: "bds8WNPnAmnj2ommhDk2JNclAY1Ei/bGeWONRhhKNv1zwrqMvZ7B6M5UapEZ\n6K8z70vFMrdIDEJjzuf+ATYS0BVWKnXCYaofiIfJ7V2hiBm7/xNZ15m2bIrM\nQFIMR/Lrkd+wFA0O8z6SaPjvdEgZC6im4zAAuRq7LpH3NTy6qaA="
@@ -5,7 +5,7 @@ Scenario: A single cookbook, without dependencies
5
5
  """ruby
6
6
  chef_cookbook 'apt'
7
7
  """
8
- When I successfully run `vendor sync`
8
+ When I run vendor command "sync"
9
9
  Then following has been conjured:
10
10
  | Name | cookbooks/apt |
11
11
  | With file | metadata.rb |
@@ -15,7 +15,7 @@ Scenario: Dependency hook
15
15
  """ruby
16
16
  chef_cookbook 'memcached'
17
17
  """
18
- When I successfully run `vendor sync`
18
+ When I run vendor command "sync"
19
19
  Then following has been conjured:
20
20
  | Name | cookbooks/memcached | cookbooks/runit |
21
21
  | With file | metadata.rb | metadata.rb |
@@ -26,7 +26,7 @@ Scenario: Ignored dependency
26
26
  chef_cookbook_ignore_dependencies ['runit']
27
27
  chef_cookbook 'memcached'
28
28
  """
29
- When I successfully run `vendor sync`
29
+ When I run vendor command "sync"
30
30
  Then following has been conjured:
31
31
  | Name | cookbooks/memcached |
32
32
  | With file | metadata.rb |
@@ -40,7 +40,7 @@ Scenario: Ignored all dependencies
40
40
  chef_cookbook_ignore_dependencies true
41
41
  chef_cookbook 'chef-server'
42
42
  """
43
- When I successfully run `vendor sync`
43
+ When I run vendor command "sync"
44
44
  Then following has been conjured:
45
45
  | Name | cookbooks/chef-server |
46
46
  | With file | metadata.rb |
@@ -5,7 +5,7 @@ Scenario: just URL as name
5
5
  """ruby
6
6
  download 'http://test-assets.3ofcoins.net.s3-website-us-east-1.amazonaws.com/testrepo-0.1.tar.gz'
7
7
  """
8
- When I successfully run `vendor sync`
8
+ When I run vendor command "sync"
9
9
  Then following has been conjured:
10
10
  | Name | testrepo-0.1.tar.gz |
11
11
  And there's a git commit note including "ea207a" in "download_checksum"
@@ -7,7 +7,7 @@ Scenario: module with a .gitignore file
7
7
  File.open('.gitignore', 'w') { |f| f.puts 'ignored.txt' }
8
8
  end
9
9
  """
10
- When I successfully run `vendor sync`
10
+ When I run vendor command "sync"
11
11
  Then the following has been conjured:
12
12
  | Name | ignore |
13
13
  | With file | .gitignore |
@@ -25,7 +25,7 @@ Scenario: module with a .gitignore file
25
25
  File.open('.gitignore', 'w') { |f| f.puts 'ignored.txt' }
26
26
  end
27
27
  """
28
- And I successfully run `vendor sync`
28
+ And I run vendor command "sync"
29
29
  Then the file "vendor/ignore/files.txt" should not contain "ignored.txt"
30
30
  And the file "vendor/ignore/ignored.txt" should contain exactly:
31
31
  """
@@ -8,8 +8,8 @@ Scenario: Pushing to remote repo
8
8
  end
9
9
  """
10
10
  And a remote repository
11
- When I successfully run `vendor sync`
12
- And I successfully run `vendor push`
11
+ When I run vendor command "sync"
12
+ And I run vendor command "push"
13
13
  Then branch "vendor/generated" exists in the remote repo
14
14
  And tag "vendor/generated/0.23" exists in the remote repo
15
15
  And notes ref "vendor" exists in the remote repo
@@ -23,10 +23,10 @@ Scenario: Getting module information
23
23
  end
24
24
  """
25
25
  And a remote repository
26
- When I successfully run `vendor sync`
27
- And I successfully run `vendor info generated`
28
- Then the last output should match /Module merged version: 0.23/
29
- And the last output should match /unparsed_args/
26
+ When I run vendor command "sync"
27
+ And I run vendor command "info generated"
28
+ Then the last vendor output should match /Module merged version: 0.23/
29
+ And the last vendor output should match /unparsed_args/
30
30
 
31
31
  Scenario: Getting revision information
32
32
  Given a repository with following Vendorfile:
@@ -36,7 +36,7 @@ Scenario: Getting revision information
36
36
  end
37
37
  """
38
38
  And a remote repository
39
- When I successfully run `vendor sync`
40
- And I successfully run `vendor info HEAD\^2`
41
- Then the last output should match /master, vendor\/generated/
42
- Then the last output should match /:unparsed_args/
39
+ When I run vendor command "sync"
40
+ And I run vendor command "info HEAD^2"
41
+ Then the last vendor output should match /master, vendor\/generated/
42
+ Then the last vendor output should match /:unparsed_args/
data/features/git.feature CHANGED
@@ -5,7 +5,7 @@ Scenario: Vendorificating a git repo
5
5
  """ruby
6
6
  git "file://#{ENV['FIXTURES_DIR']}/git/testrepo"
7
7
  """
8
- When I successfully run `vendor sync`
8
+ When I run vendor command "sync"
9
9
  Then following has been conjured:
10
10
  | Name | testrepo |
11
11
  | Version | 10e9ac58c77bc229d8c59a5b4eb7422916453148 |
@@ -19,7 +19,7 @@ Scenario: Vendorificating a subdirectory from a git repo
19
19
  git "file://#{ENV['FIXTURES_DIR']}/git/testrepo",
20
20
  :subdirectory => 'test'
21
21
  """
22
- When I successfully run `vendor sync`
22
+ When I run vendor command "sync"
23
23
  Then following has been conjured:
24
24
  | Name | testrepo |
25
25
  | Version | 10e9ac58c77bc229d8c59a5b4eb7422916453148 |
@@ -33,7 +33,7 @@ Scenario: Vendorificating a certain branch from a git repo
33
33
  git "file://#{ENV['FIXTURES_DIR']}/git/testrepo",
34
34
  :branch => 'topic/pink'
35
35
  """
36
- When I successfully run `vendor sync`
36
+ When I run vendor command "sync"
37
37
  Then following has been conjured:
38
38
  | Name | testrepo |
39
39
  | Version | ecbfa229ba5f11c05b18bcc4f7c32b8f25d63f8c |
@@ -47,7 +47,7 @@ Scenario: Vendorificating a certain tag from a git repo
47
47
  git "file://#{ENV['FIXTURES_DIR']}/git/testrepo",
48
48
  :tag => 'email-v0'
49
49
  """
50
- When I successfully run `vendor sync`
50
+ When I run vendor command "sync"
51
51
  Then following has been conjured:
52
52
  | Name | testrepo |
53
53
  | Version | email-v0 |
@@ -62,7 +62,7 @@ Scenario: Vendorificating a certain revision from a git repo
62
62
  git "file://#{ENV['FIXTURES_DIR']}/git/testrepo",
63
63
  :revision => '6ff1be'
64
64
  """
65
- When I successfully run `vendor sync`
65
+ When I run vendor command "sync"
66
66
  Then following has been conjured:
67
67
  | Name | testrepo |
68
68
  | Version | 6ff1be9c3819c93a2f41e0ddc09f252fcf154f34 |
@@ -6,12 +6,12 @@ Scenario: already downloaded tarball
6
6
  archive :testrepo, :version => '0.1',
7
7
  :url => 'http://test-assets.3ofcoins.net.s3-website-us-east-1.amazonaws.com/testrepo-0.1.tar.gz'
8
8
  """
9
- When I successfully run `vendor sync`
9
+ When I run vendor command "sync"
10
10
  Then I'm on "master" branch
11
- And the last output should match /module\s+testrepo/
12
- And the last output should match "testrepo-0.1.tar.gz"
11
+ And the last vendor output should match /module\s+testrepo/
12
+ And the last vendor output should match "testrepo-0.1.tar.gz"
13
13
 
14
- When I successfully run `vendor sync`
15
- Then the last output should match /module\s+testrepo/
16
- And the last output should match /up to date\s+testrepo/
17
- And the last output should not match "testrepo-0.1.tar.gz"
14
+ When I run vendor command "sync"
15
+ Then the last vendor output should match /module\s+testrepo/
16
+ And the last vendor output should match /up to date\s+testrepo/
17
+ And the last vendor output should not match "testrepo-0.1.tar.gz"
@@ -12,16 +12,16 @@ Background:
12
12
  """
13
13
 
14
14
  Scenario: status new module
15
- When I successfully run `vendor status`
16
- Then the last output should match /new\s+generated\/0.23/
15
+ When I run vendor command "status"
16
+ Then the last vendor output should match /new\s+generated\/0.23/
17
17
 
18
18
  Scenario: status up-to-date module
19
- When I successfully run `vendor sync`
20
- And I successfully run `vendor status`
21
- Then the last output should match /up to date\s+generated\/0.23/
19
+ When I run vendor command "sync"
20
+ And I run vendor command "status"
21
+ Then the last vendor output should match /up to date\s+generated\/0.23/
22
22
 
23
23
  Scenario: status outdated modules
24
- When I successfully run `vendor sync`
24
+ When I run vendor command "sync"
25
25
  And I change Vendorfile to:
26
26
  """ruby
27
27
  vendor 'generated', :version => '0.42' do |v|
@@ -29,8 +29,8 @@ Scenario: status outdated modules
29
29
  File.open('VERSION', 'w') { |f| f.puts v.version }
30
30
  end
31
31
  """
32
- And I successfully run `vendor status`
33
- Then the last output should match /outdated\s+generated\/0.42/
32
+ And I run vendor command "status"
33
+ Then the last vendor output should match /outdated\s+generated\/0.42/
34
34
 
35
35
  Scenario: Module's dependencies are statused if they are known
36
36
  When I change Vendorfile to:
@@ -38,10 +38,10 @@ Scenario: Module's dependencies are statused if they are known
38
38
  require 'vendorificator/vendor/chef_cookbook'
39
39
  chef_cookbook 'memcached'
40
40
  """
41
- And I successfully run `vendor status`
42
- Then the last output should match /new\s+memcached/
43
- And the last output should not match "runit"
44
- When I successfully run `vendor sync`
45
- And I successfully run `vendor status`
46
- Then the last output should match /up to date\s+memcached/
47
- And the last output should match /up to date\s+runit/
41
+ And I run vendor command "status"
42
+ Then the last vendor output should match /new\s+memcached/
43
+ And the last vendor output should not match "runit"
44
+ When I run vendor command "sync"
45
+ And I run vendor command "status"
46
+ Then the last vendor output should match /up to date\s+memcached/
47
+ And the last vendor output should match /up to date\s+runit/
@@ -1,4 +1,3 @@
1
-
2
1
  Then /^the last output should match (#{PATTERN})$/ do |expected|
3
2
  assert { last_output =~ expected }
4
3
  end
@@ -7,6 +6,14 @@ Then /^the last output should not match (#{PATTERN})$/ do |expected|
7
6
  deny { last_output =~ expected }
8
7
  end
9
8
 
9
+ Then /^the last vendor output should match (#{PATTERN})$/ do |expected|
10
+ assert { mock_output =~ expected }
11
+ end
12
+
13
+ Then /^the last vendor output should not match (#{PATTERN})$/ do |expected|
14
+ deny { mock_output =~ expected }
15
+ end
16
+
10
17
  Then /^it should fail$/ do
11
18
  deny { last_exit_status == 0 }
12
19
  end
@@ -41,3 +41,14 @@ When /^I change Vendorfile to:$/ do |vendorfile_contents|
41
41
  write_file('Vendorfile', vendorfile_contents)
42
42
  run_simple 'git commit -m "Updated Vendorfile" Vendorfile'
43
43
  end
44
+
45
+ When /^I run vendor command "(.*)"$/ do |args|
46
+ args = args.split
47
+ args[0] = args[0].to_sym
48
+
49
+ Dir.chdir(current_dir) do
50
+ with_redirected_stdout do
51
+ Vendorificator::CLI.start args
52
+ end
53
+ end
54
+ end
@@ -1,4 +1,5 @@
1
1
  require 'shellwords'
2
+ require 'stringio'
2
3
 
3
4
  module Vendorificator
4
5
  module TestSupport
@@ -8,15 +9,15 @@ module Vendorificator
8
9
  end
9
10
 
10
11
  def last_stdout
11
- last_process.stdout(@aruba_keep_ansi)
12
+ unescape last_process.stdout
12
13
  end
13
14
 
14
15
  def last_stderr
15
- last_process.stderr(@aruba_keep_ansi)
16
+ unescape last_process.stderr
16
17
  end
17
18
 
18
19
  def last_output
19
- last_stdout + last_stderr
20
+ unescape(last_stdout + last_stderr)
20
21
  end
21
22
 
22
23
  def without_bundler(cmd)
@@ -24,6 +25,48 @@ module Vendorificator
24
25
  ].map { |v| "unset #{v} ; " }.join << cmd
25
26
  "sh -c #{Shellwords.escape(cmd)}"
26
27
  end
28
+
29
+ def with_redirected_stdout(&block)
30
+ redirect_stdout
31
+ yield
32
+ bring_back_stdout
33
+ end
34
+
35
+ def mock_stdout
36
+ unescape @stdout_cache
37
+ end
38
+
39
+ def mock_stderr
40
+ unescape @stderr_cache
41
+ end
42
+
43
+ def mock_output
44
+ mock_stdout + mock_stderr
45
+ end
46
+
47
+ private
48
+
49
+ def redirect_stdout
50
+ @stdout_cache = ''
51
+ @stderr_cache = ''
52
+
53
+ @stdout_redirected = true
54
+ @orig_stdout = $stdout
55
+ @orig_stderr = $stderr
56
+ $stdout = @mock_stdout = StringIO.new
57
+ $stderr = @mock_stderr = StringIO.new
58
+ end
59
+
60
+ def bring_back_stdout
61
+ @stdout_cache = @mock_stderr.string
62
+ @stderr_cache = @mock_stdout.string
63
+
64
+ @stdout_redirected = false
65
+ $stdout = @orig_stdout
66
+ $stderr = @orig_stderr
67
+ @orig_stdout = @mock_stdout = nil
68
+ @orig_stderr = @mock_stderr = nil
69
+ end
27
70
  end
28
71
  end
29
72
  end
@@ -5,6 +5,8 @@ require 'tmpdir'
5
5
  require 'aruba/cucumber'
6
6
  require 'wrong'
7
7
 
8
+ require 'vendorificator/cli'
9
+
8
10
  ENV['GIT_AUTHOR_NAME'] = ENV['GIT_COMMITTER_NAME'] = 'Vendorificator Cucumber'
9
11
  ENV['GIT_AUTHOR_EMAIL'] = ENV['GIT_COMMITTER_EMAIL'] = 'nonexistent@example.com'
10
12
 
@@ -5,7 +5,7 @@ Scenario: just URL as name
5
5
  """ruby
6
6
  archive 'http://test-assets.3ofcoins.net.s3-website-us-east-1.amazonaws.com/testrepo-0.1.tar.gz'
7
7
  """
8
- When I successfully run `vendor sync`
8
+ When I run vendor command "sync"
9
9
  Then following has been conjured:
10
10
  | Name | testrepo-0.1 |
11
11
  | Version | testrepo-0.1.tar.gz |
@@ -17,7 +17,7 @@ Scenario: URL as keyword
17
17
  archive :testrepo,
18
18
  :url => 'http://test-assets.3ofcoins.net.s3-website-us-east-1.amazonaws.com/testrepo-0.1.tar.gz'
19
19
  """
20
- When I successfully run `vendor sync`
20
+ When I run vendor command "sync"
21
21
  Then following has been conjured:
22
22
  | Name | testrepo |
23
23
  | Version | testrepo-0.1.tar.gz |
@@ -31,7 +31,7 @@ Scenario: Version & checksum
31
31
  :version => '0.1',
32
32
  :checksum => 'ea207a896f929ffb3a1dfe128332d6134a18edab7c01b97bfb2b1c7eacebe0cb'
33
33
  """
34
- When I successfully run `vendor sync`
34
+ When I run vendor command "sync"
35
35
  Then following has been conjured:
36
36
  | Name | testrepo |
37
37
  | Version | 0.1 |
@@ -60,7 +60,7 @@ Scenario: Tarball without a root directory
60
60
  archive :testrepo,
61
61
  :url => 'http://test-assets.3ofcoins.net.s3-website-us-east-1.amazonaws.com/testrepo-0.1-noroot.tar.gz'
62
62
  """
63
- When I successfully run `vendor sync`
63
+ When I run vendor command "sync"
64
64
  Then following has been conjured:
65
65
  | Name | testrepo |
66
66
  | With file | test/alias.c |
@@ -8,7 +8,7 @@ Scenario:
8
8
  FileUtils::rm Dir['test/archive*.c']
9
9
  end
10
10
  """
11
- When I successfully run `vendor sync`
11
+ When I run vendor command "sync"
12
12
  Then following has been conjured:
13
13
  | Name | testrepo |
14
14
  | With file | test/alias.c |
@@ -20,7 +20,7 @@ Scenario: Use Gem bundler to download rubygems, and Vendorificator to vendor the
20
20
  source "file://#{ENV['FIXTURES_DIR']}/rubygems"
21
21
  gem "hello"
22
22
  """
23
- When I successfully run `vendor sync`
23
+ When I run vendor command "sync"
24
24
  Then following has been conjured:
25
25
  | Name | bundler |
26
26
  | Path | cache |
@@ -33,7 +33,7 @@ Scenario: Bundler correctly downloads and caches dependencies
33
33
  source "file://#{ENV['FIXTURES_DIR']}/rubygems"
34
34
  gem "first"
35
35
  """
36
- When I successfully run `vendor sync`
36
+ When I run vendor command "sync"
37
37
  Then following has been conjured:
38
38
  | Name | bundler |
39
39
  | Path | cache |
@@ -47,7 +47,7 @@ Scenario: directory contents are completely replaced on re-vendoring
47
47
  source "file://#{ENV['FIXTURES_DIR']}/rubygems"
48
48
  gem "hello"
49
49
  """
50
- When I successfully run `vendor sync`
50
+ When I run vendor command "sync"
51
51
  Then following has been conjured:
52
52
  | Name | bundler |
53
53
  | Path | cache |
@@ -58,7 +58,7 @@ Scenario: directory contents are completely replaced on re-vendoring
58
58
  source "file://#{ENV['FIXTURES_DIR']}/rubygems"
59
59
  gem "first"
60
60
  """
61
- And I successfully run `vendor sync`
61
+ And I run vendor command "sync"
62
62
  Then following has been conjured:
63
63
  | Name | bundler |
64
64
  | Path | cache |
@@ -14,7 +14,7 @@ Scenario: rubygems_bundler
14
14
  source "file://#{ENV['FIXTURES_DIR']}/rubygems"
15
15
  gem "hello"
16
16
  """
17
- When I successfully run `vendor sync`
17
+ When I run vendor command "sync"
18
18
  Then following has been conjured:
19
19
  | Name | rubygems |
20
20
  | Path | cache |
@@ -35,7 +35,7 @@ Scenario: chef_berkshelf
35
35
  And I successfully run `berks install`
36
36
  And I successfully run `git add Berksfile Berksfile.lock`
37
37
  And I successfully run `git commit -m Berksfile`
38
- When I successfully run `vendor sync`
38
+ When I run vendor command "sync"
39
39
  Then following has been conjured:
40
40
  | Name | cookbooks |
41
41
  | With file | build-essential/metadata.rb |
@@ -9,7 +9,7 @@ Scenario:
9
9
  File.open('VERSION', 'w') { |f| f.puts v.version }
10
10
  end
11
11
  """
12
- When I successfully run `vendor sync`
12
+ When I run vendor command "sync"
13
13
  Then the following has been conjured:
14
14
  | Name | generated |
15
15
  | Version | 0.23 |
@@ -197,7 +197,7 @@ module Vendorificator
197
197
  :vendorificator_version => ::Vendorificator::VERSION,
198
198
  :current_branch => git.capturing.rev_parse({:abbrev_ref => true}, 'HEAD').strip,
199
199
  :current_sha => git.capturing.rev_parse('HEAD').strip,
200
- :git_describe => (git.capturing.describe.strip rescue '')
200
+ :git_describe => (git.capturing.describe(:always => true).strip rescue '')
201
201
  }
202
202
  end
203
203
 
@@ -21,9 +21,9 @@ module Vendorificator
21
21
  File.join(git.git_work_tree, spec),
22
22
  verbose: true
23
23
  end
24
- Dir.chdir(git.git_work_tree) do
25
- system self.command or raise RuntimeError, "Command failed"
26
- end
24
+ end
25
+ Dir.chdir(git.git_work_tree) do
26
+ system self.command or raise RuntimeError, "Command failed"
27
27
  end
28
28
  end
29
29
 
@@ -162,11 +162,17 @@ module Vendorificator
162
162
 
163
163
  def in_branch(options={}, &block)
164
164
  branch_exists = !!self.head
165
+ notes_exist = begin
166
+ git.capturing.rev_parse({verify: true, quiet: true}, 'refs/notes/vendor')
167
+ rescue MiniGit::GitError
168
+ nil
169
+ end
165
170
  Dir.mktmpdir("vendor-#{category}-#{name}") do |tmpdir|
166
171
  clone_opts = {:shared => true, :no_checkout => true}
167
172
  clone_opts[:branch] = branch_name if branch_exists
168
173
  MiniGit.git(:clone, clone_opts, git.git_dir, tmpdir)
169
174
  tmpgit = MiniGit::new(tmpdir)
175
+ tmpgit.fetch(git.git_dir, "refs/notes/vendor:refs/notes/vendor") if notes_exist
170
176
  tmpgit.checkout({orphan: true}, branch_name) unless branch_exists
171
177
  tmpgit.rm( { :r => true, :f => true, :q => true, :ignore_unmatch => true }, '.') if options[:clean] || !branch_exists
172
178
 
@@ -182,8 +188,8 @@ module Vendorificator
182
188
  git.fetch(tmpdir)
183
189
  git.fetch({tags: true}, tmpdir)
184
190
  git.fetch(tmpdir,
185
- "+refs/heads/#{branch_name}:refs/heads/#{branch_name}",
186
- "+refs/notes/vendor:refs/notes/vendor")
191
+ "refs/heads/#{branch_name}:refs/heads/#{branch_name}",
192
+ "refs/notes/vendor:refs/notes/vendor")
187
193
  end
188
194
  end
189
195
 
@@ -223,7 +229,7 @@ module Vendorificator
223
229
  commit_and_annotate(options[:metadata])
224
230
  end
225
231
  # Merge back to the original branch
226
- git.merge( {:no_edit => true, :no_ff => true}, branch_name )
232
+ git.capturing.merge( {:no_edit => true, :no_ff => true}, branch_name )
227
233
  postprocess! if self.respond_to? :postprocess!
228
234
  compute_dependencies!
229
235
  ensure
@@ -330,10 +336,10 @@ module Vendorificator
330
336
  #
331
337
  # Returns nothing.
332
338
  def commit_and_annotate(environment_metadata = {})
333
- git.add work_dir, *git_add_extra_paths
334
- git.commit :m => conjure_commit_message
335
- git.notes({:ref => 'vendor'}, 'add', {:m => conjure_note(environment_metadata)}, 'HEAD')
336
- git.tag( { :a => true, :m => tag_message }, tag_name )
339
+ git.capturing.add work_dir, *git_add_extra_paths
340
+ git.capturing.commit :m => conjure_commit_message
341
+ git.capturing.notes({:ref => 'vendor'}, 'add', {:m => conjure_note(environment_metadata)}, 'HEAD')
342
+ git.capturing.tag( { :a => true, :m => tag_message }, tag_name )
337
343
  shell.say_status :tag, tag_name
338
344
  end
339
345
 
@@ -16,14 +16,20 @@ Gem::Specification.new do |gem|
16
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
17
  gem.name = "vendorificator"
18
18
  gem.require_paths = ["lib"]
19
- gem.version = Vendorificator::VERSION
19
+ gem.version = if ENV['PRERELEASE']
20
+ require 'minigit'
21
+ git_desc = MiniGit::Capturing.new(__FILE__).describe.strip.gsub('-', '.')
22
+ Gem::Version.new(Vendorificator::VERSION).bump.to_s << ".git.#{git_desc}"
23
+ else
24
+ Vendorificator::VERSION
25
+ end
20
26
 
21
27
  gem.add_dependency 'escape'
22
28
  gem.add_dependency 'thor', '>= 0.18.1'
23
29
  gem.add_dependency 'minigit', '>= 0.0.3'
24
30
  gem.add_dependency 'awesome_print'
25
31
 
26
- gem.add_development_dependency 'aruba', '0.5.1'
32
+ gem.add_development_dependency 'aruba', '0.5.3'
27
33
  gem.add_development_dependency 'cucumber', '~> 2.0'
28
34
  gem.add_development_dependency 'mocha', '>= 0.14.0'
29
35
  gem.add_development_dependency 'chef', '>= 10.16.0' unless is_jruby
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vendorificator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
5
- prerelease:
4
+ version: 0.5.git.v0.4.0.17.g26d50d8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Maciej Pasternacki
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-06 00:00:00.000000000 Z
11
+ date: 2013-07-17 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: escape
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: thor
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: minigit
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: awesome_print
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,23 +69,20 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: aruba
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - '='
84
74
  - !ruby/object:Gem::Version
85
- version: 0.5.1
75
+ version: 0.5.3
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - '='
92
81
  - !ruby/object:Gem::Version
93
- version: 0.5.1
82
+ version: 0.5.3
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: cucumber
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: mocha
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ! '>='
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ! '>='
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: chef
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - ! '>='
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - ! '>='
140
123
  - !ruby/object:Gem::Version
@@ -142,7 +125,6 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: berkshelf
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
129
  - - ! '>='
148
130
  - !ruby/object:Gem::Version
@@ -150,7 +132,6 @@ dependencies:
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
136
  - - ! '>='
156
137
  - !ruby/object:Gem::Version
@@ -158,7 +139,6 @@ dependencies:
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: vcr
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
143
  - - ! '>='
164
144
  - !ruby/object:Gem::Version
@@ -166,7 +146,6 @@ dependencies:
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
150
  - - ! '>='
172
151
  - !ruby/object:Gem::Version
@@ -174,7 +153,6 @@ dependencies:
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: webmock
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
157
  - - ! '>='
180
158
  - !ruby/object:Gem::Version
@@ -182,7 +160,6 @@ dependencies:
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
164
  - - ! '>='
188
165
  - !ruby/object:Gem::Version
@@ -190,7 +167,6 @@ dependencies:
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: wrong
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
171
  - - ! '>='
196
172
  - !ruby/object:Gem::Version
@@ -198,7 +174,6 @@ dependencies:
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
178
  - - ! '>='
204
179
  - !ruby/object:Gem::Version
@@ -206,7 +181,6 @@ dependencies:
206
181
  - !ruby/object:Gem::Dependency
207
182
  name: rake
208
183
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
184
  requirements:
211
185
  - - ! '>='
212
186
  - !ruby/object:Gem::Version
@@ -214,7 +188,6 @@ dependencies:
214
188
  type: :development
215
189
  prerelease: false
216
190
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
191
  requirements:
219
192
  - - ! '>='
220
193
  - !ruby/object:Gem::Version
@@ -222,7 +195,6 @@ dependencies:
222
195
  - !ruby/object:Gem::Dependency
223
196
  name: simplecov
224
197
  requirement: !ruby/object:Gem::Requirement
225
- none: false
226
198
  requirements:
227
199
  - - ! '>='
228
200
  - !ruby/object:Gem::Version
@@ -230,7 +202,6 @@ dependencies:
230
202
  type: :development
231
203
  prerelease: false
232
204
  version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
205
  requirements:
235
206
  - - ! '>='
236
207
  - !ruby/object:Gem::Version
@@ -238,7 +209,6 @@ dependencies:
238
209
  - !ruby/object:Gem::Dependency
239
210
  name: minitest
240
211
  requirement: !ruby/object:Gem::Requirement
241
- none: false
242
212
  requirements:
243
213
  - - ~>
244
214
  - !ruby/object:Gem::Version
@@ -246,7 +216,6 @@ dependencies:
246
216
  type: :development
247
217
  prerelease: false
248
218
  version_requirements: !ruby/object:Gem::Requirement
249
- none: false
250
219
  requirements:
251
220
  - - ~>
252
221
  - !ruby/object:Gem::Version
@@ -360,33 +329,26 @@ files:
360
329
  - vendorificator.gemspec
361
330
  homepage: https://github.com/3ofcoins/vendorificator/
362
331
  licenses: []
332
+ metadata: {}
363
333
  post_install_message:
364
334
  rdoc_options: []
365
335
  require_paths:
366
336
  - lib
367
337
  required_ruby_version: !ruby/object:Gem::Requirement
368
- none: false
369
338
  requirements:
370
339
  - - ! '>='
371
340
  - !ruby/object:Gem::Version
372
341
  version: '0'
373
- segments:
374
- - 0
375
- hash: -228954601075819929
376
342
  required_rubygems_version: !ruby/object:Gem::Requirement
377
- none: false
378
343
  requirements:
379
- - - ! '>='
344
+ - - ! '>'
380
345
  - !ruby/object:Gem::Version
381
- version: '0'
382
- segments:
383
- - 0
384
- hash: -228954601075819929
346
+ version: 1.3.1
385
347
  requirements: []
386
348
  rubyforge_project:
387
- rubygems_version: 1.8.25
349
+ rubygems_version: 2.0.5
388
350
  signing_key:
389
- specification_version: 3
351
+ specification_version: 4
390
352
  summary: Integrate third-party vendor modules into your git repository
391
353
  test_files:
392
354
  - features/chef_cookbook.feature