From 6a8ee544e8aaabf332585409c76ba9ca15fa6120 Mon Sep 17 00:00:00 2001 From: Shen Sat Date: Wed, 19 May 2021 08:44:10 +0100 Subject: [PATCH 1/3] Change readme to strong encourage running setup script --- GETTING_STARTED.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index b68dbcae57..91d11ea413 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -47,7 +47,11 @@ $ sudo -u postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f0 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. -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. +Next, it is _strongly recommended_ to run the setup script. +```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. Now, your dreams of spinning up a development server can be realised: From ab027d6af647b2ee6f7e800c37f4a40b57ddf9ff Mon Sep 17 00:00:00 2001 From: Shen Sat Date: Wed, 19 May 2021 08:44:55 +0100 Subject: [PATCH 2/3] Change money initializer to use ENV vars instead of Spree::Config --- config/initializers/money.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/money.rb b/config/initializers/money.rb index 1dea6e473b..e681ed185c 100644 --- a/config/initializers/money.rb +++ b/config/initializers/money.rb @@ -1,2 +1,2 @@ Money.rounding_mode = BigDecimal::ROUND_HALF_EVEN -Money.default_currency = Money::Currency.new(Spree::Config[:currency]) +Money.default_currency = Money::Currency.new(ENV.fetch('CURRENCY')) From cb914e4729f75ef180781678341e4dba6a7189fc Mon Sep 17 00:00:00 2001 From: Shen Sat Date: Wed, 19 May 2021 08:45:40 +0100 Subject: [PATCH 3/3] Change wording in create_admin_user to be more descriptive --- db/default/users.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/default/users.rb b/db/default/users.rb index cc30bb5076..192fee97f2 100644 --- a/db/default/users.rb +++ b/db/default/users.rb @@ -62,7 +62,7 @@ def create_admin_user role = Spree::Role.find_or_create_by(name: 'admin') admin.spree_roles << role admin.save - say "Done!" + say "New admin user persisted!" else say "There was some problems with persisting new admin user:" admin.errors.full_messages.each do |error|