vendorificator 0.5.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OWU4MzczODMxMGY1Y2NjZGQ1MWQxMWRhOWM3Y2VmZGQ5Y2NhNDZhOQ==
5
- data.tar.gz: !binary |-
6
- Yzc5ZWM0ZmQwMjI2YmRiYjRkZGJhN2U2ZDkyYTI3OTg4NzYyNzZjYg==
2
+ SHA1:
3
+ metadata.gz: 8ffc895a9d38852ab78248d83caf1f8551f6d605
4
+ data.tar.gz: ea5398c3ad6c7eb2be54603c01d5ee9b5cf23992
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NjMxNzIwYzRlY2M2NGFjMjZmNTZhOWU5Y2E0MTMyY2UzNzMyNmViNzdlOTFl
10
- MWQwNTkxMjkzN2NlZDNiNjg5NmJiMTJkNDNiY2M4NzUyNDM3ODYwODUyNzA4
11
- MTA5YTM1YmE0NmU1ZWVmZDNjMGI1MmIzZTIxOTYyNzczOWM3NDQ=
12
- data.tar.gz: !binary |-
13
- ZGRkNzQ3ZGI3ZDFmNGY4YTFmMGZiOTY3OGI1OGFkZWNkNWE1ZGNjMjZmNTQw
14
- NThiZGZjNDEwOTMyNDVlNGExZTdjYWRhNjVmYmMzZGU4MjMzNjM4N2U3NjUx
15
- MThlN2I0ZDdkMDY0MTIxMmQ1NjBlMzU3MDljMzdiOWRkNzAyN2U=
6
+ metadata.gz: 067d8f2c47caf0f5596378b9aa231febfec4fe1907454dc2a1f257c787f51f49b030718b23f1a04f4985fab5044bda30343ac4af70b816f38bd4ff0b0ae7ef65
7
+ data.tar.gz: c40b008a5c19afb24953f27ec0d3a355a39be539df8de5d9b7c909389447bbf60b25432453f5c5e39308cdaf8ee11e80bbaa178c1e9d30918e6daaf41b4c663a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ## 0.6.0
4
+
5
+ - Fixed output for many commands
6
+ - Support Berkshelf 3
7
+
3
8
  ## 0.5.3
4
9
 
5
10
  - Fixed `vendor pull` from a clone that haven't run vendor commands
data/Gemfile CHANGED
@@ -11,5 +11,4 @@ end
11
11
  group :development_workstation do
12
12
  gem "pry"
13
13
  gem "awesome_print"
14
- gem 'debugger', :platforms => :mri
15
14
  end
data/README.md CHANGED
@@ -258,9 +258,9 @@ Vendorificator. Takes the same arguments as `vendor`, plus:
258
258
  won't be committed to the vendor branch together with specs and
259
259
  dependencies
260
260
 
261
- Two convenience shortcuts are provided, `rubygems_bundler`, and
262
- `chef_berkshelf`. They take no arguments. Their definitions are
263
- examples as well:
261
+ Two convenience shortcuts are provided, `rubygems_bundler`,
262
+ and `chef_berkshelf`. Their definitions are examples
263
+ as well:
264
264
 
265
265
  ```ruby
266
266
  tool 'rubygems', # <- rubygems_bundler
@@ -273,9 +273,20 @@ tool 'rubygems', # <- rubygems_bundler
273
273
  tool 'cookbooks', # <- chef_berkshelf
274
274
  :path => 'cookbooks',
275
275
  :specs => [ 'Berksfile', 'Berksfile.lock' ],
276
- :command => 'berks install --path vendor/cookbooks'
276
+ :command => 'berks vendor vendor/cookbooks'
277
277
  ```
278
278
 
279
+ `rubygems_bundler` takes no arguments and it passes block to `tool`.
280
+
281
+ `chef_berkshelf` takes following arguments:
282
+
283
+ - `:path` (default: `'cookbooks'`) -- path to save cookbooks
284
+ - `:specs` (array, always present: `Berksfile` and `Berksfile.lock`)
285
+ -- files treated as specs (you can specify `metadata.rb` files of your
286
+ local cookbooks to include their dependencies automatically)
287
+ - `:berks2` (default: false) -- if set to `true`, use command for
288
+ Berkshelf 2 (default is Berkshelf 3)
289
+
279
290
  #### overlay
280
291
 
281
292
  Overlays multiple modules in the same directory, instead of each of them being
@@ -73,7 +73,7 @@ Scenario: Getting module list
73
73
  """
74
74
  When I run vendor command "install"
75
75
  And I run vendor command "list"
76
- Then the last vendor output should match /Module: generated, version: 0.23/
76
+ Then the last vendor output should match /generated \(0\.23\)/
77
77
 
78
78
  Scenario: Getting list of outdated modules
79
79
  Given a repository with following Vendorfile:
@@ -29,7 +29,7 @@ Scenario: chef_berkshelf
29
29
  """
30
30
  And a file named "Berksfile" with:
31
31
  """ruby
32
- site :opscode
32
+ source 'https://api.berkshelf.com'
33
33
  cookbook 'build-essential'
34
34
  """
35
35
  And I successfully run `berks install`
@@ -37,8 +37,8 @@ Scenario: chef_berkshelf
37
37
  And I successfully run `git commit -m Berksfile`
38
38
  When I run vendor command "install"
39
39
  Then following has been conjured:
