Skip to content

Commit

Permalink
Move Rails folders to project root (#8945)
Browse files Browse the repository at this point in the history
* Move individual files and merge where necessary

* Move Rails folders to top level

* Remove WcaOnRails mentions where appropriate
  • Loading branch information
gregorbg authored Mar 4, 2024
1 parent 62d8d7e commit 8290946
Show file tree
Hide file tree
Showing 1,957 changed files with 117 additions and 136 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/WcaOnRails"
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: "/WcaOnRails"
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/deploy-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ jobs:
- name: Build and Push Sidekiq image
uses: docker/build-push-action@v5
with:
context: ./WcaOnRails
push: true
file: ./WcaOnRails/Dockerfile.sidekiq
file: ./Dockerfile.sidekiq
tags: |
${{ steps.login-ecr.outputs.registry }}/wca-on-rails:sidekiq-production
${{ steps.login-ecr.outputs.registry }}/wca-on-rails:sidekiq-staging
Expand All @@ -34,9 +33,7 @@ jobs:
- name: Build and push Prod Image
uses: docker/build-push-action@v5
with:
context: ./WcaOnRails
push: true
file: ./WcaOnRails/Dockerfile
tags: |
${{ steps.login-ecr.outputs.registry }}/wca-on-rails:latest
${{ steps.login-ecr.outputs.registry }}/wca-on-rails:staging
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ jobs:
env:
RACK_ENV: test
RAILS_ENV: test
defaults:
run:
working-directory: WcaOnRails
steps:
- uses: actions/checkout@v4
- uses: fregante/setup-git-user@v2 # set up dummy user.name and user.email in git so that Overcommit doesn't explode
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: WcaOnRails
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Set up Corepack/Yarn
run: corepack enable # this allows NPM to use its own Yarn. It is crucial that this is run BEFORE the Node setup!
Expand All @@ -42,8 +38,6 @@ jobs:
run: bundle exec rake yarn:install
- name: Run Overcommit commit hooks
working-directory: ${{ env.GITHUB_WORKSPACE }}
env:
BUNDLE_GEMFILE: WcaOnRails/Gemfile
run: bundle exec overcommit --sign && bundle exec overcommit --sign pre-commit && bundle exec overcommit --run
- name: Activate MySQL # as per https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#mysql
run: |
Expand All @@ -61,10 +55,9 @@ jobs:
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: 'WcaOnRails/coverage/lcov/WcaOnRails.lcov'
base-path: 'WcaOnRails'
path-to-lcov: 'coverage/lcov/worldcubeassociation.org.lcov'
- uses: actions/upload-artifact@v4
if: always() && steps.rspec.outcome == 'failure'
with:
name: capybara-screenshots
path: WcaOnRails/tmp/capybara
path: tmp/capybara
5 changes: 1 addition & 4 deletions .github/workflows/staging-deployment-from-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ jobs:
if: steps.trigger-deployment.outputs.triggered == 'true'
uses: docker/build-push-action@v5
with:
context: ./WcaOnRails
push: true
file: ./WcaOnRails/Dockerfile.sidekiq
file: ./Dockerfile.sidekiq
tags: |
${{ steps.login-ecr.outputs.registry }}/wca-on-rails:sidekiq-staging
cache-from: type=gha
Expand All @@ -55,9 +54,7 @@ jobs:
if: steps.trigger-deployment.outputs.triggered == 'true'
uses: docker/build-push-action@v5
with:
context: ./WcaOnRails
push: true
file: ./WcaOnRails/Dockerfile
tags: |
${{ steps.login-ecr.outputs.registry }}/wca-on-rails:staging
cache-from: type=gha
Expand Down
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,62 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# byebug stuff
.byebug_history

# Ignore bundler config.
/.bundle
/vendor/bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp/*
!/tmp/.keep

# More rails stuff
public/assets/**

# Ignore js-specific generated locales (they are rebuilt whenever we compile assets)
app/webpacker/rails_translations/*.json

# Environment configuration
.env*
!.env.development
!.env.test

# Unicorn pid
pids/*.pid

/public/packs
/public/packs-test
/node_modules

# Coveralls stuff
/coverage/

/yarn-error.log
yarn-debug.log*
.yarn-integrity

# Healthcheck flag for our Rails docker container
.db-inited

# GCE secrets file
**/application_default_credentials.json

# Per https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
36 changes: 16 additions & 20 deletions .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@
#
# Uncomment the following lines to make the configuration take effect.

gemfile: 'WcaOnRails/Gemfile'
gemfile: 'Gemfile'

PreCommit:
ALL:
exclude:
- 'regulations/**/*'
- 'webroot/**/*'
- 'WcaOnRails/vendor/**/*'
- 'WcaOnRails/tmp/**/*'
- 'WcaOnRails/db/structure.sql'
- 'WcaOnRails/node_modules/**/*'
- 'WcaOnRails/app/webpacker/stylesheets/semantic/**/*'
- 'WcaOnRails/config/locales/*.yml'
- 'chef/**/*'
- 'vendor/**/*'
- 'tmp/**/*'
- 'node_modules/**/*'
- 'app/webpacker/stylesheets/semantic/**/*'
- 'config/locales/*.yml'
- '.gitmodules'
- '**/*.pdf'
- '**/*.jpg'
Expand All @@ -40,18 +36,18 @@ PreCommit:
- '**/*.svg'

EsLint:
required_executable: 'WcaOnRails/bin/yarn'
required_executable: 'bin/yarn'
enabled: true
include:
- 'WcaOnRails/app/webpacker/**/*.js'
- 'app/webpacker/**/*.js'
exclude:
# Semantic UI stuff, we need to re-exclude that here.
- 'WcaOnRails/app/webpacker/stylesheets/semantic/**/*'
command: ['WcaOnRails/bin/yarn', '--silent', 'run', 'eslint', '-c', '.eslintrc.json', '-f', 'compact']
- 'app/webpacker/stylesheets/semantic/**/*'
command: ['bin/yarn', '--silent', 'run', 'eslint', '-c', '.eslintrc.json', '-f', 'compact']

RuboCop:
enabled: true
command: ['bundle', 'exec', 'rubocop', '--config', './WcaOnRails/.rubocop.yml']
command: ['bundle', 'exec', 'rubocop', '--config', './.rubocop.yml']
on_warn: fail # Treat all warnings as failures

IllegalStrings:
Expand All @@ -61,14 +57,14 @@ PreCommit:
enabled: true
include:
# Others are handled by EsLint
'WcaOnRails/app/assets'
required_executable: 'WcaOnRails/bin/yarn'
command: ['WcaOnRails/bin/yarn', '--silent', 'run', 'jshint', '--verbose']
'app/assets'
required_executable: 'bin/yarn'
command: ['bin/yarn', '--silent', 'run', 'jshint', '--verbose']

Stylelint:
enabled: true
required_executable: 'WcaOnRails/bin/yarn'
command: ['WcaOnRails/bin/yarn', '--silent', 'run', 'stylelint', '-f', 'compact']
required_executable: 'bin/yarn'
command: ['bin/yarn', '--silent', 'run', 'stylelint', '-f', 'compact']

TrailingWhitespace:
enabled: true
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">WorldCubeAssociation Website</h1>
<div align="center">
<img height="120" src="WcaOnRails/public/files/wca_icon_only.png" />
<img height="120" src="public/files/wca_icon_only.png" />
</div>
<br />
<div align="center">
Expand Down
File renamed without changes.
60 changes: 0 additions & 60 deletions WcaOnRails/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion WcaOnRails/.ruby-version

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def update
user_login = Octokit.user.login
origin_repo = "#{user_login}/worldcubeassociation.org"
upstream_repo = "thewca/worldcubeassociation.org"
file_path = "WcaOnRails/config/locales/#{locale}.yml"
file_path = "config/locales/#{locale}.yml"
message = "Update #{locale} translation."
content_digest = Digest::SHA1.hexdigest(content)
branch_name = "translation-#{locale}-#{content_digest}"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 8290946

Please sign in to comment.