Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Threads #66

Merged
merged 15 commits into from
Oct 21, 2018
Merged

Threads #66

merged 15 commits into from
Oct 21, 2018

Conversation

Mifrill
Copy link
Owner

@Mifrill Mifrill commented Oct 20, 2018

No description provided.

@Mifrill Mifrill self-assigned this Oct 20, 2018
end

def second
puts __method__
yield Runner.run(parser: self.class, method: :third, url: nil, data: {})
yield task(parser: self.class, method: :third, url: 'http://google.com/', data: {})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [87/80]

end

def first
puts __method__
yield Runner.run(parser: self.class, method: :second, url: nil, data: {})
yield task(parser: self.class, method: :second, url: 'http://google.com/', data: {})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [88/80]

app/app.rb Outdated
@@ -40,6 +41,46 @@ def parse_class(text)
end
end

def start
@@runner = Runner.new

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/ClassVars: Replace class var @@runner with a class instance var.

@@ -40,6 +41,46 @@ def parse_class(text)
end
end

def start

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/AbcSize: Assignment Branch Condition size for start is too high. [22.2/15]
Metrics/MethodLength: Method has too many lines. [27/10]

@Mifrill
Copy link
Owner Author

Mifrill commented Oct 20, 2018

should be test covered

@codecov
Copy link

codecov bot commented Oct 21, 2018

Codecov Report

Merging #66 into master will increase coverage by 18.49%.
The diff coverage is 71.64%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #66       +/-   ##
===========================================
+ Coverage   55.97%   74.46%   +18.49%     
===========================================
  Files           6        4        -2     
  Lines         159       94       -65     
===========================================
- Hits           89       70       -19     
+ Misses         70       24       -46
Impacted Files Coverage Δ
app/runner.rb 100% <100%> (ø) ⬆️
app/task.rb 100% <100%> (ø)
app/app.rb 62.5% <43.47%> (-12.5%) ⬇️
parsers/test_parser.rb 53.84% <53.84%> (ø)
spec/images_by_url_spec.rb

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 254f670...298cb30. Read the comment docs.

app/task.rb Outdated
attr_reader :parser, :method, :url, :data

def initialize(parser:, method:, url:, data:)
@parser, @method, @url, @data = parser, method, url, data

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/ParallelAssignment: Do not use parallel assignment.

@@ -0,0 +1,19 @@
module Parsers
class Task

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.

@@ -0,0 +1,19 @@
module Parsers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@runner ||= Runner.new
end

def start

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/MethodLength: Method has too many lines. [12/10]

app/app.rb Outdated
@@ -40,6 +40,30 @@ def parse_class(text)
end
end

def runner
@@runner ||= Runner.new

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/ClassVars: Replace class var @@runner with a class instance var.

@coveralls
Copy link

coveralls commented Oct 21, 2018

Coverage Status

Coverage increased (+43.3%) to 92.531% when pulling 298cb30 on threads into 254f670 on master.

@@ -0,0 +1,33 @@
require 'spec_helper'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

allow(parser).to receive(:test).and_return(something: 'testing')
end

VCR.use_cassette('source') do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [34/25]

@@ -0,0 +1,68 @@
require 'spec_helper'

describe Parsers::Runner do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [53/25]

@@ -0,0 +1,68 @@
require 'spec_helper'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -0,0 +1,22 @@
require 'byebug'

class TestParser

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.

@@ -0,0 +1,22 @@
require 'byebug'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

app/app.rb Outdated
private

def runner
@@runner ||= Runner.new

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/ClassVars: Replace class var @@runner with a class instance var.


array = []
find_all('.row').each do |row|
array << { "#{row.find('.left').text.to_s}": row.find('.right').text.to_s }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [85/80]

end
end

describe Parsers do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [43/25]

it 'does something useful' do
VCR.use_cassette('yahoo') do
url = 'http://yahoo.com'
links = JSON.parse(result.list_links_images(url)).map { |link| link['link'] }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [85/80]

@@ -0,0 +1,77 @@
require 'spec_helper'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,7 +1,8 @@
require('spec_helper')
require 'spec_helper'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@Mifrill Mifrill merged commit 8001514 into master Oct 21, 2018
@Mifrill Mifrill deleted the threads branch October 21, 2018 12:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants