Skip to content

Commit

Permalink
Attempt to get github gems built by excluding files from the gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Yurek committed May 15, 2009
1 parent 738d7fa commit 6d792fd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
24 changes: 19 additions & 5 deletions Rakefile
Expand Up @@ -45,6 +45,17 @@ task :clean do |t|
Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
end

include_file_globs = ["README*",
"LICENSE",
"Rakefile",
"init.rb",
"{generators,lib,tasks,test,shoulda_macros}/**/*"]
exclude_file_globs = ["test/s3.yml",
"test/debug.log",
"test/paperclip.db",
"test/doc",
"test/pkg",
"test/tmp"]
spec = Gem::Specification.new do |s|
s.name = "paperclip"
s.version = Paperclip::VERSION
Expand All @@ -53,11 +64,7 @@ spec = Gem::Specification.new do |s|
s.homepage = "http://www.thoughtbot.com/projects/paperclip"
s.platform = Gem::Platform::RUBY
s.summary = "File attachments as attributes for ActiveRecord"
s.files = FileList["README*",
"LICENSE",
"Rakefile",
"init.rb",
"{generators,lib,tasks,test,shoulda_macros}/**/*"].to_a
s.files = FileList[include_file_globs].to_a - FileList[exclude_file_globs].to_a
s.require_path = "lib"
s.test_files = FileList["test/**/test_*.rb"].to_a
s.rubyforge_project = "paperclip"
Expand All @@ -68,6 +75,13 @@ spec = Gem::Specification.new do |s|
s.add_development_dependency 'thoughtbot-shoulda'
s.add_development_dependency 'mocha'
end

desc "Print a list of the files to be put into the gem"
task :manifest => :clean do
spec.files.each do |file|
puts file
end
end

desc "Generate a gemspec file for GitHub"
task :gemspec => :clean do
Expand Down
4 changes: 2 additions & 2 deletions paperclip.gemspec
Expand Up @@ -6,10 +6,10 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jon Yurek"]
s.date = %q{2009-05-14}
s.date = %q{2009-05-15}
s.email = %q{jyurek@thoughtbot.com}
s.extra_rdoc_files = ["README.rdoc"]
s.files = ["README.rdoc", "LICENSE", "Rakefile", "init.rb", "generators/paperclip", "generators/paperclip/paperclip_generator.rb", "generators/paperclip/templates", "generators/paperclip/templates/paperclip_migration.rb.erb", "generators/paperclip/USAGE", "lib/paperclip", "lib/paperclip/attachment.rb", "lib/paperclip/callback_compatability.rb", "lib/paperclip/geometry.rb", "lib/paperclip/interpolations.rb", "lib/paperclip/iostream.rb", "lib/paperclip/matchers", "lib/paperclip/matchers/have_attached_file_matcher.rb", "lib/paperclip/matchers/validate_attachment_content_type_matcher.rb", "lib/paperclip/matchers/validate_attachment_presence_matcher.rb", "lib/paperclip/matchers/validate_attachment_size_matcher.rb", "lib/paperclip/matchers.rb", "lib/paperclip/processor.rb", "lib/paperclip/storage.rb", "lib/paperclip/thumbnail.rb", "lib/paperclip/upfile.rb", "lib/paperclip.rb", "tasks/paperclip_tasks.rake", "test/attachment_test.rb", "test/database.yml", "test/fixtures", "test/fixtures/12k.png", "test/fixtures/50x50.png", "test/fixtures/5k.png", "test/fixtures/bad.png", "test/fixtures/s3.yml", "test/fixtures/text.txt", "test/fixtures/twopage.pdf", "test/geometry_test.rb", "test/helper.rb", "test/integration_test.rb", "test/interpolations_test.rb", "test/iostream_test.rb", "test/matchers", "test/matchers/have_attached_file_matcher_test.rb", "test/matchers/validate_attachment_content_type_matcher_test.rb", "test/matchers/validate_attachment_presence_matcher_test.rb", "test/matchers/validate_attachment_size_matcher_test.rb", "test/paperclip_test.rb", "test/processor_test.rb", "test/s3.yml", "test/storage_test.rb", "test/thumbnail_test.rb", "test/tmp", "test/tmp/storage.txt", "shoulda_macros/paperclip.rb"]
s.files = ["README.rdoc", "LICENSE", "Rakefile", "init.rb", "generators/paperclip", "generators/paperclip/paperclip_generator.rb", "generators/paperclip/templates", "generators/paperclip/templates/paperclip_migration.rb.erb", "generators/paperclip/USAGE", "lib/paperclip", "lib/paperclip/attachment.rb", "lib/paperclip/callback_compatability.rb", "lib/paperclip/geometry.rb", "lib/paperclip/interpolations.rb", "lib/paperclip/iostream.rb", "lib/paperclip/matchers", "lib/paperclip/matchers/have_attached_file_matcher.rb", "lib/paperclip/matchers/validate_attachment_content_type_matcher.rb", "lib/paperclip/matchers/validate_attachment_presence_matcher.rb", "lib/paperclip/matchers/validate_attachment_size_matcher.rb", "lib/paperclip/matchers.rb", "lib/paperclip/processor.rb", "lib/paperclip/storage.rb", "lib/paperclip/thumbnail.rb", "lib/paperclip/upfile.rb", "lib/paperclip.rb", "tasks/paperclip_tasks.rake", "test/attachment_test.rb", "test/database.yml", "test/fixtures", "test/fixtures/12k.png", "test/fixtures/50x50.png", "test/fixtures/5k.png", "test/fixtures/bad.png", "test/fixtures/s3.yml", "test/fixtures/text.txt", "test/fixtures/twopage.pdf", "test/geometry_test.rb", "test/helper.rb", "test/integration_test.rb", "test/interpolations_test.rb", "test/iostream_test.rb", "test/matchers", "test/matchers/have_attached_file_matcher_test.rb", "test/matchers/validate_attachment_content_type_matcher_test.rb", "test/matchers/validate_attachment_presence_matcher_test.rb", "test/matchers/validate_attachment_size_matcher_test.rb", "test/paperclip_test.rb", "test/processor_test.rb", "test/storage_test.rb", "test/thumbnail_test.rb", "test/tmp/storage.txt", "shoulda_macros/paperclip.rb"]
s.has_rdoc = true
s.homepage = %q{http://www.thoughtbot.com/projects/paperclip}
s.rdoc_options = ["--line-numbers", "--inline-source"]
Expand Down

0 comments on commit 6d792fd

Please sign in to comment.