- Run rails new
rails new [name] --api -T
- Copy your Gemfile
- Copy your .gitignore
- Copy your .rubocop.yml
- Install Rspec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docker image to Docker Hub | |
on: | |
pull_request: {} | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN}} | |
DOCKER_HUB_REGISTRY: fernandollisboa/checkout-captacao | |
DOCKER_IMAGE: checkout-captacao |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:1 | |
FROM ruby:3.3.0 | |
# Install nodejs | |
ENV NODE_VERSION 18.19.0 | |
RUN ARCH=$(uname -m) \ | |
&& if [ "$ARCH" = "aarch64" ]; then \ | |
NODE_PACKAGE_URL="https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-arm64.tar.xz"; \ | |
else \ | |
NODE_PACKAGE_URL="https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"; \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "or_wZm04dxFkFL4nz6v", | |
"code": "EWPOIXI493", | |
"amount": 500000, | |
"currency": "BRL", | |
"closed": true, | |
"items": [ | |
{ | |
"id": "oi_KeGjYRrCQCPY4bJZ", | |
"type": "product", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('catalog promotions', () => { | |
beforeEach(() => { | |
const credentials = ['sylius', 'sylius']; | |
cy.login(...credentials); | |
cy.clickInFirst('a[href="/admin/catalog-promotions/"]'); | |
}); | |
// Remove .only and implement others test cases! | |
it('shows of especify catalog promotion exposes the correct product and discount', () => { | |
// Select inactive promotions in search tab | |
cy.get('[id="criteria_state"]').select('Inactive'); |