textrepo 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/textrepo/file_system_repository.rb +6 -5
- data/lib/textrepo/timestamp.rb +9 -2
- data/lib/textrepo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c33d87733a93d357237cf217161c5d56c37e9b48d4f9a52b9a59ec8a945f6377
|
4
|
+
data.tar.gz: 2c8969d2ee93dfb1f6b84e49be43eb81630e63341ad77da2fbed3c59be465b78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 711e6b19e280887f6558ecd62e39abf6146efbafe817ad9db329dd33c9fdd0e4b5d5feef4c8a246872c748142daee96518030ab378c2756dd1eb66ca40dbbade
|
7
|
+
data.tar.gz: 3b129941b8df7f41540a5088357bd562a11c3567635e8e26002a2a4222850b89a58d1147d0b3305b17835f0e720b86bf3a8b4ea0dccbfb01d098d00962bbe42d
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
## [Unreleased]
|
8
8
|
Nothing to record here.
|
9
9
|
|
10
|
+
## [0.5.2] - 2020-11-03
|
11
|
+
### Changed
|
12
|
+
- Fix issue #34:
|
13
|
+
- fix FileSystemRepository#entries to accept "yyyymo" pattern as a
|
14
|
+
Timestamp pattern.
|
15
|
+
- Fix issue #33: fix typo in the doc for FileSystemRepository.new.
|
16
|
+
- Fix issue #31: unfriendly error message of Timestamp.parse_s.
|
17
|
+
|
10
18
|
## [0.5.1] - 2020-11-02
|
11
19
|
### Changed
|
12
20
|
- Fix issue #28.
|
@@ -67,9 +67,10 @@ module Textrepo
|
|
67
67
|
# were not defined in `conf`.
|
68
68
|
#
|
69
69
|
# Be careful to set `:searcher_options`, it must be to specify the
|
70
|
-
# searcher behavior equivalent to `grep` with "-
|
71
|
-
#
|
72
|
-
# grep on macOS), GNU grep, and ripgrep (aka rg). They
|
70
|
+
# searcher behavior equivalent to `grep` with "-inRE". The
|
71
|
+
# default values for the searcher options is defined for BSD grep
|
72
|
+
# (default grep on macOS), GNU grep, and ripgrep (aka rg). They
|
73
|
+
# are:
|
73
74
|
#
|
74
75
|
# "grep" => ["-i", "-n", "-R", "-E"]
|
75
76
|
# "egrep" => ["-i", "-n", "-R"]
|
@@ -77,7 +78,7 @@ module Textrepo
|
|
77
78
|
# "gegrep" => ["-i", "-n", "-R"]
|
78
79
|
# "rg" => ["-S", "-n", "--no-heading", "--color", "never"]
|
79
80
|
#
|
80
|
-
# If use those
|
81
|
+
# If use those searchers, it is not recommended to set
|
81
82
|
# `:searcher_options`. The default value works well in
|
82
83
|
# `textrepo`.
|
83
84
|
#
|
@@ -186,7 +187,7 @@ module Textrepo
|
|
186
187
|
if exist?(stamp)
|
187
188
|
results << stamp
|
188
189
|
end
|
189
|
-
when 0, "yyyymoddhhmiss".size, "yyyymodd".size
|
190
|
+
when 0, "yyyymoddhhmiss".size, "yyyymodd".size, "yyyymo".size
|
190
191
|
results += find_entries(stamp_pattern)
|
191
192
|
when 4 # "yyyy" or "modd"
|
192
193
|
pat = nil
|
data/lib/textrepo/timestamp.rb
CHANGED
@@ -97,8 +97,15 @@ module Textrepo
|
|
97
97
|
begin
|
98
98
|
ye, mo, da, ho, mi, se, sfx = split_stamp(stamp_str).map(&:to_i)
|
99
99
|
Timestamp.new(Time.new(ye, mo, da, ho, mi, se), sfx)
|
100
|
-
rescue InvalidTimestampStringError, ArgumentError =>
|
101
|
-
|
100
|
+
rescue InvalidTimestampStringError, ArgumentError => e
|
101
|
+
emsg = if stamp_str.nil?
|
102
|
+
"(nil)"
|
103
|
+
elsif stamp_str.empty?
|
104
|
+
"(empty string)"
|
105
|
+
else
|
106
|
+
stamp_str
|
107
|
+
end
|
108
|
+
raise InvalidTimestampStringError, emsg
|
102
109
|
end
|
103
110
|
end
|
104
111
|
|
data/lib/textrepo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: textrepo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mnbi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|