Skip to content

Commit c316310

Browse files
committed
Fix latest linting errors
1 parent c00dd85 commit c316310

7 files changed

Lines changed: 8 additions & 2 deletions

File tree

app/controllers/concerns/alchemy/admin/resource_filter.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module Alchemy
44
module Admin
55
module ResourceFilter
66
extend ActiveSupport::Concern
7+
78
COMMON_SEARCH_FILTER_EXCLUDES = %i[id utf8 _method _ format].freeze
89

910
included do

app/helpers/alchemy/pages_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def meta_keywords
163163
end
164164

165165
def meta_robots
166-
"#{@page.robot_index? ? "" : "no"}index, #{@page.robot_follow? ? "" : "no"}follow"
166+
"#{"no" unless @page.robot_index?}index, #{"no" unless @page.robot_follow?}follow"
167167
end
168168

169169
private

app/models/alchemy/page/page_naming.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class Page < BaseRecord
55
module PageNaming
66
extend ActiveSupport::Concern
77
include NameConversions
8+
89
RESERVED_URLNAMES = %w[admin messages new]
910

1011
included do

app/models/alchemy/site/layout.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module Alchemy
44
module Site::Layout
55
extend ActiveSupport::Concern
6+
67
SITE_DEFINITIONS_FILE = Rails.root.join("config/alchemy/site_layouts.yml")
78

89
module ClassMethods

lib/alchemy/configurations/format_matchers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Alchemy
44
module Configurations
55
class FormatMatchers < Alchemy::Configuration
66
option :email, :regexp, default: /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/
7-
option :url, :regexp, default: /\A[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?\z/ix
7+
option :url, :regexp, default: /\A[a-z0-9]+([-.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?\z/ix
88
option :link_url, :regexp, default: /^(tel:|mailto:|\/|[a-z]+:\/\/)/
99
end
1010
end

lib/tasks/alchemy/usage.rake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace :alchemy do
77
desc "List Alchemy elements usage"
88
task page_usage: :environment do
99
include ActionView::Helpers::NumberHelper
10+
1011
puts "\n Alchemy pages usage"
1112
results = Alchemy::Tasks::Usage.pages_count_by_type
1213
if results.any?
@@ -24,6 +25,7 @@ namespace :alchemy do
2425
desc "List Alchemy elements usage"
2526
task element_usage: :environment do
2627
include ActionView::Helpers::NumberHelper
28+
2729
puts "\n Alchemy elements usage"
2830
results = Alchemy::Tasks::Usage.elements_count_by_name
2931
if results.any?

spec/models/alchemy/admin/resource_name_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
let(:klass) do
77
Class.new do
88
include Alchemy::Admin::ResourceName
9+
910
attr_reader :controller_path
1011

1112
def initialize(controller_path)

0 commit comments

Comments
 (0)