vendorificator 0.5.git.v0.4.0.60.g9c35209 → 0.5.git.v0.4.0.63.g8e9d54d

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWI0NzRjOTRjNDkzZTI2NjkyY2NhZDJhYjE4NDU3NGI5ZDIyZTY4Zg==
4
+ YTc4NGQ5NzBiMmUyNzA4MGI5MjJhNDNmMmVmMWM0Y2JlZjZkMjlmOQ==
5
5
  data.tar.gz: !binary |-
6
- ZWQwNTNhNWFhMTY5ZDhhZWM0MjJjMTI2Y2IzZGU2ZTQ3NGY2ZGZlZA==
6
+ ZTJmMmY3NGJlZDUwMWQ1YWQ0NzFhZjczYmYyYjE3ZTc2ODc4NWU3Nw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- Y2Q1MDc2YjNmMzgxMWI1N2RhNjRmMWVkYzYzYTAyMjA4MTYzMjMwNmVkZmJi
10
- MmNkY2FkN2VmMGM4MzdlMDFkM2VlMmZiYTM5MmRjM2VmM2M2YzJhNTk2M2Vh
11
- M2FlNmQ5M2EzYjZhODNjYmZiNGIwZmViNGNlZmVjZDhjZTU4YjQ=
9
+ ODE3NmJhZTliZmMwMzk1NjQ3M2I5MjRmNjk1NzA1MDI5MWFkZDY0MGQ1MTQy
10
+ NjA3NTc2ZTNhOWFiZmRlMGFkMjA3ZDFjOTQ0ZTc0MDM0NWFjNjVkOTIzNTc2
11
+ ZjYyMTA1ODcyMTVmNzY4ODg3MGZhOWI4OWUwYTgwODliZDJkMmY=
12
12
  data.tar.gz: !binary |-
13
- YjE3ZjE1MjYzYTc4NjFiZWU3MTM1MGI5MGE1OWQ4ZWZiZjY2NmZlMDFjNzFl
14
- MTRhOTA1Yjc4N2ZlOTQ0ZWI3ZDk5ODAyZWFlZGJjMjE4MzhhM2FiNTA5NWJh
15
- YTdlYjliY2MyNDIzMmFiNjY0MjQzYzhkM2RjMjhjZjEwYzM0ZjY=
13
+ YzA5OGQ2NjgzYzY5NGY2MjZiZDRhMDNjNjFiNGY1Y2NhMGU4MTkyYTAyNGZh
14
+ ZjA0Y2I4OWRiNjkyNjI1N2Q4MTQwMzVjMmE1NmE3MTk2MTg2N2NkMGZkMzEx
15
+ Nzc4Nzc2YjNiZDA5OWVlZjY1NDM4Y2M3ZmVhZjY3N2ViNDIyOWE=
@@ -40,3 +40,25 @@ Scenario: chef_berkshelf
40
40
  | Name | cookbooks |
41
41
  | With file | build-essential/metadata.rb |
42
42
 
43
+ @berkshelf
44
+ Scenario: postprocessing tool
45
+ Given a repository with following Vendorfile:
46
+ """ruby
47
+ chef_berkshelf do
48
+ FileUtils::rm_rf 'runit'
49
+ end
50
+ """
51
+ And a file named "Berksfile" with:
52
+ """ruby
53
+ site :opscode
54
+ cookbook 'runit'
55
+ """
56
+ And I successfully run `berks install`
57
+ And I successfully run `git add Berksfile Berksfile.lock`
58
+ And I successfully run `git commit -m Berksfile`
59
+ When I run vendor command "install"
60
+ Then following has been conjured:
61
+ | Name | cookbooks |
62
+ | With file | build-essential/metadata.rb |
63
+ | With file | yum/metadata.rb |
64
+ | Without file | runit/metadata.rb |
@@ -25,6 +25,7 @@ module Vendorificator
25
25
  Dir.chdir(git.git_work_tree) do
26
26
  system self.command or raise RuntimeError, "Command failed"
27
27
  end
28
+ super
28
29
  end
29
30
 
30
31
  def git_add_extra_paths
@@ -43,18 +44,20 @@ module Vendorificator
43
44
  class Config
44
45
  register_module :tool, Vendor::Tool
45
46
 
46
- def rubygems_bundler
47
+ def rubygems_bundler(&block)
47
48
  tool 'rubygems',
48
49
  :path => 'cache', # Hardcoded, meh
49
50
  :specs => [ 'Gemfile', 'Gemfile.lock' ],
50
- :command => 'bundle package --all'
51
+ :command => 'bundle package --all',
52
+ &block
51
53
  end
52
54
 
53
- def chef_berkshelf
55
+ def chef_berkshelf(&block)
54
56
  tool 'cookbooks',
55
57
  :path => 'cookbooks',
56
58
  :specs => [ 'Berksfile', 'Berksfile.lock' ],
57
- :command => 'berks install --path vendor/cookbooks'
59
+ :command => 'berks install --path vendor/cookbooks',
60
+ &block
58
61
  end
59
62
  end
60
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vendorificator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.git.v0.4.0.60.g9c35209
4
+ version: 0.5.git.v0.4.0.63.g8e9d54d
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Pasternacki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-03 00:00:00.000000000 Z
11
+ date: 2013-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: escape