require 'pathname' gempath = Pathname.new(File.expand_path('../../', __FILE__)) require gempath.join('..', 'base', 'lib', 'base', 'refinery') gemspec = < 2.5' # Cucumber s.add_dependency 'capybara', '>= 0.4.1.1' s.add_dependency 'database_cleaner' s.add_dependency 'cucumber-rails', '>= 0.4' s.add_dependency 'cucumber' s.add_dependency 'launchy' s.add_dependency 'gherkin' s.add_dependency 'rack-test', '~> 0.5.6' s.add_dependency 'json_pure' # Factory Girl s.add_dependency 'factory_girl' # Autotest s.add_dependency 'autotest' s.add_dependency 'autotest-rails' s.add_dependency 'autotest-notification' s.files = [ '#{%w( **/{*,.rspec,.gitignore,.yardopts} ).map { |file| Pathname.glob(gempath.join(file)) }.flatten.reject{|f| !f.exist? or f.to_s =~ /\.gem$/ 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"}