textrepo 0.5.6 → 0.5.7

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: 0032a2287829a2a4beb5d2561a99f716a04d6d6ea5a2d99da93fed6dfb187eff
4
- data.tar.gz: 3af5842649ea9db629117699d44941742104aec93d35b87378d729b8d020ec98
3
+ metadata.gz: b85b70f9d672503576cbce911f202dac9d00cf8af3915109f304c4c2745ce32f
4
+ data.tar.gz: 9ca1decf965281c4f1a34b908a919478aafc915293412b3a9fa6e4903f57de45
5
5
  SHA512:
6
- metadata.gz: 8048e13e77c8aa8be78444b4c3e18aa955636434fb7f15f205f37b039f4c94122515f4481b3a4881923bb37661f8de968e2c80b8bf8fa2d9a101cf19ab7f9341
7
- data.tar.gz: 5d1aeda6151c09f0c9249aa6b6d2800f54749b5a1a5050a21e1d56bb1562e4935c5b0755b92be070164acb108db7c7db488a03e0ca4d99c3493adc1b3879f55d
6
+ metadata.gz: 6c24a75691c34d72dae4e33c13a22c7dc4a04539d29edcfafa31b93815b8fada5b0c7840f0c90b32b461eb925d28c32d0918dc65a5bda05592379d6f02ddd4bc
7
+ data.tar.gz: bc16b111bf4bc9cc7ca62942025961ac572ee892925bcce0f6a6b8c2e78ea664affbbcb18d79832cd4168fcaf62b57410f0c058c315e600750e6e348d5541153
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
  ## [Unreleased]
8
8
  Nothing to record here.
9
9
 
10
+ ## [0.5.7] - 2020-11-16
11
+ ### Fixed
12
+ - Fix issue #47: mmdd pattern matches incorrectly (`#entries`).
13
+
10
14
  ## [0.5.6] - 2020-11-11
11
15
  ### Add
12
16
  - Change `Repository` to enumerable.
@@ -27,11 +31,11 @@ Nothing to record here.
27
31
  - `Repository#update(timestamp, text, keep_stamp = false)`
28
32
 
29
33
  ## [0.5.3] - 2020-11-03
30
- ### Changed
34
+ ### Fixed
31
35
  - Fix issue #38: fix typo in code for FileSystemRepository.
32
36
 
33
37
  ## [0.5.2] - 2020-11-03
34
- ### Changed
38
+ ### Fixed
35
39
  - Fix issue #34:
36
40
  - fix FileSystemRepository#entries to accept "yyyymo" pattern as a
37
41
  Timestamp pattern.
@@ -39,7 +43,7 @@ Nothing to record here.
39
43
  - Fix issue #31: unfriendly error message of Timestamp.parse_s.
40
44
 
41
45
  ## [0.5.1] - 2020-11-02
42
- ### Changed
46
+ ### Fixed
43
47
  - Fix issue #28.
44
48
  - Modify `Repository#update` to do nothing when the given text is
45
49
  identical to the one in the repository.
@@ -190,7 +190,7 @@ module Textrepo
190
190
  results << stamp
191
191
  end
192
192
  when 0, "yyyymoddhhmiss".size, "yyyymodd".size, "yyyymo".size
193
- results += find_entries(stamp_pattern)
193
+ results += find_entries("#{stamp_pattern}*")
194
194
  when 4 # "yyyy" or "modd"
195
195
  pat = nil
196
196
  # The following distinction is practically correct, but not
@@ -199,10 +199,10 @@ module Textrepo
199
199
  # any text (I believe...).
200
200
  if stamp_pattern.to_i > 1231
201
201
  # yyyy
202
- pat = stamp_pattern
202
+ pat = "#{stamp_pattern}*"
203
203
  else
204
204
  # modd
205
- pat = "*#{stamp_pattern}"
205
+ pat = "????#{stamp_pattern}*"
206
206
  end
207
207
  results += find_entries(pat)
208
208
  end
@@ -270,7 +270,7 @@ module Textrepo
270
270
  end
271
271
 
272
272
  def find_entries(stamp_pattern)
273
- Dir.glob("#{@path}/**/#{stamp_pattern}*.#{@extname}").map { |e|
273
+ Dir.glob("#{@path}/**/#{stamp_pattern}.#{@extname}").map { |e|
274
274
  begin
275
275
  Timestamp.parse_s(timestamp_str(e))
276
276
  rescue InvalidTimestampStringError => _
@@ -1,3 +1,3 @@
1
1
  module Textrepo
2
- VERSION = '0.5.6'
2
+ VERSION = '0.5.7'
3
3
  end
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.6
4
+ version: 0.5.7
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 00:00:00.000000000 Z
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler