-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #379 from OpenSourcePolitics/develop
Co-authored-by: Quentin Champenois <[email protected]> Co-authored-by: moustachu <[email protected]> Co-authored-by: eliegaboriau <[email protected]> fix Sentry (#369) fix: Assets in docker-compose (#370) fix: Fix rubocop (#371) Fix interactive map wrong version (#383)
- Loading branch information
Showing
46 changed files
with
172 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,11 @@ jobs: | |
key: asset-cache-${{ runner.os }}-${{ steps.cache-hash.outputs.hash }} | ||
- run: mkdir -p ./spec/tmp/screenshots | ||
name: Create the screenshots folder | ||
- uses: nanasess/[email protected] | ||
|
||
# TODO: Use latest version | ||
- uses: nanasess/setup-chromedriver@v2 | ||
with: | ||
chromedriver-version: "114.0.5735.90" | ||
- run: bundle exec rake "test:run[exclude, spec/system/**/*_spec.rb, ${{ matrix.slice }}]" | ||
name: RSpec | ||
- run: ./.github/upload_coverage.sh decidim-app $GITHUB_EVENT_PATH | ||
|
@@ -153,7 +157,10 @@ jobs: | |
key: asset-cache-${{ runner.os }}-${{ steps.cache-hash.outputs.hash }} | ||
- run: mkdir -p ./spec/tmp/screenshots | ||
name: Create the screenshots folder | ||
- uses: nanasess/[email protected] | ||
# TODO: Use latest version | ||
- uses: nanasess/setup-chromedriver@v2 | ||
with: | ||
chromedriver-version: "114.0.5735.90" | ||
- run: bundle exec rake "test:run[include, spec/system/**/*_spec.rb, ${{ matrix.slice }}]" | ||
name: RSpec | ||
- run: ./.github/upload_coverage.sh decidim-app $GITHUB_EVENT_PATH | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# frozen_string_literal: true | ||
|
||
module Decidim | ||
class RepairCommentsService | ||
include Decidim::TranslatableAttributes | ||
|
||
def self.run | ||
new.execute | ||
end | ||
|
||
def execute | ||
return [] if ok? | ||
|
||
update_comments! | ||
end | ||
|
||
def ok? | ||
invalid_comments.empty? | ||
end | ||
|
||
def invalid_comments | ||
return @invalid_comments if @invalid_comments | ||
|
||
invalid_comments = [] | ||
Decidim::Comments::Comment.find_each do |comment| | ||
next if translated_attribute(comment.body).is_a?(String) | ||
|
||
invalid_comments << [comment, comment.body.values.first] | ||
end | ||
@invalid_comments = invalid_comments | ||
end | ||
|
||
private | ||
|
||
# Update each users with new nickname | ||
# Returns Array of updated User ID | ||
def update_comments! | ||
invalid_comments.map do |comment, new_body| | ||
comment.body = new_body | ||
|
||
comment.id if comment.save!(validate: false) # Validation is skipped to allow updating comments from root that don't accepts new comments | ||
end.compact | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
require "initializers/sentry_setup" | ||
require "decidim_app/sentry_setup" | ||
|
||
SentrySetup.init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.