build-files 1.8.1 → 1.9.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
  SHA256:
3
- metadata.gz: 13546b8a7c748816d55902380e09b9406074ea0983dc487de2afac9cef4a7000
4
- data.tar.gz: 731d2f9b19bfcc42356db6c2c0bd8ae93025118c3c57e04fd2fb68ef93e3ab5f
3
+ metadata.gz: abffeac84e2e1e1585743ecdc01742332ae8629865701b306b10f1987c6cae8a
4
+ data.tar.gz: 03ddfbbc237aa66d472e7cbb108e2e364c0aa95a4ee7b769abcb98c0ba8cb1e4
5
5
  SHA512:
6
- metadata.gz: 7f378f74224fe53b757e3425ba2b540fdb34ab63570ac865288804a9d9abbafeea0245c6edb9b788409f4246fca88fb893c50ce471ab99cf6daf7ceac908f727
7
- data.tar.gz: 52dbba181571f9bb1e7c84bdca6a18e2938c89f5260a826d7753214bd8ffe4634c7019e20c9dc1a71bbd7c08aa0a11dfb407a74686bea34118902a2dea366bef
6
+ metadata.gz: 349d26dd750a8cf993a606502703b22c55b0479ec67b127e64658ac8a44be2ea6a96d0d44bb34751f4a7d1e40659e6af4ce886960ba680b0362316bc02a10a22
7
+ data.tar.gz: c93a0c33ec66c7862201b2d386f7133eaa874e3b4b5f87f42da427c21c49cdef6bbc82ad8f642134ed140cf5fecc930ba5fc4476f33ce1d7a9e439ddcc69902f
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,24 +1,9 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require_relative 'list'
3
+ # Released under the MIT License.
4
+ # Copyright, 2019-2025, by Samuel Williams.
5
+
6
+ require_relative "list"
22
7
 
23
8
  module Build
24
9
  module Files
@@ -1,24 +1,9 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require_relative 'list'
3
+ # Released under the MIT License.
4
+ # Copyright, 2019-2025, by Samuel Williams.
5
+
6
+ require_relative "list"
22
7
 
23
8
  module Build
24
9
  module Files
@@ -1,24 +1,9 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require_relative 'list'
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2025, by Samuel Williams.
5
+
6
+ require_relative "list"
22
7
 
23
8
  module Build
24
9
  module Files
@@ -1,24 +1,9 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require_relative 'list'
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2025, by Samuel Williams.
5
+
6
+ require_relative "list"
22
7
 
23
8
  module Build
24
9
  module Files
@@ -1,24 +1,9 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require_relative 'path'
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2025, by Samuel Williams.
5
+
6
+ require_relative "path"
22
7
 
23
8
  module Build
24
9
  module Files
@@ -55,6 +40,14 @@ module Build
55
40
  other.any?{|path| include?(path)}
56
41
  end
57
42
 
43
+ def empty?
44
+ each do
45
+ return false
46
+ end
47
+
48
+ return true
49
+ end
50
+
58
51
  def with(**options)
59
52
  return to_enum(:with, **options) unless block_given?
60
53
 
@@ -97,3 +90,5 @@ module Build
97
90
  end
98
91
  end
99
92
  end
93
+
94
+ require_relative "difference"
@@ -1,22 +1,7 @@
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.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2025, by Samuel Williams.
20
5
 
21
6
  module Build
22
7
  module Files
@@ -29,7 +14,7 @@ module Build
29
14
  def self.split(path)
30
15
  # Effectively dirname and basename:
31
16
  dirname, separator, filename = path.rpartition(File::SEPARATOR)
32
- filename, dot, extension = filename.rpartition('.')
17
+ filename, dot, extension = filename.rpartition(".")
33
18
 
34
19
  return dirname + separator, filename, dot + extension
35
20
  end
@@ -248,7 +233,7 @@ module Build
248
233
 
249
234
  # Match a path with a given pattern, using `File#fnmatch`.
250
235
  def match(pattern, flags = 0)
251
- path = pattern.start_with?('/') ? full_path : relative_path
236
+ path = pattern.start_with?("/") ? full_path : relative_path
252
237
 
253
238
  return File.fnmatch(pattern, path, flags)
254
239
  end
@@ -1,24 +1,9 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require_relative 'list'
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2025, by Samuel Williams.
5
+
6
+ require_relative "list"
22
7
 
23
8
  module Build
24
9
  module Files
