dsu 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/lib/dsu/validators/entries_validator.rb +14 -8
- data/lib/dsu/version.rb +1 -1
- metadata +20 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f500cfe8707d939020d669f5196f30167ae14195827f96066a594463b549d6d7
|
4
|
+
data.tar.gz: 4399c77c765050e3af7b6c2310c57063c6a89e46c8a0d69fadac6936a7269501
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db967077cdbb83eff72ae203f87c88d3bf835f0339b4ec9e15db9fa2918dc0275a01fa6ff2752019505eaf8ffe61fece1dccd64b5255ad74fcbe449acdca22d
|
7
|
+
data.tar.gz: ed725fc2bba98f3a4b8ad2ec3e4e6fc1e36e9a3e20102580f406ec6ea253e7a99a61edbc0b3832473491ff93dd97099db38aa2cd060e6d6c3b4571b33f180840
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -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(:
|
15
|
-
|
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(:
|
30
|
-
|
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(:
|
46
|
-
|
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
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.
|
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:
|
122
|
-
Up) participation. How? by providing a simple command
|
123
|
-
allows you to create, read, update, and delete (CRUD)
|
124
|
-
|
125
|
-
|
126
|
-
viewed in simple text format from the command
|
127
|
-
for a particular day
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
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:
|