require 'pathname' gempath = Pathname.new(File.expand_path('../../', __FILE__)) require gempath.join('..', 'base', 'lib', 'base', 'refinery') gemspec = < 3.2.1' s.add_dependency 'globalize3', '~> 0.1' s.add_dependency 'awesome_nested_set', '~> 2.0' s.add_dependency 'seo_meta', '~> 1.1' 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"}