@@ -1,26 +1,11 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require_relative 'list'
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2025, by Samuel Williams.
22
5
 
23
- require 'forwardable'
6
+ require_relative "list"
7
+
8
+ require "forwardable"
24
9
 
25
10
  module Build
26
11
  module Files
@@ -1,34 +1,19 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require 'fileutils'
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2025, by Samuel Williams.
22
5
 
23
- require_relative 'path'
24
- require_relative 'list'
6
+ require "fileutils"
7
+
8
+ require_relative "path"
9
+ require_relative "list"
25
10
 
26
11
  module Build
27
12
  module Files
28
13
  class Path
29
14
  # Open a file with the specified mode.
30
15
  def open(mode, &block)
31
- File.open(self, mode, &block)
16
+ File.open(self.to_s, mode, &block)
32
17
  end
33
18
 
34
19
  # Read the entire contents of the file.
@@ -45,52 +30,60 @@ module Build
45
30
  end
46
31
  end
47
32
 
33
+ def copy(destination)
34
+ if directory?
35
+ destination.create
36
+ else
37
+ FileUtils.cp(self.to_s, destination.to_s)
38
+ end
39
+ end
40
+
48
41
  # Touch the file, changing it's last modified time.
49
42
  def touch
50
- FileUtils.touch self
43
+ FileUtils.touch(self.to_s)
51
44
  end
52
45
 
53
46
  def stat
54
- File.stat self
47
+ File.stat(self.to_s)
55
48
  end
56
49
 
57
50
  # Checks if the file exists in the local file system.
58
51
  def exist?
59
- File.exist? self
52
+ File.exist?(self.to_s)
60
53
  end
61
54
 
62
55
  # Checks if the path refers to a directory.
63
56
  def directory?
64
- File.directory? self
57
+ File.directory?(self.to_s)
65
58
  end
66
59
 
67
60
  def file?
68
- File.file? self
61
+ File.file?(self.to_s)
69
62
  end
70
63
 
71
64
  def symlink?
72
- File.symlink? self
65
+ File.symlink?(self.to_s)
73
66
  end
74
67
 
75
68
  def readable?
76
- File.readable? self
69
+ File.readable?(self.to_s)
77
70
  end
78
71
 
79
72
  # The time the file was last modified.
80
73
  def modified_time
81
- File.mtime self
74
+ File.mtime(self.to_s)
82
75
  end
83
76
 
84
77
  # Recursively create a directory hierarchy for the given path.
85
78
  def mkpath
86
- FileUtils.mkpath self
79
+ FileUtils.mkpath(self.to_s)
87
80
  end
88
81
 
89
82
  alias create mkpath
90
83
 
91
84
  # Recursively delete the given path and all contents.
92
85
  def rm
93
- FileUtils.rm_rf self
86
+ FileUtils.rm_rf(self.to_s)
94
87
  end
95
88
 
96
89
  alias delete rm
@@ -116,6 +109,12 @@ module Build
116
109
  def delete
117
110
  each(&:delete)
118
111
  end
112
+
113
+ def copy(destination)
114
+ each do |path|
115
+ path.copy(destination / path.relative_path)
116
+ end
117
+ end
119
118
  end
120
119
  end
121
120
  end
@@ -1,25 +1,10 @@
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.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2023, by Samuel Williams.
20
5
 
21
6
  module Build
22
7
  module Files
23
- VERSION = "1.8.1"
8
+ VERSION = "1.9.1"
24
9
  end
25
10
  end
data/lib/build/files.rb CHANGED
@@ -1,27 +1,12 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require_relative 'files/list'
22
- require_relative 'files/composite'
23
- require_relative 'files/paths'
24
- require_relative 'files/glob'
25
- require_relative 'files/directory'
3
+ # Released under the MIT License.
4
+ # Copyright, 2014-2025, by Samuel Williams.
26
5
 
