date_named_file 0.1.0 → 0.1.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/date_named_file/dated_file.rb +1 -0
- data/lib/date_named_file/template.rb +3 -1
- data/lib/date_named_file/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb870c5e1fb7a83394c2cd0d63385d81a033f18b53fe859142aaa1bd482f8d48
|
4
|
+
data.tar.gz: a4f40144afc276818cc70b251d910089eba00160223a0cd0d773ac62ff723981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebd909bd171cd28d99647591744a123ee4e4945921445569cd7e2c30b0f0664bc4b22d0cb7cb0eec3b0e4cefcd6546a37da6abb938b93c378f2e5bb9b6da4af3
|
7
|
+
data.tar.gz: 5317abdcf027f47e40b0c8b8d9832fcd4d8fdcbd0c70318d5b5299ec4731facb629349a7c520c2816761af0dafdec5890f4a05f6a4f0477d1445e5c44544c39d
|
@@ -31,6 +31,8 @@ module DateNamedFile
|
|
31
31
|
# NO support for mixing unix epoch with anything else. Why would you do that?
|
32
32
|
class Template
|
33
33
|
|
34
|
+
include DateNamedFile::DateishHelpers
|
35
|
+
|
34
36
|
SUBSTITUTION_REGEXP = {}
|
35
37
|
SUBSTITUTION_REGEXP['%Y'] = '(\d{4})'
|
36
38
|
%w[m d H M S].each {|x| SUBSTITUTION_REGEXP["%#{x}"] = '(\d{2})'}
|
@@ -74,7 +76,7 @@ module DateNamedFile
|
|
74
76
|
# @param [<anything date_ish>] date_ish (see #forgiving_dateify)
|
75
77
|
# @return [String] the expanded filename
|
76
78
|
def filename_for(date_ish)
|
77
|
-
|
79
|
+
forgiving_dateify(date_ish).strftime(template_string)
|
78
80
|
end
|
79
81
|
|
80
82
|
# Get a DateNamedFile::File for the given date/datetime
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: date_named_file
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Dueber
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
133
|
+
rubygems_version: 3.1.2
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Utility to deal with files with embedded dates
|