# Encoding: UTF-8 require 'pathname' gempath = Pathname.new(File.expand_path('../../', __FILE__)) require gempath.join('..', 'base', 'lib', 'base', 'refinery') gemspec = < 2.6' s.add_dependency 'fuubar' s.add_dependency 'rspec-instafail' # Cucumber s.add_dependency 'database_cleaner' s.add_dependency 'cucumber-rails', '~> 1.0.0' s.add_dependency 'launchy' s.add_dependency 'rack-test', '>= 0.5.6' s.add_dependency 'json_pure' # Factory Girl s.add_dependency 'factory_girl' s.files = [ '#{%w( **/{*,.rspec,.gitignore,.yardopts} ).map { |file| Pathname.glob(gempath.join(file)) }.flatten.reject{|f| !f.exist? or f.to_s =~ /(\.(gem|rbc)|tmp(\/.*)?|spec\/lib\/tmp(\/.*)?)$/ or (f.directory? and f.children.empty?) }.map{|d| d.relative_path_from(gempath)}.uniq.sort.join("',\n '")}' ] 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"}