require 'pathname' gempath = Pathname.new(File.expand_path('../../', __FILE__)) require gempath.join('..', 'base', 'lib', 'base', 'refinery') gemspec = < #{::Refinery::Version}' s.add_dependency 'seo_meta', '~> 1.0.2' end EOF (gemfile = gempath.join("#{gemname}.gemspec")).open('w') {|f| f.puts(gemspec)} puts `cd #{gempath} && gem build #{gemfile}` if ARGV.any?{|a| a == "BUILD=true"}