build-files 1.4.3 → 1.4.4

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
  SHA256:
3
- metadata.gz: c5298ff2018cafcc8c18f9319af1027d92c5f5a1b2c11cb683f916d65e0ba5ba
4
- data.tar.gz: ab00474b4117ae16729255445285d9b835fe1d92a6de7b5c7a10207bb684c4e1
3
+ metadata.gz: 1bc83a50590e47d506077954a01e6b550d86cb926c96b3d99cf1983d25ded1ba
4
+ data.tar.gz: e927fdf5e155f71fe51810661d83cd8088a0896035f19c94b35c508648c341eb
5
5
  SHA512:
6
- metadata.gz: fd0603af29ac1189dd43b9b8beee290e091709cb218389a47dce5489bfed64aa716d9534c6848d2a735341cf7ed34149fb815d46605020f2c1806743ed7e7a44
7
- data.tar.gz: b47e003284e29761c501d27e82032011e9350e816627d16223f24657c5f8ffdb155e69753c179ffc08b7c7bd95e633bc6aa851b55c1feab64be834cbce6e5529
6
+ metadata.gz: 655bd4cc6e70e89d4c06c7b9bd7a61810d2ff567af333f583d727a4ee0ba7f01b1154d8a455505b43b3d3d9544a662c663a72e1dfe3701c14e690944c6a70494
7
+ data.tar.gz: ad2d9507d2e5c1372b439852763c9175f9847fc5b66248710544f41ef9d1aee4fbe6565d1dd84d10be3f498ce8e8333c329f99285dff2549e40d464353cf5bd5
@@ -89,9 +89,6 @@ module Build
89
89
  # Effectively dirname and basename:
90
90
  @root, _, @relative_path = full_path.rpartition(File::SEPARATOR)
91
91
  end
92
-
93
- # This improves the cost of hash/eql? slightly but the root cannot be deconstructed if it was an instance of Path.
94
- # @root = @root.to_s
95
92
  end
96
93
 
97
94
  attr :root
@@ -116,7 +113,7 @@ module Build
116
113
  alias parts components
117
114
 
118
115
  def relative_path
119
- @relative_path ||= Path.relative_path(@root.to_s, @full_path).freeze
116
+ @relative_path ||= Path.relative_path(@root.to_s, @full_path.to_s).freeze
120
117
  end
121
118
 
122
119
  def relative_parts
@@ -190,7 +187,7 @@ module Build
190
187
  end
191
188
 
192
189
  def to_str
193
- @full_path
190
+ @full_path.to_str
194
191
  end
195
192
 
196
193
  def to_path
@@ -198,7 +195,8 @@ module Build
198
195
  end
199
196
 
200
197
  def to_s
201
- @full_path
198
+ # It's not guaranteed to be string.
199
+ @full_path.to_s
202
200
  end
203
201
 
204
202
  def inspect
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Build
22
22
  module Files
23
- VERSION = "1.4.3"
23
+ VERSION = "1.4.4"
24
24
  end
25
25
  end
@@ -92,6 +92,12 @@ RSpec.describe Build::Files::Path.new("/foo/bar/baz", "/foo") do
92
92
  expect(subject + nil).to be == subject
93
93
  end
94
94
 
95
+ it "can inspect path with nil root" do
96
+ expect do
97
+ (subject / nil).inspect
98
+ end.to_not raise_error
99
+ end
100
+
95
101
  it "can add nil root" do
96
102
  expect(subject / nil).to be == subject
97
103
  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.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-14 00:00:00.000000000 Z
11
+ date: 2019-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb-inotify
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubygems_version: 3.0.2
155
+ rubygems_version: 3.0.3
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Build::Files is a set of idiomatic classes for dealing with paths and monitoring