-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements #9
Open
shinenelson
wants to merge
17
commits into
jeKnowledge:master
Choose a base branch
from
shinenelson:improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Improvements #9
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8274bc3
Change birthdays database to YAML / JSON
shinenelson 17a3ea0
Configurize db_path for the birthdays database
shinenelson 726d61a
Rename configurations.json to configuration.json.example
shinenelson c45e1e1
Optimize bot to work with {hash}ed birthdays
shinenelson 9f7bc88
Configurize mention'ing team members
shinenelson dfbcc78
Update README.md with more detailed instructions
shinenelson d409122
Rename db_path to birthdays_path (Resolves https://github.com/jeKnowl…
shinenelson 077a104
Log Time.now
shinenelson 2ee35b3
change date keys to string
shinenelson 9b83de9
handle empty / nil YAML.load_file
shinenelson ed5c9cb
remove spaces (Resolves https://github.com/jeKnowledge/slack-birthday…
shinenelson e901b71
move birthday list filter to birthday_bot from birthday_reader
shinenelson f4dbfe8
add today = Time.now (Resolves https://github.com/jeKnowledge/slack-b…
shinenelson e3a0763
def build_user_list
shinenelson 56c8b07
[refactor] remove httparty dependency
shinenelson e64afd9
[docs] replace db_path with birthdays_path
shinenelson 0596516
[readme] fix URL in contributors' list
shinenelson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
01 : | ||
{ | ||
01 : [ "elvina.slovak" ] | ||
}, | ||
|
||
02 : | ||
{ | ||
02 : [ "john.doe", "jane.doe" ], | ||
28 : [ "chris.nolan" ], | ||
}, | ||
|
||
04 : | ||
{ | ||
15 : [ "erwin.down", "leora.pontious", "randy.young" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
01 : | ||
01 : [ "elvina.slovak" ] | ||
|
||
02 : | ||
02 : [ "john.doe", "jane.doe" ] | ||
28 : [ "chris.nolan" ] | ||
|
||
04 | ||
15 : [ "erwin.down", "leora.pontious", "randy.young" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of this class is to read birthdays only, I don't think we should return only the birthdays according to
Time.now
, instead we should return all of them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The primary reason I switched to a structured format for the database was to drill down to the exact date to fetch all the birthdays on the day. What would be the use case to have return all the birthdays together? It would just use more memory (for no particular gain, whatsoever) IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not against the structuring.
What I am saying is that the purpose of the function is to read birthdays. It is not to read and filter. That is why I think we should not filter the birthdays here.
And because we are just managing strings of birthdays I guess memory is not a concern.