utopia 2.17.0 → 2.17.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: 5549c06603672129f49f5d8c7f00b9cc706786460ba6597c3459be007d508c5c
4
- data.tar.gz: 7ee6b130a7a671944ec64c7a98cc8b01e7f579e64e978e3733462c2f60ead135
3
+ metadata.gz: 271df583d52d5b53718ed38a322b2ed66d73d1e8ecfe460f18961e156ce92d10
4
+ data.tar.gz: eaa41f80ca7244853bb1a08acc9ca0b1d76932e1cc3ebff58771fee1686eb4a7
5
5
  SHA512:
6
- metadata.gz: ae1d066e702f89c544236458d8753bcc01ab07aade2eb9b7e89755d88d9ddce520e3f1453ee9c8535f5f2788ae1cd5f5d34d412b4fdd8ee0ef00008d476debfc
7
- data.tar.gz: bba30364281ce80ff9c25597c7181a903579fe6fe28cf128e53ab730c768a216a3632e999a3c1f7a4ee249debe43c3e4afcfe59e1b4fee2a3f1df6c9f04f3f0e
6
+ metadata.gz: b9d8cef96cde92e960559a9618d447512ec35905b75cb67a116899607181db2c7bc4de457fe7739a8aea20cd98f9f1e7ee56e33656cc84873aaacc1f4337e22a
7
+ data.tar.gz: 4b6df56fabfc179ca95c11db76e31689ec722c1bdd6d1f430e5ce8f0a2d613d390bcee7f22b4399f59311c7ed2dc1843a706da49fc63af03f745319b0e0c322b
@@ -237,6 +237,7 @@ module Utopia
237
237
  return self.class.new(result)
238
238
  end
239
239
 
240
+ # Returns the first path component.
240
241
  def first
241
242
  if absolute?
242
243
  @components[1]
@@ -245,12 +246,19 @@ module Utopia
245
246
  end
246
247
  end
247
248
 
249
+ # Returns the last path component.
248
250
  def last
249
- @components.last
251
+ if @components != ['']
252
+ @components.last
253
+ end
250
254
  end
251
255
 
256
+ # Pops the last path component.
252
257
  def pop
253
- @components.pop
258
+ # We don't want to convert an absolute path to a relative path.
259
+ if @components != ['']
260
+ @components.pop
261
+ end
254
262
  end
255
263
 
256
264
  # @return [String] the last path component without any file extension.
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module Utopia
24
- VERSION = "2.17.0"
24
+ VERSION = "2.17.1"
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.17.0
4
+ version: 2.17.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: 2020-06-06 00:00:00.000000000 Z
11
+ date: 2020-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby