Add changelog Start fixing rubocop offences

Add changelog Start fixing rubocop offences
From 718e914398f7067ec078c057cd01379fc7eac8b2 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Mon, 10 Dec 2018 13:23:27 +1100
Subject: [PATCH] Add changelog Start fixing rubocop offences


diff --git a/.gitignore b/.gitignore
index e134328..eb45146 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ tmp
 Gemfile.lock
 coverage
 .sass-cache/
+.rubocop-https---raw-githubusercontent-com-discourse-discourse-master--rubocop-yml
diff --git a/.rubocop.yml b/.rubocop.yml
index 8706ce1..0ca7eff 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,8 +1 @@
-AllCops:
-  DisabledByDefault: true
-  TargetRubyVersion: 2.2
-  Include:
-    - 'lib/**/*.rb'
-
-Performance:
-  Enabled: true
+inherit_from: https://raw.githubusercontent.com/discourse/discourse/master/.rubocop.yml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ae66419..d8e8a89 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@
 
 - [FIX] add support for exec_params instrumentation in PG, this method as of PG 1.1.0 no longer
  routes calls to exec / async_exec
+- [FIX] add missing started_at on requests
+- [UX] amend colors so we pass lighthouse
+- [FEATURE] fetch API support
+- [FIX] getEntriesByName is missing in iOS, workaround
 
 ## 1.0.0 2017-03-29
 
diff --git a/lib/mini_profiler/client_settings.rb b/lib/mini_profiler/client_settings.rb
index fab1081..4747ace 100644
--- a/lib/mini_profiler/client_settings.rb
+++ b/lib/mini_profiler/client_settings.rb
@@ -13,7 +13,6 @@ module Rack
       attr_accessor :disable_profiling
       attr_accessor :backtrace_level
 
-
       def initialize(env, store, start)
         @request = ::Rack::Request.new(env)
         @cookie = @request.cookies[COOKIE_NAME]
@@ -25,8 +24,8 @@ module Rack
         @allowed_tokens, @orig_auth_tokens = nil
 
         if @cookie
-          @cookie.split(",").map{|pair| pair.split("=")}.each do |k,v|
-            @orig_disable_profiling = @disable_profiling = (v=='t') if k == "dp"
+          @cookie.split(",").map { |pair| pair.split("=") }.each do |k, v|
+            @orig_disable_profiling = @disable_profiling = (v == 't') if k == "dp"
             @backtrace_level = v.to_i if k == "bt"
             @orig_auth_tokens = v.to_s.split("|") if k == "a"
           end
@@ -41,7 +40,7 @@ module Rack
       end
 
       def handle_cookie(result)
-        status,headers,_body = result
+        status, headers, _body = result
 
         if (MiniProfiler.config.authorization_mode == :whitelist && !MiniProfiler.request_authorized?)
           # this is non-obvious, don't kill the profiling cookie on errors or short requests
@@ -70,12 +69,12 @@ module Rack
             @cookie.nil? ||
             tokens_changed
 
-          settings = {"p" =>  "t" }
+          settings = { "p" => "t" }
           settings["dp"] = "t"                  if @disable_profiling
           settings["bt"] = @backtrace_level     if @backtrace_level
           settings["a"] = @allowed_tokens.join("|") if @allowed_tokens && MiniProfiler.request_authorized?
-          settings_string = settings.map{|k,v| "#{k}=#{v}"}.join(",")
-          cookie = { :value => settings_string, :path => '/', :httponly => true }
+          settings_string = settings.map { |k, v| "#{k}=#{v}" }.join(",")
+          cookie = { value: settings_string, path: '/', httponly: true }
           cookie[:secure] = true if @request.ssl?
           Rack::Utils.set_cookie_header!(headers, COOKIE_NAME, cookie)
         end
@@ -83,7 +82,7 @@ module Rack
 
       def discard_cookie!(headers)
         if @cookie
-          Rack::Utils.delete_cookie_header!(headers, COOKIE_NAME, :path => '/')
+          Rack::Utils.delete_cookie_header!(headers, COOKIE_NAME, path: '/')
         end
       end
 
@@ -100,7 +99,6 @@ module Rack
         valid_cookie
       end
 
-
       def disable_profiling?
         @disable_profiling
       end
diff --git a/spec/lib/timer_struct/sql_timer_struct_spec.rb b/spec/lib/timer_struct/sql_timer_struct_spec.rb
index d1a79a1..fade504 100644
--- a/spec/lib/timer_struct/sql_timer_struct_spec.rb
+++ b/spec/lib/timer_struct/sql_timer_struct_spec.rb
@@ -18,8 +18,6 @@ describe Rack::MiniProfiler::TimerStruct::Sql do
     end
   end
 
-
-
   describe 'backtrace' do
     it 'has a snippet' do
       sql = Rack::MiniProfiler::TimerStruct::Sql.new("SELECT * FROM users", 200, @page, nil)

GitHub