Commit graph

3601 commits

Author SHA1 Message Date
Andrew Kvalheim
e11f634377 Merge #​2665 "Annotate past migrations with Rails version" 2020-06-26 20:19:39 -07:00
Andrew Kvalheim
d7a5351b7c Merge #​2663 "Update Docker Compose file format: 2.0 → 2.4 (minor)" 2020-06-26 20:19:38 -07:00
Andrew Kvalheim
0618f93660 Merge #​2662 "Fix bug in test of animated form" 2020-06-26 20:19:37 -07:00
Andrew Kvalheim
943f0afaaf Merge #​2659 "Use Rails transactional tests" 2020-06-26 20:19:36 -07:00
Andrew Kvalheim
305c7cac28 Merge #​2658 "Fix bug in logging of screenshots of failed tests" 2020-06-26 20:19:36 -07:00
Andrew Kvalheim
04a77a6043 Merge #​2657 "Remove superfluous click to display Markdown editor" 2020-06-26 20:19:35 -07:00
Andrew Kvalheim
e4251d7b67 Merge #​2654 "Fix access to the version history of organization-level roles" 2020-06-26 20:19:34 -07:00
Andrew Kvalheim
668aa388a1 Merge #​2655 "Ignore schema.rb in RuboCop" 2020-06-26 20:19:34 -07:00
Andrew Kvalheim
042fe17fdb Merge #​2649 "Work around ChromeDriver/Chromium crash" 2020-06-26 20:19:33 -07:00
Andrew Kvalheim
09b30b4b23 Merge #​2648 "Resolve conflict between WebMock and Webdrivers" 2020-06-26 20:19:32 -07:00
Andrew Kvalheim
14fe81be29 Merge #​2647 "Install missing test dependency in base image" 2020-06-26 20:19:32 -07:00
Andrew Kvalheim
c5f937902a Merge #​2670 "Update all of rails: 5.2.3 → 5.2.4.3 (minor)" 2020-06-26 20:19:31 -07:00
Andrew Kvalheim
dd40243fbf Merge #​2646 "Use version range instead of OSEM_RUBY_VERSION." 2020-06-26 20:19:10 -07:00
Andrew Kvalheim
ace4fd4996 Merge #​2640 "Explicitly configure database authentication in Docker Compose" 2020-06-26 20:19:10 -07:00
depfu[bot]
7baf1099ab
Update all of rails to version 5.2.4.3 2020-06-20 02:40:59 +00:00
James Mason
6e6a6dcd39
Merge pull request #2679 from openSUSE/depfu/update/rack-2.1.4
🚨 [security] Update rack: 2.0.8 → 2.1.4 (minor)
2020-06-19 19:33:39 -07:00
depfu[bot]
3a3c0e6f2f
Update rack to version 2.1.4 2020-06-20 02:10:35 +00:00
James Mason
8c96a6cc9a
Merge pull request #2677 from openSUSE/depfu/update/websocket-extensions-0.1.5
🚨 [security] Update websocket-extensions: 0.1.4 → 0.1.5 (minor)
2020-06-19 19:09:34 -07:00
James Mason
0d876de27f
Merge pull request #2672 from openSUSE/depfu/update/puma-3.12.6
🚨 [security] Update puma: 3.12.4 → 3.12.6 (patch)
2020-06-19 19:09:13 -07:00
James Mason
754c47e41b
Merge pull request #2656 from AndrewKvalheim/ajax-datatables-rails-293-postgresql
Fix bug in UserDatatable query affecting PostgreSQL
2020-06-19 19:07:18 -07:00
depfu[bot]
acb3654af2
Update websocket-extensions to version 0.1.5 2020-06-05 18:44:31 +00:00
depfu[bot]
4e6c74ecb5
Update puma to version 3.12.6 2020-05-22 20:50:27 +00:00
Stella Rouzi
a89201ff82
Merge pull request #2671 from ifellinaholeonce/master
Add uniqueness tests for Event scope on Vote model with User association
2020-05-21 08:47:26 +03:00
Tymm Schmitke
40036899b3 Add empty line at end of file 2020-05-19 23:18:05 -04:00
Tymm Schmitke
aa99f909a6 Add uniqueness tests for Event scope on Vote model with User association 2020-05-19 22:24:37 -04:00
Andrew Kvalheim
4a0961e88e 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
2020-05-12 07:09:28 -07:00
Andrew Kvalheim
c34b55c1b8 Update Docker Compose file format: 2.0 → 2.4 (minor)
Allows the use of additional parameters such as `cpus` and
`healthcheck`.
2020-04-13 08:45:31 -07:00
Andrew Kvalheim
e657d37c8d Whitelist Webdrivers update URLs in WebMock
Resolves #2557:

    $ docker-compose run --rm osem bundle exec rspec --tag js
    …
    WebMock::NetConnectNotAllowedError

See titusfortner/webdrivers#109 for details.
2020-04-12 17:43:46 -07:00
Andrew Kvalheim
e077fe9671 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
2020-04-12 13:40:49 -07:00
James Mason
dfb159a0e1
Merge pull request #2638 from openSUSE/depfu/update/puma-3.12.4
🚨 [security] Update puma: 3.12.2 → 3.12.4 (patch)
2020-04-06 09:48:04 -07:00
James Mason
49639dadb1
Merge pull request #2637 from openSUSE/depfu/update/sqlite3-1.4.2
Update sqlite3: 1.4.1 → 1.4.2 (patch)
2020-04-06 09:46:41 -07:00
James Mason
8403074765
Merge pull request #2644 from openSUSE/depfu/update/json-2.3.0
🚨 [security] Update json: 2.2.0 → 2.3.0 (minor)
2020-04-06 09:46:08 -07:00
Stella Rouzi
303129bf45
Merge pull request #2652 from AndrewKvalheim/test-unspecified-order-2
Decouple tests from unspecified data ordering (part 2)
2020-04-06 15:26:07 +03:00
Andrew Kvalheim
ae00a7f055 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.
2020-04-05 13:15:12 -07:00
Andrew Kvalheim
11a7e056bf 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.
2020-04-05 13:15:04 -07:00
Andrew Kvalheim
3aa32aebe8 Remove redundant code
This functionality is provided by transactional_capybara.
2020-04-05 13:14:55 -07:00
Andrew Kvalheim
75f64508de Work around RuboCop false positive
Details: rubocop-hq/rubocop#7853
2020-04-05 10:24:51 -07:00
Andrew Kvalheim
3142c0f164 Fix bug in logging of screenshots of failed tests
Presumably this was a typo.
2020-04-05 10:24:27 -07:00
Andrew Kvalheim
5b3520801f 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.
2020-04-04 22:09:48 -07:00
Andrew Kvalheim
4182b6fb8f Fix bug in UserDatatable query affecting PostgreSQL
Resolves:

    $ docker-compose run --rm osem bundle exec rspec ./spec/datatables/user_datatable_spec.rb:97
    …
    ActiveRecord::StatementInvalid:
    PG::GroupingError: ERROR:  column "users.id" must appear in the GROUP BY clause or be used in an aggregate function
2020-04-04 10:35:56 -07:00
Andrew Kvalheim
d3e73b103f Document workaround for jbox-web/ajax-datatables-rails#293 2020-04-04 10:35:44 -07:00
Andrew Kvalheim
17c0abb2de 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.
2020-04-03 17:06:36 -07:00
Andrew Kvalheim
faffc49020 Exclude Rails database schema from linting
The schema is automatically generated, so RuboCop's recommendations are
non-actionable; ignore it as in rubocop-hq/rubocop#752.
2020-04-03 16:39:23 -07:00
Andrew Kvalheim
fe2e5febe3 Deconflate organization/conference IDs in role versions
Resolves failing test spec/features/versions_spec.rb:320.
2020-04-03 16:19:36 -07:00
Andrew Kvalheim
79cd1c9fcd Grant permission to read, revert organization_admin version
Without this permission, organization administrators can't see the
history of changes to the organization administrator role on the
Revision History screen.
2020-04-03 15:35:58 -07:00
Andrew Kvalheim
71d9860124 Test access to organization_admin version as organization_admin
This corrects the specification for the behavior of the Revision History
screen; changes to the organization administrator role should be
accessible to organization administrators, not conference organizers.
2020-04-03 15:35:44 -07:00
Andrew Kvalheim
aa61ec9692 Remove unused code 2020-04-03 15:35:25 -07:00
Andrew Kvalheim
a179a38fae Minor refactor 2020-04-01 08:53:46 -07:00
Andrew Kvalheim
10f0edac20 Decouple tests from unspecified data ordering
These tests have been passing with SQLite, but don't reflect guaranteed
behavior and with PostgreSQL failed intermittently.
2020-03-29 09:06:47 -07:00
Stella Rouzi
e709d080b4
Merge pull request #2650 from AndrewKvalheim/test-unspecified-order
Decouple tests from unspecified data ordering
2020-03-29 15:55:34 +03:00