CartItem model tests
ShippingAddress model tests
Product model tests
Tienda hacktivista.com is built with LeanWeb.
mariadb-server ruby-full gcc libc6-dev libmariadb-dev
.RACK_ENV
: development
or anything else, which means production.ENVIAME_QUOTE_API_KEY
: Enviame.io Quote API key.HAWESE_ENDPOINT
: Hawese-payment endpoint.HACKTIVISTA_COM_PAYMENT_AUTH_TOKEN
: Payment token used for connection with Hawese.HACKTIVISTA_COM_ENDPOINT
: This instance's URL, used for Hawese return url and emails.HACKTIVISTA_COM_DATABASE_URL
: MariaDB/MySQL database according to the Sequel docs format, using the mysql2
driver.HACKTIVISTA_COM_NOTIFICATION_EMAILS
: Comma-separated emails to which send subscription and purchase notifications.SMTP_HOST
: SMTP host to connect.SMTP_FROM
: In the format Name <user@mail>
or user@mail
.SMTP_SECURITY
: tls
or starttls
, otherwise no encryption, optional.SMTP_PORT
: SMTP port, optional (default: 25).SMTP_USER
: SMTP user, optional.SMTP_PASSWORD
: SMTP password, optional.bundle exec rake migrate && bundle exec rake update_stock
.development
environment, build static pages with bundle exec rake build_static
.bundle exec rake serve
.public/
.Or, you can simply download setup.sh on a Debian 11 machine and setup hacktivista.com according to the instructions on that same file.
Please note that you will need to configure Hawese properly in order to accept this origin and be able to receive instant payment notifications.
vendor/hawese-payment/config/payment.php
to config/payment.php
.origins
array.$app->configure('payment');
under custom configuration on bootstrap/app.php
PAYMENT_HACKTIVISTA_COM_AUTH_TOKEN
env var on Hawese to the same value than HACKTIVISTA_COM_PAYMENT_AUTH_TOKEN
on Tienda hacktivista.com.* Proper config, change urls if needed:
'hacktivista_com' => [
'return_url' => env('PAYMENT_HACKTIVISTA_COM_ENDPOINT') . '/checkout',
'notify' => [
'status' => ['completed', 'aborted'],
'uri' => env('PAYMENT_HACKTIVISTA_COM_ENDPOINT') . '/verify-payment',
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' .
env('PAYMENT_HACKTIVISTA_COM_AUTH_TOKEN'),
],
'method' => 'POST',
'params' => [
'status' => 'payment.status',
'uuid' => 'payment.uuid'
],
],
],
Setup a HACKTIVISTA_COM_DATABASE_URL
env var on a file named .env.testing
according to Sequel docs, using the mysql2 driver.
Add the RACK_ENV=testing
env var to that same file.
Run specs with the command bundle exec rake spec
.
bundle exec rake migrate[0] && bundle exec rake migrate
(probably you'll want to bundle exec rake update_stock
too)
If you profit out of this software or in base to its derivation, please remember to give back.
In order to increase awareness and create a saner socioeconomic system for libre software I'm providing "reciprocity certificates" that will allow your clients and friends to know that you are contributing back instead of just free riding. To support our work and receive your certificate go to https://hacktivista.org/reciprocity.
Tienda Hacktivista.com is libre software released under the Hacktivista General Public License 0.1 or any later version. Which means that it works exactly like the GNU AGPL license but every copy counts as a distribution, even for "internal use".
This license by no means prohibits the private usage of covered works. Private usage and modification is always allowed but never enforced. Thus, this license holds a stronger, purely libre copyleft stance.
To comply with the terms of the license, if you modify this software you must prominently provide the means to access the source code of your version of the software easily and free of charge to anyone who has access to it, including users accessing it through a network (i.e., web browser).
Any modification or inclusion of this source code will inherit the same license, that is, it cannot be sublicensed.
At this time I don't recommend the use of this license for non-derivative works, since it's a work in progress expecting changes and validation by competent lawyers. On derivative works please remember to license it under current version "or any later version", so you can be sure your code is covered by the legally safest version.