Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.10:testing
obs-server
obs-server-2.10-0101-Add-strong_migrations-to-o...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.10-0101-Add-strong_migrations-to-our-development-environment.patch of Package obs-server
From fa8dfaa47d5693692a66732f7dc71fb0625945a3 Mon Sep 17 00:00:00 2001 From: Victor Pereira <vpereira@suse.de> Date: Wed, 25 Mar 2020 18:17:20 +0100 Subject: [PATCH] Add strong_migrations to our development environment Install https://github.com/ankane/strong_migrations and whitelist all migrations before 20200318123203 --- src/api/Gemfile | 2 ++ src/api/Gemfile.lock | 3 +++ src/api/config/initializers/strong_migrations.rb | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 src/api/config/initializers/strong_migrations.rb diff --git a/src/api/Gemfile b/src/api/Gemfile index 3078063276..53f3a1f1f0 100644 --- a/src/api/Gemfile +++ b/src/api/Gemfile @@ -183,6 +183,8 @@ group :development, :test do gem 'puma', '~> 4.0' # to drive headless chrome gem 'selenium-webdriver' + # Catch unsafe migrations in development + gem 'strong_migrations' # scan for security vulnerability (circleci only, do not touch) # BRAKEMAN end diff --git a/src/api/Gemfile.lock b/src/api/Gemfile.lock index 5b79b91162..cf05d2059b 100644 --- a/src/api/Gemfile.lock +++ b/src/api/Gemfile.lock @@ -414,6 +414,8 @@ GEM unicode-display_width (~> 1.5) unicode_utils (~> 1.4) strings-ansi (0.1.0) + strong_migrations (0.6.2) + activerecord (>= 5) sysexits (1.2.0) tdigest (0.1.1) rbtree (~> 0.4.2) @@ -559,6 +561,7 @@ DEPENDENCIES single_test sprite-factory (>= 1.5.2) sprockets (~> 3.0) + strong_migrations test-unit thinking-sphinx (> 3.1) tilt (>= 1.4.1) diff --git a/src/api/config/initializers/strong_migrations.rb b/src/api/config/initializers/strong_migrations.rb new file mode 100644 index 0000000000..1578de6f8b --- /dev/null +++ b/src/api/config/initializers/strong_migrations.rb @@ -0,0 +1,4 @@ +# since its a timestamp and not a regular number, disable the cop +# rubocop:disable Style/NumericLiterals +StrongMigrations.start_after = 20200318123203 +# rubocop:enable Style/NumericLiterals -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor