Rakefile in rest-builder-0.9.1 vs Rakefile in rest-builder-0.9.2
- old
+ new
@@ -1,21 +1,16 @@
begin
- require "#{dir = File.dirname(__FILE__)}/task/gemgem"
+ require "#{__dir__}/task/gemgem"
rescue LoadError
sh 'git submodule update --init --recursive'
exec Gem.ruby, '-S', $PROGRAM_NAME, *ARGV
end
-$LOAD_PATH.unshift(File.expand_path("#{dir}/promise_pool/lib"))
-
-Gemgem.init(dir) do |s|
+Gemgem.init(__dir__, :submodules => %w[promise_pool]) do |s|
require 'rest-builder/version'
s.name = 'rest-builder'
s.version = RestBuilder::VERSION
- %w[promise_pool httpclient mime-types].each do |g|
- s.add_runtime_dependency(g)
- end
- # exclude promise_pool
- s.files.reject!{ |f| f.start_with?('promise_pool/') }
+ %w[promise_pool httpclient mime-types].
+ each(&s.method(:add_runtime_dependency))
end