Commit graph

3827 commits

Author SHA1 Message Date
Stella Rouzi
ee5274b352 Fix JS error when saving survey_question 2021-03-07 07:32:52 +02:00
Henne Vogelsang
6b57c0be05
Merge pull request #2737 from hennevogel/feature/sentry-release
Set a release for sentry
2021-03-07 01:34:21 +01:00
Henne Vogelsang
d4e6122ba2
Set a release for sentry 2021-03-07 01:25:06 +01:00
depfu[bot]
c76ccd3000
Update chartkick to version 3.4.2 2021-03-06 23:00:44 +00:00
Henne Vogelsang
cee9bc8e14
Merge pull request #2735 from openSUSE/depfu/update/dalli-2.7.11
Update dalli: 2.7.10 → 2.7.11 (patch)
2021-03-06 23:55:24 +01:00
depfu[bot]
0291663360
Update dalli to version 2.7.11 2021-03-06 22:45:55 +00:00
Henne Vogelsang
3dfb950b01
Merge pull request #2734 from openSUSE/depfu/update/devise-4.7.3
Update devise: 4.7.1 → 4.7.3 (patch)
2021-03-06 23:44:39 +01:00
Henne Vogelsang
441a877ce5
Merge pull request #2733 from hennevogel/feature/sentry
Introduces sentry, removes airbrake
2021-03-06 23:24:15 +01:00
Henne Vogelsang
b4b20bd135
Introduces sentry, removes airbrake
Sentry is the premiere FOSS error tracking app.
2021-03-06 23:13:59 +01:00
depfu[bot]
ea6111244d
Update devise to version 4.7.3 2021-03-06 22:06:09 +00:00
Henne Vogelsang
ef00a313f5
Merge pull request #2732 from openSUSE/depfu/update/cocoon-1.2.15
Update cocoon: 1.2.14 → 1.2.15 (patch)
2021-03-06 23:04:42 +01:00
Henne Vogelsang
3faee06e48
Merge pull request #2731 from hennevogel/bugfix/cloudinary
Move cache to file
2021-03-06 22:20:51 +01:00
depfu[bot]
3e7f51a125
Update cocoon to version 1.2.15 2021-03-06 21:10:53 +00:00
Henne Vogelsang
52c61a0c0a
Merge pull request #2730 from openSUSE/depfu/update/dotenv-rails-2.7.6
Update dotenv-rails: 2.7.5 → 2.7.6 (patch)
2021-03-06 22:05:20 +01:00
Henne Vogelsang
05adba0e35
Merge pull request #2705 from cycomachead/patch-3
Fix Frozen String Error in Commercials Controller
2021-03-06 22:04:48 +01:00
Henne Vogelsang
1291d1846d
Move cache to file
No need to store caches in the cloud.
2021-03-06 21:58:23 +01:00
Henne Vogelsang
57360c183c
Merge pull request #2729 from hennevogel/bugfix/carrierwave-update
CarrierWave needs to be told where to store in 2.x
2021-03-06 21:44:33 +01:00
depfu[bot]
d534b42afa
Update dotenv-rails to version 2.7.6 2021-03-06 20:41:06 +00:00
Michael Ball
258a2c1489
Fix Frozen String Error in Commercials Controller
`errors_text` is a frozen string, so `<<` leads to an exception when trying to generate the error message.

https://sentry.cs10.org/share/issue/7867fdaf8eba4387ae2789fd5f1cff3b/
if you want a production example. :)
2021-03-06 21:40:25 +01:00
Henne Vogelsang
58d51c6d25
Merge pull request #2648 from AndrewKvalheim/webmock-webdrivers
Resolve conflict between WebMock and Webdrivers
2021-03-06 21:38:06 +01:00
Henne Vogelsang
8b0f6ae1f9
Merge pull request #2726 from openSUSE/depfu/update/rails-controller-testing-1.0.5
Update rails-controller-testing: 1.0.4 → 1.0.5 (patch)
2021-03-06 21:37:21 +01:00
Henne Vogelsang
e4c9100ea6
Merge pull request #2717 from hellcp/master
Add icalendar files
2021-03-06 21:36:50 +01:00
Henne Vogelsang
2c238365d6
CarrierWave needs to be told where to store in 2.x 2021-03-06 21:34:48 +01:00
depfu[bot]
dc02d0ce09
Update rails-controller-testing to version 1.0.5 2021-03-06 20:21:20 +00:00
Henne Vogelsang
30c2db682e
Merge pull request #2702 from AndrewKvalheim/omit-nil-smtp-settings
Allow leaving OSEM_SMTP_DOMAIN unset
2021-03-06 21:19:36 +01:00
Sasi Olin
613161bbc7
Add buttons in the interface 2021-03-06 21:18:42 +01:00
Sasi Olin
d540092bfc
Add icalendar files (fixes #2147) 2021-03-06 21:18:39 +01:00
Andrew Kvalheim
266fdbabea
Omit nil SMTP settings
Allows leaving `smtp_settings[:domain]` unspecified. Explicitly setting
it to `nil` (as when `OSEM_SMTP_DOMAIN` is unset) overrides the default
value of `'localhost.localdomain'` and caused SMTP connections to fail
with `EOFError`.
2021-03-06 21:10:36 +01:00
Henne Vogelsang
32164c47db
Merge pull request #2663 from AndrewKvalheim/docker-compose-v2.4
Update Docker Compose file format: 2.0 → 2.4 (minor)
2021-03-06 21:03:22 +01:00
Henne Vogelsang
9a04411f81
Merge pull request #2667 from AndrewKvalheim/fix-migration-non-null
Work around bug in migrations to non-null columns
2021-03-06 21:02:13 +01:00
Henne Vogelsang
c29d45beea
Merge pull request #2666 from AndrewKvalheim/fix-migration-carrierwave
Fix migration that fails on conferences without pictures
2021-03-06 21:00:38 +01:00
Henne Vogelsang
fabb17f41c
Merge pull request #2665 from AndrewKvalheim/migration-rails-version
Annotate past migrations with Rails version
2021-03-06 20:59:57 +01:00
Andrew Kvalheim
fdd7806071
Work around bug in migrations to non-null columns
When running migration 20170705075039 followed by 20170715131706, the
latter fails due to lingering null values in a newly non-null column—

    Mysql2::Error: Invalid use of NULL value: ALTER TABLE `tracks` CHANGE `state` `state` varchar(255) DEFAULT 'new' NOT NULL
    db/migrate/20170715131706_make_track_state_not_null_and_add_default_value.rb:17:in `change'

—despite having apparently converted any existing null values prior to
changing the column type. Investigation reveals that actually the
attempted conversion has had no effect, and that this can be resolved by
clearing ActiveRecord internal caches between migrations:

    connection.schema_cache.clear_data_source_cache! 'tracks'

The same problem also affects running 20170705075039 followed by
20170720134353, but in that case it leads to silent data corruption as
`change_column_null` automatically converts any lingering null values.

This commit 1) clears ActiveRecord internal caches at the beginning of
each affected migration, and 2) replaces `change_column_null` with
`change_column` to reflect that no automatic conversion is intended.
2021-03-06 20:10:20 +01:00
Andrew Kvalheim
079f609603
Fix migration that fails on conferences without pictures
CarrierWave documentation:

> Note: `recreate_versions!` will throw an exception on records without
> an image. To avoid this, scope the records to those with images or
> check if an image exists within the block.

Resolves #1976:

    NoMethodError: undefined method `read' for nil:NilClass
    …/carrierwave-1.3.1/lib/carrierwave/uploader/cache.rb:81:in `sanitized_file'
    …/carrierwave-1.3.1/lib/carrierwave/uploader/cache.rb:118:in `cache!'
    …/carrierwave-1.3.1/lib/carrierwave/uploader/versions.rb:234:in `recreate_versions!'
    db/migrate/20171130172334_rebuild_conference_pictures.rb:4:in `block in up'
2021-03-06 20:08:15 +01:00
Andrew Kvalheim
5a890013ef
Annotate past migrations with Rails version
Many migrations currently fail to run with:

> Directly inheriting from ActiveRecord::Migration is not supported.
> Please specify the Rails release the migration was written for:
>
>     class Example < ActiveRecord::Migration[4.2]

I've annotated those that I need to run with the Rails version at the
time each was committed:

    rake db:migrate:status \
    | grep --perl-regexp --only-matching '(?<=^  down    )\d{14}' \
    | while read -r id; do
      path="$(ls -1 db/migrate/${id}_*.rb)"
      version="$(git show "$(git log --diff-filter=A --pretty=format:%H -- "$path")":Gemfile.lock \
        | grep --perl-regexp --only-matching '(?<=^    rails \()\d+\.\d+(?=(\.\d+)+\))')"
      sed --in-place -e "s/\(< ActiveRecord::Migration\)$/\\1[$version]/" "$path"
    done
2021-03-06 20:06:50 +01:00
Andrew Kvalheim
b6208d4d4b
Update Docker Compose file format: 2.0 → 2.4 (minor)
Allows the use of additional parameters such as `cpus` and
`healthcheck`.
2021-03-06 20:04:51 +01:00
Henne Vogelsang
2051540693
Merge pull request #2655 from AndrewKvalheim/rubocop-db-schema
Ignore schema.rb in RuboCop
2021-03-06 20:03:32 +01:00
Henne Vogelsang
7f1d3b923a
Merge pull request #2662 from AndrewKvalheim/issue-2661-workaround
Fix bug in test of animated form
2021-03-06 20:02:04 +01:00
Henne Vogelsang
0729c6f6fe
Merge pull request #2659 from AndrewKvalheim/transactional-tests
Use Rails transactional tests
2021-03-06 20:01:47 +01:00
Henne Vogelsang
fc61c4b39c
Merge pull request #2658 from AndrewKvalheim/save-screenshot
Fix bug in logging of screenshots of failed tests
2021-03-06 20:01:13 +01:00
Henne Vogelsang
995db101b3
Merge pull request #2657 from AndrewKvalheim/bootstrap-markdown
Remove superfluous click to display Markdown editor
2021-03-06 20:00:50 +01:00
Andrew Kvalheim
07f1323eff
Fix bug in test of animated form
The help text for the event type field is animated using a technique
unaffected by `Capybara.disable_animation`. Wait for the animation.

Resolves: #2356
Works around: #2661
2021-03-06 19:43:35 +01:00
Andrew Kvalheim
c3e02c20b9
Use Rails transactional tests
As of Rails 5.1:

  - Rails has built-in support for running tests within database
    transactions, so Database Cleaner is no longer needed for this.
  - Rails automatically shares the database connection across threads,
    so transactional_capybara is no longer needed.

Changes:

  - Enable `use_transactional_tests`.
  - Remove transactional_capybara.
  - Remove the Database Cleaner test wrapper.

This resolves:

  - transactional_capybara mismanages the shared database connection,
    causing the connection to falsely report as idle after the first
    test. At 6 minutes (idle_timeout + reaping_frequency) into testing,
    the connection is closed, causing e.g. `PG::ConnectionBad` errors.
2021-03-06 19:41:06 +01:00
Andrew Kvalheim
310fc8dc68
Fix bug in test database preparation
Presumably the intent of this was to clear the database and repopulate
it with seed data. `transaction` isn't the right strategy for this; it
just rolls back any existing transactions.
2021-03-06 19:41:06 +01:00
Andrew Kvalheim
2c8521a2e5
Remove redundant code
This functionality is provided by transactional_capybara.
2021-03-06 19:41:05 +01:00
Andrew Kvalheim
c0913ab723
Work around RuboCop false positive
Details: rubocop-hq/rubocop#7853
2021-03-06 19:38:47 +01:00
Andrew Kvalheim
0df16e4773
Fix bug in logging of screenshots of failed tests
Presumably this was a typo.
2021-03-06 19:38:47 +01:00
Henne Vogelsang
977748a039
Merge pull request #2653 from differentreality/chart_legend
Fix chart legend position
2021-03-06 19:36:34 +01:00
Andrew Kvalheim
ce59c37ff6
Use correct loading mode of Bootstrap-Markdown
data-provide="markdown-editable" is intended for inline editing of page
content à la contenteditable. When this is applied to a textarea, the
editor is loaded only after the user clicks on the field. This behavior
breaks focus and is incompatible with keyboard navigation.
2021-03-06 19:35:23 +01:00
Andrew Kvalheim
75d28b802f
Don't clobber RuboCop's default excludes
By default, adding an exclude (faffc49) has the effect of removing the
default excludes. Merge them as described in rubocop-hq/rubocop#6567.
2021-03-06 19:33:28 +01:00