Skip to content

Commit

Permalink
fix: Ignore Lint/Loop for tumblr (#360)
Browse files Browse the repository at this point in the history
Merge pull request 360
  • Loading branch information
DirtyF authored and jekyllbot committed Oct 11, 2018
1 parent a1878df commit 9077994
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ AllCops:
- vendor/**/*
- Rakefile

Lint/Loop:
Exclude:
- lib/jekyll-import/importers/tumblr.rb

Lint/NestedMethodDefinition:
Exclude:
- lib/jekyll-import/importers/posterous.rb
Expand Down
4 changes: 2 additions & 2 deletions lib/jekyll-import/importers/tumblr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.process(options)
posts = []
# Two passes are required so that we can rewrite URLs.
# First pass builds up an array of each post as a hash.
until blog["posts"].size < per_page
begin
current_page = (current_page || -1) + 1
feed_url = url + "?num=#{per_page}&start=#{current_page * per_page}"
Jekyll.logger.info "Fetching #{feed_url}"
Expand All @@ -53,7 +53,7 @@ def self.process(options)
else
batch.each { |post| write_post(post, format == "md", add_highlights) }
end
end
end until blog["posts"].size < per_page

# Rewrite URLs, create redirects and write out out posts if necessary
if rewrite_urls
Expand Down

0 comments on commit 9077994

Please sign in to comment.