eco-helpers 2.7.22 → 2.7.23

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: 7cc77a4ee2eb9f30b13efc22f5eaedff1b564f9831c3b7f4d9430b80185ffb83
4
- data.tar.gz: fbe4135c3c9c08d46c1ee39b1b3de0c28fd2be547243d2137e49517997052d96
3
+ metadata.gz: 1d522c29136b4722235f8dbf8349d7328ba7ebe90f77d5fecf15a03a049cc8fe
4
+ data.tar.gz: b2529b04d22fcc9f013366c07a5bb7905c8d6154af97c4d235fafc1f0bf6452b
5
5
  SHA512:
6
- metadata.gz: 3f9d81d2a91bf458dadd99e60b15c2e4063e902fa4e9663383367f91a0ad39fdbf4bd4f367a11fa5aef6f9aacfe82ee22161adc4f36ec46781e2d23ef9798168
7
- data.tar.gz: 823605e14716575990fcc13db6e538bc7642164b77b889d10fb0b3037bd8a9304751e012ba1fe3229895e0ec1d3585ea69318496a4226df5af18a7c288a42f81
6
+ metadata.gz: 822b1359de0c56118ed2e8e564a54c1119a2bb7597373c029cc72e3f808b3fbd94853a8eced013033613f77b0cfb0c47983e4e03e60e928e30bb6084096d9250
7
+ data.tar.gz: f32a7ad2a927015c1a2a1b0642f379c1014231db7a2aea00187bf690584a738c7f6770ba361422eeecbf097f2b760c6c6ee502b8c6ca5d790354cef13bf58f26
data/CHANGELOG.md CHANGED
@@ -2,7 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [2.7.22] - 2024-07-xx
5
+ ## [2.7.24] - 2024-07-xx
6
+
7
+ ### Added
8
+
9
+ ### Changed
10
+
11
+ ### Fixed
12
+
13
+ ## [2.7.23] - 2024-07-29
14
+
15
+ ### Fixed
16
+
17
+ - Filename and path scoping
18
+
19
+ ## [2.7.22] - 2024-07-26
6
20
 
7
21
  ### Added
8
22
 
@@ -17,10 +17,10 @@ module Eco
17
17
  end
18
18
 
19
19
  def dir_path=(value)
20
- @dir = Eco::Data::Files::Directory.new(value)
20
+ @dir = Eco::Data::Files::Directory.new(value)
21
21
  @dir_path = @dir.create
22
- rescue StandardError => e
23
- logger.error("could not create or make any sense of directory '#{value}': #{e.to_s}")
22
+ rescue StandardError => err
23
+ logger.error("could not create or make any sense of directory '#{value}': #{err}")
24
24
  end
25
25
 
26
26
  def logger
@@ -123,7 +123,8 @@ module Eco
123
123
 
124
124
  def filename_for(filename, modifier = :no_stamp)
125
125
  file = dir.file(filename)
126
- FileManager.timestamp_file(file) if modifier == :timestamp
126
+ file = FileManager.timestamp_file(file) if modifier == :timestamp
127
+ file
127
128
  end
128
129
  end
129
130
  end
@@ -54,19 +54,21 @@ module Eco
54
54
  end
55
55
 
56
56
  def file_name(fullname)
57
+ return nil unless fullname
58
+
57
59
  File.basename(fullname)
58
60
  end
59
61
 
60
62
  def file_basename(fullname)
61
- File.basename(fullname, File.extname(fullname))
62
- end
63
+ return nil unless fullname
63
64
 
64
- def file_path(fullname)
65
- File.dirname(fullname)
65
+ File.basename(fullname, File.extname(fullname))
66
66
  end
67
67
 
68
68
  def file_fullpath(fullname)
69
- file_path(File.expand_path(fullname))
69
+ return nil unless fullname
70
+
71
+ File.dirname(File.expand_path(fullname))
70
72
  end
71
73
 
72
74
  def file_exists?(file)
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = '2.7.22'.freeze
2
+ VERSION = '2.7.23'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.22
4
+ version: 2.7.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura