Skip to content

Commit

Permalink
Rubocop: autocorrect (#165)
Browse files Browse the repository at this point in the history
Merge pull request 165
  • Loading branch information
jekyllbot authored Nov 7, 2017
1 parent dd5cbc6 commit 37eed64
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"
gemspec

Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
require "rspec/core/rake_task"

Expand Down
6 changes: 3 additions & 3 deletions jekyll-redirect-from.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# coding: utf-8
# frozen_string_literal: true

lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
Expand All @@ -24,8 +24,8 @@ Gem::Specification.new do |spec|

spec.add_runtime_dependency "jekyll", "~> 3.3"
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rspec", "~> 3.5"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "jekyll-sitemap", "~> 1.0"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "rspec", "~> 3.5"
spec.add_development_dependency "rubocop", "~> 0.43"
end
2 changes: 2 additions & 0 deletions lib/jekyll-redirect-from.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "jekyll"
require "jekyll-redirect-from/version"
require "jekyll-redirect-from/generator"
Expand Down
2 changes: 2 additions & 0 deletions lib/jekyll-redirect-from/context.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module JekyllRedirectFrom
# Stubbed LiquidContext to support relative_url and absolute_url helpers
class Context
Expand Down
2 changes: 2 additions & 0 deletions lib/jekyll-redirect-from/generator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module JekyllRedirectFrom
class Generator < Jekyll::Generator
safe true
Expand Down
2 changes: 2 additions & 0 deletions lib/jekyll-redirect-from/layout.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module JekyllRedirectFrom
# A stubbed layout for our default redirect template
# We cannot use the standard Layout class because of site.in_source_dir
Expand Down
2 changes: 2 additions & 0 deletions lib/jekyll-redirect-from/page_without_a_file.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module JekyllRedirectFrom
class PageWithoutAFile < Jekyll::Page
def read_yaml(*)
Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll-redirect-from/redirect_page.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Encoding: utf-8
# frozen_string_literal: true

module JekyllRedirectFrom
# Specialty page which implements the redirect path logic
Expand Down
2 changes: 2 additions & 0 deletions lib/jekyll-redirect-from/redirectable.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module JekyllRedirectFrom
# Module which can be mixed in to documents (and pages) to provide
# redirect_to and redirect_from helpers
Expand Down
2 changes: 2 additions & 0 deletions lib/jekyll-redirect-from/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module JekyllRedirectFrom
VERSION = "0.12.1".freeze
end
2 changes: 2 additions & 0 deletions spec/integrations_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

RSpec.describe "JekyllRedirectFrom integration tests" do
before { site.process }
let(:relative_path) { "" }
Expand Down
2 changes: 2 additions & 0 deletions spec/jekyll_redirect_from/context_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

RSpec.describe JekyllRedirectFrom::Context do
subject { described_class.new(site) }

Expand Down
2 changes: 2 additions & 0 deletions spec/jekyll_redirect_from/generator_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

RSpec.describe JekyllRedirectFrom::Generator do
before(:each) do
site.read
Expand Down
2 changes: 2 additions & 0 deletions spec/jekyll_redirect_from/layout_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

RSpec.describe JekyllRedirectFrom::Layout do
subject { described_class.new(@site) }

Expand Down
2 changes: 1 addition & 1 deletion spec/jekyll_redirect_from/redirect_page_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Encoding: utf-8
# frozen_string_literal: true

describe JekyllRedirectFrom::RedirectPage do
let(:from) { "/foo" }
Expand Down
2 changes: 2 additions & 0 deletions spec/jekyll_redirect_from/redirectable_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class RedirectableTestHelper
include JekyllRedirectFrom::Redirectable
attr_reader :to_liquid
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "jekyll"
require File.expand_path("lib/jekyll-redirect-from.rb")

Expand Down

0 comments on commit 37eed64

Please sign in to comment.