build-files 1.0.0 → 1.0.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/lib/build/files/directory.rb +5 -0
- data/lib/build/files/glob.rb +0 -1
- data/lib/build/files/list.rb +4 -0
- data/lib/build/files/system.rb +6 -2
- data/lib/build/files/version.rb +1 -1
- data/spec/build/files/glob_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f34f08a51af0bb5ea2b5d9c9a0db153043814c2
|
4
|
+
data.tar.gz: e04880fa3fcead461fa957855ae762aa0954101a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf6faf14761ae2b0b4856e9669687ec676d1462080ea4150ec32a213e2a6ad6f6e66cfa880a24ab2459e91cfeedb76043511add720cb4e7b7a632d36aa7c335f
|
7
|
+
data.tar.gz: 2f27d02ca86929aa603c4f02f7462fb1b0a337065ce8ffed855f7204d39da025b346489538a7a04acdec06eccaf44d0f546188ee7d95ae5cd7f8f54b98775dd8
|
@@ -64,10 +64,15 @@ module Build
|
|
64
64
|
self.class.new(@root.rebase(root))
|
65
65
|
end
|
66
66
|
|
67
|
+
# Convert a Directory into a String, can be used as an argument to a command.
|
67
68
|
def to_str
|
68
69
|
@root.to_str
|
69
70
|
end
|
70
71
|
|
72
|
+
def to_s
|
73
|
+
to_str
|
74
|
+
end
|
75
|
+
|
71
76
|
def to_path
|
72
77
|
@root
|
73
78
|
end
|
data/lib/build/files/glob.rb
CHANGED
data/lib/build/files/list.rb
CHANGED
data/lib/build/files/system.rb
CHANGED
@@ -66,14 +66,18 @@ module Build
|
|
66
66
|
end
|
67
67
|
|
68
68
|
# Recursively create a directory hierarchy for the given path.
|
69
|
-
def
|
69
|
+
def mkpath
|
70
70
|
FileUtils.mkpath self
|
71
71
|
end
|
72
72
|
|
73
|
+
alias create mkpath
|
74
|
+
|
73
75
|
# Recursively delete the given path and all contents.
|
74
|
-
def
|
76
|
+
def rm
|
75
77
|
FileUtils.rm_rf self
|
76
78
|
end
|
79
|
+
|
80
|
+
alias delete rm
|
77
81
|
end
|
78
82
|
|
79
83
|
class List
|
data/lib/build/files/version.rb
CHANGED
@@ -39,5 +39,11 @@ module Build::Files::GlobSpec
|
|
39
39
|
|
40
40
|
expect(cache).to be_include(path.glob("*.rb"))
|
41
41
|
end
|
42
|
+
|
43
|
+
it "should print nice string represenation" do
|
44
|
+
glob = Build::Files::Glob.new(".", "*.rb")
|
45
|
+
|
46
|
+
expect("#{glob}").to be == '<Glob "."/"*.rb">'
|
47
|
+
end
|
42
48
|
end
|
43
49
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|