-
Notifications
You must be signed in to change notification settings - Fork 21
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
Vladislav Golovkin - 1 #48
base: master
Are you sure you want to change the base?
Conversation
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.
Some files could not be reviewed due to errors:
Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.
Vladislav Golovkin/1/server.rb
Outdated
@@ -0,0 +1,106 @@ | |||
require 'mechanize' |
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.
Please, split into several files corresponding to classes
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.
Some files could not be reviewed due to errors:
Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.
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.
Some files could not be reviewed due to errors:
Error: We found some problems with your configuration file: [/IrresponsibleMo...
Error: We found some problems with your configuration file: [/IrresponsibleModule] key 'IrresponsibleModule:' is undefined., [/DuplicateMethodCall] key 'DuplicateMethodCall:' is undefined., [/UtilityFunction] key 'UtilityFunction:' is undefined.
@@ -0,0 +1,42 @@ | |||
require 'telegram_bot' | |||
|
|||
TELEGRAM_BOT_TOKEN = '719163829:AAHNfvBccKUQ3KUqk-qEGc2EdSBRixmtYh4'.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.
don't hardcode credentials
require 'mechanize' | ||
require 'redis' | ||
|
||
URL_FUNNY_PUNS = 'https://thoughtcatalog.com/january-nelson/2018/03/50-short-funny-puns-that-will-crack-you-up-in-five-seconds-flat/'.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.
move inside data manager class
raw_p = page.search("div[@class='entry-block-group box-content'] p") | ||
|
||
rdy_h4 = [] | ||
raw_h4.each { |element| rdy_h4 << element.text.gsub(/\d+\. /, '') } |
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.
rdy_h4 += raw_h4.map { |element| element.text.gsub }
it's easier to read
Name
Vladislav Golovkin
Homework#
1
Comment
Level 1
See README.md
Checklist