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

Use Ruby 2.3 and Rubocop 0.55 #214

Merged
merged 1 commit into from
Jul 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ inherit_gem:
jekyll: .rubocop.yml

AllCops:
TargetRubyVersion: 2.1
TargetRubyVersion: 2.3
Include:
- lib/*.rb

Expand Down
4 changes: 3 additions & 1 deletion jekyll-sitemap.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r!^(test|spec|features)/!)
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.3.0"

spec.add_dependency "jekyll", "~> 3.3"

spec.add_development_dependency "bundler", "~> 1.16"
spec.add_development_dependency "jekyll-last-modified-at", "0.3.4"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rubocop", "0.51"
spec.add_development_dependency "rubocop", "0.55"
end
2 changes: 1 addition & 1 deletion lib/jekyll-sitemap/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Jekyll
module Sitemap
VERSION = "1.2.0".freeze
VERSION = "1.2.0"
end
end
2 changes: 2 additions & 0 deletions lib/jekyll/page_without_a_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

module Jekyll
class PageWithoutAFile < Page
# rubocop:disable Naming/MemoizedInstanceVariableName
def read_yaml(*)
Copy link
Member Author

Choose a reason for hiding this comment

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

Rubocop wants to call this method @read_yaml

Copy link
Member

Choose a reason for hiding this comment

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

The method is already called read_yaml, Rubocop wants us to name the @data instance @read_yaml no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh! Yeah, ok, that makes a lot more sense 🤦‍♂️

@data ||= {}
end
# rubocop:enable Naming/MemoizedInstanceVariableName
end
end