Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Nov 3, 2024
1 parent fb7002f commit f9fe54f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
10 changes: 10 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# inherit_from: .rubocop_todo.yml
Style/StringLiterals:
EnforcedStyle: double_quotes
Metrics/BlockLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
Lint/ConstantDefinitionInBlock:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
1 change: 1 addition & 0 deletions lib/datagrid/filters/float_filter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

# @!visibility private
module Datagrid
module Filters
class FloatFilter < Datagrid::Filters::BaseFilter
Expand Down
4 changes: 3 additions & 1 deletion spec/datagrid/form_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,9 @@ class MyTemplate
let(:_filter) { :name }

it {
should equal_to_dom('<input value="one,two" class="name string_filter" type="text" name="report[name]" id="report_name">')
should equal_to_dom(
'<input value="one,two" class="name string_filter" type="text" name="report[name]" id="report_name">'
)
}
end
end
Expand Down
9 changes: 1 addition & 8 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@
require "action_view"
require "rails"
require "mongoid"
begin
require "mongo_mapper"
rescue LoadError
end

require "datagrid"
begin
require "ruby-debug"
rescue LoadError
end
require "debug"
require "rspec"
require "logger"

Expand Down
12 changes: 6 additions & 6 deletions spec/support/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
t.float :rating
t.timestamps
end
end

class ::Entry < ActiveRecord::Base
belongs_to :group
end
class ::Entry < ActiveRecord::Base
belongs_to :group
end

class ::Group < ActiveRecord::Base
has_many :entries
end
class ::Group < ActiveRecord::Base
has_many :entries
end

0 comments on commit f9fe54f

Please sign in to comment.