build-files 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24c83aee7dd84e2705d41f1b2f8783da0de9c3c7
4
- data.tar.gz: 892414687bacc2afa80f7bb365b19cbe594b8fbb
3
+ metadata.gz: 6da1f224c99e4155b32783bcfdb5af363d2f1008
4
+ data.tar.gz: f94a00b03d6ba769008948cd266dc5c156cc9fea
5
5
  SHA512:
6
- metadata.gz: 6c17a0de43686bb7b1cfcfc5e281c550a00f1e51ec1079af1f4697b8f2183eeb64861b5f36c4071fda2baf23bc45c1d48d62238a4d124bb1c041c6ade487f756
7
- data.tar.gz: 2ae18629f8cbb12efa46f1557ed4f5d8dda6d8c9e998cf2d6b87dcc02b70a8f5a948b355a1434d2b6e967de7a8b1a77e4d1001491ad1ecfff99af825022402e9
6
+ metadata.gz: 31ad2ca9bb26c86819dcdceb4f5ed9e942f7d970a711cba57deb73e4765430f4aeb7163c78802cf859bfb50c8647852c95c01d0aab2c634465204b80d96898cc
7
+ data.tar.gz: 409d79a9e4bf960dd32c28f6ae956e4c8c4b0d9984c1df6a50094ebf5574284b4dcaea31b5c86c06a83d7d62b8e6f88dc053bdcee59167165614444fc2223ecb
@@ -22,6 +22,12 @@ require_relative 'list'
22
22
 
23
23
  module Build
24
24
  module Files
25
+ class Path
26
+ def glob(pattern)
27
+ Glob.new(self, pattern)
28
+ end
29
+ end
30
+
25
31
  class Glob < List
26
32
  def initialize(root, pattern)
27
33
  @root = root
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Build
22
22
  module Files
23
- VERSION = "0.2.7"
23
+ VERSION = "0.2.8"
24
24
  end
25
25
  end
@@ -0,0 +1,35 @@
1
+ # Copyright, 2014, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'build/files/glob'
22
+
23
+ module Build::Files::GlobSpec
24
+ include Build::Files
25
+
26
+ describe Build::Files::Glob do
27
+ let(:path) {Path.new(__dir__)}
28
+
29
+ it "can glob paths" do
30
+ paths = path.glob("*.rb")
31
+
32
+ expect(paths.count).to be >= 1
33
+ end
34
+ end
35
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-files
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-18 00:00:00.000000000 Z
11
+ date: 2014-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,6 +74,7 @@ files:
74
74
  - lib/build/files/state.rb
75
75
  - lib/build/files/version.rb
76
76
  - spec/build/files/directory_spec.rb
77
+ - spec/build/files/glob_spec.rb
77
78
  - spec/build/files/list_spec.rb
78
79
  - spec/build/files/path_spec.rb
79
80
  - spec/build/files/state_spec.rb
@@ -104,6 +105,7 @@ summary: Build::Files is a set of idiomatic classes for dealing with paths and m
104
105
  directories.
105
106
  test_files:
106
107
  - spec/build/files/directory_spec.rb
108
+ - spec/build/files/glob_spec.rb
107
109
  - spec/build/files/list_spec.rb
108
110
  - spec/build/files/path_spec.rb
109
111
  - spec/build/files/state_spec.rb