Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e3371625d | ||
|
|
b5dddd0842 |
@@ -1,2 +0,0 @@
|
||||
defaults
|
||||
IE 11
|
||||
49
.codeclimate.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
version: "2"
|
||||
plugins:
|
||||
rubocop:
|
||||
enabled: true
|
||||
channel: "rubocop-0-76"
|
||||
config:
|
||||
file: ".rubocop_styleguide.yml"
|
||||
scss-lint:
|
||||
enabled: true
|
||||
checks:
|
||||
ImportantRule:
|
||||
enabled: false
|
||||
VendorPrefix:
|
||||
enabled: false
|
||||
LeadingZero:
|
||||
enabled: false
|
||||
PropertySortOrder:
|
||||
enabled: false
|
||||
duplication:
|
||||
enabled: true
|
||||
exclude_patterns:
|
||||
- "db/**"
|
||||
- "config/initializers/active_record_postgresql_referential_integrity_patch.rb"
|
||||
checks:
|
||||
argument-count:
|
||||
enabled: false
|
||||
complex-logic:
|
||||
enabled: false
|
||||
file-lines:
|
||||
enabled: false
|
||||
method-complexity:
|
||||
enabled: false
|
||||
method-count:
|
||||
enabled: false
|
||||
method-lines:
|
||||
enabled: false
|
||||
nested-control-flow:
|
||||
enabled: false
|
||||
return-statements:
|
||||
enabled: false
|
||||
similar-code:
|
||||
enabled: false
|
||||
identical-code:
|
||||
enabled: false
|
||||
exclude_patterns:
|
||||
- "spec/**/*"
|
||||
- "vendor/**/*"
|
||||
- "app/assets/javascripts/shared/*"
|
||||
- "app/assets/javascripts/jquery-migrate-1.0.0.js"
|
||||
@@ -2,4 +2,3 @@
|
||||
.gitignore
|
||||
log/*
|
||||
tmp/*
|
||||
node_modules/
|
||||
|
||||
72
.env
@@ -1,72 +0,0 @@
|
||||
# Default ENV vars (primarily for the development environment).
|
||||
# Create `.env.development.local` or `.env.test.local` to add any local overrides.
|
||||
|
||||
# Time zone must match the operating system time zone in order to pass all tests.
|
||||
# This string is the key for the MAPPING hash constant in ActiveSupport::TimeZone.
|
||||
# Documentation including the hash="https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html
|
||||
TIMEZONE="Melbourne"
|
||||
|
||||
# Default country for dropdowns etc. See for codes="http://en.wikipedia.org/wiki/ISO_3166-1
|
||||
DEFAULT_COUNTRY_CODE="AU"
|
||||
|
||||
# Locale for translation.
|
||||
LOCALE="en_AU"
|
||||
|
||||
# For multilingual - ENV doesn't have array so pass it as string with commas
|
||||
AVAILABLE_LOCALES="en_AU,es"
|
||||
|
||||
# Spree zone.
|
||||
CHECKOUT_ZONE="Australia"
|
||||
|
||||
# Find currency codes at http://en.wikipedia.org/wiki/ISO_4217.
|
||||
CURRENCY="AUD"
|
||||
|
||||
# The whenever gem can set the `MAILTO` variable for our cron jobs.
|
||||
# You can define an email address to notify if any job outputs something.
|
||||
# But you need a working mail server setup so that the message is delivered.
|
||||
# See: config/schedule.rb
|
||||
# SCHEDULE_NOTIFICATIONS="admin@example.com"
|
||||
|
||||
# Mail settings
|
||||
MAIL_HOST="example.com"
|
||||
MAIL_DOMAIN="example.com"
|
||||
MAIL_PORT="25"
|
||||
SMTP_USERNAME="ofn"
|
||||
SMTP_PASSWORD="f00d"
|
||||
|
||||
# Optional mail settings
|
||||
# MAIL_SECURE_CONNECTION="TLS' # 'None' (default), 'SSL' or 'TLS'
|
||||
# MAILS_FROM="hello@example.com"
|
||||
# MAIL_BCC="manager@example.com"
|
||||
|
||||
# Javascript error reporting via Bugsnag.
|
||||
# BUGSNAG_JS_KEY=""
|
||||
|
||||
# see="https://developers.google.com/maps/documentation/javascript/get-api-key
|
||||
# GOOGLE_MAPS_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
# see https://developers.google.com/maps/documentation/javascript/localization#Region
|
||||
# GOOGLE_MAPS_REGION="XX"
|
||||
|
||||
# Stripe details for instance account
|
||||
# Find these under 'Developers' -> 'API keys' in your Stripe account dashboard.
|
||||
# Under 'Connect', the Redirect URI should be set to https://YOUR_SERVER_URL/stripe/callbacks (e.g. https://openfoodnetwork.org.uk/stripe/callbacks)
|
||||
# Under 'Webhooks', you should set up a Connect endpoint pointing to https://YOUR_SERVER_URL/stripe/webhooks e.g. (https://openfoodnetwork.org.uk/stripe/webhooks)
|
||||
# STRIPE_INSTANCE_SECRET_KEY="sk_test_xxxxxx" # This can be a test key or a live key
|
||||
# STRIPE_INSTANCE_PUBLISHABLE_KEY="pk_test_xxxx" # This can be a test key or a live key
|
||||
# STRIPE_CLIENT_ID="ca_xxxx" # This can be a development ID or a production ID
|
||||
# STRIPE_ENDPOINT_SECRET="whsec_xxxx"
|
||||
|
||||
# New relic settings
|
||||
# see: https://one.eu.newrelic.com/admin-portal/, Administration > API keys to get the license key
|
||||
# NEW_RELIC_AGENT_ENABLED=true
|
||||
# NEW_RELIC_APP_NAME="Open Food Network"
|
||||
# NEW_RELIC_LICENSE_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Database encryption configuration, required for VINE connected app
|
||||
# Generate with bin/rails db:encryption:init
|
||||
# ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
# ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
# ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# VINE API settings
|
||||
# VINE_API_URL="https://vine-staging.openfoodnetwork.org.au/api/v1"
|
||||
@@ -1,32 +0,0 @@
|
||||
# ENV vars for the development environment
|
||||
# Override locally with `.env.development.local`
|
||||
#
|
||||
# You may also want to use this when testing other environments locally:
|
||||
#
|
||||
# cp .env.development .env.local
|
||||
|
||||
# Locale for translation. Using a locale other than `en` tests the
|
||||
# successful fallback to `en`. To see up-to-date text used in production,
|
||||
# set another locale in a local env file.
|
||||
LOCALE="en_TST"
|
||||
|
||||
VERBOSE_QUERY_LOGS=true
|
||||
|
||||
SECRET_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
OFN_REDIS_URL="redis://localhost:6379/1"
|
||||
OFN_REDIS_JOBS_URL="redis://localhost:6379/2"
|
||||
OFN_REDIS_CABLE_URL="redis://localhost:6379/0"
|
||||
|
||||
SITE_URL="localhost:3000"
|
||||
|
||||
# Deactivate rack-timeout in development.
|
||||
# https://github.com/zombocom/rack-timeout#configuring
|
||||
RACK_TIMEOUT_SERVICE_TIMEOUT="0"
|
||||
RACK_TIMEOUT_WAIT_TIMEOUT="0"
|
||||
RACK_TIMEOUT_WAIT_OVERTIME="0"
|
||||
|
||||
# Database encryption configuration, required for VINE connected app
|
||||
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY="dev_primary_key"
|
||||
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY="dev_determinnistic_key"
|
||||
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT="dev_derivation_salt"
|
||||
36
.env.test
@@ -1,36 +0,0 @@
|
||||
# ENV vars for the test environment
|
||||
# Override locally with `.env.test.local`
|
||||
|
||||
# Test env specific variables
|
||||
#
|
||||
# Adjust this to your computer. When you start test-driven development, you may
|
||||
# want to reduce this value to avoid waiting for a test that you expect to fail.
|
||||
CAPYBARA_MAX_WAIT_TIME="10"
|
||||
|
||||
# General app specific variables
|
||||
|
||||
# Locale for translation. Using a locale other than `en` tests the
|
||||
# successful fallback to `en`.
|
||||
LOCALE="en_TST"
|
||||
|
||||
OFN_REDIS_JOBS_URL="redis://localhost:6379/2"
|
||||
|
||||
SECRET_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
STRIPE_INSTANCE_SECRET_KEY="bogus_key"
|
||||
STRIPE_CUSTOMER="bogus_customer"
|
||||
STRIPE_ACCOUNT="bogus_account"
|
||||
STRIPE_CLIENT_ID="bogus_client_id"
|
||||
|
||||
SITE_URL="test.host"
|
||||
|
||||
# OIDC Settings for DFC authentication
|
||||
# Find secrets in BitWarden.
|
||||
# To get a refresh token: log into the OIDC provider, connect your OFN user to it at /admin/oidc_settings, then copy the token from the database:
|
||||
# ./bin/rails runner 'puts "OPENID_REFRESH_TOKEN=\"#{OidcAccount.last.refresh_token}\""'
|
||||
OPENID_APP_ID="test-provider"
|
||||
OPENID_APP_SECRET="dummy-openid-app-secret-token"
|
||||
OPENID_REFRESH_TOKEN="dummy-refresh-token"
|
||||
|
||||
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY="test_primary_key"
|
||||
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY="test_deterministic_key"
|
||||
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT="test_derivation_salt"
|
||||
11
.gitattributes
vendored
@@ -1,11 +0,0 @@
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
* text=auto
|
||||
|
||||
# Set line endings to LF, even on Windows. Otherwise, execution within Docker fails.
|
||||
# See https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#per-repository-settings
|
||||
*.sh text eol=lf
|
||||
|
||||
# Same thing for following files, but they don't have an sh extension
|
||||
pre-commit eol=lf
|
||||
webpack-dev-server eol=lf
|
||||
install-bundler eol=lf
|
||||
13
.github/FUNDING.yml
vendored
@@ -1,13 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: openfoodfoundation
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: #
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
58
.github/ISSUE_TEMPLATE/release.md
vendored
@@ -1,60 +1,22 @@
|
||||
---
|
||||
name: Release task
|
||||
about: Track the process of a new release
|
||||
title: Release v
|
||||
title: 'Release v'
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## 1. Drafting on Friday
|
||||
Steps:
|
||||
|
||||
- [ ] Merge pull requests in the [Ready To Go] column
|
||||
- [ ] Include translations: `script/release/update_locales`
|
||||
- You need the [Transifex Client] installed on your local dev environement to run the script.
|
||||
- [ ] Increment version number: `git push upstream HEAD:refs/tags/vX.Y.Z`
|
||||
Check for [minor or major breaking changes]
|
||||
- Major: if server changes are required (eg. provision with ofn-install)
|
||||
- Minor: larger change that is irreversible (eg. migration deleting data)
|
||||
- Patch: all others. Shortcut: `script/release/tag`
|
||||
- [ ] [Draft new release]. Look at previous [releases] for inspiration.
|
||||
- Select new release tag
|
||||
- _Generate release notes_ and check to ensure all items are arranged in the right category.
|
||||
- [ ] Notify [#instance-managers] of user-facing :eyes:, API :warning: and experimental :construction: changes.
|
||||
|
||||
## 2. Testing
|
||||
|
||||
- [ ] Move this issue to Test Ready.
|
||||
- [ ] Notify `@testers` in [#testing].
|
||||
- [ ] Test build: [Deploy to Staging] with release tag.
|
||||
- [ ] Notify a deployer to deploy it
|
||||
|
||||
## 3. Deployment at beginning of week
|
||||
|
||||
- [ ] Publish and notify [#global-community] (this is automatically posted with a plugin)
|
||||
- [ ] Deploy the new release to all managed instances.
|
||||
<details><summary>Command line instructions</summary>
|
||||
<pre>
|
||||
cd ofn-install
|
||||
git pull
|
||||
ansible-playbook --limit all_prod --extra-vars "git_version=vX.Y.Z" playbooks/deploy.yml
|
||||
</pre>
|
||||
</details>
|
||||
- [ ] Notify [#instance-managers]:
|
||||
> @instance_managers The new release has been deployed.
|
||||
- [ ] [Create issue] for next release and confirm with next release drafter in [#delivery-circle].
|
||||
- [ ] Include translations
|
||||
- [ ] [Draft new release]
|
||||
- [ ] Notify #instance-managers of user-facing changes.
|
||||
- [ ] Test: https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/branches/master <!-- replace the URL -->
|
||||
- [ ] Publish and notify #global-community
|
||||
- [ ] Deploy and notify #instance-managers
|
||||
- [ ] Nudge next release manager
|
||||
|
||||
The full process is described at https://github.com/openfoodfoundation/openfoodnetwork/wiki/Releasing.
|
||||
|
||||
[Ready To Go]: https://github.com/orgs/openfoodfoundation/projects/8?filterQuery=status%3A%22Ready+to+go+%F0%9F%9A%80%22
|
||||
[Transifex pull request]: https://github.com/openfoodfoundation/openfoodnetwork/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+head%3Atransifex
|
||||
[Draft new release]: https://github.com/openfoodfoundation/openfoodnetwork/releases/new?title=v+Code+Name&body=Congrats%0A%0ADescription%0A%0A
|
||||
[releases]: https://github.com/openfoodfoundation/openfoodnetwork/releases
|
||||
[#instance-managers]: https://app.slack.com/client/T02G54U79/CG7NJ966B
|
||||
[#testing]: https://openfoodnetwork.slack.com/app_redirect?channel=C02TZ6X00
|
||||
[Deploy to Staging]: https://github.com/openfoodfoundation/openfoodnetwork/actions/workflows/stage.yml
|
||||
[#global-community]: https://app.slack.com/client/T02G54U79/C59ADD8F2
|
||||
[Create issue]: https://github.com/openfoodfoundation/openfoodnetwork/issues/new?assignees=&labels=&projects=&template=release.md&title=Release
|
||||
[#delivery-circle]: https://openfoodnetwork.slack.com/archives/C01T75H6G0Z
|
||||
[Transifex Client]: https://developers.transifex.com/docs/cli
|
||||
[minor or major breaking changes]: https://github.com/openfoodfoundation/openfoodnetwork/pulls?q=label%3A%22breaking+change%22%2C%22major+breaking+change%22
|
||||
[Draft new release]: https://github.com/openfoodfoundation/openfoodnetwork/releases/new?tag=v&title=v+Code+Name&body=Congrats%0A%0ADescription%0A%0A%23%23+User+facing+changes+:eyes:%0A%0A%0A%0A%23%23+Technical+changes+:wrench:%0A%0A
|
||||
|
||||
67
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,44 +1,47 @@
|
||||
## What? Why?
|
||||
#### What? Why?
|
||||
|
||||
- Closes # <!-- Insert issue number here. -->
|
||||
Closes #[the issue number this PR is related to]
|
||||
|
||||
<!-- Explain why this change is needed and the solution you propose.
|
||||
Provide context for others to understand it. -->
|
||||
Provide context for others to understand it. -->
|
||||
|
||||
|
||||
|
||||
## What should we test?
|
||||
<!-- List which features should be tested and how.
|
||||
This can be similar to the Steps to Reproduce in the issue.
|
||||
Also think of other parts of the app which could be affected
|
||||
by your change. -->
|
||||
|
||||
- Visit ... page.
|
||||
-
|
||||
|
||||
## Release notes
|
||||
|
||||
<!-- Please select one for your PR and delete the other. -->
|
||||
|
||||
Changelog Category (reviewers may add a label for the release notes):
|
||||
|
||||
- [ ] User facing changes
|
||||
- [ ] API changes (V0, V1, DFC or Webhook)
|
||||
- [ ] Technical changes only
|
||||
- [ ] Feature toggled
|
||||
|
||||
<!-- Choose a pull request title above which explains your change to a
|
||||
a user of the Open Food Network app. -->
|
||||
|
||||
The title of the pull request will be included in the release notes.
|
||||
#### What should we test?
|
||||
<!-- List which features should be tested and how. -->
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
#### Release notes
|
||||
<!-- Write a line or two to be included in the release notes.
|
||||
Everything is worth mentioning, because you did it for a reason. -->
|
||||
|
||||
|
||||
|
||||
<!-- Please assign one category to your PR and delete the others.
|
||||
The categories are based on https://keepachangelog.com/en/1.0.0/. -->
|
||||
|
||||
Changelog Category: Added | Changed | Deprecated | Removed | Fixed | Security
|
||||
|
||||
#### How is this related to the Spree upgrade?
|
||||
<!-- Any known conflicts with the Spree Upgrade?
|
||||
Explain them or remove this section. -->
|
||||
|
||||
|
||||
|
||||
#### Discourse thread
|
||||
<!-- Is there a discussion about this in Discourse?
|
||||
Add the link or remove this section. -->
|
||||
|
||||
|
||||
|
||||
#### Dependencies
|
||||
<!-- Does this PR depend on another one?
|
||||
Add the link or remove this section. -->
|
||||
Add the link or remove this section. -->
|
||||
|
||||
|
||||
|
||||
## Documentation updates
|
||||
<!-- Are there any wiki pages that need updating after merging this PR?
|
||||
List them here or remove this section. -->
|
||||
#### Documentation updates
|
||||
<!-- Are their any wiki pages that need updating after merging this PR?
|
||||
List them here or remove this section. -->
|
||||
|
||||
|
||||
44
.github/dependabot.yml
vendored
@@ -1,44 +0,0 @@
|
||||
# Dependabot configuration
|
||||
#
|
||||
# The `directory` and `schedule.interval` options are mandatory.
|
||||
# Most of the configuration here is not used for security updates though.
|
||||
|
||||
version: 2
|
||||
|
||||
multi-ecosystem-groups:
|
||||
turbo_power:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
updates:
|
||||
- package-ecosystem: "bundler"
|
||||
directory: "/"
|
||||
patterns: ["turbo_power"]
|
||||
multi-ecosystem-group: "turbo_power"
|
||||
|
||||
# Only specific requirements are specified in Gemfile, so don't touch it.
|
||||
versioning-strategy: lockfile-only
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
patterns: ["turbo_power"]
|
||||
multi-ecosystem-group: "turbo_power"
|
||||
|
||||
# Only specific requirements are specified in package.json, so don't touch it.
|
||||
versioning-strategy: lockfile-only
|
||||
|
||||
- package-ecosystem: "bundler"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
# Only specific requirements are specified in Gemfile, so don't touch it.
|
||||
versioning-strategy: lockfile-only
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
# Only specific requirements are specified in package.json, so don't touch it.
|
||||
versioning-strategy: lockfile-only
|
||||
43
.github/release.yml
vendored
@@ -1,43 +0,0 @@
|
||||
changelog:
|
||||
# Categorise according to what an instance manager needs to know
|
||||
categories:
|
||||
# Add the right label if anything appears in here.
|
||||
# Then re-generate the release notes.
|
||||
- title: "❓❓❓ Uncategorised ❓❓❓"
|
||||
labels:
|
||||
- '*'
|
||||
exclude:
|
||||
labels:
|
||||
- api changes
|
||||
- dependencies
|
||||
- feature toggled
|
||||
- technical changes only
|
||||
- user facing changes
|
||||
|
||||
# These will require a minor or major version increment
|
||||
- title: "Significant changes 🚀"
|
||||
labels:
|
||||
- breaking change
|
||||
- major breaking change
|
||||
|
||||
# Posted in advance for #instance-managers
|
||||
- title: "User-facing changes 👀"
|
||||
labels:
|
||||
- user facing changes
|
||||
|
||||
- title: "API changes ⚠️"
|
||||
labels:
|
||||
- api changes
|
||||
|
||||
- title: "Experimental features for testing 🚧" # may be tested by instance managers
|
||||
labels:
|
||||
- feature toggled
|
||||
|
||||
# Instance managers ignore below
|
||||
- title: "Technical changes 🛠️"
|
||||
labels:
|
||||
- technical changes only
|
||||
|
||||
- title: "Dependencies 📦"
|
||||
labels:
|
||||
- dependencies
|
||||
15
.github/test-events/dependabot-pr.json
vendored
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"pull_request": {
|
||||
"number": 13545,
|
||||
"title": "Bump test from 7.0.4 to 7.0.8",
|
||||
"user": {
|
||||
"login": "dependabot[bot]"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"owner": {
|
||||
"login": "openfoodfoundation"
|
||||
},
|
||||
"name": "openfoodnetwork"
|
||||
}
|
||||
}
|
||||
14
.github/workflows/auto-author-assign.yml
vendored
@@ -1,14 +0,0 @@
|
||||
name: Auto Author Assign
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
assign-author:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: toshimaru/auto-author-assign@v2.1.0
|
||||
415
.github/workflows/build.yml
vendored
@@ -1,415 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
DISABLE_KNAPSACK_PRO: false
|
||||
TIMEZONE: UTC
|
||||
COVERAGE: true
|
||||
RAILS_ENV: test
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
controllers_and_models:
|
||||
runs-on: ubuntu-22.04
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
POSTGRES_DB: open_food_network_test
|
||||
POSTGRES_USER: ofn
|
||||
POSTGRES_PASSWORD: f00d
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# [n] - where the n is a number of parallel jobs you want to run your tests on.
|
||||
# Use a higher number if you have slow tests to split them between more parallel jobs.
|
||||
# Remember to update the value of the `ci_node_index` below to (0..n-1).
|
||||
ci_node_total: [4]
|
||||
# Indexes for parallel jobs (starting from zero).
|
||||
# E.g. use [0, 1] for 2 parallel jobs, [0, 1, 2] for 3 parallel jobs, etc.
|
||||
ci_node_index: [0, 1, 2, 3]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup redis
|
||||
uses: supercharge/redis-github-action@1.4.0
|
||||
with:
|
||||
redis-version: 6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
# JS is required in order for webpacker to compile, in order to render templates containing image urls
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: yarn
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Set up database
|
||||
run: |
|
||||
bin/rails db:create db:schema:load
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: 864ef557d85ea8e603e086c0387d5154
|
||||
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
|
||||
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
|
||||
KNAPSACK_PRO_LOG_LEVEL: info
|
||||
# if you use Knapsack Pro Queue Mode you must set below env variable
|
||||
# to be able to retry CI build and run previously recorded tests
|
||||
# https://github.com/KnapsackPro/knapsack_pro-ruby#knapsack_pro_fixed_queue_split-remember-queue-split-on-retry-ci-node
|
||||
# KNAPSACK_PRO_FIXED_QUEUE_SPLIT: false
|
||||
# RSpec split test files by test examples feature - it's optional
|
||||
# https://knapsackpro.com/faq/question/how-to-split-slow-rspec-test-files-by-test-examples-by-individual-it
|
||||
#KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
|
||||
KNAPSACK_PRO_TEST_FILE_PATTERN: "{spec/controllers/**/*_spec.rb,spec/models/**/*_spec.rb}"
|
||||
run: |
|
||||
git show --no-patch # the commit being tested (which is often a merge due to actions/checkout@v3)
|
||||
bin/rails assets:precompile knapsack_pro:rspec
|
||||
|
||||
- name: Save SimpleCov file
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: simplecov-chunk-controllers-${{ matrix.ci_node_index }}
|
||||
path: coverage/*.*
|
||||
retention-days: 2 # doesn't need to be long, because it's the combined results that matter
|
||||
if-no-files-found: ignore
|
||||
include-hidden-files: true
|
||||
|
||||
system:
|
||||
runs-on: ubuntu-22.04
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
POSTGRES_DB: open_food_network_test
|
||||
POSTGRES_USER: ofn
|
||||
POSTGRES_PASSWORD: f00d
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# [n] - where the n is a number of parallel jobs you want to run your tests on.
|
||||
# Use a higher number if you have slow tests to split them between more parallel jobs.
|
||||
# Remember to update the value of the `ci_node_index` below to (0..n-1).
|
||||
ci_node_total: [19]
|
||||
# Indexes for parallel jobs (starting from zero).
|
||||
# E.g. use [0, 1] for 2 parallel jobs, [0, 1, 2] for 3 parallel jobs, etc.
|
||||
ci_node_index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup redis
|
||||
uses: supercharge/redis-github-action@1.4.0
|
||||
with:
|
||||
redis-version: 6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: yarn
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Set up database
|
||||
run: |
|
||||
bin/rails db:create db:schema:load
|
||||
|
||||
- name: Run tests
|
||||
|
||||
env:
|
||||
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ff2456e64c9f2aa5157eb0daf711d3c3
|
||||
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
|
||||
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
|
||||
KNAPSACK_PRO_LOG_LEVEL: info
|
||||
# if you use Knapsack Pro Queue Mode you must set below env variable
|
||||
# to be able to retry CI build and run previously recorded tests
|
||||
# https://github.com/KnapsackPro/knapsack_pro-ruby#knapsack_pro_fixed_queue_split-remember-queue-split-on-retry-ci-node
|
||||
KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true
|
||||
# RSpec split test files by test examples feature - it's optional
|
||||
# https://knapsackpro.com/faq/question/how-to-split-slow-rspec-test-files-by-test-examples-by-individual-it
|
||||
#KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
|
||||
KNAPSACK_PRO_TEST_FILE_PATTERN: "{spec/system/admin/**/*_spec.rb,spec/system/consumer/**/*_spec.rb}"
|
||||
|
||||
run: |
|
||||
bin/rails assets:precompile knapsack_pro:queue:rspec
|
||||
|
||||
- name: Save SimpleCov file
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: simplecov-chunk-system-${{ matrix.ci_node_index }}
|
||||
path: coverage/*.*
|
||||
retention-days: 2 # doesn't need to be long, because it's the combined results that matter
|
||||
if-no-files-found: ignore
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Archive failed tests screenshots
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: failed-system_${{ matrix.ci_node_index }}-tests-screenshots
|
||||
path: tmp/capybara/screenshots/*.png
|
||||
retention-days: 7
|
||||
if-no-files-found: ignore
|
||||
|
||||
engines:
|
||||
runs-on: ubuntu-22.04
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
POSTGRES_DB: open_food_network_test
|
||||
POSTGRES_USER: ofn
|
||||
POSTGRES_PASSWORD: f00d
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# [n] - where the n is a number of parallel jobs you want to run your tests on.
|
||||
# Use a higher number if you have slow tests to split them between more parallel jobs.
|
||||
# Remember to update the value of the `ci_node_index` below to (0..n-1).
|
||||
ci_node_total: [2]
|
||||
# Indexes for parallel jobs (starting from zero).
|
||||
# E.g. use [0, 1] for 2 parallel jobs, [0, 1, 2] for 3 parallel jobs, etc.
|
||||
ci_node_index: [0, 1]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup redis
|
||||
uses: supercharge/redis-github-action@1.4.0
|
||||
with:
|
||||
redis-version: 6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
# JS is required in order for webpacker to compile, in order to render templates linking to mail.css
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: yarn
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Set up database
|
||||
run: |
|
||||
bin/rails db:create db:schema:load
|
||||
|
||||
- name: Run tests
|
||||
|
||||
env:
|
||||
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: d6ea7ceb766404ccd016c19aa2c81b1c
|
||||
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
|
||||
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
|
||||
KNAPSACK_PRO_LOG_LEVEL: info
|
||||
# if you use Knapsack Pro Queue Mode you must set below env variable
|
||||
# to be able to retry CI build and run previously recorded tests
|
||||
# https://github.com/KnapsackPro/knapsack_pro-ruby#knapsack_pro_fixed_queue_split-remember-queue-split-on-retry-ci-node
|
||||
# KNAPSACK_PRO_FIXED_QUEUE_SPLIT: false
|
||||
# RSpec split test files by test examples feature - it's optional
|
||||
# https://knapsackpro.com/faq/question/how-to-split-slow-rspec-test-files-by-test-examples-by-individual-it
|
||||
#KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
|
||||
KNAPSACK_PRO_TEST_FILE_PATTERN: "{spec/lib/**/*_spec.rb,spec/migrations/**/*_spec.rb,spec/serializers/**/*_spec.rb,engines/**/*_spec.rb}"
|
||||
|
||||
run: |
|
||||
bin/rails assets:precompile knapsack_pro:rspec
|
||||
|
||||
- name: Save SimpleCov file
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: simplecov-chunk-engines-${{ matrix.ci_node_index }}
|
||||
path: coverage/*.*
|
||||
retention-days: 2 # doesn't need to be long, because it's the combined results that matter
|
||||
if-no-files-found: ignore
|
||||
include-hidden-files: true
|
||||
|
||||
test_the_rest:
|
||||
runs-on: ubuntu-22.04
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
POSTGRES_DB: open_food_network_test
|
||||
POSTGRES_USER: ofn
|
||||
POSTGRES_PASSWORD: f00d
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# [n] - where the n is a number of parallel jobs you want to run your tests on.
|
||||
# Use a higher number if you have slow tests to split them between more parallel jobs.
|
||||
# Remember to update the value of the `ci_node_index` below to (0..n-1).
|
||||
ci_node_total: [3]
|
||||
# Indexes for parallel jobs (starting from zero).
|
||||
# E.g. use [0, 1] for 2 parallel jobs, [0, 1, 2] for 3 parallel jobs, etc.
|
||||
ci_node_index: [0, 1, 2]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup redis
|
||||
uses: supercharge/redis-github-action@1.4.0
|
||||
with:
|
||||
redis-version: 6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
# JS is required in order for webpacker to compile, in order to render templates linking to mail.css
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: yarn
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Set up database
|
||||
run: |
|
||||
bin/rails db:create db:schema:load
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: e3b8800198d2d89b70c7edbdd85f8fd8
|
||||
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
|
||||
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
|
||||
KNAPSACK_PRO_LOG_LEVEL: info
|
||||
# if you use Knapsack Pro Queue Mode you must set below env variable
|
||||
# to be able to retry CI build and run previously recorded tests
|
||||
# https://github.com/KnapsackPro/knapsack_pro-ruby#knapsack_pro_fixed_queue_split-remember-queue-split-on-retry-ci-node
|
||||
# KNAPSACK_PRO_FIXED_QUEUE_SPLIT: false
|
||||
# RSpec split test files by test examples feature - it's optional
|
||||
# https://knapsackpro.com/faq/question/how-to-split-slow-rspec-test-files-by-test-examples-by-individual-it
|
||||
#KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
|
||||
KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN: "{engines/**/*_spec.rb,spec/models/**/*_spec.rb,spec/controllers/**/*_spec.rb,spec/serializers/**/*_spec.rb,spec/lib/**/*_spec.rb,spec/migrations/**/*_spec.rb,spec/system/**/*_spec.rb}"
|
||||
run: |
|
||||
bin/rails assets:precompile knapsack_pro:rspec
|
||||
|
||||
- name: Save SimpleCov file
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: simplecov-chunk-the-rest-${{ matrix.ci_node_index }}
|
||||
path: coverage/*.*
|
||||
retention-days: 2 # doesn't need to be long, because it's the combined results that matter
|
||||
if-no-files-found: ignore
|
||||
include-hidden-files: true
|
||||
|
||||
non_knapsack_jest_karma:
|
||||
runs-on: ubuntu-22.04
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
POSTGRES_DB: open_food_network_test
|
||||
POSTGRES_USER: ofn
|
||||
POSTGRES_PASSWORD: f00d
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Rails is required for the Karma rake script
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: yarn
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Run JS tests
|
||||
run: bin/rake karma:run
|
||||
|
||||
- name: Run jest tests
|
||||
run: yarn jest
|
||||
|
||||
collate_simplecov_results:
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- controllers_and_models
|
||||
- engines
|
||||
- system
|
||||
- test_the_rest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
- name: Download individual results from individual runners
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: simplecov-chunk-*
|
||||
path: tmp/simplecov
|
||||
|
||||
- name: collate results from each of the workers
|
||||
run: bundle exec rake 'simplecov:collate_results[tmp/simplecov]'
|
||||
|
||||
- name: Upload collated results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: combined-simplecov-report
|
||||
path: coverage/**/*.*
|
||||
retention-days: 7
|
||||
if-no-files-found: ignore
|
||||
include-hidden-files: true
|
||||
- name: Compare SimpleCov results with Undercover
|
||||
run: |
|
||||
git fetch --no-tags origin ${{ github.event.pull_request.base.ref }}:master
|
||||
bundle exec undercover
|
||||
if: ${{ github.ref != 'refs/heads/master' }} # Does not run on master, as we can't fetch master in the master branch
|
||||
30
.github/workflows/linters.yml
vendored
@@ -1,30 +0,0 @@
|
||||
name: Linters
|
||||
on: [pull_request]
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
jobs:
|
||||
lint:
|
||||
name: reviewdog
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
- run: git show --no-patch # the commit being tested (which is often a merge due to actions/checkout@v3)
|
||||
|
||||
- uses: reviewdog/action-setup@v1
|
||||
with:
|
||||
reviewdog_version: v0.21.0
|
||||
|
||||
- run: ./script/reviewdog.sh
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.github_token }}
|
||||
@@ -1,151 +0,0 @@
|
||||
name: Auto-move Dependabot PRs to Code Review
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
move-pr-to-code-review:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.user.login == 'dependabot[bot]' || startsWith(github.event.pull_request.title, 'Bump')
|
||||
steps:
|
||||
- name: Generate GitHub App Token
|
||||
id: app-token
|
||||
uses: tibdex/github-app-token@v2
|
||||
with:
|
||||
app_id: ${{ secrets.DEPENDABOT_PR_APP_ID }}
|
||||
private_key: ${{ secrets.DEPENDABOT_PR_APP_PRIVATE_KEY }}
|
||||
installation_retrieval_mode: id
|
||||
installation_retrieval_payload: ${{ secrets.DEPENDABOT_PR_APP_INSTALLATION_ID }}
|
||||
|
||||
- name: Move PR to Code Review in Project v2
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
script: |
|
||||
const projectNumber = 8; // for "OFN Delivery board"
|
||||
const org = "openfoodfoundation";
|
||||
const repo = context.repo.repo;
|
||||
const prNumber = context.payload.pull_request.number;
|
||||
const statusFieldName = "Status";
|
||||
const statusValue = "Code review 🔎";
|
||||
|
||||
// ---- Helper: Get PR Node ID ----
|
||||
async function getPrNodeId(owner, repo, number) {
|
||||
const res = await github.graphql(`
|
||||
query($owner: String!, $repo: String!, $number: Int!) {
|
||||
repository(owner: $owner, name: $repo) {
|
||||
pullRequest(number: $number) {
|
||||
id
|
||||
number
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
`, { owner, repo, number });
|
||||
return res.repository.pullRequest.id;
|
||||
}
|
||||
|
||||
console.log("🚀 Starting ProjectV2 automation...");
|
||||
|
||||
// ---- Step 1: Get Project and Fields ----
|
||||
const projectRes = await github.graphql(`
|
||||
query($org: String!, $number: Int!) {
|
||||
organization(login: $org) {
|
||||
projectV2(number: $number) {
|
||||
id
|
||||
title
|
||||
fields(first: 50) {
|
||||
nodes {
|
||||
... on ProjectV2Field {
|
||||
id
|
||||
name
|
||||
}
|
||||
... on ProjectV2SingleSelectField {
|
||||
id
|
||||
name
|
||||
options {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`, { org, number: projectNumber });
|
||||
|
||||
const project = projectRes.organization.projectV2;
|
||||
if (!project) throw new Error(`❌ Project #${projectNumber} not found`);
|
||||
|
||||
console.log(`✅ Found project: ${project.title} (${project.id})`);
|
||||
|
||||
const statusField = project.fields.nodes.find(f => f.name === statusFieldName);
|
||||
if (!statusField) throw new Error(`❌ Field '${statusFieldName}' not found`);
|
||||
|
||||
const option = statusField.options.find(o => o.name === statusValue);
|
||||
if (!option) throw new Error(`❌ Option '${statusValue}' not found in '${statusFieldName}'`);
|
||||
|
||||
console.log(`✅ Found field '${statusFieldName}' and option '${statusValue}'`);
|
||||
|
||||
// ---- Step 2: Get PR Node ID ----
|
||||
const prNodeId = await getPrNodeId(org, repo, prNumber);
|
||||
console.log(`✅ PR #${prNumber} node ID: ${prNodeId}`);
|
||||
|
||||
// ---- Step 3: Check if PR is already in Project ----
|
||||
const itemRes = await github.graphql(`
|
||||
query($prId: ID!) {
|
||||
node(id: $prId) {
|
||||
... on PullRequest {
|
||||
projectItems(first: 50) {
|
||||
nodes {
|
||||
id
|
||||
project { id title }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`, { prId: prNodeId });
|
||||
|
||||
let projectItem = itemRes.node.projectItems.nodes.find(i => i.project.id === project.id);
|
||||
|
||||
if (!projectItem) {
|
||||
console.log("ℹ️ PR not yet in project, adding...");
|
||||
const addRes = await github.graphql(`
|
||||
mutation($projectId: ID!, $contentId: ID!) {
|
||||
addProjectV2ItemById(input: {projectId: $projectId, contentId: $contentId}) {
|
||||
item { id }
|
||||
}
|
||||
}
|
||||
`, { projectId: project.id, contentId: prNodeId });
|
||||
projectItem = addRes.addProjectV2ItemById.item;
|
||||
console.log(`✅ Added PR to project: ${projectItem.id}`);
|
||||
} else {
|
||||
console.log(`ℹ️ PR already in project: ${projectItem.id}`);
|
||||
}
|
||||
|
||||
// ---- Step 4: Update Status ----
|
||||
await github.graphql(`
|
||||
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
|
||||
updateProjectV2ItemFieldValue(input: {
|
||||
projectId: $projectId,
|
||||
itemId: $itemId,
|
||||
fieldId: $fieldId,
|
||||
value: { singleSelectOptionId: $optionId }
|
||||
}) {
|
||||
projectV2Item { id }
|
||||
}
|
||||
}
|
||||
`, {
|
||||
projectId: project.id,
|
||||
itemId: projectItem.id,
|
||||
fieldId: statusField.id,
|
||||
optionId: option.id,
|
||||
});
|
||||
|
||||
console.log(`🎉 Moved PR #${prNumber} → '${statusValue}'`);
|
||||
66
.github/workflows/stage.yml
vendored
@@ -1,66 +0,0 @@
|
||||
name: "Deploy to Staging"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [labeled]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
server:
|
||||
description: "Staging Server"
|
||||
type: choice
|
||||
required: true
|
||||
options:
|
||||
- staging.openfoodnetwork.org.uk
|
||||
- staging.openfoodnetwork.org.au
|
||||
- staging.coopcircuits.fr
|
||||
commit_ref:
|
||||
description: "Commit Reference"
|
||||
type: string
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
deploy_pr:
|
||||
if: contains(fromJSON('["pr-staged-uk", "pr-staged-au", "pr-staged-fr"]'), github.event.label.name)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Check user has write access"
|
||||
uses: "lannonbr/repo-permission-check-action@2.0.2"
|
||||
with:
|
||||
permission: "write"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Configure deployment key
|
||||
if: success()
|
||||
run: |
|
||||
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
||||
echo "${{ secrets.DEPLOYMENT_KEY }}" > ~/.ssh/id_rsa
|
||||
echo "${{ secrets.DEPLOYMENT_HOSTS }}" > ~/.ssh/known_hosts
|
||||
|
||||
- name: Deploy to Staging
|
||||
if: success()
|
||||
run: |
|
||||
ssh ofn-deploy@${{ github.event.label.description }} -o LogLevel=ERROR "pull-request-${{ github.event.pull_request.number }} ."
|
||||
|
||||
deploy_branch:
|
||||
if: ${{ inputs.server }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Check user has write access"
|
||||
uses: "lannonbr/repo-permission-check-action@2.0.2"
|
||||
with:
|
||||
permission: "write"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Configure deployment key
|
||||
if: success()
|
||||
run: |
|
||||
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
||||
echo "${{ secrets.DEPLOYMENT_KEY }}" > ~/.ssh/id_rsa
|
||||
echo "${{ secrets.DEPLOYMENT_HOSTS }}" > ~/.ssh/known_hosts
|
||||
|
||||
- name: Deploy to Staging
|
||||
if: success()
|
||||
run: |
|
||||
ssh ofn-deploy@${{ inputs.server }} -o LogLevel=ERROR "$GITHUB_REF_NAME ${{ inputs.commit_ref || github.sha }}"
|
||||
20
.gitignore
vendored
@@ -1,12 +1,7 @@
|
||||
.bundle
|
||||
.rbenv-version
|
||||
.python-version
|
||||
.byebug_history
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.swp
|
||||
.vscode
|
||||
*.swo
|
||||
*.swp
|
||||
.sass-cache
|
||||
@@ -15,7 +10,6 @@ db/*.csv
|
||||
log/*.log
|
||||
log/*.log.lck
|
||||
log/*.log.*
|
||||
/storage
|
||||
tmp/
|
||||
.idea/*
|
||||
\#*
|
||||
@@ -36,27 +30,17 @@ app/public
|
||||
public/system
|
||||
public/stylesheets
|
||||
public/images
|
||||
public/files
|
||||
public/spree
|
||||
public/assets
|
||||
config/abr.yml
|
||||
config/initializers/feature_toggle.rb
|
||||
NERD_tree*
|
||||
coverage
|
||||
libpeerconnection.log
|
||||
/config/application.yml
|
||||
/config/newrelic.yml
|
||||
node_modules
|
||||
vendor/bundle/
|
||||
coverage
|
||||
/reports/
|
||||
!/reports/README.md
|
||||
|
||||
/public/packs
|
||||
/public/packs-test
|
||||
/yarn-error.log
|
||||
yarn-debug.log*
|
||||
.yarn-integrity
|
||||
|
||||
/config/credentials.yml.enc
|
||||
/config/master.key
|
||||
.secrets
|
||||
bin/
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# Whether to ignore frontmatter at the beginning of HAML documents for
|
||||
# frameworks such as Jekyll/Middleman
|
||||
skip_frontmatter: false
|
||||
|
||||
inherits_from: .haml-lint_todo.yml
|
||||
|
||||
linters:
|
||||
AltText:
|
||||
enabled: false
|
||||
|
||||
ConsecutiveSilentScripts:
|
||||
enabled: true
|
||||
max_consecutive: 2
|
||||
|
||||
EmptyScript:
|
||||
enabled: true
|
||||
|
||||
HtmlAttributes:
|
||||
enabled: true
|
||||
|
||||
ImplicitDiv:
|
||||
enabled: true
|
||||
|
||||
LeadingCommentSpace:
|
||||
enabled: true
|
||||
|
||||
LineLength:
|
||||
max: 80
|
||||
|
||||
MultilinePipe:
|
||||
enabled: true
|
||||
|
||||
MultilineScript:
|
||||
enabled: true
|
||||
|
||||
ObjectReferenceAttributes:
|
||||
enabled: true
|
||||
|
||||
RuboCop:
|
||||
enabled: false
|
||||
|
||||
SpaceInsideHashAttributes:
|
||||
style: no_space
|
||||
|
||||
TagName:
|
||||
enabled: true
|
||||
|
||||
UnnecessaryInterpolation:
|
||||
enabled: true
|
||||
@@ -1,153 +0,0 @@
|
||||
# This configuration was generated by
|
||||
# `haml-lint --auto-gen-config`
|
||||
# on 2025-10-30 09:19:50 +0100 using Haml-Lint version 0.66.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the lints are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of Haml-Lint, may require this file to be generated again.
|
||||
|
||||
linters:
|
||||
|
||||
# Offense count: 35
|
||||
ClassAttributeWithStaticValue:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 77
|
||||
ClassesBeforeIds:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 18
|
||||
ConsecutiveComments:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 22
|
||||
ConsecutiveSilentScripts:
|
||||
exclude:
|
||||
- "app/views/admin/contents/_fieldset.html.haml"
|
||||
- "app/views/admin/enterprises/form/_tag_rules.html.haml"
|
||||
- "app/views/admin/order_cycles/edit.html.haml"
|
||||
- "app/views/admin/products_v3/product_preview.turbo_stream.haml"
|
||||
- "app/views/admin/reports/_date_range_form.html.haml"
|
||||
- "app/views/checkout/_details.html.haml"
|
||||
- "app/views/checkout/_payment.html.haml"
|
||||
- "app/views/spree/admin/adjustments/_adjustments_table.html.haml"
|
||||
- "app/views/spree/admin/orders/customer_details/_address_form.html.haml"
|
||||
- "app/views/spree/admin/tax_categories/index.html.haml"
|
||||
- "app/views/spree/admin/users/index.html.haml"
|
||||
|
||||
# Offense count: 14
|
||||
FinalNewline:
|
||||
exclude:
|
||||
- "app/assets/javascripts/templates/shared/question_mark_with_tooltip.html.haml"
|
||||
- "app/views/admin/enterprises/form/_social.html.haml"
|
||||
- "app/views/admin/json/_injection_ams.html.haml"
|
||||
- "app/views/admin/order_cycles/_date_time_warning_modal_content.html.haml"
|
||||
- "app/views/admin/order_cycles/edit.html.haml"
|
||||
- "app/views/admin/product_import/_ams_data.html.haml"
|
||||
- "app/views/admin/reports/_row_group.haml"
|
||||
- "app/views/admin/reports/filters/_enterprise_fee_summary.html.haml"
|
||||
- "app/views/admin/reports/filters/_users_and_enterprises.html.haml"
|
||||
- "app/views/shop/_blocked_cookies.html.haml"
|
||||
- "app/views/spree/admin/orders/_invoice/_order_note.html.haml"
|
||||
- "app/views/spree/admin/orders/invoice4.html.haml"
|
||||
- "app/views/spree/admin/taxons/destroy_taxon.turbo_stream.haml"
|
||||
- "app/views/spree/admin/users/_email_confirmation.html.haml"
|
||||
|
||||
# Offense count: 130
|
||||
IdNames:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 5
|
||||
Indentation:
|
||||
exclude:
|
||||
- "app/views/admin/products_v3/clone.turbo_stream.haml"
|
||||
- "app/views/admin/products_v3/destroy_product_variant.turbo_stream.haml"
|
||||
- "app/views/spree/admin/taxons/destroy_taxon.turbo_stream.haml"
|
||||
|
||||
# Offense count: 191
|
||||
InlineStyles:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 589
|
||||
InstanceVariables:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
LeadingCommentSpace:
|
||||
exclude:
|
||||
- "app/views/admin/reports/_row_group.haml"
|
||||
|
||||
# Offense count: 2331
|
||||
LineLength:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
MultilinePipe:
|
||||
exclude:
|
||||
- "app/views/admin/reports/_rendering_options.html.haml"
|
||||
|
||||
# Offense count: 2
|
||||
MultilineScript:
|
||||
exclude:
|
||||
- "app/views/admin/products_v3/product_preview.turbo_stream.haml"
|
||||
- "app/views/checkout/_voucher_section.html.haml"
|
||||
|
||||
# Offense count: 2
|
||||
RepeatedId:
|
||||
exclude:
|
||||
- "app/assets/javascripts/templates/admin/save_bar.html.haml"
|
||||
|
||||
# Offense count: 24
|
||||
RubyComments:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 104
|
||||
SpaceBeforeScript:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 3345
|
||||
SpaceInsideHashAttributes:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 22
|
||||
TrailingEmptyLines:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 73
|
||||
TrailingWhitespace:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 13
|
||||
UnnecessaryInterpolation:
|
||||
exclude:
|
||||
- "app/components/example_component/example_component.html.haml"
|
||||
- "app/views/admin/product_import/_entries_table.html.haml"
|
||||
- "app/views/admin/product_import/import.html.haml"
|
||||
- "app/views/admin/variant_overrides/_filters.html.haml"
|
||||
- "app/views/registration/steps/_introduction.html.haml"
|
||||
- "app/views/spree/order_mailer/_shipping.html.haml"
|
||||
- "app/views/spree/order_mailer/invoice_email.html.haml"
|
||||
- "app/views/spree/shared/_shipment_delivery_details.html.haml"
|
||||
- "app/views/spree/shared/_shipment_pickup_details.html.haml"
|
||||
|
||||
# Offense count: 68
|
||||
UnnecessaryStringOutput:
|
||||
enabled: false
|
||||
|
||||
# Offense count: 14
|
||||
ViewLength:
|
||||
exclude:
|
||||
- "app/assets/javascripts/templates/admin/panels/enterprise_package.html.haml"
|
||||
- "app/views/admin/customers/index.html.haml"
|
||||
- "app/views/admin/enterprises/_new_form.html.haml"
|
||||
- "app/views/admin/enterprises/form/_shop_preferences.html.haml"
|
||||
- "app/views/admin/product_import/_import_review.html.haml"
|
||||
- "app/views/admin/products_v3/product_preview.turbo_stream.haml"
|
||||
- "app/views/checkout/_details.html.haml"
|
||||
- "app/views/groups/show.html.haml"
|
||||
- "app/views/producer_mailer/order_cycle_report.html.haml"
|
||||
- "app/views/shared/_footer.html.haml"
|
||||
- "app/views/spree/admin/orders/bulk_management.html.haml"
|
||||
- "app/views/spree/admin/orders/invoice4.html.haml"
|
||||
- "app/views/spree/admin/products/new.html.haml"
|
||||
- "app/views/spree/admin/variants/_form.html.haml"
|
||||
@@ -1 +1 @@
|
||||
24.10.0
|
||||
5.12.0
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# Ignore a lot of things, but we should enable where it can be helpful.
|
||||
|
||||
*.md
|
||||
*.yml
|
||||
*.yaml
|
||||
*.json
|
||||
*.html
|
||||
**/*.rb
|
||||
|
||||
# JS
|
||||
# Enabled: app/webpacker/controllers/*.js and app/webpacker/packs/*.js
|
||||
babel.config.js
|
||||
postcss.config.js
|
||||
|
||||
# SCSS
|
||||
# Enabled: most of admin
|
||||
/app/webpacker/css/admin/globals/mixins.scss
|
||||
/app/webpacker/css/admin/globals/variables.scss
|
||||
/app/webpacker/css/admin/shared/
|
||||
/app/webpacker/css/admin_v3/globals/variables.scss
|
||||
/app/webpacker/css/darkswarm/
|
||||
/app/webpacker/css/mail/
|
||||
/app/webpacker/css/shared/
|
||||
|
||||
# More
|
||||
/app/assets/
|
||||
/config/
|
||||
/coverage/
|
||||
/engines/
|
||||
/public/
|
||||
/tmp/
|
||||
/vendor/
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"printWidth": 100
|
||||
}
|
||||
19
.rubocop.yml
@@ -4,25 +4,18 @@
|
||||
#
|
||||
# The configuration is split into three files. Look into those files for more details.
|
||||
#
|
||||
plugins:
|
||||
- rubocop-capybara
|
||||
- rubocop-factory_bot
|
||||
- rubocop-rails
|
||||
- rubocop-rspec
|
||||
- rubocop-rspec_rails
|
||||
|
||||
require: rubocop-rails
|
||||
inherit_from:
|
||||
|
||||
# The automatically generated todo list to ignore all current violations.
|
||||
- .rubocop_todo.yml
|
||||
|
||||
# The relaxed style rules as a common starting point which we can refine.
|
||||
- .rubocop_relaxed_styleguide.yml
|
||||
|
||||
# Our Open Food Network style guides. If you want to see all violations,
|
||||
# then use only that configuration:
|
||||
# Our Open Food Network style guide. It's used by Code Climate. If you want to see all violations,
|
||||
# then use only that configuration (like Code Climate):
|
||||
#
|
||||
# bundle exec rubocop -c .rubocop_styleguide.yml
|
||||
#
|
||||
- .rubocop_styleguide.yml
|
||||
- .rubocop_rspec_styleguide.yml
|
||||
|
||||
# A manually compiled todo list to ignore metrics violations on a file-by-file basis.
|
||||
- .rubocop_manual_todo.yml
|
||||
|
||||
724
.rubocop_manual_todo.yml
Normal file
@@ -0,0 +1,724 @@
|
||||
# A manually compiled todo list to ignore metrics violations on a file-by-file basis.
|
||||
#
|
||||
# The file .rubocop_todo.yml is generated automatically and contains a
|
||||
# configuration to make all files pass. For a lot of cops it just lists
|
||||
# the offending files. But for metrics cops it sets a different metric.
|
||||
#
|
||||
# Since we don't want these lax metrics, we override them in our config
|
||||
# file .rubocop.yml which results in a lot of offences again. This file
|
||||
# lists all offending files for each cop to make rubocop pass. We can
|
||||
# improve the code over time and remove items from the list.
|
||||
#
|
||||
# This file was manually created by using the following tools:
|
||||
#
|
||||
# rubocop > rubo.log
|
||||
# # inspect log file to see which cops are failing
|
||||
# # copy cop configurations and add Exclude parameter
|
||||
# grep ExampleCop rubo.log | cut -d ":" -f 1 | sort -u | while read f; do echo " - $f"; done >> .rubocop.yml
|
||||
#
|
||||
# This process probably doesn't need repeating. Otherwise there is plenty
|
||||
# of room for improvements and automation.
|
||||
Layout/LineLength:
|
||||
Max: 100
|
||||
Exclude:
|
||||
- Gemfile
|
||||
- app/controllers/admin/bulk_line_items_controller.rb
|
||||
- app/controllers/admin/contents_controller.rb
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprise_groups_controller.rb
|
||||
- app/controllers/admin/enterprise_relationships_controller.rb
|
||||
- app/controllers/admin/enterprise_roles_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/inventory_items_controller.rb
|
||||
- app/controllers/admin/manager_invitations_controller.rb
|
||||
- app/controllers/admin/product_import_controller.rb
|
||||
- app/controllers/admin/proxy_orders_controller.rb
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/admin/variant_overrides_controller.rb
|
||||
- app/controllers/api/enterprise_attachment_controller.rb
|
||||
- app/controllers/api/product_images_controller.rb
|
||||
- app/controllers/spree/admin/adjustments_controller_decorator.rb
|
||||
- app/controllers/spree/admin/orders_controller_decorator.rb
|
||||
- app/controllers/spree/credit_cards_controller.rb
|
||||
- app/controllers/spree/paypal_controller_decorator.rb
|
||||
- app/controllers/stripe/callbacks_controller.rb
|
||||
- app/helpers/angular_form_builder.rb
|
||||
- app/helpers/angular_form_helper.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/enterprises_helper.rb
|
||||
- app/helpers/injection_helper.rb
|
||||
- app/helpers/markdown_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/shop_helper.rb
|
||||
- app/helpers/spree/admin/base_helper_decorator.rb
|
||||
- app/helpers/spree/orders_helper.rb
|
||||
- app/jobs/subscription_confirm_job.rb
|
||||
- app/mailers/subscription_mailer.rb
|
||||
- app/models/column_preference.rb
|
||||
- app/models/concerns/order_shipment.rb
|
||||
- app/models/concerns/product_stock.rb
|
||||
- app/models/concerns/variant_stock.rb
|
||||
- app/models/content_configuration.rb
|
||||
- app/models/customer.rb
|
||||
- app/models/enterprise_fee.rb
|
||||
- app/models/enterprise_group.rb
|
||||
- app/models/enterprise_role.rb
|
||||
- app/models/inventory_item.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/product_import/product_importer.rb
|
||||
- app/models/product_import/spreadsheet_data.rb
|
||||
- app/models/product_import/spreadsheet_entry.rb
|
||||
- app/models/product_import/unit_converter.rb
|
||||
- app/models/proxy_order.rb
|
||||
- app/models/schedule.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/app_configuration_decorator.rb
|
||||
- app/models/spree/calculator/default_tax_decorator.rb
|
||||
- app/models/spree/classification_decorator.rb
|
||||
- app/models/spree/concerns/payment_method_distributors.rb
|
||||
- app/models/spree/gateway/stripe_connect.rb
|
||||
- app/models/spree/line_item_decorator.rb
|
||||
- app/models/spree/order_decorator.rb
|
||||
- app/models/spree/payment_decorator.rb
|
||||
- app/models/spree/payment_method_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/models/spree/shipping_method_decorator.rb
|
||||
- app/models/spree/tax_rate_decorator.rb
|
||||
- app/models/spree/taxon_decorator.rb
|
||||
- app/models/spree/user.rb
|
||||
- app/models/spree/variant_decorator.rb
|
||||
- app/models/subscription.rb
|
||||
- app/models/variant_override.rb
|
||||
- app/models/variant_override_set.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/default_stock_location.rb
|
||||
- app/services/embedded_page_service.rb
|
||||
- app/services/order_cycle_form.rb
|
||||
- app/services/order_factory.rb
|
||||
- app/services/subscriptions_count.rb
|
||||
- app/services/variants_stock_levels.rb
|
||||
- engines/web/app/helpers/web/cookies_policy_helper.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/available_payment_method_filter.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/customers_report.rb
|
||||
- lib/open_food_network/enterprise_fee_applicator.rb
|
||||
- lib/open_food_network/enterprise_fee_calculator.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/open_food_network/group_buy_report.rb
|
||||
- lib/open_food_network/lettuce_share_report.rb
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_management_report.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/open_food_network/reports/bulk_coop_allocation_report.rb
|
||||
- lib/open_food_network/sales_tax_report.rb
|
||||
- lib/open_food_network/variant_and_line_item_naming.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/spree/product_filters.rb
|
||||
- lib/stripe/profile_storer.rb
|
||||
- lib/tasks/data.rake
|
||||
- lib/tasks/enterprises.rake
|
||||
- spec/controllers/admin/bulk_line_items_controller_spec.rb
|
||||
- spec/controllers/admin/column_preferences_controller_spec.rb
|
||||
- spec/controllers/admin/customers_controller_spec.rb
|
||||
- spec/controllers/admin/enterprises_controller_spec.rb
|
||||
- spec/controllers/admin/inventory_items_controller_spec.rb
|
||||
- spec/controllers/admin/manager_invitations_controller_spec.rb
|
||||
- spec/controllers/admin/order_cycles_controller_spec.rb
|
||||
- spec/controllers/admin/proxy_orders_controller_spec.rb
|
||||
- spec/controllers/admin/schedules_controller_spec.rb
|
||||
- spec/controllers/admin/stripe_accounts_controller_spec.rb
|
||||
- spec/controllers/admin/stripe_connect_settings_controller_spec.rb
|
||||
- spec/controllers/admin/subscription_line_items_controller_spec.rb
|
||||
- spec/controllers/admin/subscriptions_controller_spec.rb
|
||||
- spec/controllers/admin/variant_overrides_controller_spec.rb
|
||||
- spec/controllers/api/base_controller_spec.rb
|
||||
- spec/controllers/api/exchange_products_controller_spec.rb
|
||||
- spec/controllers/api/logos_controller_spec.rb
|
||||
- spec/controllers/api/order_cycles_controller_spec.rb
|
||||
- spec/controllers/api/orders_controller_spec.rb
|
||||
- spec/controllers/api/product_images_controller_spec.rb
|
||||
- spec/controllers/api/products_controller_spec.rb
|
||||
- spec/controllers/api/promo_images_controller_spec.rb
|
||||
- spec/controllers/api/shipments_controller_spec.rb
|
||||
- spec/controllers/api/variants_controller_spec.rb
|
||||
- spec/controllers/cart_controller_spec.rb
|
||||
- spec/controllers/checkout_controller_spec.rb
|
||||
- spec/controllers/enterprises_controller_spec.rb
|
||||
- spec/controllers/line_items_controller_spec.rb
|
||||
- spec/controllers/shop_controller_spec.rb
|
||||
- spec/controllers/shops_controller_spec.rb
|
||||
- spec/controllers/spree/admin/adjustments_controller_spec.rb
|
||||
- spec/controllers/spree/admin/base_controller_spec.rb
|
||||
- spec/controllers/spree/admin/orders/customer_details_controller_spec.rb
|
||||
- spec/controllers/spree/admin/orders_controller_spec.rb
|
||||
- spec/controllers/spree/admin/payment_methods_controller_spec.rb
|
||||
- spec/controllers/spree/admin/payments_controller_spec.rb
|
||||
- spec/controllers/spree/admin/products_controller_spec.rb
|
||||
- spec/controllers/spree/admin/reports_controller_spec.rb
|
||||
- spec/controllers/spree/admin/variants_controller_spec.rb
|
||||
- spec/controllers/spree/credit_cards_controller_spec.rb
|
||||
- spec/controllers/spree/orders_controller_spec.rb
|
||||
- spec/controllers/spree/user_sessions_controller_spec.rb
|
||||
- spec/controllers/spree/users_controller_spec.rb
|
||||
- spec/controllers/stripe/callbacks_controller_spec.rb
|
||||
- spec/controllers/stripe/webhooks_controller_spec.rb
|
||||
- spec/controllers/user_confirmations_controller_spec.rb
|
||||
- spec/features/admin/adjustments_spec.rb
|
||||
- spec/features/admin/bulk_order_management_spec.rb
|
||||
- spec/features/admin/bulk_product_update_spec.rb
|
||||
- spec/features/admin/customers_spec.rb
|
||||
- spec/features/admin/enterprise_fees_spec.rb
|
||||
- spec/features/admin/enterprise_relationships_spec.rb
|
||||
- spec/features/admin/enterprise_roles_spec.rb
|
||||
- spec/features/admin/enterprise_user_spec.rb
|
||||
- spec/features/admin/enterprises/images_spec.rb
|
||||
- spec/features/admin/enterprises/index_spec.rb
|
||||
- spec/features/admin/enterprises_spec.rb
|
||||
- spec/features/admin/image_settings_spec.rb
|
||||
- spec/features/admin/multilingual_spec.rb
|
||||
- spec/features/admin/order_cycles_spec.rb
|
||||
- spec/features/admin/orders_spec.rb
|
||||
- spec/features/admin/overview_spec.rb
|
||||
- spec/features/admin/payment_method_spec.rb
|
||||
- spec/features/admin/product_import_spec.rb
|
||||
- spec/features/admin/products_spec.rb
|
||||
- spec/features/admin/reports_spec.rb
|
||||
- spec/features/admin/schedules_spec.rb
|
||||
- spec/features/admin/shipping_methods_spec.rb
|
||||
- spec/features/admin/subscriptions_spec.rb
|
||||
- spec/features/admin/tag_rules_spec.rb
|
||||
- spec/features/admin/users_spec.rb
|
||||
- spec/features/admin/variant_overrides_spec.rb
|
||||
- spec/features/consumer/account/cards_spec.rb
|
||||
- spec/features/consumer/account/settings_spec.rb
|
||||
- spec/features/consumer/account_spec.rb
|
||||
- spec/features/consumer/authentication_spec.rb
|
||||
- spec/features/consumer/cookies_spec.rb
|
||||
- spec/features/consumer/groups_spec.rb
|
||||
- spec/features/consumer/multilingual_spec.rb
|
||||
- spec/features/consumer/registration_spec.rb
|
||||
- spec/features/consumer/shopping/cart_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_auth_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_spec.rb
|
||||
- spec/features/consumer/shopping/embedded_groups_spec.rb
|
||||
- spec/features/consumer/shopping/embedded_shopfronts_spec.rb
|
||||
- spec/features/consumer/shopping/orders_spec.rb
|
||||
- spec/features/consumer/shopping/products_spec.rb
|
||||
- spec/features/consumer/shopping/shopping_spec.rb
|
||||
- spec/features/consumer/shopping/variant_overrides_spec.rb
|
||||
- spec/features/consumer/shops_spec.rb
|
||||
- spec/helpers/admin/subscriptions_helper_spec.rb
|
||||
- spec/helpers/checkout_helper_spec.rb
|
||||
- spec/helpers/enterprises_helper_spec.rb
|
||||
- spec/helpers/groups_helper_spec.rb
|
||||
- spec/helpers/injection_helper_spec.rb
|
||||
- spec/helpers/order_cycles_helper_spec.rb
|
||||
- spec/helpers/spree/admin/base_helper_spec.rb
|
||||
- spec/jobs/confirm_order_job_spec.rb
|
||||
- spec/jobs/subscription_confirm_job_spec.rb
|
||||
- spec/jobs/subscription_placement_job_spec.rb
|
||||
- spec/lib/open_food_network/address_finder_spec.rb
|
||||
- spec/lib/open_food_network/bulk_coop_report_spec.rb
|
||||
- spec/lib/open_food_network/customers_report_spec.rb
|
||||
- spec/lib/open_food_network/enterprise_fee_applicator_spec.rb
|
||||
- spec/lib/open_food_network/enterprise_fee_calculator_spec.rb
|
||||
- spec/lib/open_food_network/group_buy_report_spec.rb
|
||||
- spec/lib/open_food_network/lettuce_share_report_spec.rb
|
||||
- spec/lib/open_food_network/option_value_namer_spec.rb
|
||||
- spec/lib/open_food_network/order_and_distributor_report_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_form_applicator_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_permissions_spec.rb
|
||||
- spec/lib/open_food_network/order_grouper_spec.rb
|
||||
- spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb
|
||||
- spec/lib/open_food_network/packing_report_spec.rb
|
||||
- spec/lib/open_food_network/permissions_spec.rb
|
||||
- spec/lib/open_food_network/products_and_inventory_report_spec.rb
|
||||
- spec/lib/open_food_network/proxy_order_syncer_spec.rb
|
||||
- spec/lib/open_food_network/scope_variant_to_hub_spec.rb
|
||||
- spec/lib/open_food_network/subscription_payment_updater_spec.rb
|
||||
- spec/lib/open_food_network/subscription_summarizer_spec.rb
|
||||
- spec/lib/open_food_network/tag_rule_applicator_spec.rb
|
||||
- spec/lib/open_food_network/users_and_enterprises_report_spec.rb
|
||||
- spec/lib/open_food_network/xero_invoices_report_spec.rb
|
||||
- spec/lib/stripe/account_connector_spec.rb
|
||||
- spec/lib/stripe/webhook_handler_spec.rb
|
||||
- spec/mailers/order_mailer_spec.rb
|
||||
- spec/mailers/producer_mailer_spec.rb
|
||||
- spec/mailers/subscription_mailer_spec.rb
|
||||
- spec/models/calculator/weight_spec.rb
|
||||
- spec/models/column_preference_spec.rb
|
||||
- spec/models/concerns/order_shipment_spec.rb
|
||||
- spec/models/concerns/product_stock_spec.rb
|
||||
- spec/models/customer_spec.rb
|
||||
- spec/models/enterprise_caching_spec.rb
|
||||
- spec/models/enterprise_fee_spec.rb
|
||||
- spec/models/enterprise_group_spec.rb
|
||||
- spec/models/enterprise_relationship_spec.rb
|
||||
- spec/models/enterprise_spec.rb
|
||||
- spec/models/exchange_spec.rb
|
||||
- spec/models/model_set_spec.rb
|
||||
- spec/models/order_cycle_spec.rb
|
||||
- spec/models/producer_property_spec.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
- spec/models/proxy_order_spec.rb
|
||||
- spec/models/spree/ability_spec.rb
|
||||
- spec/models/spree/adjustment_spec.rb
|
||||
- spec/models/spree/calculator/flexi_rate_spec.rb
|
||||
- spec/models/spree/calculator/price_sack_spec.rb
|
||||
- spec/models/spree/classification_spec.rb
|
||||
- spec/models/spree/gateway/stripe_connect_spec.rb
|
||||
- spec/models/spree/line_item_spec.rb
|
||||
- spec/models/spree/order_spec.rb
|
||||
- spec/models/spree/payment_method_spec.rb
|
||||
- spec/models/spree/payment_spec.rb
|
||||
- spec/models/spree/product_set_spec.rb
|
||||
- spec/models/spree/product_spec.rb
|
||||
- spec/models/spree/property_spec.rb
|
||||
- spec/models/spree/shipping_method_spec.rb
|
||||
- spec/models/spree/tax_rate_spec.rb
|
||||
- spec/models/spree/taxon_spec.rb
|
||||
- spec/models/spree/user_spec.rb
|
||||
- spec/models/spree/variant_spec.rb
|
||||
- spec/models/stripe_account_spec.rb
|
||||
- spec/models/tag_rule/discount_order_spec.rb
|
||||
- spec/models/tag_rule/filter_order_cycles_spec.rb
|
||||
- spec/models/tag_rule/filter_payment_methods_spec.rb
|
||||
- spec/models/tag_rule/filter_products_spec.rb
|
||||
- spec/models/tag_rule/filter_shipping_methods_spec.rb
|
||||
- spec/models/variant_override_spec.rb
|
||||
- spec/performance/orders_controller_spec.rb
|
||||
- spec/performance/shop_controller_spec.rb
|
||||
- spec/requests/checkout/failed_checkout_spec.rb
|
||||
- spec/requests/embedded_shopfronts_headers_spec.rb
|
||||
- spec/serializers/api/admin/customer_serializer_spec.rb
|
||||
- spec/serializers/api/admin/exchange_serializer_spec.rb
|
||||
- spec/serializers/api/admin/for_order_cycle/enterprise_serializer_spec.rb
|
||||
- spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb
|
||||
- spec/serializers/api/admin/order_cycle_serializer_spec.rb
|
||||
- spec/serializers/api/admin/subscription_customer_serializer_spec.rb
|
||||
- spec/serializers/api/admin/variant_override_serializer_spec.rb
|
||||
- spec/serializers/api/current_order_serializer_spec.rb
|
||||
- spec/serializers/api/enterprise_shopfront_serializer_spec.rb
|
||||
- spec/serializers/api/order_serializer_spec.rb
|
||||
- spec/services/cart_service_spec.rb
|
||||
- spec/services/embedded_page_service_spec.rb
|
||||
- spec/services/exchange_products_renderer_spec.rb
|
||||
- spec/services/order_cycle_distributed_products_spec.rb
|
||||
- spec/services/order_cycle_distributed_variants_spec.rb
|
||||
- spec/services/order_cycle_form_spec.rb
|
||||
- spec/services/order_factory_spec.rb
|
||||
- spec/services/order_syncer_spec.rb
|
||||
- spec/services/permissions/order_spec.rb
|
||||
- spec/services/product_tag_rules_filterer_spec.rb
|
||||
- spec/services/products_renderer_spec.rb
|
||||
- spec/services/subscription_estimator_spec.rb
|
||||
- spec/services/subscription_form_spec.rb
|
||||
- spec/services/subscription_validator_spec.rb
|
||||
- spec/services/subscription_variants_service_spec.rb
|
||||
- spec/spec_helper.rb
|
||||
- spec/support/cancan_helper.rb
|
||||
- spec/support/delayed_job_helper.rb
|
||||
- spec/support/matchers/delegate_matchers.rb
|
||||
- spec/support/matchers/select2_matchers.rb
|
||||
- spec/support/matchers/table_matchers.rb
|
||||
- spec/support/request/authentication_workflow.rb
|
||||
- spec/support/request/shop_workflow.rb
|
||||
- spec/support/request/web_helper.rb
|
||||
- spec/support/seeds.rb
|
||||
|
||||
Metrics/AbcSize:
|
||||
Max: 15
|
||||
Exclude:
|
||||
- app/controllers/admin/bulk_line_items_controller.rb
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/order_cycles_controller.rb
|
||||
- app/controllers/admin/product_import_controller.rb
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/admin/stripe_accounts_controller.rb
|
||||
- app/controllers/admin/subscription_line_items_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/api/enterprises_controller.rb
|
||||
- app/controllers/api/product_images_controller.rb
|
||||
- app/controllers/api/products_controller.rb
|
||||
- app/controllers/api/shipments_controller.rb
|
||||
- app/controllers/api/taxons_controller.rb
|
||||
- app/controllers/api/variants_controller.rb
|
||||
- app/controllers/base_controller.rb
|
||||
- app/controllers/cart_controller.rb
|
||||
- app/controllers/discourse_sso_controller.rb
|
||||
- app/controllers/enterprises_controller.rb
|
||||
- app/controllers/spree/admin/adjustments_controller_decorator.rb
|
||||
- app/controllers/spree/admin/image_settings_controller.rb
|
||||
- app/controllers/spree/admin/orders/customer_details_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/overview_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/reports_controller.rb
|
||||
- app/controllers/spree/admin/resource_controller.rb
|
||||
- app/controllers/spree/admin/search_controller.rb
|
||||
- app/controllers/spree/admin/taxons_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/admin/variants_controller.rb
|
||||
- app/controllers/spree/credit_cards_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/controllers/spree/user_passwords_controller.rb
|
||||
- app/controllers/spree/user_registrations_controller.rb
|
||||
- app/controllers/spree/user_sessions_controller.rb
|
||||
- app/controllers/spree/users_controller.rb
|
||||
- app/controllers/stripe/callbacks_controller.rb
|
||||
- app/controllers/user_confirmations_controller.rb
|
||||
- app/controllers/user_passwords_controller.rb
|
||||
- app/controllers/user_registrations_controller.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/i18n_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/zones_helper.rb
|
||||
- app/helpers/spree/orders_helper.rb
|
||||
- app/mailers/producer_mailer.rb
|
||||
- app/models/calculator/flat_percent_per_item.rb
|
||||
- app/models/column_preference.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/enterprise_group.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/model_set.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/proxy_order.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/calculator/default_tax_decorator.rb
|
||||
- app/models/spree/calculator/flexi_rate_decorator.rb
|
||||
- app/models/spree/line_item_decorator.rb
|
||||
- app/models/spree/order_decorator.rb
|
||||
- app/models/spree/payment_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/models/spree/taxon_decorator.rb
|
||||
- app/serializers/api/admin/enterprise_serializer.rb
|
||||
- app/serializers/api/admin/order_cycle_serializer.rb
|
||||
- app/serializers/api/product_serializer.rb
|
||||
- app/serializers/api/variant_serializer.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/create_order_cycle.rb
|
||||
- app/services/order_syncer.rb
|
||||
- app/services/subscription_validator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_decorator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/customers_report.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/open_food_network/group_buy_report.rb
|
||||
- lib/open_food_network/lettuce_share_report.rb
|
||||
- lib/open_food_network/option_value_namer.rb
|
||||
- lib/open_food_network/order_and_distributor_report.rb
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_management_report.rb
|
||||
- lib/open_food_network/order_cycle_permissions.rb
|
||||
- lib/open_food_network/packing_report.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/open_food_network/permissions.rb
|
||||
- lib/open_food_network/products_and_inventory_report.rb
|
||||
- lib/open_food_network/rack_request_blocker.rb
|
||||
- lib/open_food_network/reports/line_items.rb
|
||||
- lib/open_food_network/sales_tax_report.rb
|
||||
- lib/open_food_network/users_and_enterprises_report.rb
|
||||
- lib/open_food_network/variant_and_line_item_naming.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- lib/spree/api/controller_setup.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/stripe/account_connector.rb
|
||||
- lib/tasks/enterprises.rake
|
||||
- lib/tasks/sample_data/product_factory.rb
|
||||
- spec/features/admin/product_import_spec.rb
|
||||
- spec/features/admin/reports_spec.rb
|
||||
- spec/features/admin/subscriptions_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_paypal_spec.rb
|
||||
- spec/features/consumer/shopping/variant_overrides_spec.rb
|
||||
- spec/models/enterprise_spec.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
- spec/services/restart_checkout_spec.rb
|
||||
- spec/support/performance_helper.rb
|
||||
|
||||
Metrics/BlockLength:
|
||||
Max: 25
|
||||
ExcludedMethods: [
|
||||
"class_eval",
|
||||
"collection",
|
||||
"context",
|
||||
"describe",
|
||||
"feature",
|
||||
"it",
|
||||
"member",
|
||||
"namespace",
|
||||
"resource",
|
||||
"resources",
|
||||
"scenario"
|
||||
]
|
||||
Exclude:
|
||||
- lib/tasks/data.rake
|
||||
- spec/controllers/spree/admin/invoices_controller_spec.rb
|
||||
- spec/factories.rb
|
||||
- spec/factories/enterprise_factory.rb
|
||||
- spec/factories/order_cycle_factory.rb
|
||||
- spec/factories/order_factory.rb
|
||||
- spec/factories/product_factory.rb
|
||||
- spec/factories/shipping_method_factory.rb
|
||||
- spec/factories/subscription_factory.rb
|
||||
- spec/factories/variant_factory.rb
|
||||
- spec/features/admin/orders_spec.rb
|
||||
- spec/features/consumer/shopping/embedded_shopfronts_spec.rb
|
||||
- spec/lib/open_food_network/group_buy_report_spec.rb
|
||||
- spec/models/tag_rule/discount_order_spec.rb
|
||||
- spec/spec_helper.rb
|
||||
- spec/support/delayed_job_helper.rb
|
||||
- spec/support/matchers/select2_matchers.rb
|
||||
- spec/support/matchers/table_matchers.rb
|
||||
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 6
|
||||
Exclude:
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/spree/admin/taxons_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/i18n_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/payment_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/models/variant_override_set.rb
|
||||
- app/services/cart_service.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/spree/core/controller_helpers/order_decorator.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 7
|
||||
Exclude:
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/api/variants_controller.rb
|
||||
- app/controllers/spree/admin/taxons_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/i18n_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/order_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/spree/core/controller_helpers/order_decorator.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
|
||||
Metrics/MethodLength:
|
||||
Max: 10
|
||||
Exclude:
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/manager_invitations_controller.rb
|
||||
- app/controllers/admin/order_cycles_controller.rb
|
||||
- app/controllers/admin/stripe_accounts_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/api/products_controller.rb
|
||||
- app/controllers/api/shipments_controller.rb
|
||||
- app/controllers/api/taxons_controller.rb
|
||||
- app/controllers/api/variants_controller.rb
|
||||
- app/controllers/base_controller.rb
|
||||
- app/controllers/cart_controller.rb
|
||||
- app/controllers/shop_controller.rb
|
||||
- app/controllers/spree/admin/image_settings_controller.rb
|
||||
- app/controllers/spree/admin/orders/customer_details_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/reports_controller.rb
|
||||
- app/controllers/spree/admin/resource_controller.rb
|
||||
- app/controllers/spree/admin/tax_categories_controller.rb
|
||||
- app/controllers/spree/admin/taxons_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/credit_cards_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/controllers/spree/user_registrations_controller.rb
|
||||
- app/controllers/spree/user_sessions_controller.rb
|
||||
- app/controllers/stripe/callbacks_controller.rb
|
||||
- app/controllers/user_confirmations_controller.rb
|
||||
- app/controllers/user_passwords_controller.rb
|
||||
- app/controllers/user_registrations_controller.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/jobs/subscription_placement_job.rb
|
||||
- app/mailers/producer_mailer.rb
|
||||
- app/models/column_preference.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/preference_sections/footer_and_external_links_section.rb
|
||||
- app/models/preference_sections/main_links_section.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/product_import/product_importer.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/calculator/default_tax_decorator.rb
|
||||
- app/models/spree/calculator/flexi_rate_decorator.rb
|
||||
- app/models/spree/order_decorator.rb
|
||||
- app/models/spree/payment_decorator.rb
|
||||
- app/models/spree/payment_method_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/serializers/api/admin/order_cycle_serializer.rb
|
||||
- app/serializers/api/cached_enterprise_serializer.rb
|
||||
- app/services/order_cycle_form.rb
|
||||
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/column_preference_defaults.rb
|
||||
- lib/open_food_network/customers_report.rb
|
||||
- lib/open_food_network/enterprise_fee_calculator.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/open_food_network/group_buy_report.rb
|
||||
- lib/open_food_network/lettuce_share_report.rb
|
||||
- lib/open_food_network/option_value_namer.rb
|
||||
- lib/open_food_network/order_and_distributor_report.rb
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_management_report.rb
|
||||
- lib/open_food_network/order_cycle_permissions.rb
|
||||
- lib/open_food_network/order_grouper.rb
|
||||
- lib/open_food_network/packing_report.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/open_food_network/permissions.rb
|
||||
- lib/open_food_network/products_and_inventory_report.rb
|
||||
- lib/open_food_network/rack_request_blocker.rb
|
||||
- lib/open_food_network/reports/bulk_coop_allocation_report.rb
|
||||
- lib/open_food_network/reports/bulk_coop_supplier_report.rb
|
||||
- lib/open_food_network/reports/line_items.rb
|
||||
- lib/open_food_network/sales_tax_report.rb
|
||||
- lib/open_food_network/users_and_enterprises_report.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- lib/spree/api/controller_setup.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/stripe/profile_storer.rb
|
||||
- lib/tasks/sample_data/product_factory.rb
|
||||
- spec/features/consumer/shopping/checkout_paypal_spec.rb
|
||||
- spec/features/consumer/shopping/variant_overrides_spec.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
- spec/support/request/authentication_workflow.rb
|
||||
|
||||
Metrics/ClassLength:
|
||||
Max: 100
|
||||
Exclude:
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/order_cycles_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/api/products_controller.rb
|
||||
- app/controllers/application_controller.rb
|
||||
- app/controllers/checkout_controller.rb
|
||||
- app/controllers/spree/admin/base_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/reports_controller.rb
|
||||
- app/controllers/spree/admin/resource_controller.rb
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/order_cycle.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/product_import/product_importer.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/user.rb
|
||||
- app/serializers/api/cached_enterprise_serializer.rb
|
||||
- app/serializers/api/enterprise_shopfront_serializer.rb
|
||||
- app/services/cart_service.rb
|
||||
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/enterprise_fee_calculator.rb
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_management_report.rb
|
||||
- lib/open_food_network/order_cycle_permissions.rb
|
||||
- lib/open_food_network/packing_report.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/open_food_network/permissions.rb
|
||||
- lib/open_food_network/users_and_enterprises_report.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
|
||||
Metrics/ModuleLength:
|
||||
Max: 100
|
||||
Exclude:
|
||||
- app/helpers/admin/injection_helper.rb
|
||||
- app/helpers/injection_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- lib/open_food_network/column_preference_defaults.rb
|
||||
- spec/controllers/admin/enterprises_controller_spec.rb
|
||||
- spec/controllers/admin/order_cycles_controller_spec.rb
|
||||
- spec/controllers/api/order_cycles_controller_spec.rb
|
||||
- spec/controllers/api/orders_controller_spec.rb
|
||||
- spec/controllers/spree/admin/payment_methods_controller_spec.rb
|
||||
- spec/lib/open_food_network/address_finder_spec.rb
|
||||
- spec/lib/open_food_network/customers_report_spec.rb
|
||||
- spec/lib/open_food_network/enterprise_fee_calculator_spec.rb
|
||||
- spec/lib/open_food_network/option_value_namer_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_form_applicator_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_permissions_spec.rb
|
||||
- spec/lib/open_food_network/order_grouper_spec.rb
|
||||
- spec/lib/open_food_network/permissions_spec.rb
|
||||
- spec/lib/open_food_network/products_and_inventory_report_spec.rb
|
||||
- spec/lib/open_food_network/proxy_order_syncer_spec.rb
|
||||
- spec/lib/open_food_network/scope_variant_to_hub_spec.rb
|
||||
- spec/lib/open_food_network/subscription_payment_updater_spec.rb
|
||||
- spec/lib/open_food_network/tag_rule_applicator_spec.rb
|
||||
- spec/lib/open_food_network/users_and_enterprises_report_spec.rb
|
||||
- spec/models/spree/ability_spec.rb
|
||||
- spec/models/spree/adjustment_spec.rb
|
||||
- spec/models/spree/line_item_spec.rb
|
||||
- spec/models/spree/payment_spec.rb
|
||||
- spec/models/spree/product_spec.rb
|
||||
- spec/models/spree/variant_spec.rb
|
||||
- spec/services/permissions/order_spec.rb
|
||||
- spec/support/request/web_helper.rb
|
||||
|
||||
Metrics/ParameterLists:
|
||||
Max: 5
|
||||
Exclude:
|
||||
- app/helpers/angular_form_builder.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- spec/features/admin/reports_spec.rb
|
||||
@@ -1,153 +0,0 @@
|
||||
# Relaxed.Ruby.Style
|
||||
## Version 2.5
|
||||
|
||||
Style/Alias:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylealias
|
||||
|
||||
Style/AsciiComments:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styleasciicomments
|
||||
|
||||
Style/BeginBlock:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylebeginblock
|
||||
|
||||
Style/BlockDelimiters:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styleblockdelimiters
|
||||
|
||||
Style/CommentAnnotation:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylecommentannotation
|
||||
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styledocumentation
|
||||
|
||||
Layout/DotPosition:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#layoutdotposition
|
||||
|
||||
Style/DoubleNegation:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styledoublenegation
|
||||
|
||||
Style/EndBlock:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styleendblock
|
||||
|
||||
Style/FormatString:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styleformatstring
|
||||
|
||||
Style/IfUnlessModifier:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styleifunlessmodifier
|
||||
|
||||
Style/Lambda:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylelambda
|
||||
|
||||
Style/ModuleFunction:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylemodulefunction
|
||||
|
||||
Style/MultilineBlockChain:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylemultilineblockchain
|
||||
|
||||
Style/NegatedIf:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylenegatedif
|
||||
|
||||
Style/NegatedWhile:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylenegatedwhile
|
||||
|
||||
Style/NumericPredicate:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylenumericpredicate
|
||||
|
||||
Style/ParallelAssignment:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styleparallelassignment
|
||||
|
||||
Style/PercentLiteralDelimiters:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylepercentliteraldelimiters
|
||||
|
||||
Style/PerlBackrefs:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styleperlbackrefs
|
||||
|
||||
Style/Semicolon:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylesemicolon
|
||||
|
||||
Style/SignalException:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylesignalexception
|
||||
|
||||
Style/SingleLineBlockParams:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylesinglelineblockparams
|
||||
|
||||
Style/SingleLineMethods:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylesinglelinemethods
|
||||
|
||||
Layout/SpaceBeforeBlockBraces:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#layoutspacebeforeblockbraces
|
||||
|
||||
Layout/SpaceInsideParens:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#layoutspaceinsideparens
|
||||
|
||||
Style/SpecialGlobalVars:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylespecialglobalvars
|
||||
|
||||
Style/StringLiterals:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylestringliterals
|
||||
|
||||
Style/TrailingCommaInArguments:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarguments
|
||||
|
||||
Style/TrailingCommaInArrayLiteral:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarrayliteral
|
||||
|
||||
Style/TrailingCommaInHashLiteral:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainhashliteral
|
||||
|
||||
Style/SymbolArray:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylesymbolarray
|
||||
|
||||
Style/WhileUntilModifier:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylewhileuntilmodifier
|
||||
|
||||
Style/WordArray:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#stylewordarray
|
||||
|
||||
Lint/AmbiguousRegexpLiteral:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#lintambiguousregexpliteral
|
||||
|
||||
Lint/AssignmentInCondition:
|
||||
Enabled: false
|
||||
StyleGuide: https://relaxed.ruby.style/#lintassignmentincondition
|
||||
|
||||
Layout/LineLength:
|
||||
Enabled: false
|
||||
|
||||
Metrics:
|
||||
Enabled: false
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# OFN styleguide for rubocop-rspec
|
||||
# Because there are so many, we will disable by default, and enable rules as needed.
|
||||
|
||||
Capybara:
|
||||
Enabled: false
|
||||
|
||||
RSpec:
|
||||
Enabled: false
|
||||
|
||||
FactoryBot:
|
||||
Enabled: false
|
||||
|
||||
# Enabled rules
|
||||
|
||||
Capybara/NegationMatcher:
|
||||
Enabled: true
|
||||
EnforcedStyle: not_to
|
||||
|
||||
RSpec/ExpectChange:
|
||||
Enabled: true
|
||||
EnforcedStyle: block
|
||||
|
||||
RSpec/NotToNot:
|
||||
Enabled: true
|
||||
@@ -1,159 +1,32 @@
|
||||
# Our Open Food Network style guide.
|
||||
#
|
||||
# These are the rules we agreed upon and we work towards.
|
||||
# These are the rules we agreed upon and we work towards. Code Climate uses
|
||||
# these rules to rate our code and detect new violations. But when you run
|
||||
# rubocop locally, the default configuration file `.rubocop.yml` loads
|
||||
# our "todo lists" to ignore all current violations.
|
||||
AllCops:
|
||||
NewCops: enable
|
||||
MigratedSchemaVersion: "20250111000000"
|
||||
TargetRailsVersion: 3.2
|
||||
Exclude:
|
||||
- bin/**/*
|
||||
- config/**/*
|
||||
- db/bad_migrations/*
|
||||
- db/migrate/201*
|
||||
- db/migrate/202[0-4]*
|
||||
- db/schema.rb
|
||||
- script/**/*
|
||||
- vendor/**/*
|
||||
- node_modules/**/*
|
||||
- 'bin/**/*'
|
||||
- 'db/**/*'
|
||||
- 'config/**/*'
|
||||
- 'script/**/*'
|
||||
- 'vendor/**/*'
|
||||
- 'node_modules/**/*'
|
||||
# Excluding: inadequate Naming/FileName rule rejects GemFile name with camelcase
|
||||
- engines/web/Gemfile
|
||||
- .undercover
|
||||
- 'engines/web/Gemfile'
|
||||
|
||||
Bundler/DuplicatedGem:
|
||||
Enabled: false
|
||||
## OFN SETTINGS
|
||||
#
|
||||
# Cop settings that have been agreed upon by the OFN community
|
||||
|
||||
Layout/LineLength:
|
||||
Rails:
|
||||
Enabled: true
|
||||
Max: 100
|
||||
|
||||
Layout/MultilineMethodCallIndentation:
|
||||
Enabled: true
|
||||
EnforcedStyle: indented
|
||||
|
||||
# Don't think this is a big issue, mostly picking up RPSEC scope definitions
|
||||
# with lamdas and RSpec '.to change{}' blocks
|
||||
Lint/AmbiguousBlockAssociation:
|
||||
Enabled: false
|
||||
|
||||
Lint/MissingSuper:
|
||||
Exclude:
|
||||
- app/components/**/*
|
||||
|
||||
Lint/RaiseException:
|
||||
Enabled: true
|
||||
|
||||
Lint/StructNewOverride:
|
||||
Enabled: true
|
||||
|
||||
# Heaps of offences (> 100) in specs, mostly in situations where two or more
|
||||
# instances of a model are required, but only one is referenced. Difficult to
|
||||
# fix without making the spec look messy or rewriting it.
|
||||
# Should definitely fix at some point.
|
||||
Lint/UselessAssignment:
|
||||
Exclude:
|
||||
- spec/**/*
|
||||
|
||||
Metrics:
|
||||
Enabled: true
|
||||
|
||||
Metrics/AbcSize:
|
||||
Max: 30 # default 17
|
||||
|
||||
Metrics/BlockLength:
|
||||
AllowedMethods: [
|
||||
"class_eval",
|
||||
"collection",
|
||||
"configure",
|
||||
"context",
|
||||
"delete",
|
||||
"describe",
|
||||
"feature",
|
||||
"get",
|
||||
"it",
|
||||
"member",
|
||||
"namespace",
|
||||
"path",
|
||||
"post",
|
||||
"put",
|
||||
"resource",
|
||||
"resources",
|
||||
"response",
|
||||
"scenario",
|
||||
"shared_examples",
|
||||
"shared_examples_for",
|
||||
"xdescribe",
|
||||
]
|
||||
|
||||
Metrics/MethodLength:
|
||||
Enabled: true
|
||||
Max: 25 # default 10
|
||||
|
||||
Metrics/ParameterLists:
|
||||
CountKeywordArgs: false
|
||||
|
||||
Metrics/PerceivedComplexity:
|
||||
Enabled: true
|
||||
Max: 14 # default 8
|
||||
|
||||
Naming/PredicatePrefix:
|
||||
Enabled: false
|
||||
|
||||
Naming/VariableNumber:
|
||||
AllowedIdentifiers:
|
||||
- street_address_1
|
||||
- street_address_2
|
||||
AllowedPatterns:
|
||||
- _v[\d]+
|
||||
# Cf. conversation https://github.com/openfoodfoundation/openfoodnetwork/pull/13306#pullrequestreview-2831644286
|
||||
- menu_[\d]
|
||||
|
||||
Rails/ApplicationRecord:
|
||||
Exclude:
|
||||
# Migrations should not contain application code:
|
||||
- db/migrate/*.rb
|
||||
|
||||
# Allow many-to-many associations without explicit model.
|
||||
# - It avoids the additional code of a model class.
|
||||
# - It simplifies the declaration of the association.
|
||||
# - Rails may know that there are no callbacks associated.
|
||||
Rails/HasAndBelongsToMany:
|
||||
Enabled: false
|
||||
|
||||
# Cf. conversation https://github.com/openfoodfoundation/openfoodnetwork/pull/13251
|
||||
Rails/LexicallyScopedActionFilter:
|
||||
Enabled: false
|
||||
|
||||
Rails/OutputSafety:
|
||||
Exclude:
|
||||
- spec/**/*
|
||||
|
||||
Rails/RedundantActiveRecordAllMethod:
|
||||
AllowedReceivers:
|
||||
- ActionMailer::Preview
|
||||
- ActiveSupport::TimeZone
|
||||
|
||||
Rails/SkipsModelValidations:
|
||||
AllowedMethods:
|
||||
- touch
|
||||
- touch_all
|
||||
- update_all
|
||||
- update_attribute
|
||||
- update_column
|
||||
- update_columns
|
||||
|
||||
Rails/UnknownEnv:
|
||||
Environments:
|
||||
- development
|
||||
- production
|
||||
- staging
|
||||
- test
|
||||
|
||||
Rails/WhereExists:
|
||||
EnforcedStyle: where # Cf. conversion https://github.com/openfoodfoundation/openfoodnetwork/pull/12363
|
||||
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
|
||||
Style/FormatStringToken:
|
||||
Style/StringLiterals:
|
||||
Enabled: false
|
||||
|
||||
Style/HashSyntax:
|
||||
@@ -163,5 +36,196 @@ Style/HashSyntax:
|
||||
Style/Send:
|
||||
Enabled: true
|
||||
|
||||
Style/StringLiterals:
|
||||
Layout/MultilineMethodCallIndentation:
|
||||
Enabled: true
|
||||
EnforcedStyle: indented
|
||||
|
||||
Layout/LineLength:
|
||||
Max: 100
|
||||
|
||||
## TEMPORARY/CONTESTED SETTINGS
|
||||
#
|
||||
# These are still to be decided upon, but recommended for inclusion by
|
||||
# oeoeaio after scrutinising offenses the codebase
|
||||
|
||||
# Don't think this is a big issue, mostly picking up RPSEC scope definitions
|
||||
# with lamdas and RSpec '.to change{}' blocks
|
||||
Lint/AmbiguousBlockAssociation:
|
||||
Enabled: false
|
||||
|
||||
# Heaps of offences (> 100) in specs, mostly in situations where two or more
|
||||
# instances of a model are required, but only one is referenced. Difficult to
|
||||
# fix without making the spec look messy or rewriting it.
|
||||
# Should definitely fix at some point.
|
||||
Lint/UselessAssignment:
|
||||
Exclude:
|
||||
- spec/**/*
|
||||
|
||||
# AFAIK, there is no good alternative to dynamic matchers until we upgrade
|
||||
# to Rails 4 and can use #find_by. If there is a better approach, let's do it.
|
||||
Rails/DynamicFindBy:
|
||||
Enabled: false
|
||||
|
||||
# Same as above, #find_by is not available until Rails 4
|
||||
Rails/FindBy:
|
||||
Enabled: false
|
||||
|
||||
# Same as above, #update! is not available until Rails 4
|
||||
Rails/ActiveRecordAliases:
|
||||
Enabled: false
|
||||
|
||||
# This should be the programmer's discretion, perhaps we should review all of
|
||||
# the uses of it an make specific exceptions though.
|
||||
Rails/SkipsModelValidations:
|
||||
Enabled: false
|
||||
|
||||
## Relaxed.Ruby.Style SETTINGS
|
||||
#
|
||||
# These styles are a starting point for the conversation around conventions
|
||||
# They should be removed or tweaked and moved above as decisions are made
|
||||
# NOTE: Cops which did not fail at the time of writing were removed
|
||||
|
||||
Layout/DotPosition:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styledotposition
|
||||
|
||||
Layout/SpaceBeforeBlockBraces:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
|
||||
|
||||
Layout/SpaceInsideParens:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
|
||||
|
||||
Style/Alias:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylealias
|
||||
|
||||
Style/BlockDelimiters:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
|
||||
|
||||
Style/CommentAnnotation:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylecommentannotation
|
||||
|
||||
Style/DoubleNegation:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styledoublenegation
|
||||
|
||||
Style/FormatString:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styleformatstring
|
||||
|
||||
Style/HashEachMethods:
|
||||
Enabled: false
|
||||
|
||||
Style/HashTransformKeys:
|
||||
Enabled: false
|
||||
|
||||
Style/HashTransformValues:
|
||||
Enabled: false
|
||||
|
||||
Style/IfUnlessModifier:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
|
||||
|
||||
Style/Lambda:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylelambda
|
||||
|
||||
Style/MultilineBlockChain:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
|
||||
|
||||
Style/NegatedIf:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylenegatedif
|
||||
|
||||
Style/NegatedWhile:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
|
||||
|
||||
Style/ParallelAssignment:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
|
||||
|
||||
Style/PercentLiteralDelimiters:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
|
||||
|
||||
Style/Semicolon:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylesemicolon
|
||||
|
||||
Style/SingleLineMethods:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
|
||||
|
||||
Style/TrailingCommaInArguments:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styletrailingcommainarguments
|
||||
|
||||
Style/TrailingCommaInArrayLiteral:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styletrailingcommainliteral
|
||||
|
||||
Style/TrailingCommaInHashLiteral:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#styletrailingcommainliteral
|
||||
|
||||
Style/WordArray:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#stylewordarray
|
||||
|
||||
Style/SymbolArray:
|
||||
Enabled: false
|
||||
StyleGuide: https://rubocop.readthedocs.io/en/latest/cops_style/#stylesymbolarray
|
||||
|
||||
Lint/AmbiguousRegexpLiteral:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
|
||||
|
||||
Lint/AssignmentInCondition:
|
||||
Enabled: false
|
||||
StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
|
||||
|
||||
Metrics/AbcSize:
|
||||
Max: 15
|
||||
|
||||
Metrics/BlockLength:
|
||||
Max: 25
|
||||
ExcludedMethods: [
|
||||
"class_eval",
|
||||
"collection",
|
||||
"context",
|
||||
"describe",
|
||||
"feature",
|
||||
"it",
|
||||
"member",
|
||||
"namespace",
|
||||
"resource",
|
||||
"resources",
|
||||
"scenario"
|
||||
]
|
||||
|
||||
Metrics/BlockNesting:
|
||||
Max: 3
|
||||
|
||||
Metrics/ClassLength:
|
||||
Max: 100
|
||||
|
||||
Metrics/ModuleLength:
|
||||
Max: 100
|
||||
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 6
|
||||
|
||||
Metrics/MethodLength:
|
||||
Max: 10
|
||||
|
||||
Metrics/ParameterLists:
|
||||
Max: 5
|
||||
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 7
|
||||
|
||||
1879
.rubocop_todo.yml
@@ -1 +1 @@
|
||||
3.2.9
|
||||
2.3.7
|
||||
|
||||
3
.scss-lint.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
scss_files: 'app/assets/stylesheets/**/*.css.scss'
|
||||
|
||||
exclude: 'app/assets/stylesheets/shared/**'
|
||||
@@ -1,4 +0,0 @@
|
||||
# .secrets file define github secrets value locally
|
||||
DEPENDABOT_PR_APP_ID=123456
|
||||
DEPENDABOT_PR_APP_INSTALLATION_ID=123456
|
||||
DEPENDABOT_PR_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n....\n-----END RSA PRIVATE KEY-----"
|
||||
18
.simplecov
@@ -1,18 +0,0 @@
|
||||
#!/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
SimpleCov.start 'rails' do
|
||||
# The rails profile contains some filters already:
|
||||
#
|
||||
# - "/test/"
|
||||
# - "/features/"
|
||||
# - "/spec/"
|
||||
# - "/autotest/"
|
||||
# - /^\/config\//
|
||||
# - /^\/db\//
|
||||
add_filter '/bin/'
|
||||
add_filter '/config/' # to include engine config
|
||||
add_filter '/script'
|
||||
|
||||
formatter SimpleCov::Formatter::SimpleFormatter
|
||||
end
|
||||
@@ -1,7 +1,7 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[o:open-food-foundation:p:open-food-network:r:enyml]
|
||||
[open-food-network.enyml]
|
||||
file_filter = config/locales/<lang>.yml
|
||||
source_lang = en
|
||||
type = YML
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
--compare master
|
||||
|
||||
# This shouldn't be needed in undercover > 0.7.4
|
||||
#
|
||||
# * https://github.com/grodowski/undercover/issues/233
|
||||
--exclude-files "bin/*,db/*,config/*,spec/*,engines/*/config/*,engines/*/spec/*"
|
||||
@@ -1,3 +0,0 @@
|
||||
# Code of Conduct of the Open Food Network
|
||||
|
||||
**Welcome!** We are currently working on a Code of Conduct. You are welcome to contribute. We started this work at the Global Gathering 2020 and you find [notes of the initial session](https://community.openfoodnetwork.org/t/global-gathering-2020-day-5-a-code-of-conduct-for-ofn/2071/1) in the community forum. You can edit this file on Github to suggest new content. Alternatively, you can post in our [community forum](https://community.openfoodnetwork.org) or reach us on [Slack](https://openfoodnetwork.org/slack-invite).
|
||||
@@ -1,9 +1,9 @@
|
||||
# Contributing
|
||||
We love pull requests from everyone. Any contribution is valuable!
|
||||
We love pull requests from everyone. Any contribution is valuable, but there are two issue streams that we especially love people to work on:
|
||||
|
||||
If you have some time and are interested in working on some issues please make yourself known on the [#dev][slack-dev] channel on Slack.
|
||||
1) Our delivery backlog, is managed via a ZenHub board (ZenHub extensions are available for most major browsers). We use a Kanban-style approach, whereby devs pick issues from the top of the backlog which has been organised according to current priorities. If you have some time and are interested in working on some issues from the backlog, please make yourself known on the [#dev][slack-dev] channel on Slack and we can direct you to the most appropriate issue to pick up.
|
||||
|
||||
We have curated all issues we consider to be a good starting point for new members of the community within the [Welcome New Developers project board][welcome-dev]. Have a look and pick the one you would prefer working on!
|
||||
2) Our list of bugs and other self-contained issues that we consider to be a good starting point for new contributors, or devs who aren’t able to commit to seeing a whole feature through. These issues are marked with the `# good first issue` label.
|
||||
|
||||
## Set up
|
||||
|
||||
@@ -15,18 +15,14 @@ Create a new branch on your local machine to make your changes against (based on
|
||||
|
||||
git checkout -b branch-name-here --no-track upstream/master
|
||||
|
||||
You might need to update or install missing gems:
|
||||
|
||||
bundle install
|
||||
|
||||
Also, there might be missing dependencies, after pulling a particular branch. To update dependencies, run:
|
||||
|
||||
yarn install
|
||||
|
||||
If you want to run the whole test suite, we recommend using a free CI service to run your tests in parallel. Running the whole suite locally in series is likely to take > 40 minutes. [TravisCI][travis] and [SemaphoreCI][semaphore] both work great in our experience. Either way, make sure the tests pass on your new branch:
|
||||
|
||||
bundle exec rspec spec
|
||||
|
||||
## Which issue to pick first?
|
||||
|
||||
We have curated all issues interesting for new members of the community within the [Welcome New Developers project board][welcome-dev]. Have a look and pick the one you would prefer working on!
|
||||
|
||||
## Internationalisation (i18n)
|
||||
|
||||
The locale `en` is maintained in the source code, but other locales are managed at [Transifex][ofn-transifex]. Read more about [internationalisation][i18n] in the developer wiki.
|
||||
@@ -48,7 +44,7 @@ Push your changes to a branch on your fork:
|
||||
|
||||
## Submitting a Pull Request
|
||||
|
||||
Use the GitHub UI to submit a [new pull request][pr] against upstream/master. To increase the chances that your pull request is swiftly accepted please have a look at our guide to [making a great pull request][great-pr].
|
||||
Use the GitHub UI to submit a [new pull request][pr] against upstream/master. To increase the chances that your pull request is swiftly accepted please have a look at our guide to [making a great pull request][great-pr].
|
||||
|
||||
TL;DR:
|
||||
* Write tests
|
||||
@@ -57,7 +53,6 @@ TL;DR:
|
||||
* Maintain a clean commit history
|
||||
* Use a style consistent with the rest of the codebase
|
||||
* Before submitting, [rebase your work][rebase] on the current master branch
|
||||
* After submitting, be sure to check the [CI test results](ci). Click on a ❌ result to view the logged results and investigate.
|
||||
|
||||
From here, your pull request will progress through the [Review, Test, Merge & Deploy process][process].
|
||||
|
||||
@@ -70,6 +65,5 @@ From here, your pull request will progress through the [Review, Test, Merge & De
|
||||
[semaphore]: https://semaphoreci.com/
|
||||
[slack-dev]: https://openfoodnetwork.slack.com/messages/C2GQ45KNU
|
||||
[ofn-transifex]: https://www.transifex.com/open-food-foundation/open-food-network/
|
||||
[i18n]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Internationalisation-%28i18n%29
|
||||
[welcome-dev]: https://github.com/orgs/openfoodfoundation/projects/5
|
||||
[ci]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Continuous-Integration
|
||||
[i18n]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/i18n
|
||||
[welcome-dev]: https://github.com/openfoodfoundation/openfoodnetwork/projects/27
|
||||
|
||||
47
DOCKER.md
Normal file
@@ -0,0 +1,47 @@
|
||||
### Docker
|
||||
|
||||
It is possible to setup the Open Food Network app easily with Docker and Docker Compose.
|
||||
The objective is to spare configuration time, in order to help people testing the app and contribute to it.
|
||||
It can also be used as documentation. It is not perfect but it is used in many other projects and many devs are used to it nowadays.
|
||||
|
||||
### Install Docker
|
||||
|
||||
Please check the documentation here, https://docs.docker.com/install/ to install Docker.
|
||||
|
||||
For Docker Compose, information are here: https://docs.docker.com/compose/install/.
|
||||
|
||||
Better to have at least 2GB free on your computer in order to download images and create containers for Open Food Network app.
|
||||
|
||||
|
||||
### Use Docker with Open Food Network
|
||||
|
||||
Open a terminal with a shell.
|
||||
|
||||
Clone the repository:
|
||||
|
||||
```sh
|
||||
$ git clone git@github.com:openfoodfoundation/openfoodnetwork.git
|
||||
```
|
||||
|
||||
Go at the root of the app:
|
||||
|
||||
```sh
|
||||
$ cd openfoodnetwork
|
||||
```
|
||||
|
||||
Download the Docker images and build the containers:
|
||||
|
||||
```sh
|
||||
$ docker-compose build
|
||||
```
|
||||
|
||||
Run the app with all the required containers:
|
||||
|
||||
```sh
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
This command will setup the database and seed it with sample data. The default admin user is 'ofn@example.com' with 'ofn123' password.
|
||||
Check the app in the browser at `http://localhost:3000`.
|
||||
|
||||
You will then get the trace of the containers in the terminal. You can stop the containers using Ctrl-C in the terminal.
|
||||
67
Dockerfile
@@ -1,34 +1,41 @@
|
||||
FROM ruby:3.2.9-alpine3.19 AS base
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
TZ=Europe/London \
|
||||
RAILS_ROOT=/usr/src/app \
|
||||
BUNDLE_PATH=/bundles \
|
||||
BUNDLE_APP_CONFIG=/bundles
|
||||
RUN apk --no-cache upgrade && \
|
||||
apk add --no-cache tzdata postgresql-client imagemagick imagemagick-jpeg && \
|
||||
apk add --no-cache --virtual wkhtmltopdf
|
||||
FROM ubuntu:18.04
|
||||
|
||||
WORKDIR $RAILS_ROOT
|
||||
# Install all the requirements
|
||||
RUN apt-get update && apt-get install -y curl git build-essential software-properties-common wget zlib1g-dev libssl1.0-dev libreadline-dev libyaml-dev libffi-dev libxml2-dev libxslt1-dev wait-for-it imagemagick unzip
|
||||
|
||||
# Development dependencies
|
||||
FROM base AS development-base
|
||||
RUN apk add --no-cache --virtual .build-deps \
|
||||
build-base postgresql-dev git nodejs yarn && \
|
||||
apk add --no-cache --virtual .dev-utils \
|
||||
bash curl less vim chromium-chromedriver zlib-dev openssl-dev cmake\
|
||||
readline-dev yaml-dev sqlite-dev libxml2-dev libxslt-dev libffi-dev vips-dev && \
|
||||
curl -o /usr/local/bin/wait-for-it https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && \
|
||||
chmod +x /usr/local/bin/wait-for-it
|
||||
# Setup ENV variables
|
||||
ENV PATH /usr/local/src/rbenv/shims:/usr/local/src/rbenv/bin:$PATH
|
||||
ENV RBENV_ROOT /usr/local/src/rbenv
|
||||
ENV CONFIGURE_OPTS --disable-install-doc
|
||||
ENV BUNDLE_PATH /bundles
|
||||
|
||||
# Install yarn dependencies separately for caching
|
||||
FROM development-base AS yarn-dependencies
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install --frozen-lockfile
|
||||
WORKDIR /usr/src/app
|
||||
COPY .ruby-version .
|
||||
|
||||
# Install Ruby gems
|
||||
FROM development-base
|
||||
COPY . $RAILS_ROOT
|
||||
COPY Gemfile Gemfile.lock ./
|
||||
RUN bundle install --jobs "$(nproc)"
|
||||
COPY --from=yarn-dependencies $RAILS_ROOT/node_modules ./node_modules
|
||||
# Rbenv & Ruby part
|
||||
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
||||
git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
|
||||
${RBENV_ROOT}/plugins/ruby-build/install.sh && \
|
||||
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh && \
|
||||
rbenv install $(cat .ruby-version) && \
|
||||
rbenv global $(cat .ruby-version) && \
|
||||
gem install bundler --version=1.17.2
|
||||
|
||||
# Postgres
|
||||
RUN sh -c "echo 'deb https://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' > /etc/apt/sources.list.d/pgdg.list" && \
|
||||
wget --quiet -O - https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - && \
|
||||
apt-get update && \
|
||||
apt-get install -yqq --no-install-recommends postgresql-client-9.5 libpq-dev
|
||||
|
||||
# Install Chrome
|
||||
RUN wget --quiet -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
sh -c "echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list.d/google-chrome.list" && \
|
||||
apt-get update && \
|
||||
apt-get install -fy google-chrome-stable
|
||||
|
||||
# Install Chromedriver
|
||||
RUN wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip && \
|
||||
unzip chromedriver_linux64.zip -d /usr/bin && \
|
||||
chmod u+x /usr/bin/chromedriver
|
||||
|
||||
COPY . /usr/src/app/
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV TZ Europe/London
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list
|
||||
|
||||
# Install all the requirements
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
git \
|
||||
build-essential \
|
||||
software-properties-common \
|
||||
wget \
|
||||
zlib1g-dev \
|
||||
libreadline-dev \
|
||||
libyaml-dev \
|
||||
libffi-dev \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
wait-for-it \
|
||||
imagemagick \
|
||||
unzip \
|
||||
libjemalloc-dev \
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
cmake
|
||||
|
||||
# Setup ENV variables
|
||||
ENV PATH /usr/local/src/rbenv/shims:/usr/local/src/rbenv/bin:/usr/local/src/nodenv/shims:/usr/local/src/nodenv/bin:$PATH
|
||||
ENV RBENV_ROOT /usr/local/src/rbenv
|
||||
ENV NODENV_ROOT /usr/local/src/nodenv
|
||||
ENV CONFIGURE_OPTS --disable-install-doc
|
||||
ENV BUNDLE_PATH /bundles
|
||||
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# trim spaces and line return from .ruby-version file
|
||||
COPY .ruby-version .ruby-version.raw
|
||||
RUN cat .ruby-version.raw | tr -d '\r\t ' > .ruby-version
|
||||
|
||||
# Install Rbenv & Ruby
|
||||
RUN git clone --depth 1 https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
||||
git clone --depth 1 https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
|
||||
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh && \
|
||||
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install $(cat .ruby-version) && \
|
||||
rbenv global $(cat .ruby-version)
|
||||
|
||||
# Install Postgres
|
||||
RUN sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main' >> /etc/apt/sources.list.d/pgdg.list" && \
|
||||
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null && \
|
||||
apt-get update && \
|
||||
apt-get install -yqq --no-install-recommends postgresql-client-10 libpq-dev
|
||||
|
||||
|
||||
# trim spaces and line return from .node-version file
|
||||
COPY .node-version .node-version.raw
|
||||
RUN cat .node-version.raw | tr -d '\r\t ' > .node-version
|
||||
|
||||
# Install Node and Yarn with Nodenv
|
||||
RUN git clone --depth 1 https://github.com/nodenv/nodenv.git ${NODENV_ROOT} && \
|
||||
git clone --depth 1 https://github.com/nodenv/node-build.git ${NODENV_ROOT}/plugins/node-build && \
|
||||
git clone --depth 1 https://github.com/pine/nodenv-yarn-install.git ${NODENV_ROOT}/plugins/nodenv-yarn-install && \
|
||||
git clone --depth 1 https://github.com/nodenv/nodenv-package-rehash.git ${NODENV_ROOT}/plugins/nodenv-package-rehash && \
|
||||
echo 'eval "$(nodenv init -)"' >> /etc/profile.d/nodenv.sh && \
|
||||
nodenv install $(cat .node-version) && \
|
||||
nodenv global $(cat .node-version)
|
||||
|
||||
# Install Chrome
|
||||
RUN wget --quiet -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
sh -c "echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list.d/google-chrome.list" && \
|
||||
apt-get update && \
|
||||
apt-get install -fy google-chrome-stable
|
||||
|
||||
# Install Chromedriver
|
||||
RUN wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip && \
|
||||
unzip chromedriver_linux64.zip -d /usr/bin && \
|
||||
chmod u+x /usr/bin/chromedriver
|
||||
|
||||
# Copy code and install app dependencies
|
||||
COPY . /usr/src/app/
|
||||
|
||||
# Install Bundler
|
||||
RUN ./script/install-bundler
|
||||
|
||||
# Install front-end dependencies
|
||||
RUN yarn install
|
||||
|
||||
# Run bundler install in parallel with the amount of available CPUs
|
||||
RUN bundle install --jobs="$(nproc)"
|
||||
@@ -1,16 +1,30 @@
|
||||
### Getting Started
|
||||
|
||||
This is a general guide to setting up an Open Food Network **development environment on your local machine**. If you want to setup OFN on a server, please have a look at the [ofn-install deployment guide](https://github.com/openfoodfoundation/ofn-install/wiki).
|
||||
This is a general guide to setting up an Open Food Network development environment on your local machine.
|
||||
|
||||
#### Still learning Ruby on Rails?
|
||||
The following guides are located in the wiki and provide more OS-specific step-by-step instructions:
|
||||
|
||||
Head to our wiki on [Learning Rails](https://github.com/openfoodfoundation/openfoodnetwork/wiki/Learning-Rails) to find some good starting points.
|
||||
- [Ubuntu Setup Guide][ubuntu]
|
||||
- [macOS Sierra Setup Guide][sierra]
|
||||
- [OSX El Capitan Setup Guide][el-capitan]
|
||||
|
||||
### Dependencies
|
||||
|
||||
* Rails 3.2.x
|
||||
* Ruby 2.1.9
|
||||
* PostgreSQL database
|
||||
* PhantomJS (for testing)
|
||||
* See Gemfile for a list of gems required
|
||||
|
||||
If you are likely to need to manage multiple version of ruby on your local machine, we recommend version managers such as [rbenv](https://github.com/rbenv/rbenv) or [RVM](https://rvm.io/).
|
||||
|
||||
For those new to Rails, the following tutorial will help get you up to speed with configuring a [Rails environment](http://guides.rubyonrails.org/getting_started.html).
|
||||
|
||||
### Get it
|
||||
|
||||
If you're planning on contributing code to the project (which we [LOVE](CONTRIBUTING.md)), it is a good idea to begin by forking this repo using the `Fork` button in the top-right corner of this screen. You should then be able to use `git clone` to copy your fork onto your local machine:
|
||||
If you're planning on contributing code to the project (which we [LOVE](CONTRIBUTING.md)), it is a good idea to begin by forking this repo using the `Fork` button in the top-right corner of this screen. You should then be able to use `git clone` to copy your fork onto your local machine.
|
||||
|
||||
git clone git@github.com:YOUR_GITHUB_USERNAME_HERE/openfoodnetwork.git
|
||||
git clone https://github.com/YOUR_GITHUB_USERNAME_HERE/openfoodnetwork
|
||||
|
||||
Jump into your new local copy of the Open Food Network:
|
||||
|
||||
@@ -18,62 +32,36 @@ Jump into your new local copy of the Open Food Network:
|
||||
|
||||
And then add an `upstream` remote that points to the main repo:
|
||||
|
||||
git remote add upstream git@github.com:openfoodfoundation/openfoodnetwork.git
|
||||
git remote add upstream https://github.com/openfoodfoundation/openfoodnetwork
|
||||
|
||||
Fetch the latest version of `master` from `upstream` (ie. the main repo):
|
||||
|
||||
git fetch upstream master
|
||||
|
||||
### Installation
|
||||
|
||||
This project needs specific ruby/bundler versions as well as node/yarn specific versions. For a local setup you will need:
|
||||
|
||||
* Install or change your Ruby version according to the one specified at [.ruby-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.ruby-version) file.
|
||||
- To manage versions, it's recommended to use [rbenv](https://github.com/rbenv/rbenv) or [RVM](https://rvm.io/).
|
||||
* Install [nodenv](https://github.com/nodenv/nodenv) to ensure the correct [.node-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.node-version) is used.
|
||||
- [nodenv](https://github.com/nodenv/nodenv) is recommended as a node version manager.
|
||||
* PostgreSQL database
|
||||
* Redis (for background jobs)
|
||||
* Chrome (for testing)
|
||||
|
||||
The following guides will provide OS-specific step-by-step instructions to get these requirements installed:
|
||||
- [Ubuntu Setup Guide][ubuntu]
|
||||
- [Debian Setup Guide][debian]
|
||||
- [OSX Setup Guide][osx]
|
||||
|
||||
For those new to Rails, the following tutorial will help get you up to speed with configuring a [Rails environment](http://guides.rubyonrails.org/getting_started.html).
|
||||
|
||||
Another way to make it work locally would be using Docker. See the [Docker setup guide](docker/README.md).
|
||||
|
||||
### Get it running
|
||||
|
||||
First, you need to create the database user the app will use by manually typing the following in your terminal:
|
||||
|
||||
```sh
|
||||
sudo --login --user=postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f00d'"
|
||||
$ sudo -u postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f00d'"
|
||||
```
|
||||
|
||||
This will create the "ofn" user as superuser and allowing it to create databases. If this command fails, check the [troubleshooting section](#creating-the-database) for an alternative.
|
||||
|
||||
Next, it is _strongly recommended_ to run the setup script:
|
||||
Once done, run `script/setup`. If the script succeeds you're ready to start developing. If not, take a look at the output as it should be informative enough to help you troubleshoot.
|
||||
|
||||
```sh
|
||||
./script/setup
|
||||
```
|
||||
If the script succeeds you're ready to start developing. If not, take a look at the output as it should be informative enough to help you troubleshoot.
|
||||
If you run into any other issues getting your local environment up and running please consult [the wiki][wiki].
|
||||
|
||||
If still you get stuck do not hesitate to open an issue reporting the full output of the script.
|
||||
|
||||
Now, your dreams of spinning up a development server can be realised:
|
||||
|
||||
foreman start
|
||||
bundle exec rails server
|
||||
|
||||
Go to [http://localhost:3000](http://localhost:3000) to play around!
|
||||
To login as Spree default user, use:
|
||||
|
||||
To login as the default user, use:
|
||||
|
||||
email: ofn@example.com
|
||||
password: ofn123
|
||||
|
||||
See [Locale and sample data] about loading data.
|
||||
email: spree@example.com
|
||||
password: spree123
|
||||
|
||||
### Testing
|
||||
|
||||
@@ -87,11 +75,13 @@ Then the main application tests can be run with:
|
||||
|
||||
The tests of all custom engines can be run with:
|
||||
|
||||
bundle exec rspec ./engines
|
||||
bundle exec rake ofn:specs:engines:rspec
|
||||
|
||||
Note: If your OS is not explicitly supported in the setup guides then not all tests may pass. However, you may still be able to develop.
|
||||
Note: If your OS is not explicitly supported in the setup guides then not all tests may pass. However, you may still be able to develop. Get in touch with the [#dev][slack-dev] channel on Slack to troubleshoot issues and determine if they will preclude you from contributing to OFN.
|
||||
|
||||
Note: The time zone on your machine should match the one defined in the `.env[.*]` file.
|
||||
Note: The time zone on your machine should match the one defined in `config/application.yml`.
|
||||
|
||||
The project is configured to use [Zeus][zeus] to reduce the pre-test startup time while Rails loads. See the [Zeus GitHub page][zeus] for usage instructions.
|
||||
|
||||
Once [npm dependencies are installed][karma], AngularJS tests can be run with:
|
||||
|
||||
@@ -117,22 +107,22 @@ Below are fixes to potential issues that can happen during the installation proc
|
||||
|
||||
#### Creating the database
|
||||
|
||||
If the `sudo -u postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f00d'"` command doesn't work, you can run the following commands instead:
|
||||
If the ```$ sudo -u postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f00d'"``` command doesn't work, you can run the following commands instead:
|
||||
```
|
||||
createuser --superuser --pwprompt ofn
|
||||
# Enter password for new role: f00d
|
||||
# Enter it again: f00d
|
||||
createdb open_food_network_dev --owner=ofn
|
||||
createdb open_food_network_test --owner=ofn
|
||||
$ createuser --superuser --pwprompt ofn
|
||||
Enter password for new role: f00d
|
||||
Enter it again: f00d
|
||||
$ createdb open_food_network_dev --owner=ofn
|
||||
$ createdb open_food_network_test --owner=ofn
|
||||
```
|
||||
If these commands succeed, you should be able to [continue the setup process](#get-it-running).
|
||||
|
||||
[developer-wiki]: https://github.com/openfoodfoundation/openfoodnetwork/wiki
|
||||
[osx]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-OS-X
|
||||
[sierra]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup%3A-macOS-%28Sierra%2C-HighSierra-and-Mojave%29
|
||||
[el-capitan]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-OS-X-(El-Capitan)
|
||||
[ubuntu]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-Ubuntu
|
||||
[debian]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-Debian
|
||||
[wiki]: https://github.com/openfoodfoundation/openfoodnetwork/wiki
|
||||
[zeus]: https://github.com/burke/zeus
|
||||
[rubocop]: https://rubocop.readthedocs.io/en/latest/
|
||||
[karma]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Karma
|
||||
[slack-dev]: https://openfoodnetwork.slack.com/messages/C2GQ45KNU
|
||||
[Locale and sample data]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Locale-and-sample-data
|
||||
|
||||
251
Gemfile
@@ -1,207 +1,170 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
source 'https://gem.coop'
|
||||
source 'https://rubygems.org'
|
||||
ruby "2.3.7"
|
||||
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }
|
||||
|
||||
ruby File.read('.ruby-version').chomp
|
||||
|
||||
gem 'dotenv', require: 'dotenv/load' # Load ENV vars before other gems
|
||||
|
||||
gem 'rails'
|
||||
|
||||
# Active Storage
|
||||
gem "active_storage_validations"
|
||||
gem "aws-sdk-s3", require: false
|
||||
gem "image_processing"
|
||||
|
||||
gem 'activemerchant'
|
||||
gem 'angular-rails-templates'
|
||||
gem 'ransack', '~> 4.1.0'
|
||||
gem 'responders'
|
||||
gem 'webpacker', '~> 5'
|
||||
|
||||
# Indirect dependency but we access it directly in JS specs.
|
||||
# It turns out to be hard to upgrade but please do if you can.
|
||||
gem 'sprockets', '~> 3.7'
|
||||
|
||||
gem 'i18n'
|
||||
gem 'i18n-js', '~> 3.9.0'
|
||||
gem 'rails-i18n'
|
||||
gem 'i18n', '~> 0.6.11'
|
||||
gem 'i18n-js', '~> 3.6.0'
|
||||
gem 'rails', '~> 3.2.22'
|
||||
gem 'rails-i18n', '~> 3.0.0'
|
||||
gem 'rails_safe_tasks', '~> 1.0'
|
||||
|
||||
gem "activerecord-import"
|
||||
gem "db2fog", github: "openfoodfoundation/db2fog", branch: "rails-7"
|
||||
gem "fog-aws", "~> 2.0" # db2fog does not support v3
|
||||
gem "mime-types" # required by fog
|
||||
# Patched version. See http://rubysec.com/advisories/CVE-2015-5312/.
|
||||
gem 'nokogiri', '>= 1.6.7.1'
|
||||
|
||||
gem "validates_lengths_from_database"
|
||||
gem "valid_email2"
|
||||
|
||||
gem "catalog", path: "./engines/catalog"
|
||||
gem 'dfc_provider', path: './engines/dfc_provider'
|
||||
gem "order_management", path: "./engines/order_management"
|
||||
gem 'web', path: './engines/web'
|
||||
|
||||
gem "activerecord-postgresql-adapter"
|
||||
gem "arel-helpers", "~> 2.12"
|
||||
gem "pg"
|
||||
gem 'activerecord-postgresql-adapter'
|
||||
gem 'pg', '~> 0.21.0'
|
||||
|
||||
gem 'acts_as_list', '1.0.4'
|
||||
gem 'cancancan', '~> 1.15.0'
|
||||
gem 'digest'
|
||||
gem 'ffaker'
|
||||
gem 'highline'
|
||||
gem 'json'
|
||||
gem 'monetize', '~> 1.11'
|
||||
gem 'paranoia', '~> 2.4'
|
||||
gem 'state_machines-activerecord'
|
||||
gem 'stringex', '~> 2.8.5', require: false
|
||||
# OFN-maintained and patched version of Spree v2.0.4. See
|
||||
# https://github.com/openfoodfoundation/openfoodnetwork/wiki/Tech-Doc:-OFN's-Spree-fork%F0%9F%8D%B4
|
||||
# for details.
|
||||
gem 'spree_core', github: 'openfoodfoundation/spree', branch: '2-0-4-stable'
|
||||
|
||||
gem 'paypal-sdk-merchant', '1.117.2'
|
||||
gem 'stripe', '~> 15'
|
||||
gem 'spree_i18n', github: 'spree/spree_i18n', branch: '1-3-stable'
|
||||
|
||||
gem 'devise'
|
||||
gem 'devise-encryptable'
|
||||
gem 'devise-i18n'
|
||||
gem 'devise-token_authenticatable'
|
||||
gem 'jwt', '~> 2.3'
|
||||
gem 'oauth2', '~> 1.4.7' # Used for Stripe Connect
|
||||
# Our branch contains two changes
|
||||
# - Pass customer email and phone number to PayPal (merged to upstream master)
|
||||
# - Change type of password from string to password to hide it in the form
|
||||
gem 'spree_paypal_express', github: "openfoodfoundation/better_spree_paypal_express", branch: "2-0-stable"
|
||||
gem 'stripe'
|
||||
|
||||
gem 'datafoodconsortium-connector'
|
||||
gem 'jsonapi-serializer'
|
||||
gem 'pagy', '~> 9'
|
||||
# We need at least this version to have Digicert's root certificate
|
||||
# which is needed for Pin Payments (and possibly others).
|
||||
gem 'activemerchant', '~> 1.78'
|
||||
|
||||
gem 'rswag-api'
|
||||
gem 'rswag-ui'
|
||||
gem 'devise', '~> 2.2.5'
|
||||
gem 'devise-encryptable', '0.2.0'
|
||||
gem 'jwt', '~> 2.2'
|
||||
gem 'oauth2', '~> 1.4.4' # Used for Stripe Connect
|
||||
|
||||
gem 'omniauth_openid_connect'
|
||||
gem 'omniauth-rails_csrf_protection'
|
||||
gem 'openid_connect'
|
||||
gem 'daemons'
|
||||
gem 'delayed_job_active_record'
|
||||
gem 'delayed_job_web'
|
||||
|
||||
gem 'angularjs-rails', '1.8.0'
|
||||
# Fix bug in simple_form preventing collection_check_boxes usage within form_for block
|
||||
# When merged, revert to upstream gem
|
||||
gem 'simple_form', github: 'RohanM/simple_form'
|
||||
|
||||
# Spree's default pagination gem (locked to the current version used by Spree)
|
||||
# We use it's methods in OFN code as well, so this is a direct dependency
|
||||
gem 'kaminari', '~> 0.14.1'
|
||||
|
||||
gem 'andand'
|
||||
gem 'angularjs-rails', '1.5.5'
|
||||
gem 'aws-sdk'
|
||||
gem 'bugsnag'
|
||||
gem 'db2fog'
|
||||
gem 'haml'
|
||||
gem 'rabl'
|
||||
gem 'redcarpet'
|
||||
gem 'sass', "~> 3.3"
|
||||
gem 'sass-rails', '~> 3.2.3'
|
||||
gem 'truncate_html'
|
||||
gem 'unicorn'
|
||||
|
||||
gem 'actionpack-action_caching'
|
||||
# AMS 0.9.x and 0.10.x are very different from 0.8.4 and the upgrade is not straight forward
|
||||
# AMS is deprecated, we will introduce an alternative at some point
|
||||
# AMS is pinned to 0.8.4 because 0.9.x is a complete re-write, as is 0.10.x
|
||||
# Once Rails is updated to 5.x we should bump directly to 0.10.x
|
||||
gem "active_model_serializers", "0.8.4"
|
||||
gem 'activerecord-session_store'
|
||||
gem 'acts-as-taggable-on'
|
||||
gem 'acts-as-taggable-on', '~> 3.4'
|
||||
gem 'angularjs-file-upload-rails', '~> 2.4.1'
|
||||
gem 'bigdecimal'
|
||||
gem 'bootsnap', require: false
|
||||
gem 'blockenspiel'
|
||||
gem 'custom_error_message', github: 'jeremydurham/custom-err-msg'
|
||||
gem 'dalli'
|
||||
gem 'deface', '1.0.2'
|
||||
gem 'diffy'
|
||||
gem 'figaro'
|
||||
gem 'geocoder'
|
||||
gem 'gmaps4rails'
|
||||
gem 'mimemagic', '> 0.3.5'
|
||||
gem 'paper_trail'
|
||||
gem 'oj'
|
||||
gem 'paper_trail', '~> 5.2.3'
|
||||
gem 'paperclip', '~> 3.4.1'
|
||||
gem 'rack-rewrite'
|
||||
gem 'rack-timeout'
|
||||
gem 'roadie-rails'
|
||||
|
||||
gem 'puma'
|
||||
gem 'redis'
|
||||
gem 'sidekiq'
|
||||
gem 'sidekiq-scheduler'
|
||||
|
||||
gem "cable_ready"
|
||||
gem "stimulus_reflex"
|
||||
|
||||
gem "turbo_power"
|
||||
gem "turbo-rails"
|
||||
gem 'rack-ssl', require: 'rack/ssl'
|
||||
gem 'roadie-rails', '~> 1.3.0'
|
||||
gem 'spinjs-rails'
|
||||
|
||||
gem 'combine_pdf'
|
||||
gem 'wicked_pdf'
|
||||
gem 'wkhtmltopdf-binary'
|
||||
|
||||
gem 'foreigner'
|
||||
gem 'immigrant'
|
||||
gem 'roo' # read spreadsheets
|
||||
gem 'spreadsheet_architect' # write spreadsheets
|
||||
gem 'roo', '~> 2.8.3'
|
||||
|
||||
gem 'whenever', require: false
|
||||
|
||||
gem 'coffee-rails', '~> 5.0.0'
|
||||
gem 'test-unit', '~> 3.3'
|
||||
|
||||
gem 'angular_rails_csrf'
|
||||
gem 'coffee-rails', '~> 3.2.1'
|
||||
gem 'compass-rails'
|
||||
|
||||
gem 'jquery-rails', '4.4.0'
|
||||
gem 'jquery-ui-rails', '~> 4.2'
|
||||
gem "select2-rails", github: "openfoodfoundation/select2-rails", branch: "v349_with_thor_v1"
|
||||
gem 'mini_racer', '0.2.9'
|
||||
|
||||
gem 'good_migrations'
|
||||
gem 'uglifier', '>= 1.0.3'
|
||||
|
||||
gem 'flipper'
|
||||
gem 'flipper-active_record'
|
||||
gem 'flipper-ui'
|
||||
gem 'angular-rails-templates', '~> 0.3.0'
|
||||
gem 'foundation-icons-sass-rails'
|
||||
gem 'momentjs-rails'
|
||||
gem 'turbo-sprockets-rails3'
|
||||
|
||||
gem "view_component"
|
||||
gem 'view_component_reflex', '3.1.14.pre9'
|
||||
gem "foundation-rails"
|
||||
gem 'foundation_rails_helper', github: 'willrjmarshall/foundation_rails_helper', branch: "rails3"
|
||||
|
||||
# mini_portile2 is needed when installing with Vargant
|
||||
# https://openfoodnetwork.slack.com/archives/CEBMTRCNS/p1668439152992899
|
||||
gem 'mini_portile2', '~> 2.8'
|
||||
gem 'jquery-migrate-rails'
|
||||
gem 'jquery-rails', '3.0.4'
|
||||
gem 'jquery-ui-rails', '~> 4.0.0'
|
||||
gem 'select2-rails', '~> 3.4.7'
|
||||
|
||||
gem "faraday"
|
||||
gem "private_address_check"
|
||||
|
||||
gem 'newrelic_rpm'
|
||||
|
||||
gem 'invisible_captcha'
|
||||
gem 'ofn-qz', github: 'openfoodfoundation/ofn-qz', ref: '60da2ae4c44cbb4c8d602f59fb5fff8d0f21db3c'
|
||||
|
||||
group :production, :staging do
|
||||
gem 'sd_notify' # For better Systemd process management. Used by Puma.
|
||||
gem 'ddtrace'
|
||||
end
|
||||
|
||||
group :test, :development do
|
||||
gem 'bullet'
|
||||
gem 'capybara'
|
||||
gem 'capybara-shadowdom'
|
||||
gem 'cuprite'
|
||||
gem 'database_cleaner', require: false
|
||||
gem 'debug', '>= 1.0.0'
|
||||
gem "factory_bot_rails", '6.2.0', require: false
|
||||
gem 'fuubar', '~> 2.5.1'
|
||||
# Pretty printed test output
|
||||
gem 'atomic'
|
||||
gem 'awesome_print'
|
||||
gem 'capybara', '>= 2.18.0' # 3.0 requires nokogiri 1.8
|
||||
gem 'database_cleaner', '0.7.1', require: false
|
||||
gem "factory_bot_rails", require: false
|
||||
gem 'fuubar', '~> 2.5.0'
|
||||
gem 'json_spec', '~> 1.1.4'
|
||||
gem 'knapsack_pro'
|
||||
gem 'knapsack'
|
||||
gem 'letter_opener', '>= 1.4.1'
|
||||
gem 'rspec-rails', ">= 3.5.2"
|
||||
gem 'rspec-retry', require: false
|
||||
gem 'rspec-sql'
|
||||
gem 'rswag'
|
||||
gem 'rspec-retry'
|
||||
gem 'selenium-webdriver'
|
||||
gem 'shoulda-matchers'
|
||||
gem 'stimulus_reflex_testing', github: "podia/stimulus_reflex_testing", branch: :main
|
||||
gem 'timecop'
|
||||
gem 'unicorn-rails'
|
||||
gem 'webdrivers'
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem 'pdf-reader'
|
||||
gem 'puffing-billy'
|
||||
gem 'rails-controller-testing'
|
||||
gem 'simplecov', require: false
|
||||
gem 'undercover', require: false
|
||||
gem 'vcr', require: false
|
||||
gem 'webmock', require: false
|
||||
gem 'webmock'
|
||||
# See spec/spec_helper.rb for instructions
|
||||
# gem 'perftools.rb'
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem 'foreman'
|
||||
gem 'haml_lint', require: false
|
||||
gem 'i18n-tasks'
|
||||
gem 'listen'
|
||||
gem 'pry'
|
||||
gem 'query_count'
|
||||
gem 'rails-erd'
|
||||
gem 'byebug', '~> 9.0.0' # 9.1 requires ruby 2.2
|
||||
gem 'debugger-linecache'
|
||||
gem "newrelic_rpm", "~> 3.0"
|
||||
gem 'pry-byebug', '>= 3.4.3'
|
||||
gem 'rubocop'
|
||||
gem 'rubocop-capybara'
|
||||
gem 'rubocop-factory_bot'
|
||||
gem 'rubocop-rails'
|
||||
gem 'rubocop-rspec'
|
||||
gem 'rubocop-rspec_rails'
|
||||
gem 'spring'
|
||||
gem 'spring', '1.7.2'
|
||||
gem 'spring-commands-rspec'
|
||||
gem 'spring-commands-rubocop'
|
||||
gem 'web-console'
|
||||
|
||||
gem 'rack-mini-profiler', '< 3.0.0'
|
||||
# 1.0.9 fixed openssl issues on macOS https://github.com/eventmachine/eventmachine/issues/602
|
||||
# While we don't require this gem directly, no dependents forced the upgrade to a version
|
||||
# greater than 1.0.9, so we just required the latest available version here.
|
||||
gem 'eventmachine', '>= 1.2.3'
|
||||
|
||||
gem 'rack-mini-profiler', '< 2.0.0'
|
||||
end
|
||||
|
||||
1648
Gemfile.lock
5
Procfile
@@ -1,5 +0,0 @@
|
||||
# Foreman Procfile. Start all dev server processes with: `foreman start`
|
||||
|
||||
rails: DEV_CACHING=true bundle exec rails s -p 3000
|
||||
webpack: ./bin/webpack-dev-server
|
||||
sidekiq: DEV_CACHING=true bundle exec sidekiq -q mailers -q default
|
||||
@@ -1,5 +0,0 @@
|
||||
# Foreman Procfile for Docker env. Start all dev server processes with: `bundle exec foreman start -f Procfile.docker`
|
||||
|
||||
webpack: WEBPACKER_DEV_SERVER_HOST=0.0.0.0 ./bin/webpack-dev-server
|
||||
sidekiq: DEV_CACHING=true bundle exec sidekiq -q mailers -q default
|
||||
rails: WEBPACKER_DEV_SERVER_HOST=0.0.0.0 DEV_CACHING=true bundle exec rails s -p 3000 -b 0.0.0.0
|
||||
28
README.md
@@ -1,4 +1,5 @@
|
||||
[](https://github.com/openfoodfoundation/openfoodnetwork/actions/workflows/build.yml)
|
||||
[](https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2)
|
||||
[](https://codeclimate.com/github/openfoodfoundation/openfoodnetwork)
|
||||
|
||||
# Open Food Network
|
||||
|
||||
@@ -8,22 +9,17 @@ Supported by the Open Food Foundation and a network of global affiliates, we are
|
||||
|
||||
We're part of global movement - get involved!
|
||||
|
||||
* Join the conversation [on Slack][slack-invite]. Make sure you introduce yourself in the #general channel and join #dev for all tech-related topics.
|
||||
* Join the conversation [on Slack][slack-invite]. Make sure you introduce yourself in the #general channel.
|
||||
* Head to [https://openfoodnetwork.org](https://openfoodnetwork.org) for more information about the global OFN project.
|
||||
* Check out the [User Guide](https://guide.openfoodnetwork.org/) for a list of features and tutorials.
|
||||
* Join our [discussion forum](https://community.openfoodnetwork.org).
|
||||
|
||||
## Contributing
|
||||
|
||||
If you are interested in contributing to the OFN in any capacity, please introduce yourself [on Slack][slack-invite], and have a look through the [OFN Handbook][ofn-handbook].
|
||||
If you are interested in contributing to the OFN in any capacity, please introduce yourself [on Slack][slack-invite], and have a look through our [Contributor Guide][contributor-guide].
|
||||
|
||||
Our [GETTING_STARTED](GETTING_STARTED.md) and [CONTRIBUTING](CONTRIBUTING.md) guides are the best place to start for developers looking to set up a development environment and make contributions to the codebase.
|
||||
|
||||
### Hacktoberfest :tada:
|
||||
|
||||
Are you participating in [Hacktoberfest](https://hacktoberfest.digitalocean.com/)? Go check out our [Welcome New Developers project board][welcome-dev]! We have curated all issues we consider to be a good starting point for new members of the community and categorized them by skills and level of complexity.
|
||||
Have a look and pick the one you would prefer working on!
|
||||
|
||||
## Provisioning
|
||||
|
||||
If you're interested in provisioning a server, see [ofn-install][ofn-install] for the project's Ansible playbooks.
|
||||
@@ -32,24 +28,14 @@ We also have a [Super Admin Guide][super-admin-guide] to help with configuration
|
||||
|
||||
## Testing
|
||||
|
||||
If you'd like to help out with testing, please introduce yourself on the #testing channel on [Slack][slack-invite]. Also, do have a look in our [Welcome New QAs board][welcome-qa] for some good first issues, both on manual and automated testing (RSpec/Capybara).
|
||||
|
||||
We use [BrowserStack](https://www.browserstack.com/) as a manual testing tool. BrowserStack provides open source projects with unlimited and free of charge accounts. A big thanks to them!
|
||||
|
||||
|
||||
We use [KnapsackPro](https://knapsackpro.com/) for optimal parallelisation of our automated tests. KnapsackPro offers unlimited plans for non-commercial open source projects, like ours - a big thanks to them!
|
||||
|
||||

|
||||
|
||||
|
||||
## Licence
|
||||
|
||||
Copyright (c) 2012 - 2024 Open Food Foundation, released under the AGPL licence.
|
||||
Copyright (c) 2012 - 2020 Open Food Foundation, released under the AGPL licence.
|
||||
|
||||
[survey]: https://docs.google.com/a/eaterprises.com.au/forms/d/1zxR5vSiU9CigJ9cEaC8-eJLgYid8CR8er7PPH9Mc-30/edit#
|
||||
[slack-invite]: https://join.slack.com/t/openfoodnetwork/shared_invite/zt-9sjkjdlu-r02kUMP1zbrTgUhZhYPF~A
|
||||
[ofn-handbook]: https://ofn-user-guide.gitbook.io/ofn-handbook/
|
||||
[slack-invite]: https://join.slack.com/t/openfoodnetwork/shared_invite/enQtNzY3NDEwNzM2MDM0LWFmNGRhNDUwYzNmNWNkYmFkMzgxNDg1OTg1ODNjNWY4Y2FhNDIwNmE4ZWI0OThiMGNmZjFkODczNGZiYTJmNWI
|
||||
[contributor-guide]: https://ofn-user-guide.gitbook.io/ofn-contributor-guide/who-are-we
|
||||
[ofn-install]: https://github.com/openfoodfoundation/ofn-install
|
||||
[super-admin-guide]: https://ofn-user-guide.gitbook.io/ofn-super-admin-guide
|
||||
[welcome-dev]: https://github.com/orgs/openfoodfoundation/projects/5
|
||||
[welcome-qa]: https://github.com/orgs/openfoodfoundation/projects/6
|
||||
|
||||
4
Rakefile
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env rake
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
||||
|
||||
require_relative 'config/application'
|
||||
|
||||
Openfoodnetwork::Application.load_tasks
|
||||
|
||||
Knapsack.load_tasks if defined?(Knapsack)
|
||||
|
||||
|
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 193 KiB |
BIN
app/assets/images/browser-logos/chrome.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
app/assets/images/browser-logos/firefox.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/assets/images/browser-logos/internet-explorer.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 619 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 313 B |
10
app/assets/images/flag.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="15 13 34 38.4" enable-background="new 15 13 34 38.4" xml:space="preserve">
|
||||
<g>
|
||||
<polygon fill="#FFFFFF" points="15.5,13.5 48.5,13.5 48.5,50.7 31.6,45.5 15.5,50.7 "/>
|
||||
<path fill="#999999" d="M48,14v36l-16.4-5L16,50V14H48 M49,13h-1H16h-1v1v36v1.4l1.3-0.4l15.3-5l16.1,5l1.3,0.4V50V14V13L49,13z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
1051
app/assets/images/home/groups-bg.svg
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
app/assets/images/home/home-apples.jpg
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
app/assets/images/home/home-oranges.jpg
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
app/assets/images/home/home-strawberries.jpg
Normal file
|
After Width: | Height: | Size: 570 KiB |
|
Before Width: | Height: | Size: 283 KiB After Width: | Height: | Size: 283 KiB |
BIN
app/assets/images/home/home1.jpg
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
app/assets/images/home/home2.jpg
Normal file
|
After Width: | Height: | Size: 244 KiB |
BIN
app/assets/images/home/home3.jpg
Normal file
|
After Width: | Height: | Size: 195 KiB |
BIN
app/assets/images/home/macbook.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
1090
app/assets/images/home/maps-bg.svg
Normal file
|
After Width: | Height: | Size: 123 KiB |
72
app/assets/images/home/producers-bg.svg
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="386.638px" height="320px" viewBox="-31.319 2 386.638 320" enable-background="new -31.319 2 386.638 320"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#ABDBD0" d="M331.518,159.254c-13.147,0-23.805,26.723-23.805,59.69c0,32.96,10.658,59.685,23.805,59.685
|
||||
c13.142,0,23.801-26.725,23.801-59.685C355.319,185.977,344.66,159.254,331.518,159.254z M332.114,255.185
|
||||
c-8.06,0-14.593-15.746-14.593-35.167s6.533-35.165,14.593-35.165c8.059,0,14.594,15.743,14.594,35.165
|
||||
S340.173,255.185,332.114,255.185z"/>
|
||||
<path fill="#ABDBD0" d="M304.557,219.468c0-36.244,11.718-65.623,26.171-65.623c2.107,0,4.154,0.642,6.116,1.823
|
||||
c-10.469-8.709-35.108-4.515-46.498-2.514c-2.139,3.216-3.572,6.079-4.237,7.624c-3.91,9.023-7.063,22.001-7.063,22.001
|
||||
l-11.863-0.291l11.689,55.666h-17.909c2.54,25.911,10.809,43.072,25.314,46.94c0,0,30.567,4.944,45.693-0.081
|
||||
c-0.414,0.046-0.828,0.081-1.243,0.081C316.273,285.091,304.557,255.707,304.557,219.468z"/>
|
||||
<path fill="#ABDBD0" d="M64.393,237.666c0-46.574,34.058-84.332,76.072-84.332c1.812,0,3.605,0.095,5.386,0.234
|
||||
c-5.466-1.08-11.117-1.655-16.903-1.655c-47.453,0-85.919,38.074-85.919,85.044c0,46.967,38.467,85.042,85.919,85.042
|
||||
c2.052,0,4.08-0.097,6.096-0.238C95.562,318.679,64.393,282.219,64.393,237.666z"/>
|
||||
<path fill="#ABDBD0" d="M122.02,149.109c44.188-2.104,67.371,17.402,79.829,34.057l3.027-2.314l4.452-5.008l28.39,7.793
|
||||
l10.02,52.325h27.275l-11.689-55.667l11.861,0.291c0,0,3.157-12.974,7.066-22c1.977-4.57,10.576-20.597,24.492-23.378
|
||||
c13.917-2.784,26.31,15.218,26.31,15.218l-6.824-19.114l-25.606-9.464l-7.794-42.304l11.689-7.236l-1.114-11.69l-64.57-23.38
|
||||
l-82.387,19.483V66.74l13.361,3.341l-8.908,25.608c0,0-23.709-3.198-47.031-1.02c-27.244,2.543-54.707,10.521-54.707,10.521
|
||||
l-7.365,14.434l-5.009,66.242l2.983,0.565l5.182-59.414l70.49-6.662L122.02,149.109L122.02,149.109z M65.958,118.276
|
||||
c-3.541,0.556-6.775-1.29-7.219-4.123c-0.446-2.835,2.065-5.583,5.606-6.139c3.543-0.556,6.776,1.288,7.22,4.124
|
||||
C72.011,114.972,69.5,117.719,65.958,118.276z M107.793,115.428c-4.711,0.741-9.011-1.713-9.603-5.483
|
||||
c-0.592-3.77,2.748-7.425,7.458-8.167c4.713-0.741,9.014,1.717,9.604,5.484C115.845,111.034,112.505,114.689,107.793,115.428z
|
||||
M225.388,109.481h-19.989L166.472,98.96l7.715-25.25l57.162-10.17L225.388,109.481z M252.39,181.723l-17.886-0.702l7.015-117.482
|
||||
l30.508,9.469l5.612,49.447L252.39,181.723z M282.025,122.017l-6.135-47.956l14.378,7.715l7.015,43.925L282.025,122.017z"/>
|
||||
<path fill="#ABDBD0" d="M147.008,91.476V57.053h-6.84V41.534c-0.001-8.57-6.945-15.515-15.517-15.519v6.314
|
||||
c5.083,0.008,9.198,4.123,9.206,9.204v15.519h-6.312v33.7C134.962,90.733,141.75,91.082,147.008,91.476z"/>
|
||||
<path fill="#ABDBD0" d="M-22.811,227.408c0-33.523,28.628-60.694,63.942-60.694c1.17,0,2.333,0.034,3.487,0.094l0.406-5.338
|
||||
c-2.084-0.176-4.193-0.274-6.325-0.274c-38.67-0.001-70.018,29.602-70.018,66.12c0,36.522,31.348,66.125,70.018,66.125
|
||||
c6.585,0,12.95-0.877,18.994-2.483c-1.019-1.387-1.98-2.814-2.918-4.26c-4.397,0.909-8.959,1.4-13.642,1.4
|
||||
C5.817,288.099-22.811,260.925-22.811,227.408z"/>
|
||||
<path fill="#ABDBD0" d="M10.539,226.003c0-18.358,16.222-33.24,36.233-33.24c2.119,0,4.189,0.176,6.207,0.497
|
||||
c0.214-0.435,0.437-0.864,0.675-1.295l-10.952-2.055l1.408-18.469c-1.078-0.059-2.159-0.087-3.249-0.087
|
||||
c-32.898,0-59.568,25.249-59.568,56.395c0,31.139,26.67,56.388,59.568,56.388c4.363,0,8.614-0.457,12.71-1.299
|
||||
c-4.71-7.248-8.31-15.242-10.552-23.764C24.771,257.346,10.539,243.2,10.539,226.003z"/>
|
||||
<g>
|
||||
<polygon fill="#ABDBD0" points="121.189,130.962 56.135,136.089 56.662,129.208 122.02,123.859 "/>
|
||||
<polygon fill="#ABDBD0" points="120.531,141.218 55.478,146.347 56.004,139.465 121.364,134.116 "/>
|
||||
<path fill="#ABDBD0" d="M120.311,143.455l-65.36,5.348l-0.526,6.882l50.139-3.953c4.875-1.368,9.922-2.336,15.109-2.83
|
||||
L120.311,143.455z"/>
|
||||
<path fill="#ABDBD0" d="M54.293,159.059l-0.527,6.883l24.851-1.96c4.491-3.131,9.296-5.842,14.364-8.088L54.293,159.059z"/>
|
||||
<path fill="#ABDBD0" d="M72.954,168.275l-19.187,1.571l-0.526,6.882l11.721-0.926C67.461,173.128,70.129,170.612,72.954,168.275z"
|
||||
/>
|
||||
<path fill="#ABDBD0" d="M52.847,179.313l-0.526,6.882l4.571-0.362c1.745-2.542,3.636-4.978,5.641-7.313L52.847,179.313z"/>
|
||||
</g>
|
||||
<circle fill="#ABDBD0" cx="140.958" cy="239.852" r="19.726"/>
|
||||
<ellipse fill="#ABDBD0" cx="328.491" cy="218.807" rx="4.487" ry="12.775"/>
|
||||
<g>
|
||||
<circle fill="#ABDBD0" cx="162.134" cy="223.81" r="2.781"/>
|
||||
<circle fill="#ABDBD0" cx="133.371" cy="215.827" r="2.781"/>
|
||||
<circle fill="#ABDBD0" cx="115.492" cy="239.462" r="2.781"/>
|
||||
<circle fill="#ABDBD0" cx="131.915" cy="265.616" r="2.781"/>
|
||||
<circle fill="#ABDBD0" cx="161.682" cy="255.915" r="2.783"/>
|
||||
</g>
|
||||
<path fill="#ABDBD0" d="M126.341,6.21c-9.103,0-16.483,7.379-16.483,16.482c0,2.76,0.686,5.357,1.886,7.641
|
||||
c-2.135-2.062-3.7-4.699-4.48-7.655l0,0c-0.538,0.587-1.051,1.203-1.509,1.884c-5.088,7.548-3.096,17.791,4.454,22.881
|
||||
c2.287,1.542,4.825,2.424,7.39,2.708c-4.22,0.898-8.783,0.158-12.644-2.444c-7.548-5.088-9.542-15.333-4.452-22.881
|
||||
c1.634-2.423,3.81-4.247,6.245-5.472c-0.014-0.289-0.046-0.574-0.046-0.869c0-3.665,1.211-7.038,3.233-9.775l-0.001,0.001
|
||||
c-0.855-0.185-1.731-0.312-2.642-0.312c-7.101,0-12.857,5.756-12.857,12.858c0,2.152,0.535,4.177,1.472,5.959
|
||||
c-2.421-2.337-3.933-5.611-3.933-9.241c0-7.101,5.756-12.857,12.856-12.857c2.414,0,4.663,0.675,6.591,1.833
|
||||
c-0.004,0.002-0.004,0.004-0.006,0.005C114.405,3.9,118.571,2,123.185,2c6.343,0,11.841,3.588,14.598,8.842
|
||||
C134.817,7.98,130.789,6.21,126.341,6.21z"/>
|
||||
<path fill="#ABDBD0" d="M188.32,300.982c-0.004,0-0.006,0.002-0.008,0.004c19.094-15.154,31.275-38.079,31.275-63.757
|
||||
c0-40.085-29.659-73.5-69.016-81.055c-1.782-0.134-3.574-0.227-5.385-0.227c-42.013,0-76.072,36.7-76.072,81.97
|
||||
c0,43.31,31.169,78.747,70.65,81.743c7.991-0.539,15.673-2.145,22.914-4.642L188.32,300.982z M144.663,286.068
|
||||
c-23.696,0-42.907-20.166-42.907-45.041c0-24.878,19.211-45.042,42.907-45.042c23.697,0,42.908,20.166,42.908,45.042
|
||||
C187.571,265.902,168.359,286.068,144.663,286.068z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 784 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 840 B After Width: | Height: | Size: 840 B |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |