mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31: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/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
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
|
# [0.29.1] - 2025-07-02
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ class CheckAppVersion
|
||||||
end
|
end
|
||||||
|
|
||||||
def call
|
def call
|
||||||
|
return false if Rails.env.production?
|
||||||
|
|
||||||
latest_version != APP_VERSION
|
latest_version != APP_VERSION
|
||||||
rescue StandardError
|
rescue StandardError
|
||||||
false
|
false
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,12 @@ RSpec.describe CheckAppVersion do
|
||||||
stub_const('APP_VERSION', '1.0.0')
|
stub_const('APP_VERSION', '1.0.0')
|
||||||
end
|
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
|
context 'when latest version is newer' do
|
||||||
before { stub_const('APP_VERSION', '0.9.0') }
|
before { stub_const('APP_VERSION', '0.9.0') }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue