diff --git a/app/lib/usage_report.rb b/app/lib/usage_report.rb index 2c7ca50b7..15d7eab4c 100644 --- a/app/lib/usage_report.rb +++ b/app/lib/usage_report.rb @@ -7,7 +7,7 @@ def self.generate Jbuilder.encode do |report| report.id SiteSettings.anonymous_usage_id report.version do |version| - version.app Rails.application.config.app_version + version.app Rails.application.config.app_version.gsub(/^v/, "") version.sha Rails.application.config.git_sha version.image ENV.fetch("DOCKER_TAG", nil)&.split(":")&.first version.arch RUBY_PLATFORM diff --git a/spec/lib/usage_report_spec.rb b/spec/lib/usage_report_spec.rb index bcd1272cc..0b6bdf9d8 100644 --- a/spec/lib/usage_report_spec.rb +++ b/spec/lib/usage_report_spec.rb @@ -5,7 +5,7 @@ before do allow(SiteSettings).to receive(:anonymous_usage_id).and_return("guid-goes-here") allow(Rails.application.config).to receive_messages( - app_version: "test", + app_version: "v0.89.0", git_sha: "deadbeef" ) end @@ -27,7 +27,7 @@ end it "includes application version" do - expect(parsed["version"]["app"]).to eq "test" + expect(parsed["version"]["app"]).to eq "0.89.0" end it "includes image type" do