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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bca235a33ea1da0e66ade94053dcc06ecf023834
4
- data.tar.gz: 23542b8124bf8d5fc94df1d2314f176837886dcd
3
+ metadata.gz: 2207590b535c1aadc5b29bc2b77b225a39222701
4
+ data.tar.gz: a2ba3348251d7238b6a48a70f2a6415d00928256
5
5
  SHA512:
6
- metadata.gz: f215dcddc3918634188e7c926d47c375e33d655ce4639df69e5ab605b7b8ba1558948317082d6d8381aa70b8127133979a3fa2b282f1bae09bf6a008518e27e0
7
- data.tar.gz: 21b949470809c576cc0b17fa74455b7645f2d0c1fb15516ba4e05657b868276889a2db310a2ecf6c9d893a5ae48ca46dd069e656aa5f7b4b8235adbba624ac88
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
+ [![Build Status](https://travis-ci.org/elgalu/thor-exclude_pattern.png?branch=exclude_pattern)](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
  [![Gem Version](https://badge.fury.io/rb/thor.png)](https://rubygems.org/gems/thor)
2
34
  [![Build Status](https://secure.travis-ci.org/wycats/thor.png?branch=master)](http://travis-ci.org/wycats/thor)
3
35
  [![Dependency Status](https://gemnasium.com/wycats/thor.png?travis)](https://gemnasium.com/wycats/thor)
File without changes
data/lib/thor/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Thor
2
- VERSION = "0.17.0"
2
+ VERSION = "0.18.1"
3
3
  end
@@ -4,8 +4,8 @@ __start__
4
4
  # yellowblue
5
5
  #yellowred
6
6
  #greenred
7
- orange
8
- purple
7
+ # orange
8
+ # purple
9
9
  ind#igo
10
10
  # ind#igo
11
11
  __end__
@@ -1,4 +1,3 @@
1
1
  __start__
2
- another stuff
3
2
  README
4
3
  __end__
@@ -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/exclude_pattern/version'
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::ExcludePattern::VERSION
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.0
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-02-28 00:00:00.000000000 Z
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
@@ -1,5 +0,0 @@
1
- class Thor
2
- class ExcludePattern
3
- VERSION = "0.18.0"
4
- end
5
- end