Don't check for new version in production.

This commit is contained in:
Eugene Burmakin 2025-07-02 21:58:19 +02:00
parent 3138a25ab1
commit 12a53aac20
4 changed files with 15 additions and 1 deletions

View file

@ -1 +1 @@
0.29.1
0.29.2

View file

@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
# [0.29.2] - UNRELEASED
## Changed
- Don't check for new version in production.
# [0.29.1] - 2025-07-02
## Fixed

View file

@ -8,6 +8,8 @@ class CheckAppVersion
end
def call
return false if Rails.env.production?
latest_version != APP_VERSION
rescue StandardError
false

View file

@ -13,6 +13,12 @@ RSpec.describe CheckAppVersion do
stub_const('APP_VERSION', '1.0.0')
end
context 'when in production' do
before { allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new('production')) }
it { is_expected.to be false }
end
context 'when latest version is newer' do
before { stub_const('APP_VERSION', '0.9.0') }