-
Notifications
You must be signed in to change notification settings - Fork 18
Add internal logger and tests #11
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
Conversation
Rakefile
Outdated
| RSpec::Core::RakeTask.new(:spec) | ||
|
|
||
| task :default => :spec | ||
| task default: :spec |
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.
changed by Rubocop
lib/logdna/resources.rb
Outdated
| MS_IN_A_DAY = 86400000 | ||
| MAX_REQUEST_TIMEOUT = 300000 | ||
| MAX_LINE_LENGTH = 32000 | ||
| LOG_LEVELS = %w[DEBUG INFO WARN ERROR FATAL TRACE].freeze |
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.
changed by rubocop. I am not sure which one reads better
| end | ||
|
|
||
| # Should retry to connect and preserve the failed line | ||
| def fatal_method_not_found(level, port, expected_level) |
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 decided not pass the parameter for repetition number (how many times to call the method and with which values for each time) bc I think it will be less readable.
dchai76
left a comment
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.
Ugh, the rubocop-initiated changes make this harder to review. They should arguably have been in a separate PR, but whatever.
One request - it's nicer for your reviewers if you avoid all the temp commits with meaningless titles and squash them with a descriptive summary before you push your changes to remote. It just makes things easier to follow.
dchai76
left a comment
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.
Let's leave the CircleCI changes for a separate PR - otherwise looks good.
smusali
left a comment
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.
make sure to rebase with master after #13 gets merged in and make required correction to some files
Besides rebasing, there are 2 things that
|
9d4025e to
f4fb072
Compare
Adds internal logger instead of "puts"
Adds tests for all methods and unsuccessful request.