From bfcbe595749f3b5611df8fcd2306d1d50087f01d Mon Sep 17 00:00:00 2001 From: Jose Galisteo Date: Mon, 30 Aug 2021 02:28:37 +0200 Subject: [PATCH] Link github project on ?pp=help menu (#510) * Link github project on ?pp=help menu Closes https://github.com/MiniProfiler/rack-mini-profiler/issues/503 * Apply suggestions from code review Co-authored-by: Sam --- lib/mini_profiler/profiler.rb | 2 +- lib/mini_profiler/version.rb | 1 + rack-mini-profiler.gemspec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mini_profiler/profiler.rb b/lib/mini_profiler/profiler.rb index f127fb3b..fa6bb7d2 100644 --- a/lib/mini_profiler/profiler.rb +++ b/lib/mini_profiler/profiler.rb @@ -652,7 +652,7 @@ def help(client_settings, env) headers = { 'Content-Type' => 'text/html' } body = "
-Append the following to your query string:
+This is the help menu of the rack-mini-profiler gem, append the following to your query string for more options:
 
   #{make_link "help", env} : display this screen
   #{make_link "env", env} : display the rack environment
diff --git a/lib/mini_profiler/version.rb b/lib/mini_profiler/version.rb
index 9b6b72c8..f70c3585 100644
--- a/lib/mini_profiler/version.rb
+++ b/lib/mini_profiler/version.rb
@@ -3,5 +3,6 @@
 module Rack
   class MiniProfiler
     VERSION = '2.3.2'
+    SOURCE_CODE_URI = 'https://github.com/MiniProfiler/rack-mini-profiler'
   end
 end
diff --git a/rack-mini-profiler.gemspec b/rack-mini-profiler.gemspec
index 79278b80..4354552a 100644
--- a/rack-mini-profiler.gemspec
+++ b/rack-mini-profiler.gemspec
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
   s.required_ruby_version = '>= 2.4.0'
 
   s.metadata = {
-    'source_code_uri' => 'https://github.com/MiniProfiler/rack-mini-profiler',
+    'source_code_uri' => Rack::MiniProfiler::SOURCE_CODE_URI,
     'changelog_uri' => 'https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md'
   }