mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
Merge branch 'dev' for release 4.5.1
This commit is contained in:
commit
6444c91c48
@ -1,5 +1,11 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
## v4.5.1 2020 July 1st
|
||||
|
||||
- Ability to run the upgrade without interactions
|
||||
- Fix a bug: Unable to access the invoices section if no stripe key was set or incorrect
|
||||
- Fix a bug: task env_to_db overrides the values set in the UI, even if the corresponding variable was not defined in the env file
|
||||
|
||||
## v4.5.0 2020 June 30
|
||||
|
||||
- Search in the projets directly from PostgreSQL
|
||||
@ -22,6 +28,7 @@
|
||||
- Fix a security issue: updated rack to 2.2.3 to fix [CVE-2020-8184](https://nvd.nist.gov/vuln/detail/CVE-2020-8184)
|
||||
- [TODO DEPLOY] add the `POSTGRESQL_LANGUAGE_ANALYZER` environment variable (see [doc/environment.md](doc/environment.md#POSTGRESQL_LANGUAGE_ANALYZER) for configuration details)
|
||||
- [TODO DEPLOY] `rails fablab:setup:env_to_db`
|
||||
- [TODO DEPLOY] `rails db:seed`
|
||||
- [TODO DEPLOY] `\curl -sSL https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/redis-upgrade.sh | bash`
|
||||
- [TODO DEPLOY] -> (only dev) upgrade redis to v6, you may be able to use the script above, depending on your installation
|
||||
|
||||
|
@ -60,10 +60,12 @@ class API::PaymentsController < API::ApiController
|
||||
authorize :payment
|
||||
|
||||
key = Setting.get('stripe_secret_key')
|
||||
render json: { status: false } and return unless key
|
||||
render json: { status: false } and return unless key&.present?
|
||||
|
||||
charges = Stripe::Charge.list({ limit: 1 }, { api_key: key })
|
||||
render json: { status: charges.data.length.positive? }
|
||||
rescue Stripe::AuthenticationError
|
||||
render json: { status: false }
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -106,19 +106,19 @@ namespace :fablab do
|
||||
include ApplicationHelper
|
||||
|
||||
mapping = [
|
||||
%w[_ PHONE_REQUIRED phone_required true],
|
||||
%w[_ PHONE_REQUIRED phone_required],
|
||||
%w[_ GA_ID tracking_id],
|
||||
%w[_ BOOK_SLOT_AT_SAME_TIME book_overlapping_slots true],
|
||||
%w[_ SLOT_DURATION slot_duration 60],
|
||||
%w[_ EVENTS_IN_CALENDAR events_in_calendar false],
|
||||
%w[! FABLAB_WITHOUT_SPACES spaces_module true],
|
||||
%w[! FABLAB_WITHOUT_PLANS plans_module false],
|
||||
%w[! FABLAB_WITHOUT_INVOICES invoicing_module false],
|
||||
%w[_ BOOK_SLOT_AT_SAME_TIME book_overlapping_slots],
|
||||
%w[_ SLOT_DURATION slot_duration],
|
||||
%w[_ EVENTS_IN_CALENDAR events_in_calendar],
|
||||
%w[! FABLAB_WITHOUT_SPACES spaces_module],
|
||||
%w[! FABLAB_WITHOUT_PLANS plans_module],
|
||||
%w[! FABLAB_WITHOUT_INVOICES invoicing_module],
|
||||
%w[_ FACEBOOK_APP_ID facebook_app_id],
|
||||
%w[_ TWITTER_NAME twitter_analytics],
|
||||
%w[_ RECAPTCHA_SITE_KEY recaptcha_site_key],
|
||||
%w[_ RECAPTCHA_SECRET_KEY recaptcha_secret_key],
|
||||
%w[_ FEATURE_TOUR_DISPLAY feature_tour_display once],
|
||||
%w[_ FEATURE_TOUR_DISPLAY feature_tour_display],
|
||||
%w[_ DEFAULT_MAIL_FROM email_from],
|
||||
%w[_ DISQUS_SHORTNAME disqus_shortname],
|
||||
%w[_ ALLOWED_EXTENSIONS allowed_cad_extensions],
|
||||
@ -126,14 +126,14 @@ namespace :fablab do
|
||||
%w[_ OPENLAB_APP_ID openlab_app_id],
|
||||
%w[_ OPENLAB_APP_SECRET openlab_app_secret],
|
||||
%w[_ OPENLAB_DEFAULT openlab_default],
|
||||
%w[! FABLAB_WITHOUT_ONLINE_PAYMENT online_payment_module false],
|
||||
%w[! FABLAB_WITHOUT_ONLINE_PAYMENT online_payment_module],
|
||||
%w[_ STRIPE_PUBLISHABLE_KEY stripe_public_key],
|
||||
%w[_ STRIPE_API_KEY stripe_secret_key],
|
||||
%w[_ STRIPE_CURRENCY stripe_currency],
|
||||
%w[_ INVOICE_PREFIX invoice_prefix FabManager_invoice],
|
||||
%w[_ USER_CONFIRMATION_NEEDED_TO_SIGN_IN confirmation_required false],
|
||||
%w[! FABLAB_WITHOUT_WALLET wallet_module false],
|
||||
%w[! FABLAB_WITHOUT_STATISTICS statistics_module false]
|
||||
%w[_ USER_CONFIRMATION_NEEDED_TO_SIGN_IN confirmation_required],
|
||||
%w[! FABLAB_WITHOUT_WALLET wallet_module],
|
||||
%w[! FABLAB_WITHOUT_STATISTICS statistics_module]
|
||||
]
|
||||
|
||||
mapping.each do |m|
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fab-manager",
|
||||
"version": "4.5.0",
|
||||
"version": "4.5.1",
|
||||
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
|
||||
"keywords": [
|
||||
"fablab",
|
||||
|
@ -1,11 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
parseparams()
|
||||
{
|
||||
while getopts "hy" opt; do
|
||||
case "${opt}" in
|
||||
y)
|
||||
Y=true
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
}
|
||||
|
||||
config()
|
||||
{
|
||||
YES_ALL=${Y:-false}
|
||||
if [ "$(whoami)" = "root" ]
|
||||
then
|
||||
echo "It is not recommended to run this script as root. As a normal user, elevation will be prompted if needed."
|
||||
read -rp "Continue anyway? (Y/n) " confirm </dev/tty
|
||||
[[ "$YES_ALL" = "true" ]] && confirm="y" || read -rp "Continue anyway? (Y/n) " confirm </dev/tty
|
||||
if [[ "$confirm" = "n" ]]; then exit 1; fi
|
||||
else
|
||||
if ! groups | grep docker; then
|
||||
@ -17,7 +33,7 @@ config()
|
||||
fi
|
||||
FM_PATH=$(pwd)
|
||||
TYPE="NOT-FOUND"
|
||||
read -rp "Is Fab-manager installed at \"$FM_PATH\"? (y/N) " confirm </dev/tty
|
||||
[[ "$YES_ALL" = "true" ]] && confirm="y" || read -rp "Is Fab-manager installed at \"$FM_PATH\"? (y/N) " confirm </dev/tty
|
||||
if [ "$confirm" = "y" ]; then
|
||||
test_docker_compose
|
||||
if [[ "$TYPE" = "NOT-FOUND" ]]
|
||||
@ -65,6 +81,15 @@ docker_up()
|
||||
docker-compose up -d
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
printf "Usage: %s [OPTIONS]
|
||||
Options:
|
||||
-h Print this message and quit
|
||||
-y Answer yes to all questions\n" "$(basename "$0")" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
function trap_ctrlc()
|
||||
{
|
||||
echo "Ctrl^C, exiting..."
|
||||
@ -73,8 +98,9 @@ function trap_ctrlc()
|
||||
|
||||
upgrade_redis()
|
||||
{
|
||||
parseparams "$@"
|
||||
config
|
||||
read -rp "Continue with upgrading? (y/N) " confirm </dev/tty
|
||||
[[ "$YES_ALL" = "true" ]] && confirm="y" || read -rp "Continue with upgrading? (y/N) " confirm </dev/tty
|
||||
if [[ "$confirm" = "y" ]]; then
|
||||
trap "trap_ctrlc" 2 # SIGINT
|
||||
docker_down
|
||||
|
@ -76,7 +76,11 @@ upgrade()
|
||||
exit 1
|
||||
fi
|
||||
for SCRIPT in "${SCRIPTS[@]}"; do
|
||||
\curl -sSL "https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/$SCRIPT.sh" | bash
|
||||
if [[ "$YES_ALL" = "true" ]]; then
|
||||
\curl -sSL "https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/$SCRIPT.sh" | bash -s -- -y
|
||||
else
|
||||
\curl -sSL "https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/$SCRIPT.sh" | bash
|
||||
fi
|
||||
done
|
||||
docker-compose down
|
||||
docker-compose run --rm "$SERVICE" bundle exec rake db:migrate
|
||||
|
Loading…
x
Reference in New Issue
Block a user