40
- | Name | cookbooks |
41
- | With file | build-essential/metadata.rb |
40
+ | Name | cookbooks |
41
+ | With file | build-essential/metadata.json |
42
42
 
43
43
  @berkshelf
44
44
  Scenario: postprocessing tool
@@ -50,7 +50,7 @@ Scenario: postprocessing tool
50
50
  """
51
51
  And a file named "Berksfile" with:
52
52
  """ruby
53
- site :opscode
53
+ source 'https://api.berkshelf.com'
54
54
  cookbook 'runit'
55
55
  """
56
56
  And I successfully run `berks install`
@@ -58,7 +58,7 @@ Scenario: postprocessing tool
58
58
  And I successfully run `git commit -m Berksfile`
59
59
  When I run vendor command "install"
60
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 |
61
+ | Name | cookbooks |
62
+ | With file | build-essential/metadata.json |
63
+ | With file | yum/metadata.json |
64
+ | Without file | runit/metadata.json |
@@ -139,7 +139,7 @@ module Vendorificator
139
139
  load_vendorfile
140
140
 
141
141
  each_segment do |mod|
142
- shell.say "Module: #{mod.name}, version: #{mod.version}"
142
+ say :default, "#{mod.name} (#{mod.version})"
143
143
  end
144
144
  end
145
145
 
@@ -1,40 +1,28 @@
1
1
  require 'stringio'
2
2
 
3
3
  module Vendorificator
4
- class IOProxy < StringIO
4
+ class IOProxy
5
5
  attr_reader :shell
6
6
 
7
7
  def initialize(shell, verbosity = :default)
8
8
  @shell = shell
9
9
  @verbosity = verbosity
10
-
11
- super()
12
- capture_stdout
13
10
  end
14
11
 
15
12
  def puts(value, verb_level = :default)
16
13
  @orig_stdout.puts value if should_speak?(verb_level)
17
- super
18
14
  end
19
15
 
20
16
  def say_status(verb_level, *args)
21
- write args[0..1].join(' ' * @shell.padding)
22
17
  @shell.say_status(*args) if @shell && should_speak?(verb_level)
23
18
  end
24
19
 
25
20
  def say(verb_level, *args)
26
- write args[0]
27
21
  @shell.say(*args) if @shell && should_speak?(verb_level)
28
22
  end
29
23
 
30
24
  private
31
25
 
32
- def capture_stdout
33
- @orig_stdout = $stdout
34
-
35
- $stdout = self
36
- end
37
-
38
26
  def should_speak?(level)
39
27
  levels = {:quiet => 1, :default => 2, :chatty => 3, :debug => 9}
40
28
  raise "Unknown verbosity level: #{level.inspect}" if levels[level].nil?
@@ -73,7 +73,11 @@ module Vendorificator
73
73
  args[:path] ||= 'cookbooks'
74
74
  args[:specs] ||= []
75
75
  args[:specs] |= [ 'Berksfile', 'Berksfile.lock' ]
76
- args[:command] = "berks install --path vendor/#{args[:path]}"
76
+ if args[:berks2]
77
+ args[:command] = "berks install --path vendor/#{args[:path]}"
78
+ else
79
+ args[:command] = "berks vendor vendor/#{args[:path]}"
80
+ end
77
81
  tool 'cookbooks', args, &block
78
82
  end
79
83
  end
@@ -1,3 +1,3 @@
1
1
  module Vendorificator
2
- VERSION = "0.5.3"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,223 +1,223 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vendorificator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Pasternacki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-08 00:00:00.000000000 Z
11
+ date: 2014-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: escape
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.18.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.18.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minigit
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.0.3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.0.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: awesome_print
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: aruba
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.5.3
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.5.3
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: cucumber
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.3.10
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.3.10
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: mocha
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ! '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.14.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ! '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.14.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: berkshelf
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ! '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ! '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: vcr
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ! '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ! '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: webmock
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ! '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ! '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: wrong
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0.7'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.7'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rake
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ! '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ! '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: simplecov
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ! '>='
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ! '>='
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: tee
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ~>
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
201
  version: '1.0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ~>
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: '1.0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: minitest
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ~>
213
+ - - "~>"
214
214
  - !ruby/object:Gem::Version
215
215
  version: '5.2'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ~>
220
+ - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: '5.2'
223
223
  description: Vendor everything. Stay sane.
@@ -229,8 +229,8 @@ executables:
229
229
  extensions: []
230
230
  extra_rdoc_files: []
231
231
  files:
232
- - .gitignore
233
- - .travis.yml
232
+ - ".gitignore"
233
+ - ".travis.yml"
234
234
  - CHANGELOG.md
235
235
  - Gemfile
236
236
  - LICENSE
@@ -388,17 +388,17 @@ require_paths:
388
388
  - lib
389
389
  required_ruby_version: !ruby/object:Gem::Requirement
390
390
  requirements:
391
- - - ! '>='
391
+ - - ">="
392
392
  - !ruby/object:Gem::Version
393
393
  version: '0'
394
394
  required_rubygems_version: !ruby/object:Gem::Requirement
395
395
  requirements:
396
- - - ! '>='
396
+ - - ">="
397
397
  - !ruby/object:Gem::Version
398
398
  version: '0'
399
399
  requirements: []
400
400
  rubyforge_project:
401
- rubygems_version: 2.1.11
401
+ rubygems_version: 2.2.2
402
402
  signing_key:
403
403
  specification_version: 4
404
404
  summary: Integrate third-party vendor modules into your git repository