27
- require_relative 'files/system'
6
+ require_relative "files/list"
7
+ require_relative "files/composite"
8
+ require_relative "files/paths"
9
+ require_relative "files/glob"
10
+ require_relative "files/directory"
11
+
12
+ require_relative "files/system"
data/license.md ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright, 2014-2025, by Samuel Williams.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,53 @@
1
+ # Build::Files
2
+
3
+ Build::Files is a set of idiomatic classes for dealing with paths and monitoring directories. File paths are represented with both root and relative parts which makes copying directory structures intuitive.
4
+
5
+ [![Development Status](/workflows/Test/badge.svg)](/actions?workflow=Test)
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'build-files'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install build-files
20
+
21
+ ## Usage
22
+
23
+ The basic structure is the `Path`. Paths are stored with a root and relative part. By default, if no root is specified, it is the `dirname` part.
24
+
25
+ require 'build/files'
26
+
27
+ path = Build::Files::Path("/foo/bar/baz")
28
+ => "/foo/bar"/"baz"
29
+
30
+ > path.root
31
+ => "/foo/bar"
32
+ > path.relative_path
33
+ => "baz"
34
+
35
+ Paths can be coerced to strings and thus are suitable arguments to `exec`/`system` functions.
36
+
37
+ ## Contributing
38
+
39
+ We welcome contributions to this project.
40
+
41
+ 1. Fork it.
42
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
43
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
44
+ 4. Push to the branch (`git push origin my-new-feature`).
45
+ 5. Create new Pull Request.
46
+
47
+ ### Developer Certificate of Origin
48
+
49
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
50
+
51
+ ### Community Guidelines
52
+
53
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,87 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-files
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
12
11
  -----BEGIN CERTIFICATE-----
13
- MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
14
- ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
15
- MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs
16
- aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B
17
- AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr
18
- xvtqbTTL8gbLHz5LW3QD2nfwCv3qTlw0qI3Ie7a9VMJMbSvgVEGEfQirqIgJXWMj
19
- eNMDgKsMJtC7u/43abRKx7TCURW3iWyR19NRngsJJmaR51yGGGm2Kfsr+JtKKLtL
20
- L188Wm3f13KAx7QJU8qyuBnj1/gWem076hzdA7xi1DbrZrch9GCRz62xymJlrJHn
21
- 9iZEZ7AxrS7vokhMlzSr/XMUihx/8aFKtk+tMLClqxZSmBWIErWdicCGTULXCBNb
22
- E/mljo4zEVKhlTWpJklMIhr55ZRrSarKFuW7en0+tpJrfsYiAmXMJNi4XAYJH7uL
23
- rgJuJwSaa/dMz+VmUoo7VKtSfCoOI+6v5/z0sK3oT6sG6ZwyI47DBq2XqNC6tnAj
24
- w+XmCywiTQrFzMMAvcA7rPI4F0nU1rZId51rOvvfxaONp+wgTi4P8owZLw0/j0m4
25
- 8C20DYi6EYx4AHDXiLpElWh3AgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8E
26
- BAMCBLAwHQYDVR0OBBYEFB6ZaeWKxQjGTI+pmz7cKRmMIywwMC4GA1UdEQQnMCWB
27
- I3NhbXVlbC53aWxsaWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWB
28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jqhYCdmMBqCws
34
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
35
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
36
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
37
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
38
38
  -----END CERTIFICATE-----
39
- date: 2022-05-22 00:00:00.000000000 Z
40
- dependencies:
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: covered
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.4'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.4'
83
- description:
84
- email:
39
+ date: 2025-03-30 00:00:00.000000000 Z
40
+ dependencies: []
85
41
  executables: []
86
42
  extensions: []
87
43
  extra_rdoc_files: []
@@ -97,12 +53,14 @@ files:
97
53
  - lib/build/files/state.rb
98
54
  - lib/build/files/system.rb
99
55
  - lib/build/files/version.rb
56
+ - license.md
57
+ - readme.md
100
58
  homepage: https://github.com/ioquatix/build-files
101
59
  licenses:
102
60
  - MIT
103
61
  metadata:
104
62
  funding_uri: https://github.com/sponsors/ioquatix/
105
- post_install_message:
63
+ source_code_uri: https://github.com/ioquatix/build-files.git
106
64
  rdoc_options: []
107
65
  require_paths:
108
66
  - lib
@@ -110,15 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
68
  requirements:
111
69
  - - ">="
112
70
  - !ruby/object:Gem::Version
113
- version: '2.0'
71
+ version: '3.1'
114
72
  required_rubygems_version: !ruby/object:Gem::Requirement
115
73
  requirements:
116
74
  - - ">="
117
75
  - !ruby/object:Gem::Version
118
76
  version: '0'
119
77
  requirements: []
120
- rubygems_version: 3.1.6
121
- signing_key:
78
+ rubygems_version: 3.6.2
122
79
  specification_version: 4
123
80
  summary: Abstractions for handling and mapping paths.
124
81
  test_files: []
metadata.gz.sig CHANGED
Binary file