Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
taketo1113 committed Dec 31, 2023
1 parent a2a5dbe commit a05d840
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# More info at https://github.com/guard/guard#readme

directories %w(lib spec) \
.select { |d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist") }
.select { |d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist") }

## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
Expand Down
2 changes: 2 additions & 0 deletions lib/mini_profiler/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def self.default

# redefined - since the accessor defines it first
undef :authorization_mode=
# rubocop:disable Lint/DuplicateMethods
def authorization_mode=(mode)
# rubocop:enable Lint/DuplicateMethods
if mode == :whitelist
warn "[DEPRECATION] `:whitelist` authorization mode is deprecated. Please use `:allow_authorized` instead."

Expand Down
2 changes: 2 additions & 0 deletions lib/mini_profiler/snapshots_transporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ class << self
def transported_snapshots_count
@@transported_snapshots_count
end

def successful_http_requests_count
@@successful_http_requests_count
end

def failed_http_requests_count
@@failed_http_requests_count
end
Expand Down
2 changes: 0 additions & 2 deletions lib/mini_profiler/storage/file_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ def initialize(args = nil)
end

at_exit { t[:should_exit] = true }

t
end

def save(page_struct)
Expand Down
1 change: 0 additions & 1 deletion lib/mini_profiler/timer_struct/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def [](name)

def []=(name, val)
attributes[name] = val
self
end

def to_json(*a)
Expand Down
2 changes: 1 addition & 1 deletion lib/mini_profiler/views.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_profile_script(env)
script = ::File.read(::File.expand_path('../html/profile_handler.js', ::File.dirname(__FILE__)))
# replace the variables
settings.each do |k, v|
regex = Regexp.new("\\{#{k.to_s}\\}")
regex = Regexp.new("\\{#{k}\\}")
script.gsub!(regex, v.to_s)
end

Expand Down

0 comments on commit a05d840

Please sign in to comment.