dsu 1.2.0 → 1.2.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/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/dsu/support/entry_group_fileable.rb +5 -0
- data/lib/dsu/version.rb +1 -1
- data/lib/dsu/views/entry_group/edit.rb +5 -5
- 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: 6ce3877d498ca52f9395b713e062dd3448ef447028823b880d5a3e514009d8a9
|
4
|
+
data.tar.gz: 3c3a7ea5fd481d5d1e2ff409a812d5581d779d9061c736a8bd1994276c67e343
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e25b5428fa6779df05b47b37323e5ae25ae776dfa9eb78463f79c2332d84e338b3f668f805ac5c9f24e5702db4d2802e46ee8439fa94d01ffafc6e15093f650a
|
7
|
+
data.tar.gz: 46aa0bbd606a025f9ffc458c98cc59d0070caac1d89d73eafec90d57da7cc7aedc552ece986fbede7bf7f7977d9afbbd314027f61c371d637d5187ae2968cbd2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## [1.2.1] 2023-06-02
|
2
|
+
* Bug fixes
|
3
|
+
- Fixed a bug that raises an error `NoMethodError` for `entry_group_file_exists?` if the `carry_over_entries_to_today` configuration option is set to true, and attempting to edit today's dsu entries.
|
1
4
|
## [1.2.0] 2023-05-26
|
2
5
|
* Changes
|
3
6
|
- Various refactors.
|
data/Gemfile.lock
CHANGED
@@ -14,6 +14,11 @@ module Dsu
|
|
14
14
|
File.exist?(entry_group_file_path)
|
15
15
|
end
|
16
16
|
|
17
|
+
def entry_group_file_exists_for?(time:)
|
18
|
+
entries_file_name = time.strftime(configuration_or_options_configuration[:entries_file_name])
|
19
|
+
File.join(entries_folder, entries_file_name)
|
20
|
+
end
|
21
|
+
|
17
22
|
private
|
18
23
|
|
19
24
|
def entry_group_path_exists?
|
data/lib/dsu/version.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative '../../models/entry_group'
|
4
|
-
require_relative '../../support/
|
4
|
+
require_relative '../../support/entry_group_fileable'
|
5
5
|
|
6
6
|
module Dsu
|
7
7
|
module Views
|
8
8
|
module EntryGroup
|
9
9
|
class Edit
|
10
|
-
include Support::
|
10
|
+
include Support::EntryGroupFileable
|
11
11
|
|
12
12
|
def initialize(entry_group:, options: {})
|
13
13
|
raise ArgumentError, 'entry_group is nil' if entry_group.nil?
|
@@ -100,7 +100,7 @@ module Dsu
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def previous_entry_group?
|
103
|
-
previous_entry_group.present?
|
103
|
+
previous_entry_group.entries.present?
|
104
104
|
end
|
105
105
|
|
106
106
|
def previous_entry_group
|
@@ -108,13 +108,13 @@ module Dsu
|
|
108
108
|
# TODO: Make this configurable or accept an option?
|
109
109
|
@previous_entry_group ||= (1..7).each do |days|
|
110
110
|
t = time.days_ago(days)
|
111
|
-
return Models::EntryGroup.load(time: t) if
|
111
|
+
return Models::EntryGroup.load(time: t) if entry_group_file_exists_for?(time: t)
|
112
112
|
end
|
113
113
|
nil
|
114
114
|
end
|
115
115
|
|
116
116
|
def carry_over_entries_to_today?
|
117
|
-
configuration[:carry_over_entries_to_today]
|
117
|
+
configuration.merge(options)[:carry_over_entries_to_today]
|
118
118
|
end
|
119
119
|
end
|
120
120
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dsu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gene M. Angelo, Jr.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|