Skip to content

Commit

Permalink
AO3-6565 Resolve merge conflcits
Browse files Browse the repository at this point in the history
  • Loading branch information
weeklies committed Oct 27, 2024
2 parents 681db28 + 766898d commit 6da083b
Show file tree
Hide file tree
Showing 267 changed files with 17,956 additions and 12,771 deletions.
2 changes: 0 additions & 2 deletions .erb-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ linters:
rubocop_config:
inherit_from:
- .rubocop.yml
# Uncomment the following line to ignore known issues
# - .rubocop_todo_erb.yml
Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation
Layout/InitialIndentation:
Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Bash scripts needs to have LF line endings, even on Windows
*.sh text eol=lf
# /usr/local/bin/ruby: warning: shebang line ending with \r may cause problems
/bin/* text eol=lf
13 changes: 13 additions & 0 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,22 @@ jobs:
arguments: db:otwseed
- command: rspec
arguments: spec/controllers
imagemagick: true
- command: rspec
arguments: spec/models
imagemagick: true
- command: rspec
arguments: --exclude-pattern 'spec/{controllers,models}/**/*.rb'
imagemagick: true
- command: cucumber
arguments: features/admins
imagemagick: true
- command: cucumber
arguments: features/bookmarks
imagemagick: true
- command: cucumber
arguments: features/collections
imagemagick: true
- command: cucumber
arguments: features/comments_and_kudos
- command: cucumber
Expand All @@ -73,8 +79,10 @@ jobs:
vcr: true
- command: cucumber
arguments: features/other_a
imagemagick: true
- command: cucumber
arguments: features/other_b
imagemagick: true
- command: cucumber
arguments: features/prompt_memes_a
- command: cucumber
Expand All @@ -92,6 +100,7 @@ jobs:
- command: cucumber
arguments: features/works
ebook: true
imagemagick: true

steps:
- name: Check out code
Expand Down Expand Up @@ -129,6 +138,10 @@ jobs:
restore-keys: |
cassette-library-${{ hashFiles(matrix.tests.arguments) }}-
- name: Install imagemagick for image processing
if: ${{ matrix.tests.imagemagick }}
run: sudo apt-get install -y imagemagick

- name: Set up Ruby and run bundle install
uses: ruby/setup-ruby@v1
with:
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/phrase-export-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Check Phrase exports
on:
pull_request:
branches:
- master
- main
workflow_dispatch:

jobs:
en-keys-to-remove:
if: github.head_ref == 'phrase-translations'
runs-on: ubuntu-latest
name: Check for outdated English keys in Phrase

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Ruby and run bundle install
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run i18n-tasks missing (diff mode)
run: bundle exec i18n-tasks missing -t diff -f keys en | bundle exec i18n-tasks tree-mv -f keys "en.{*}" "\1" > en-keys-to-remove.txt

- name: Check that all keys exported from Phrase exist in English
run: "! test -s en-keys-to-remove.txt"

- name: Upload list of English keys that should be removed from Phrase
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: en-keys-to-remove
path: en-keys-to-remove.txt

unused-keys:
if: github.head_ref == 'phrase-translations'
runs-on: ubuntu-latest
needs: en-keys-to-remove
name: Check unused keys for all locales

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Ruby and run bundle install
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run i18n-tasks unused
run: bundle exec i18n-tasks unused -f keys > unused-keys.txt

- name: Upload list of unused locale keys
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: unused-keys
path: unused-keys.txt

inconsistent-interpolations:
if: github.head_ref == 'phrase-translations'
runs-on: ubuntu-latest
name: Check consistent interpolations for all locales

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Ruby and run bundle install
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run i18n-tasks check-consistent-interpolations
run: bundle exec i18n-tasks check-consistent-interpolations -f yaml > inconsistent-interpolations.yml
continue-on-error: true

- name: Upload yaml of inconsistent interpolations
uses: actions/upload-artifact@v4
with:
name: inconsistent-interpolations
path: inconsistent-interpolations.yml
8 changes: 5 additions & 3 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ jobs:
bundler-cache: true

- name: rubocop
uses: reviewdog/action-rubocop@708a61f1f3bc4127205f5ec59f4f8617478ebdda
uses: reviewdog/action-rubocop@5e23bb67d79c93e5eb45bdae6d08b04052afec35
with:
use_bundler: true
reporter: github-pr-check
skip_install: true
fail_on_error: true

erb-lint:
name: ERB Lint runner
Expand All @@ -44,7 +45,8 @@ jobs:
bundler-cache: true

- name: erb-lint
uses: tk0miya/action-erblint@667687e73b44e7b7a710a1204b180f49f80ebb5e
uses: tk0miya/action-erblint@b6e537f4616e4fa7a9eef209ca34ca944e1440dd
with:
use_bundler: true
reporter: github-pr-check # default
reporter: github-pr-check
fail_on_error: true
17 changes: 17 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
tasks:
- init: ./script/docker/init.sh
command: docker compose up -d web

ports:
- port: 3000
onOpen: open-browser
- port: 3306
onOpen: ignore
- port: 6379
onOpen: ignore
- port: 9200
onOpen: ignore
- port: 9300
onOpen: ignore
- port: 9400
onOpen: ignore
6 changes: 3 additions & 3 deletions .phrase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ phrase:
- file: ./config/locales/phrase-exports/ru.yml
params:
locale_id: ru
- file: ./config/locales/phrase-exports/scr.yml
params:
locale_id: scr
- file: ./config/locales/phrase-exports/sk.yml
params:
locale_id: sk
- file: ./config/locales/phrase-exports/sl.yml
params:
locale_id: sl
- file: ./config/locales/phrase-exports/sr.yml
params:
locale_id: sr
- file: ./config/locales/phrase-exports/sv.yml
params:
locale_id: sv
Expand Down
11 changes: 7 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Uncomment the following line to ignore known issues
# inherit_from: .rubocop_todo.yml

# Options available at https://github.com/bbatsov/rubocop/blob/master/config/default.yml

require:
Expand All @@ -14,7 +11,7 @@ inherit_mode:

AllCops:
NewCops: enable
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1

Bundler/OrderedGems:
Enabled: false
Expand Down Expand Up @@ -53,6 +50,12 @@ Lint/AmbiguousBlockAssociation:
Lint/AmbiguousRegexpLiteral:
Enabled: false

Lint/RedundantSafeNavigation:
Exclude:
# Take a better safe than sorry approach to safe navigation in admin
# policies.
- 'app/policies/*.rb'

Metrics/AbcSize:
Enabled: false

Expand Down
Loading

0 comments on commit 6da083b

Please sign in to comment.