Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into hackathon_squash_…
Browse files Browse the repository at this point in the history
…attempt_7
  • Loading branch information
lentschi committed Mar 16, 2024
2 parents 907c213 + 790a263 commit 7ad947d
Show file tree
Hide file tree
Showing 282 changed files with 7,815 additions and 4,226 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Fixes line endings for Windows (Docker) environment, which are by default converted to crlf
* text=auto
*.sh text eol=lf
proc-start text eol=lf
Rakefile text eol=lf
6 changes: 4 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
options: >-
--health-cmd "mysqladmin ping"
--health-cmd "mariadb-admin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
Expand All @@ -35,7 +35,9 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup chromedriver
uses: nanasess/[email protected]
uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: '115.0.5790.170' # https://github.com/nanasess/setup-chromedriver/issues/200
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ config/environments/development.rb
nbproject/
.*.sw?
*~
*.iml

coverage
tags
Expand Down
32 changes: 32 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This configuration file was mainly inspired by ./doc/SETUP_DEVELOPMENT_DOCKER.md
tasks:
- name: Docker
init: |
# init docker containers
docker-compose -f docker-compose-dev.yml pull
docker-compose -f docker-compose-dev.yml up -d mariadb
docker-compose -f docker-compose-dev.yml run --rm foodsoft bundle install
docker-compose -f docker-compose-dev.yml run --rm foodsoft bundle exec rake foodsoft:setup_development_docker
# setup test database
docker-compose -f docker-compose-dev.yml run --rm mariadb mariadb --host=mariadb --password=secret --execute="CREATE DATABASE test"
docker-compose -f docker-compose-dev.yml run --rm foodsoft bundle exec rake db:schema:load RAILS_ENV=test DATABASE_URL=mysql2://root:secret@mariadb/test?encoding=utf8mb4
command: |
# start docker containers
docker-compose -f docker-compose-dev.yml up
- name: Rails
command: |
echo "The rails application is started in docker containers (see docker-compose-dev.yml)."
echo "For executing rails commands, open up a bash terminal inside the foodsoft container via 'docker-compose -f docker-compose-dev.yml exec foodsoft bash'"
ports:
- port: 3000
onOpen: open-preview
- port: 2080
onOpen: notify
- port: 1080
onOpen: notify

vscode:
extensions:
- ms-azuretools.vscode-docker
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.9
2.7.8
57 changes: 56 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
# Foodsoft 4.8.1
(15 February 2024)


### Bug Fixes

