mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Don't check for new version in production.
This commit is contained in:
parent
3138a25ab1
commit
12a53aac20
4 changed files with 15 additions and 1 deletions
|
|
@ -1 +1 @@
|
|||
0.29.1
|
||||
0.29.2
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ class CheckAppVersion
|
|||
end
|
||||
|
||||
def call
|
||||
return false if Rails.env.production?
|
||||
|
||||
latest_version != APP_VERSION
|
||||
rescue StandardError
|
||||
false
|
||||
|
|
|
|||
|
|
@ -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') }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue