40 Commits

Author SHA1 Message Date
Maikel Linke
92382ca473 Remove outdated warning
We only create a user when seeding the database and we check that
there's no user already. We don't have a use case for adding an admin
user to a database with user data.

It also referred to a spree task that doesn't exist in our code base.
2026-01-13 11:02:49 +11:00
Maikel Linke
76a3e913df Remove unnecessary load 2026-01-13 11:00:02 +11:00
Maikel Linke
23ab6bb489 Create seed admin user without prompting for details
We don't really need it. In development, we use default values. And when
preparing a new server, we set env vars.

This fixes a broken dependency on HighLine. I found removal easier than
fixing something we don't use.
2026-01-13 10:59:31 +11:00
Maikel Linke
969dcae8d0 Remove unnecessary require statement 2026-01-07 14:08:10 +11:00
Filipe
32c4b4557b Merge pull request #13086 from rioug/fix-tax-rate-refund
Remove tax rate refund code path
2025-01-30 21:54:30 -06:00
Maikel Linke
1a393592b4 Reduce database writes seeding zones 2025-01-28 15:47:32 +11:00
Gaetan Craig-Riou
c4d74ac10d Apply Rubocop linting 2025-01-27 11:03:54 +11:00
Gaetan Craig-Riou
6ef73acfcd Fix seeding file for Spree::Zones 2025-01-27 11:03:48 +11:00
Maikel Linke
d49cea5e3d Use admin flag instead of user role 2025-01-22 14:59:49 +11:00
Maikel Linke
fcc31fffcd Fix user seeding 2025-01-21 11:21:08 +11:00
Maikel Linke
8c68179069 Style default user creation 2025-01-21 11:19:57 +11:00
Maikel Linke
042cc238c8 Modernise db default scripts 2025-01-21 11:17:31 +11:00
Maikel Linke
a7140d1f60 Use only admin role, on demand
We are now creating the role on demand which removes the need for
seeding it as well.
2024-12-19 09:02:04 +11:00
Maikel Linke
c8511ecd0d Remove superfluous line
The `<<` operation saves the association already.
2023-08-03 10:26:59 +10:00
Maikel Linke
6056c59301 Skip online domain validation of dev user email
We improved the email address validation to check the domain for
existing DNS entries. But our default user has the example.com domain
which is not resolved by my internet service provider.

I couldn't find a better way to deactivate this one check than
overriding the method in the validator. The code does not affect other
parts of the app unless you run multiple rake tasks in the same command
line with the database setup.
2023-08-03 10:22:00 +10:00
jibees
088ae496cc Merge pull request #7664 from shen-sat/7626-fix-unknown-currency-error
7626 fix unknown currency error
2021-05-28 16:18:04 +02:00
Shen Sat
cb914e4729 Change wording in create_admin_user to be more descriptive 2021-05-19 08:45:40 +01:00
Andy Brett
7df2915fbd add DefaultCountry service 2021-05-18 12:44:53 -07:00
Matt-Yorkley
58c0d90575 Fix error in countries.rb 2020-10-18 19:49:48 +01:00
Matt-Yorkley
3612386463 Make loading of Zones in db:seed idempotent (and avoid fatal errors if run twice) 2020-10-17 18:08:28 +01:00
Matt-Yorkley
e9e7bdc6cd Set Spree::Config[:default_country_id]` from ENV vars if default country specified. 2020-10-17 17:54:48 +01:00
Matt-Yorkley
d1c066d360 Move states.yml back to it's former filepath 2020-10-17 17:14:26 +01:00
Luis Ramos
74161267fd Prepare seed data for bye bye spree 2020-09-24 12:54:43 +01:00
Luis Ramos
19da0ba969 Merge branch 'master' into 3-0-stable-may13 2020-05-13 19:50:32 +01:00
Luis Ramos
92d0a5b735 Change default user from spree@example.com to ofn@example.com 2020-05-03 10:12:43 +01:00
Matt-Yorkley
53645517af Update deprecated #find_by_* methods 2020-02-22 11:06:51 +00:00
Matt-Yorkley
30558485de Update deprecated #find_or_create_by_* methods 2020-02-22 11:06:51 +00:00
Matt-Yorkley
9dd02044a5 Fix "can't modify frozen string" error in validation callbacks 2019-08-14 10:24:30 +01:00
Matt-Yorkley
d8a7190f43 Adjust user creation syntax
#skip_confirmation! can't be chained...
2019-08-14 09:22:11 +01:00
Matt-Yorkley
8c95399292 Don't prompt if admin user already exists 2019-08-13 21:02:12 +01:00
Matt-Yorkley
14c1abb861 Skip confirmation email on initial admin user creation 2019-08-13 21:00:30 +01:00
Maikel Linke
cbaedcec92 Fix seeding of default user without asking 2019-08-13 09:47:54 +10:00
Maikel Linke
e4ba515109 Seed admin user without asking by default 2019-08-09 14:16:01 +10:00
Maikel Linke
af1f6f6c6d Skip confirmation when creating first admin user 2019-08-09 14:16:01 +10:00
luisramos0
6d7c41c04b Bring db/default/users from spree_auth_devise, this is necessary to create the first user in the DB 2019-07-20 20:48:49 +01:00
Pau Perez
5eb3dc4beb Bring states.yml from l10n_au
The states.yml present in this repo had a different format which doesn't
work with the current seeds.rb that we brought from ofn-install.
2018-03-07 10:30:12 +01:00
Rohan Mitchell
8d0f192ca7 Update states to match 2013-10-30 10:42:23 +11:00
Rohan Mitchell
6161114750 Standardise on Australia having ID 12, as staging and prod servers do 2013-10-30 10:34:29 +11:00
Rohan Mitchell
bf02dd0caa Set countries and states in test to mirror id configuration provided by seed 2013-10-11 15:11:50 +11:00
Andrew Spinks
1288760839 Added first working acceptance spec for supplier. 2012-06-09 14:41:09 +10:00