* article convert_unit will fail when unit contains a comma character ([b1fa97d](https://github.com/foodcoops/foodsoft/commit/b1fa97d34d66d140e197107867251db93360f8a5))
* documents sort sql needs Arel.sql ([4df78de](https://github.com/foodcoops/foodsoft/commit/4df78def01fc395f7902deb6f0d11d1d8b8efda7))
* incompatible uri gem ([bae984b](https://github.com/foodcoops/foodsoft/commit/bae984bb3e760bb863410374216c7f6ef50fe93a))
* update ruby image, fix bundler version ([c450368](https://github.com/foodcoops/foodsoft/commit/c45036810eeced044a58dac615a629a7b1fb78d0))
* bug on saving config, fixes [#801](https://github.com/foodcoops/foodsoft/issues/801) ([8b152bf](https://github.com/foodcoops/foodsoft/commit/8b152bfbc0ef375f1f180c92006b62d241c83a2d))
* active storage links for attachments ([#1045](https://github.com/foodcoops/foodsoft/issues/1045)) ([4b7356e](https://github.com/foodcoops/foodsoft/commit/4b7356e7e4993f44590cd62dc9f24642cb94c89a))
* allow_other_host for discourse plugin redirects ([#1043](https://github.com/foodcoops/foodsoft/issues/1043)) ([8836697](https://github.com/foodcoops/foodsoft/commit/8836697ed7d9d3137d7797067a2db9e9208a6440))
* **finance:** ordergroup overview total balances ([#1051](https://github.com/foodcoops/foodsoft/issues/1051)) ([a5861f5](https://github.com/foodcoops/foodsoft/commit/a5861f55855dfbe5ce343d4d1896121ccf14471d))

### Features

* **messages:** show recipients in thread view ([9ee8a8f](https://github.com/foodcoops/foodsoft/commit/9ee8a8f85bf4d912276dbfac58bbbaa1e14cde1d))
* use active storage for invoice attachments ([0ff74e8](https://github.com/foodcoops/foodsoft/commit/0ff74e8a46c1c46be1574f74f4365f2e6870a386)), closes [#1037](https://github.com/foodcoops/foodsoft/issues/1037)
* remove the feedback form ([9c81aa3](https://github.com/foodcoops/foodsoft/commit/9c81aa3b7e3b4b045ab32ba58a9b653458382169))


# Foodsoft 4.8.0

* feat: Show total sums for ordergroup finances [#1017](https://github.com/foodcoops/foodsoft/pull/1017)
* feat: Richtext Messages and Attachments with Actiontext [#918](https://github.com/foodcoops/foodsoft/issues/918)
* feat: Make date configurable via locales [#997](https://github.com/foodcoops/foodsoft/pull/997)
* feat: Turkish language support added [#995](https://github.com/foodcoops/foodsoft/pull/995)
* feat: Disable member list via configuration [#990](https://github.com/foodcoops/foodsoft/pull/990)
* feat: Specify an URL to redirect after logout via settings #989
* feat: introduce importmaps [#983](https://github.com/foodcoops/foodsoft/pull/983)
* feat: ruby 2.7.2 and rails 7 upgrade [#979](https://github.com/foodcoops/foodsoft/pull/979)
* feat: Add home controller test [#972](https://github.com/foodcoops/foodsoft/pull/972)
* feat: Replace apivore with rswag for api tests [#969](https://github.com/foodcoops/foodsoft/pull/969)
* feat: increase test coverage [#966](https://github.com/foodcoops/foodsoft/pull/966)
* feat: Show order note as tooltip [#965](https://github.com/foodcoops/foodsoft/pull/965)
* feat: Add sd_notify [#961](https://github.com/foodcoops/foodsoft/pull/961)
* feat: Show instance name at login screen [#957](https://github.com/foodcoops/foodsoft/pull/957)
* feat: Enabled systemd socket activation [#942](https://github.com/foodcoops/foodsoft/pull/942)
* feat: Add table_print gem for debugging ActiveRecord queries in the console [#935](https://github.com/foodcoops/foodsoft/pull/935)
* feat: Add admin UI for SupplierCategories (supplier_categories) [#930](https://github.com/foodcoops/foodsoft/pull/930)

* fix: add null checks for articles convert_units [33034e6](https://github.com/foodcoops/foodsoft/commit/33034e66b88968dedc5289425e1eff847ee67e12)
* fix: downgrade haml to make deface work [#1003](https://github.com/foodcoops/foodsoft/pull/1003)
* fix: dutch translation errors [#954](https://github.com/foodcoops/foodsoft/pull/954)
* fix: Fixe filtering of active ordergroups [#934](https://github.com/foodcoops/foodsoft/pull/934)
* fix: Change password validation to allow longer passwords [#923](https://github.com/foodcoops/foodsoft/pull/923)
* fix: Invoice: change label "delivery" to "stock delivery" [#922](https://github.com/foodcoops/foodsoft/pull/922)
* fix: Allow decimal numbers in transaction collections [#921](https://github.com/foodcoops/foodsoft/pull/921)
* fix: Add validation of more article fields [#917](https://github.com/foodcoops/foodsoft/pull/917/files)
* fix: Add default time_zone [#912](https://github.com/foodcoops/foodsoft/pull/912)
* fix: Rename Piwik to Matomo [#911](https://github.com/foodcoops/foodsoft/pull/911/files)
* fix: Change instructions to rbenv [#910](https://github.com/foodcoops/foodsoft/pull/910/files)


# Foodsoft 4.7.1
(31 December 2020)

Expand Down Expand Up @@ -234,4 +289,4 @@ It's been a year since the previous release. Much has changed. Big changes have
When you upgrade, be sure to review `config/app_config.yml.SAMPLE`. When you're running multiple foodcoops from a single installation, check your rake invocations as the syntax is now: `rake multicoops:run TASK=db:migrate`.

# Foodsoft 3.1.1
(20 July 2012)
(20 July 2012)
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.6
FROM ruby:2.7.8

RUN supercronicUrl=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-amd64 && \
supercronicBin=/usr/local/bin/supercronic && \
Expand All @@ -22,6 +22,7 @@ RUN buildDeps='libmagic-dev' && \
apt-get update && \
apt-get install --no-install-recommends -y $buildDeps && \
echo 'gem: --no-document' >> ~/.gemrc && \
gem install bundler -v 2.4.22 && \
bundle config build.nokogiri "--use-system-libraries" && \
bundle install --deployment --without development test -j 4 && \
apt-get purge -y --auto-remove $buildDeps && \
Expand All @@ -34,23 +35,24 @@ RUN export DATABASE_URL=mysql2://localhost/temp?encoding=utf8 && \
export SECRET_KEY_BASE=thisisnotimportantnow && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y mariadb-server && \
/etc/init.d/mysql start && \
apt-get install -y mariadb-server nodejs && \
/etc/init.d/mariadb start && \
mariadb -e "CREATE DATABASE temp" && \
cp config/app_config.yml.SAMPLE config/app_config.yml && \
cp config/database.yml.MySQL_SAMPLE config/database.yml && \
cp config/storage.yml.SAMPLE config/storage.yml && \
bundle exec rake db:setup assets:precompile && \
rm -Rf tmp/* && \
/etc/init.d/mysql stop && \
/etc/init.d/mariadb stop && \
rm -Rf /run/mysqld /tmp/* /var/tmp/* /var/lib/mysql /var/log/mysql* && \
apt-get purge -y --auto-remove mariadb-server && \
rm -Rf /var/lib/apt/lists/* /var/cache/apt/*

# Make relevant dirs and files writable for app user
RUN mkdir -p tmp && \
RUN mkdir -p tmp storage && \
chown nobody config/app_config.yml && \
chown nobody tmp
chown nobody tmp && \
chown nobody storage

# Run app as unprivileged user
USER nobody
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.6
FROM ruby:2.7.8

# Install dependencies
RUN deps='libmagic-dev chromium nodejs' && \
Expand All @@ -19,6 +19,7 @@ ENV PORT=3000 \

WORKDIR /app

RUN gem install bundler -v 2.4.22
RUN bundle config build.nokogiri "--use-system-libraries"

EXPOSE 3000
Expand Down
106 changes: 58 additions & 48 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,91 +1,102 @@
# A sample Gemfile
source "https://rubygems.org"
source 'https://rubygems.org'

gem "rails", '~> 5.2'
gem 'rails', '~> 7.0.8'

gem 'sass-rails'
gem 'less-rails'
gem 'uglifier', '>= 1.0.3'
gem 'sassc-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby

gem 'jquery-rails'
gem 'select2-rails'
gem 'rails_tokeninput'
gem 'bootsnap', require: false
gem 'bootstrap-datepicker-rails'
gem 'date_time_attribute'
gem 'rails-assets-listjs', '0.2.0.beta.4' # remember to maintain list.*.js plugins and template engines on update
gem 'i18n-js', '~> 3.0.0.rc8'
gem 'jquery-rails'
gem 'rails-assets-listjs', '0.2.0.beta.4' # remember to maintain list.*.js plugins and template engines on update
gem 'rails-i18n'
gem 'bootsnap', require: false
gem 'rails_tokeninput'
gem 'select2-rails'

gem 'mysql2'
gem 'prawn'
gem 'prawn-table'
gem 'haml'
gem 'haml-rails'
gem 'kaminari'
gem 'simple_form'
gem 'inherited_resources'
gem 'localize_input', git: 'https://github.com/carchrae/localize_input.git'
gem 'active_model_serializers', '~> 0.10.0'
gem 'acts_as_tree'
gem 'attribute_normalizer'
gem 'daemons'
gem 'doorkeeper'
gem 'doorkeeper-i18n'
gem 'haml', '~> 5.0'
gem 'haml-rails'
gem 'ice_cube'
gem 'inherited_resources'
gem 'kaminari'
gem 'mysql2'
gem 'net-ftp'
gem 'net-http'
gem 'prawn'
gem 'prawn-table'
gem 'puma'
gem 'rack-cors', require: 'rack/cors'
gem 'active_model_serializers', '~> 0.10.0'
gem 'twitter-bootstrap-rails', '~> 2.2.8'
gem 'rails-settings-cached', '= 0.4.3' # caching breaks tests until Rails 5 https://github.com/huacnlee/rails-settings-cached/issues/73
gem 'ransack'
gem 'resque'
gem 'ruby-units'
gem 'simple_form'
gem 'simple-navigation', '~> 3.14.0' # 3.x for simple_navigation_bootstrap
gem 'simple-navigation-bootstrap'
gem 'sprockets', '< 4'
gem 'ransack'
gem 'acts_as_tree'
gem 'rails-settings-cached', '= 0.4.3' # caching breaks tests until Rails 5 https://github.com/huacnlee/rails-settings-cached/issues/73
gem 'resque'
gem 'puma'
gem 'twitter-bootstrap-rails', '~> 2.2.8'
gem 'uri', '= 0.10.0.2' # TODO: remove this when updated to ruby 3.x
gem 'whenever', require: false # For defining cronjobs, see config/schedule.rb
gem 'ruby-units'
gem 'attribute_normalizer'
gem 'ice_cube'
gem 'recurring_select'
gem 'roo'
gem 'roo-xls'
gem 'spreadsheet'
# At time of development 01-06-2022 mmddyyyy necessary fix for config_helper.rb form builder was not in rubygems so we pull from github, see: https://github.com/gregschmit/recurring_select/pull/152
gem 'exception_notification'
gem 'gaffe'
gem 'ruby-filemagic'
gem 'mime-types'
gem 'hashie', '~> 3.4.6', require: false # https://github.com/westfieldlabs/apivore/issues/114
gem 'image_processing', '~> 1.12'
gem 'importmap-rails', '~> 1.1'
gem 'midi-smtp-server'
gem 'mime-types'
gem 'recurring_select', git: 'https://github.com/gregschmit/recurring_select'
gem 'roo'
gem 'roo-xls'
gem 'rswag-api'
gem 'rswag-ui'
gem 'ruby-filemagic'
gem 'spreadsheet'
gem 'terser', '~> 1.1'

# we use the git version of acts_as_versioned, and need to include it in this Gemfile
gem 'acts_as_versioned', git: 'https://github.com/technoweenie/acts_as_versioned.git'
gem 'foodsoft_wiki', path: 'plugins/wiki'
gem 'foodsoft_messages', path: 'plugins/messages'
gem 'foodsoft_documents', path: 'plugins/documents'
gem 'foodsoft_discourse', path: 'plugins/discourse'
gem 'foodsoft_documents', path: 'plugins/documents'
gem 'foodsoft_links', path: 'plugins/links'
gem 'foodsoft_messages', path: 'plugins/messages'
gem 'foodsoft_polls', path: 'plugins/polls'
gem 'foodsoft_wiki', path: 'plugins/wiki'

# plugins not enabled by default
# gem 'foodsoft_current_orders', path: 'plugins/current_orders'
# gem 'foodsoft_printer', path: 'plugins/printer'
# gem 'foodsoft_uservoice', path: 'plugins/uservoice'

group :development do
gem 'sqlite3', '~> 1.3.6'
gem 'listen'
gem 'mailcatcher'
gem 'sqlite3', '~> 1.3.6'
gem 'web-console'
gem 'listen'
gem 'byebug'

Check failure on line 86 in Gemfile

View workflow job for this annotation

GitHub Actions / test

Bundler/OrderedGems: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem `byebug` should appear before `web-console`.

# Better error output
gem 'better_errors'
gem 'binding_of_caller'
# gem "rails-i18n-debug"
# chrome debugging extension https://github.com/dejan/rails_panel
gem 'meta_request'
# TODO: disabled due to https://github.com/rails/rails/issues/40781
# gem 'meta_request'

# Get infos when not using proper eager loading
gem 'bullet'
# Display Active Record queries as tables in the console
gem 'table_print'
end

group :development, :test do
Expand All @@ -100,21 +111,20 @@ group :development, :test do
end

group :test do
gem 'rspec-rails'
gem 'factory_bot_rails'
gem 'faker'
gem 'capybara'
gem 'apparition' # Capybara javascript driver
gem 'database_cleaner'
gem 'capybara'
gem 'connection_pool'
gem 'database_cleaner'
gem 'factory_bot_rails'
gem 'faker'
gem 'rspec-rails'
# need to include rspec components before i18n-spec or rake fails in test environment
gem 'i18n-spec'
gem 'rspec-core'
gem 'rspec-rerun'
gem 'i18n-spec'
# code coverage
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false
# api
gem 'apivore', require: false
gem 'hashie', '~> 3.4.6', require: false # https://github.com/westfieldlabs/apivore/issues/114
gem 'rswag-specs'
end
Loading

0 comments on commit 7ad947d

Please sign in to comment.