@@ -105,180 +105,20 @@ RDoc::Task.new rdoc: "docs", clobber_rdoc: "clobber_docs" do |doc|
105105 doc . rdoc_dir = "doc"
106106end
107107
108- # No big deal if Automatiek is not available. This might be just because
109- # `rake` is executed from release tarball.
110- if File . exist? ( "tool/automatiek.rake" )
111- load "tool/automatiek.rake"
112-
113- # We currently ship Molinillo master branch as of
114- # https://github.com/CocoaPods/Molinillo/commit/7cc27a355e861bdf593e2cde7bf1bca3daae4303
115- desc "Vendor a specific version of molinillo to rubygems"
116- Automatiek ::RakeTask . new ( "molinillo" ) do |lib |
117- lib . version = "master"
118- lib . download = { github : "https://github.com/CocoaPods/Molinillo" }
119- lib . namespace = "Molinillo"
120- lib . prefix = "Gem::Resolver"
121- lib . vendor_lib = "lib/rubygems/resolver/molinillo"
122- lib . license_path = "LICENSE"
123-
124- lib . dependency ( "tsort" ) do |sublib |
125- sublib . version = "v0.2.0"
126- sublib . download = { github : "https://github.com/ruby/tsort" }
127- sublib . namespace = "TSort"
128- sublib . prefix = "Gem"
129- sublib . vendor_lib = "lib/rubygems/tsort"
130- sublib . license_path = "LICENSE.txt"
131- end
108+ namespace :vendor do
109+ task :bundle do
110+ sh ( { "BUNDLE_PATH" => "../../tmp/vendor" , "BUNDLER_GEM_DEFAULT_DIR" => "../../tmp/vendor" } , "ruby" , "--disable-gems" , "-r./bundler/spec/support/hax.rb" , "-I" , "lib" , "bundler/spec/support/bundle.rb" , "install" , "--gemfile=tool/bundler/vendor_gems.rb" )
132111 end
133112
134- # We currently ship optparse 0.3.0 plus the following changes:
135- # * Remove top aliasing the `::OptParse` constant to `OptionParser`, since we
136- # don't need it and it triggers redefinition warnings since the default
137- # optparse gem also does the aliasing.
138- # * Add an empty .document file to the library's root path to hint RDoc that
139- # this library should not be documented.
140- desc "Vendor a specific version of optparse to rubygems"
141- Automatiek ::RakeTask . new ( "optparse" ) do |lib |
142- lib . version = "v0.4.0"
143- lib . download = { github : "https://github.com/ruby/optparse" }
144- lib . namespace = "OptionParser"
145- lib . prefix = "Gem"
146- lib . vendor_lib = "lib/rubygems/optparse"
147- lib . license_path = "COPYING"
148- end
149-
150- desc "Vendor a specific version of pub_grub to bundler"
151- Automatiek ::RakeTask . new ( "pub_grub" ) do |lib |
152- lib . version = "main"
153- lib . download = { github : "https://github.com/jhawthorn/pub_grub" }
154- lib . namespace = "PubGrub"
155- lib . prefix = "Bundler"
156- lib . vendor_lib = "bundler/lib/bundler/vendor/pub_grub"
157- lib . license_path = "LICENSE.txt"
158- end
159-
160- desc "Vendor a specific version of tsort to bundler"
161- Automatiek ::RakeTask . new ( "tsort" ) do |lib |
162- lib . version = "v0.2.0"
163- lib . download = { github : "https://github.com/ruby/tsort" }
164- lib . namespace = "TSort"
165- lib . prefix = "Bundler"
166- lib . vendor_lib = "bundler/lib/bundler/vendor/tsort"
167- lib . license_path = "LICENSE.txt"
168- end
169-
170- desc "Vendor a specific version of thor to bundler"
171- Automatiek ::RakeTask . new ( "thor" ) do |lib |
172- lib . version = "v1.3.0"
173- lib . download = { github : "https://github.com/rails/thor" }
174- lib . namespace = "Thor"
175- lib . prefix = "Bundler"
176- lib . vendor_lib = "bundler/lib/bundler/vendor/thor"
177- lib . license_path = "LICENSE.md"
178- end
179-
180- desc "Vendor a specific version of fileutils to bundler"
181- Automatiek ::RakeTask . new ( "fileutils" ) do |lib |
182- lib . version = "v1.7.2"
183- lib . download = { github : "https://github.com/ruby/fileutils" }
184- lib . namespace = "FileUtils"
185- lib . prefix = "Bundler"
186- lib . vendor_lib = "bundler/lib/bundler/vendor/fileutils"
187- lib . license_path = "LICENSE.txt"
188- end
189-
190- # We currently include the following changes over the official version:
191- # * Avoid requiring the optional `net-http-pipeline` dependency, so that its version can be selected by end users.
192- # * Require vendored net/http version RubyGems if available, otherwise the stdlib version.
193- desc "Vendor a specific version of net-http-persistent to bundler"
194- Automatiek ::RakeTask . new ( "net-http-persistent" ) do |lib |
195- lib . version = "v4.0.2"
196- lib . download = { github : "https://github.com/drbrain/net-http-persistent" }
197- lib . namespace = "Net::HTTP::Persistent"
198- lib . prefix = "Gem"
199- lib . vendor_lib = "bundler/lib/bundler/vendor/net-http-persistent"
200- lib . license_path = "README.rdoc"
201-
202- lib . dependency ( "connection_pool" ) do |sublib |
203- sublib . version = "v2.4.1"
204- sublib . download = { github : "https://github.com/mperham/connection_pool" }
205- sublib . namespace = "ConnectionPool"
206- sublib . prefix = "Bundler"
207- sublib . vendor_lib = "bundler/lib/bundler/vendor/connection_pool"
208- sublib . license_path = "LICENSE"
209-
210- sublib . dependency ( "timeout" ) do |subsublib |
211- subsublib . version = "v0.4.1"
212- subsublib . download = { github : "https://github.com/ruby/timeout" }
213- subsublib . namespace = "Timeout"
214- subsublib . prefix = "Gem"
215- subsublib . vendor_lib = "lib/rubygems/timeout"
216- subsublib . license_path = "LICENSE.txt"
217- end
218- end
219-
220- lib . dependency ( "uri" ) do |sublib |
221- sublib . version = "v0.13.0"
222- sublib . download = { github : "https://github.com/ruby/uri" }
223- sublib . namespace = "URI"
224- sublib . prefix = "Bundler"
225- sublib . vendor_lib = "bundler/lib/bundler/vendor/uri"
226- sublib . license_path = "LICENSE.txt"
227- end
228-
229- lib . dependency ( "net-http" ) do |sublib |
230- sublib . version = "v0.4.0"
231- sublib . download = { github : "https://github.com/ruby/net-http" }
232- sublib . namespace = "Net"
233- sublib . prefix = "Gem"
234- sublib . vendor_lib = "lib/rubygems/net-http"
235- sublib . license_path = "LICENSE.txt"
236-
237- sublib . dependency ( "net-protocol" ) do |subsublib |
238- subsublib . version = "v0.2.2"
239- subsublib . download = { github : "https://github.com/ruby/net-protocol" }
240- subsublib . namespace = "Net"
241- subsublib . prefix = "Gem"
242- subsublib . vendor_lib = "lib/rubygems/net-protocol"
243- subsublib . license_path = "LICENSE.txt"
244-
245- subsublib . dependency ( "timeout" ) do |ssslib |
246- ssslib . version = "v0.4.1"
247- ssslib . download = { github : "https://github.com/ruby/timeout" }
248- ssslib . namespace = "Timeout"
249- ssslib . prefix = "Gem"
250- ssslib . vendor_lib = "lib/rubygems/timeout"
251- ssslib . license_path = "LICENSE.txt"
252- end
253- end
254-
255- sublib . dependency ( "timeout" ) do |subsublib |
256- subsublib . version = "v0.4.1"
257- subsublib . download = { github : "https://github.com/ruby/timeout" }
258- subsublib . namespace = "Timeout"
259- subsublib . prefix = "Gem"
260- subsublib . vendor_lib = "lib/rubygems/timeout"
261- subsublib . license_path = "LICENSE.txt"
262- end
113+ task install : :bundle do
114+ sh ( { "BUNDLE_GEMFILE" => "tool/bundler/vendor_gems.rb" , "BUNDLE_PATH" => "../../tmp/vendor" , "BUNDLER_GEM_DEFAULT_DIR" => "../../tmp/vendor" } , "ruby" , "-rpathname" , "-r./bundler/spec/support/hax.rb" , "-I" , "lib" , "bundler/spec/support/bundle.rb" , "exec" , "tool/automatiek/vendor.rb" )
115+ end
263116
264- sublib . dependency ( "resolv" ) do |subsublib |
265- subsublib . version = "v0.3.0"
266- subsublib . download = { github : "https://github.com/ruby/resolv" }
267- subsublib . namespace = "Resolv"
268- subsublib . prefix = "Gem"
269- subsublib . vendor_lib = "lib/rubygems/resolv"
270- subsublib . license_path = "LICENSE.txt"
271-
272- subsublib . dependency ( "timeout" ) do |ssslib |
273- ssslib . version = "v0.4.1"
274- ssslib . download = { github : "https://github.com/ruby/timeout" }
275- ssslib . namespace = "Timeout"
276- ssslib . prefix = "Gem"
277- ssslib . vendor_lib = "lib/rubygems/timeout"
278- ssslib . license_path = "LICENSE.txt"
279- end
280- end
281- end
117+ task check : :install do
118+ Spec ::Rubygems . check_source_control_changes (
119+ success_message : "Vendored gems are in sync" ,
120+ error_message : "Vendored gems are out of sync. Please update the vendored lib patches."
121+ )
282122 end
283123end
284124
0 commit comments