README.md in thor-exclude_pattern-0.18.0 vs README.md in thor-exclude_pattern-0.18.1
- old
+ new
@@ -1,4 +1,36 @@
+[](https://travis-ci.org/elgalu/thor-exclude_pattern/builds)
+
+Thor with exclude_pattern
+=========================
+
+This fork adds a new option :exclude_pattern => /regexp/ to the directory() method.
+
+Directory method
+----------------
+
+> Copies recursively the files from source directory to root directory. If any of the files finishes with .tt, it's considered to be a template and is placed in the destination without the extension .tt. If any empty directory is found, it's copied and all .empty_directory files are ignored. If any file name is wrapped within % signs, the text within the % signs will be executed as a method and replaced with the returned value.
+
+If :exclude_pattern => /regexp/, it prevents copying files that match that regexp.
+
+Specs for the added option
+--------------------------
+
+```ruby
+it "ignores files within excluding/ directories when exclude_pattern is provided" do
+ invoke! "doc", "docs", :exclude_pattern => /excluding\//
+ file = File.join(destination_root, "docs", "excluding", "rdoc.rb")
+ expect(File.exists?(file)).to be_false
+end
+
+it "copies and evalutes files within excluding/ directory when no exclude_pattern is present" do
+ invoke! "doc", "docs"
+ file = File.join(destination_root, "docs", "excluding", "rdoc.rb")
+ expect(File.exists?(file)).to be_true
+ expect(File.read(file)).to eq("BAR = BAR\n")
+end
+```
+
[](https://rubygems.org/gems/thor)
[](http://travis-ci.org/wycats/thor)
[](https://gemnasium.com/wycats/thor)
[](https://codeclimate.com/github/wycats/thor)
[](https://coveralls.io/r/wycats/thor)