Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

goodbye, '.gemified'. we'll miss you

  • Loading branch information...
commit 54bc63e86635a7b44539a2a550b726d1e4353462 1 parent 3334327
@mislav authored
Showing with 13 additions and 17 deletions.
  1. +0 −9 .gemified
  2. +13 −8 Rakefile
View
9 .gemified
@@ -1,9 +0,0 @@
----
-:email: mislav.marohnic@gmail.com
-:has_rdoc: true
-:homepage: http://github.com/mislav/will_paginate
-:name: will_paginate
-:rubyforge_project: will-paginate
-:version: 2.2.3
-:author: "Mislav Marohni\xC4\x87"
-:summary: Most awesome pagination solution for Rails
View
21 Rakefile
@@ -72,10 +72,13 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
end
+desc %{Update ".manifest" with the latest list of project filenames. Respect\
+.gitignore by excluding everything that git ignores. Update `files` and\
+`test_files` arrays in "*.gemspec" file if it's present.}
task :manifest do
list = Dir['**/*'].sort
spec_file = Dir['*.gemspec'].first
- list -= [spec_file]
+ list -= [spec_file] if spec_file
File.read('.gitignore').each_line do |glob|
glob = glob.chomp.sub(/^\//, '')
@@ -84,14 +87,16 @@ task :manifest do
puts "excluding #{glob}"
end
- spec = File.read spec_file
- spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
- assignment = $1
- bunch = $2 ? list.grep(/^test\//) : list
- '%s%%w(%s)' % [assignment, bunch.join(' ')]
+ if spec_file
+ spec = File.read spec_file
+ spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
+ assignment = $1
+ bunch = $2 ? list.grep(/^test\//) : list
+ '%s%%w(%s)' % [assignment, bunch.join(' ')]
+ end
+
+ File.open(spec_file, 'w') {|f| f << spec }
end
-
- File.open(spec_file, 'w') {|f| f << spec }
File.open('.manifest', 'w') {|f| f << list.join("\n") }
end
Please sign in to comment.
Something went wrong with that request. Please try again.