Permalink
Browse files

Add Manifest.all

  • Loading branch information...
1 parent de7d08c commit 76eddaf0636a2270d8943d8d9f1236242adf3f01 @judofyr judofyr committed Jan 23, 2010
Showing with 12 additions and 5 deletions.
  1. +12 −5 lib/gemify/manifest.rb
View
@@ -4,10 +4,11 @@ module Gemify
# gem.
#
# == Using
- # #auto:: Automatically find the files.
- # #file, #vcs or #basic:: Find the files the specific place.
+ # {.files}:: Find the files based on the argument.
+ # {.auto}:: Automatically find the files.
+ # {.vcs}, {.basic} or {.all}:: Find the files the specific place.
module Manifest
- MODE = [:auto, :vcs, :basic]
+ MODE = [:auto, :vcs, :basic, :all]
VCS = [:git, :darcs, :hg, :bzr, :svn, :cvs]
ALL = MODE + VCS
@@ -31,9 +32,10 @@ def files(type)
end
end
- # Returns the first of #vcs and #basic which returns a list.
+ # Uses the files from your VCS, falling back to all the files in
+ # the directory.
def auto
- vcs || basic
+ vcs || all
end
# Determine which VCS you're using and returns all the files which are
@@ -62,6 +64,11 @@ def basic
Dir["bin/*"] + Dir["lib/**/**"]
end
+ # Returns all the files in a directory.
+ def all
+ Dir["**/*"]
+ end
+
private
def determine_vcs

0 comments on commit 76eddaf

Please sign in to comment.