dsu 1.1.2 → 1.2.0

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: 17c91e41af3f1aff56de7740ccbc27cb9d024bb28c850216e198036b2b8ddac3
4
- data.tar.gz: 1ebff03df51f1d98642181c3504b7f14ce28a5c3b9ec7fee983e999291fddf06
3
+ metadata.gz: f500cfe8707d939020d669f5196f30167ae14195827f96066a594463b549d6d7
4
+ data.tar.gz: 4399c77c765050e3af7b6c2310c57063c6a89e46c8a0d69fadac6936a7269501
5
5
  SHA512:
6
- metadata.gz: b2cd09f9407c7bd079f826f3e6450b6f092e2d19e9f1e0c5f6f81d77f338864e6f3617603e2f24d68d821cf23b1514d7e49b5efdb9de84acc098579b274180b6
7
- data.tar.gz: 8a35fcaa5c4e376b8df795be462874cfa2fce1359c5b4c11fa7a251dd98d248ee0ab52150db99764405cd8a338e17f0358c4052ef2e2cd2c80f6a049975e67a6
6
+ metadata.gz: 9db967077cdbb83eff72ae203f87c88d3bf835f0339b4ec9e15db9fa2918dc0275a01fa6ff2752019505eaf8ffe61fece1dccd64b5255ad74fcbe449acdca22d
7
+ data.tar.gz: ed725fc2bba98f3a4b8ad2ec3e4e6fc1e36e9a3e20102580f406ec6ea253e7a99a61edbc0b3832473491ff93dd97099db38aa2cd060e6d6c3b4571b33f180840
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## [1.1.2] 2023-05-??
1
+ ## [1.2.0] 2023-05-26
2
+ * Changes
3
+ - Various refactors.
4
+ - Bring test coverage to >= 85%.
5
+ ## [1.1.2] 2023-05-26
2
6
  * Changes
3
7
  - Various refactors.
4
8
  - Add more test coverage.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dsu (1.1.2)
4
+ dsu (1.2.0)
5
5
  activemodel (~> 7.0, >= 7.0.4.3)
6
6
  activesupport (~> 7.0, >= 7.0.4)
7
7
  colorize (~> 0.8.1)
@@ -11,12 +11,14 @@ module Dsu
11
11
 
12
12
  def validate(record)
13
13
  unless record.entries.is_a?(Array)
14
- record.errors.add(:entries_entry, 'is the wrong object type. ' \
15
- "\"Array\" was expected, but \"#{record.entries.class}\" was received.")
14
+ record.errors.add(:entries, 'is the wrong object type. ' \
15
+ "\"Array\" was expected, but \"#{record.entries.class}\" was received.")
16
+ return
16
17
  end
17
18
 
18
- validate_entry_types record
19
- validate_unique_entry record
19
+ return if validate_entry_types record
20
+ return if validate_unique_entry record
21
+
20
22
  validate_entries record
21
23
  end
22
24
 
@@ -26,10 +28,12 @@ module Dsu
26
28
  record.entries.each do |entry|
27
29
  next if entry.is_a? Dsu::Models::Entry
28
30
 
29
- record.errors.add(:entries_entry, 'entry Array element is the wrong object type. ' \
30
- "\"Entry\" was expected, but \"#{entry.class}\" was received.",
31
+ record.errors.add(:entries, 'Array element is the wrong object type. ' \
32
+ "\"Entry\" was expected, but \"#{entry.class}\" was received.",
31
33
  type: Support::FieldErrors::FIELD_TYPE_ERROR)
32
34
  end
35
+
36
+ record.errors.any?
33
37
  end
34
38
 
35
39
  def validate_unique_entry(record)
@@ -42,10 +46,12 @@ module Dsu
42
46
 
43
47
  non_unique_descriptions = descriptions.select { |description| descriptions.count(description) > 1 }.uniq
44
48
  if non_unique_descriptions.any?
45
- record.errors.add(:entries_entry, 'contains a duplicate entry: ' \
46
- "#{format_non_unique_descriptions(non_unique_descriptions)}.",
49
+ record.errors.add(:entries, 'Array contains a duplicate entry: ' \
50
+ "#{format_non_unique_descriptions(non_unique_descriptions)}.",
47
51
  type: Support::FieldErrors::FIELD_DUPLICATE_ERROR)
48
52
  end
53
+
54
+ record.errors.any?
49
55
  end
50
56
 
51
57
  def validate_entries(record)
data/lib/dsu/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dsu
4
- VERSION = '1.1.2'
4
+ VERSION = '1.2.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dsu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gene M. Angelo, Jr.
@@ -118,18 +118,25 @@ dependencies:
118
118
  - - "~>"
119
119
  - !ruby/object:Gem::Version
120
120
  version: '1.0'
121
- description: " dsu is little gem that helps manage your Agile DSU (Daily Stand
122
- Up) participation. How? by providing a simple command line interface (CLI) which
123
- allows you to create, read, update, and delete (CRUD) noteworthy activities that
124
- you performed during your day. During your DSU, you can then easily recall and share
125
- these these activities with your team. Activities are grouped by day and can be
126
- viewed in simple text format from the command line. When displaying DSU entries
127
- for a particular day or date (date), dsu will display the given day or date's (date)
128
- DSU entries, as well as the DSU entries for the previous day, relative to the given
129
- day or date. If the date or day you are trying to view falls on a weekend or Monday,
130
- dsu will display back to, and including the weekend and previous Friday inclusive;
131
- this is so that you can share what you did over the weekend (if anything) and the
132
- previous Friday at your DSU.\n"
121
+ description: ' dsu is a small, but powerful gem that helps manage your Agile DSU
122
+ (Daily Stand Up) participation. How? by providing a simple command-line interface
123
+ (CLI) which allows you to create, read, update, and delete (CRUD) your DSU entries
124
+ (activities). During your DSU, you can use dsu''s CLI to list and share what you
125
+ did "yesterday" and what you plan on doing "Today" with your team. DSU entries are
126
+ grouped by day and can be viewed in simple text format from the command-line. When
127
+ displaying DSU entries for a particular day, dsu will also display DSU entries for
128
+ the previous day. If the day you are trying to display falls on a weekend or Monday,
129
+ dsu will automatically search back to include the weekend and previous Friday dates
130
+ and display the entries; this is so that you can share what you did over the weekend
131
+ (if anything) and the previous Friday with your team. When searching for "Yesterday''s"
132
+ DSU entries, dsu will automatically search back a maximimum of 7 days to find DSU
133
+ entries to share. This could be helpful if, for example, if you are sharing what
134
+ you plan to do today (Wednesday), but were sick yesterday (Tuesday); dsu in this
135
+ case will display the last DSU entries it can find searching backwards a maximum
136
+ of 7 days. dsu does a LOT more and is perfect for command-line junkies and those
137
+ who LOVE simplicity. Give it a try and a star if you like it!
138
+
139
+ '
133
140
  email:
134
141
  - public.gma@gmail.com
135
142
  executables: