зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-08-28 15:36:17 +03:00
fix: Handle version specifiers with operators in Gemfile
The eval_version function now properly handles versions that already include operators like ~>, >=, etc. This fixes CI failures where ACTIVEADMIN_VERSION was passed with '~> 3.0' format.
Этот коммит содержится в:
8
Gemfile
8
Gemfile
@@ -5,7 +5,13 @@ source 'https://rubygems.org'
|
|||||||
def eval_version(dependency, version)
|
def eval_version(dependency, version)
|
||||||
return [dependency] if version.empty?
|
return [dependency] if version.empty?
|
||||||
|
|
||||||
version.count('.') < 2 ? [dependency, "~> #{version}.0"] : [dependency, version]
|
# Handle versions that already have operators like ~>, >=, etc.
|
||||||
|
if version.match?(/^[~<>=]/)
|
||||||
|
[dependency, version]
|
||||||
|
else
|
||||||
|
# Add ~> operator and ensure version has at least 2 dots
|
||||||
|
version.count('.') < 2 ? [dependency, "~> #{version}.0"] : [dependency, "~> #{version}"]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV['DEVEL'] == '1'
|
if ENV['DEVEL'] == '1'
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user