Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Razomni
Copy link
Contributor

@Razomni Razomni commented Jan 31, 2019

Name

Vladislav Golovkin

Homework#

1

Comment

Level 1
See README.md

Checklist

  • I have read homework assignment fully
  • I have implemented homework assignment fully
  • My pull request is named "#{name} #{surname} - #{homework_number}"
  • My code is located under "#{name} #{surname}/#{homework_number}"
  • It executes correctly
  • It doesn't crash, freeze, kill everyone on unexpected input
  • Credentials are NOT hardcoded
  • Large files and credentials added to .gitignore INSIDE homework dir
  • It can be tested in under 10 minutes (download part + parse + execute)
  • Gemfile added, it runs under bundle exec without error

Copy link

@houndci-bot houndci-bot left a 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,106 @@
require 'mechanize'
Copy link
Collaborator

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

@RGBD RGBD self-assigned this Feb 2, 2019
Copy link

@houndci-bot houndci-bot left a 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.

Copy link

@houndci-bot houndci-bot left a 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
Copy link
Collaborator

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
Copy link
Collaborator

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+\. /, '') }
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants