diff --git a/Gemfile b/Gemfile index 423567b29e..47cc13b5ad 100644 --- a/Gemfile +++ b/Gemfile @@ -44,7 +44,7 @@ group :rubocop do end group :doc do - gem "sdoc", ">= 2.3.2" + gem "sdoc", ">= 2.4.0" gem "redcarpet", "~> 3.2.3", platforms: :ruby gem "w3c_validators", "~> 1.3.6" gem "kindlerb", "~> 1.2.0" diff --git a/Gemfile.lock b/Gemfile.lock index 384b6f4adf..85a29aeec8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -456,7 +456,7 @@ GEM rubyzip (2.3.2) rufus-scheduler (3.6.0) fugit (~> 1.1, >= 1.1.6) - sdoc (2.3.2) + sdoc (2.4.0) rdoc (>= 5.0) selenium-webdriver (4.1.0) childprocess (>= 0.5, < 5.0) @@ -613,7 +613,7 @@ DEPENDENCIES rubocop-packaging rubocop-performance rubocop-rails - sdoc (>= 2.3.2) + sdoc (>= 2.4.0) selenium-webdriver (>= 4.0.0) sequel sidekiq diff --git a/guides/assets/images/edge_badge.png b/guides/assets/images/edge_badge.png deleted file mode 100644 index a3c1843d1d..0000000000 Binary files a/guides/assets/images/edge_badge.png and /dev/null differ diff --git a/railties/lib/rails/api/task.rb b/railties/lib/rails/api/task.rb index 38ae7870a3..c1636bea49 100644 --- a/railties/lib/rails/api/task.rb +++ b/railties/lib/rails/api/task.rb @@ -166,6 +166,7 @@ module Rails def setup_horo_variables # :nodoc: ENV["HORO_PROJECT_NAME"] = "Ruby on Rails" ENV["HORO_PROJECT_VERSION"] = rails_version + ENV["HORO_BADGE_VERSION"] = badge_version end def api_main @@ -192,12 +193,20 @@ module Rails def rails_version "main@#{`git rev-parse HEAD`[0, 7]}" end + + def badge_version + "edge" + end end class StableTask < RepoTask def rails_version File.read("RAILS_VERSION").strip end + + def badge_version + "v#{rails_version}" + end end end end