thor-exclude_pattern 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +0 -3
- data/README.md +32 -0
- data/bin/{thor → thor-exclude_pattern} +0 -0
- data/lib/thor/version.rb +1 -1
- data/spec/sandbox/doc/COMMENTER +2 -2
- data/spec/sandbox/doc/README +0 -1
- data/{thor.gemspec → thor-exclude_pattern.gemspec} +4 -4
- metadata +5 -6
- data/lib/thor/exclude_pattern/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2207590b535c1aadc5b29bc2b77b225a39222701
|
4
|
+
data.tar.gz: a2ba3348251d7238b6a48a70f2a6415d00928256
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 043b529c440bd0853f4c788f51163050187cef0889725ddab0086c00c8b01456a5637b7c41305259dcff39b9c4a52990b22bf5aab070e0d73aafd71282e65607
|
7
|
+
data.tar.gz: a654cb793d8e123b8e931e6f37497093daf5504af4fc14c46d08e7d2890ee66d95ed43ca4322447f02427163d7a58a736f3e76289190644f011d7298fd8413db
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
## In git
|
2
|
-
* Add directory() config[:exclude_pattern] to prevent copying files that match certain regexp
|
3
|
-
|
4
1
|
## 0.17.0, release 2013-01-24
|
5
2
|
* Add better support for tasks that accept arbitrary additional arguments (e.g. things like `bundle exec`)
|
6
3
|
* Add #stop_on_unknown_option!
|
data/README.md
CHANGED
@@ -1,3 +1,35 @@
|
|
1
|
+
[](https://travis-ci.org/elgalu/thor-exclude_pattern/builds)
|
2
|
+
|
3
|
+
Thor with exclude_pattern
|
4
|
+
=========================
|
5
|
+
|
6
|
+
This fork adds a new option :exclude_pattern => /regexp/ to the directory() method.
|
7
|
+
|
8
|
+
Directory method
|
9
|
+
----------------
|
10
|
+
|
11
|
+
> 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.
|
12
|
+
|
13
|
+
If :exclude_pattern => /regexp/, it prevents copying files that match that regexp.
|
14
|
+
|
15
|
+
Specs for the added option
|
16
|
+
--------------------------
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
it "ignores files within excluding/ directories when exclude_pattern is provided" do
|
20
|
+
invoke! "doc", "docs", :exclude_pattern => /excluding\//
|
21
|
+
file = File.join(destination_root, "docs", "excluding", "rdoc.rb")
|
22
|
+
expect(File.exists?(file)).to be_false
|
23
|
+
end
|
24
|
+
|
25
|
+
it "copies and evalutes files within excluding/ directory when no exclude_pattern is present" do
|
26
|
+
invoke! "doc", "docs"
|
27
|
+
file = File.join(destination_root, "docs", "excluding", "rdoc.rb")
|
28
|
+
expect(File.exists?(file)).to be_true
|
29
|
+
expect(File.read(file)).to eq("BAR = BAR\n")
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
1
33
|
[](https://rubygems.org/gems/thor)
|
2
34
|
[](http://travis-ci.org/wycats/thor)
|
3
35
|
[](https://gemnasium.com/wycats/thor)
|
File without changes
|
data/lib/thor/version.rb
CHANGED
data/spec/sandbox/doc/COMMENTER
CHANGED
data/spec/sandbox/doc/README
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib/', __FILE__)
|
3
3
|
$:.unshift lib unless $:.include?(lib)
|
4
|
-
require 'thor/
|
4
|
+
require 'thor/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.add_development_dependency 'bundler', '~> 1.0'
|
8
8
|
spec.authors = ['Yehuda Katz', 'José Valim']
|
9
9
|
spec.description = %q{A scripting framework that replaces rake, sake and rubigen}
|
10
10
|
spec.email = 'ruby-thor@googlegroups.com'
|
11
|
-
spec.executables = %w(thor)
|
12
|
-
spec.files = %w(.document CHANGELOG.md LICENSE.md README.md Thorfile thor.gemspec)
|
11
|
+
spec.executables = %w(thor-exclude_pattern)
|
12
|
+
spec.files = %w(.document CHANGELOG.md LICENSE.md README.md Thorfile thor-exclude_pattern.gemspec)
|
13
13
|
spec.files += Dir.glob("bin/**/*")
|
14
14
|
spec.files += Dir.glob("lib/**/*.rb")
|
15
15
|
spec.files += Dir.glob("spec/**/*")
|
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.required_rubygems_version = '>= 1.3.6'
|
21
21
|
spec.summary = spec.description
|
22
22
|
spec.test_files = Dir.glob("spec/**/*")
|
23
|
-
spec.version = Thor::
|
23
|
+
spec.version = Thor::VERSION
|
24
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thor-exclude_pattern
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
description: A scripting framework that replaces rake, sake and rubigen
|
29
29
|
email: ruby-thor@googlegroups.com
|
30
30
|
executables:
|
31
|
-
- thor
|
31
|
+
- thor-exclude_pattern
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
@@ -37,8 +37,8 @@ files:
|
|
37
37
|
- LICENSE.md
|
38
38
|
- README.md
|
39
39
|
- Thorfile
|
40
|
-
- thor.gemspec
|
41
|
-
- bin/thor
|
40
|
+
- thor-exclude_pattern.gemspec
|
41
|
+
- bin/thor-exclude_pattern
|
42
42
|
- bin/rake2thor
|
43
43
|
- lib/thor.rb
|
44
44
|
- lib/thor/shell.rb
|
@@ -49,7 +49,6 @@ files:
|
|
49
49
|
- lib/thor/actions/empty_directory.rb
|
50
50
|
- lib/thor/actions/create_link.rb
|
51
51
|
- lib/thor/actions/inject_into_file.rb
|
52
|
-
- lib/thor/exclude_pattern/version.rb
|
53
52
|
- lib/thor/invocation.rb
|
54
53
|
- lib/thor/shell/html.rb
|
55
54
|
- lib/thor/shell/color.rb
|