date_named_file 0.1.0 → 0.1.1

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: 8f891f2477e3244bcdd8dbe173a82c77d2b69f95dd851fc4334c49d8ca21f5d8
4
- data.tar.gz: 82314bb7a4f069c15a82d8f87bd4fe114cbdcf504fec8495a2484ae0ac8af85e
3
+ metadata.gz: cb870c5e1fb7a83394c2cd0d63385d81a033f18b53fe859142aaa1bd482f8d48
4
+ data.tar.gz: a4f40144afc276818cc70b251d910089eba00160223a0cd0d773ac62ff723981
5
5
  SHA512:
6
- metadata.gz: 2d92757d19200579ecee7c88e85e35e8ed7a3329835fbea57f5f361c3ba20227fe82006618183ec870f4d8e99449e54524c270081e552eda46bf0c84f7aabc26
7
- data.tar.gz: f84bc8f8eb057a47706d44fa7d65abbc74a38fdb56d539d0b4ab289f99a669e360a5488e79d89cbfe406cb200f9cc3317e5f487f456aff539c9b424c0c654880
6
+ metadata.gz: ebd909bd171cd28d99647591744a123ee4e4945921445569cd7e2c30b0f0664bc4b22d0cb7cb0eec3b0e4cefcd6546a37da6abb938b93c378f2e5bb9b6da4af3
7
+ data.tar.gz: 5317abdcf027f47e40b0c8b8d9832fcd4d8fdcbd0c70318d5b5299ec4731facb629349a7c520c2816761af0dafdec5890f4a05f6a4f0477d1445e5c44544c39d
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
+ require 'delegate'
4
5
  require 'date_named_file/template'
5
6
 
6
7
  module DateNamedFile
@@ -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
- Dateish.forgiving_dateify(date_ish).strftime(template_string)
79
+ forgiving_dateify(date_ish).strftime(template_string)
78
80
  end
79
81
 
80
82
  # Get a DateNamedFile::File for the given date/datetime
@@ -1,3 +1,3 @@
1
1
  module DateNamedFile
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-02-25 00:00:00.000000000 Z
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.0.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