Sha256: e655e1133db756c125297dd4d54e865947c667e5aa70e5d9d66e7592f25654ca

Contents?: true

Size: 1.66 KB

Versions: 1

Compression:

Stored size: 1.66 KB

Contents

#!/usr/bin/env ruby
require 'pathname'
gempath = Pathname.new(File.expand_path('../../', __FILE__))

files = %w( Gemfile *.md **/**/{*,.rspec,.gitignore,.yardopts} ).map { |file| Pathname.glob(file) }.flatten
rejection_patterns = [
  "^public/system",
  "^config/(application|boot|environment).rb$",
  "^config/initializers(\/.*\.rb)?$",
  "^config/(database|i18n\-js).yml$",
  "^lib\/gemspec\.rb",
  ".*\/cache\/",
  "^script\/*",
  "^vendor\/plugins\/?$",
  "(^log|\.log)$",
  "\.rbc$",
  "^tmp(|/.+?)$",
  ".gem$",
  "^doc($|\/)"
]

files.reject! do |f|
  !f.exist? or (f.directory? and f.children.empty?) =~ %r{(#{rejection_patterns.join(')|(')})}
end

gemspec = <<EOF
# DO NOT EDIT THIS FILE DIRECTLY! Instead, use lib/gemspec.rb to generate it.
$:.push File.expand_path("../lib", __FILE__)
require "moxify/version"

Gem::Specification.new do |s|
  s.name              = %q{#{gemname = 'moxify'}}
  s.version           = Moxify::VERSION
  s.description       = 'A blanket full of toy cars for Refinery CMS'
  s.date              = %q{#{Time.now.strftime('%Y-%m-%d')}}
  s.summary           = 'My port of Refinery CMS'
  s.email             = %q{mail@bitflut.com}
  s.homepage          = %q{http://bitflut.com}
  s.authors           = ['Marian Andre']
  s.license           = %q{MIT}
  s.require_paths     = %w(lib)
  s.files             = Dir['lib/**/*', 'config/**/*', 'app/**/*', 'public/**/*']
  
  s.add_dependency    'refinerycms', '~> 0.9.9.10'
  
  s.files             = [
    '#{files.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"}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moxify-0.1.5 lib/gemspec.rb