Skip to content

Commit b6fbbe7

Browse files
authored
Merge pull request #6468 from SuperGoodSoft/all-together-now
Merge solidus_starter_frontend in as "storefront"
2 parents ce4295d + a355f7f commit b6fbbe7

294 files changed

Lines changed: 23837 additions & 21 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/prepare_post_release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ jobs:
4444
run: |
4545
bin/release/bump-docker-image-version \
4646
${{ steps.pipeline_context.outputs.next_candidate_dev_version }}
47-
- name: "Bump installer starter frontend version"
48-
if: github.ref_name == 'main'
49-
run: |
50-
bin/release/bump-starter-frontend-version \
51-
main
5247
- name: "Publish release draft & tag last commit"
5348
run: |
5449
bin/release/publish-release \

.github/workflows/prepare_release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ jobs:
2929
- name: "Bump docker image version"
3030
if: github.ref_name == 'main'
3131
run: bin/release/bump-docker-image-version ${{ steps.pipeline_context.outputs.candidate_version }}
32-
- name: "Bump installer starter frontend version"
33-
if: github.ref_name == 'main'
34-
run: bin/release/bump-starter-frontend-version ${{ steps.pipeline_context.outputs.candidate_patch_branch }}
3532
- name: "Update Changelog"
3633
run: bin/release/update-changelog ${{ steps.pipeline_context.outputs.candidate_tag }}
3734
- name: "Compute labels for the PR"

.github/workflows/solidus_installer.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
env:
2020
DB: sqlite
2121
RUBY_VERSION: "3.2"
22+
SOLIDUS_STOREFRONT_TEMPLATE: ${{ github.workspace }}/storefront/template.rb
23+
COVERAGE: true
24+
COVERAGE_DIR: ${{ github.workspace }}/storefront/coverage
2225
steps:
2326
- uses: actions/checkout@v6
2427
- name: Install libvips
@@ -37,3 +40,23 @@ jobs:
3740
run: |
3841
cd $RUNNER_TEMP/my_app
3942
bundle list | grep 'solidus_paypal_commerce_platform (1.'
43+
- name: Setup code coverage
44+
# SimpleCov must start before the app is loaded (Ruby's Coverage only
45+
# tracks files required after Coverage.start), so we load it from the top
46+
# of the generated spec_helper.rb rather than from spec/support, which is
47+
# required after rails_helper has already (eager-)loaded the app.
48+
run: |
49+
cd $RUNNER_TEMP/my_app
50+
cp $GITHUB_WORKSPACE/storefront/lib/testing_support/coverage.rb spec/simplecov_setup.rb
51+
printf 'require_relative "simplecov_setup"\n%s\n' "$(cat spec/spec_helper.rb)" > spec/spec_helper.rb
52+
- name: Run starter frontend specs
53+
run: |
54+
cd $RUNNER_TEMP/my_app
55+
bundle exec rspec spec
56+
- name: Upload coverage report to Codecov
57+
uses: codecov/codecov-action@v5
58+
with:
59+
token: ${{ secrets.CODECOV_TOKEN }}
60+
slug: solidusio/solidus
61+
disable_search: true
62+
files: ${{ env.COVERAGE_DIR }}/coverage.xml

.standard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ format: progress
33
ruby_version: 3.1
44
ignore:
55
- "*/spec/dummy/**/*"
6-
- "sandbox/**/*"
6+
- "**/sandbox/**/*"

bin/release/bump-starter-frontend-version

Lines changed: 0 additions & 11 deletions
This file was deleted.

bin/sandbox

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ unbundled bin/rails db:drop db:create
107107

108108
echo "~~~> Running the solidus:install generator"
109109
export SOLIDUS_ADMIN_LOOKBOOK=true
110+
export SOLIDUS_STOREFRONT_TEMPLATE="$PWD/../storefront/template.rb"
110111
unbundled bin/rails generate solidus:install --admin-preview --auto-accept $@
111112

112113
echo "
Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
apply "https://github.com/solidusio/solidus_starter_frontend/raw/main/template.rb"
1+
# frozen_string_literal: true
2+
3+
template =
4+
ENV["SOLIDUS_STOREFRONT_TEMPLATE"] ||
5+
begin
6+
version = Spree.solidus_version if defined?(Spree) && Spree.respond_to?(:solidus_version)
7+
gem_version = version ? Gem::Version.new(version) : nil
8+
9+
ref =
10+
if gem_version && !gem_version.prerelease?
11+
"v#{gem_version.segments[0, 2].join(".")}"
12+
else
13+
"main"
14+
end
15+
16+
"https://github.com/solidusio/solidus/raw/#{ref}/storefront/template.rb"
17+
end
18+
19+
apply template

storefront/.dockerdev/.psqlrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
\set HISTFILE ~/history/psql_history

storefront/.dockerdev/Dockerfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
ARG RUBY_VERSION
2+
FROM ruby:$RUBY_VERSION-slim-buster
3+
4+
ARG PG_VERSION
5+
ARG MYSQL_VERSION
6+
ARG NODE_VERSION
7+
ARG BUNDLER_VERSION
8+
9+
RUN apt-get update -qq \
10+
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
11+
build-essential \
12+
gnupg2 \
13+
curl \
14+
git \
15+
imagemagick \
16+
libmariadb-dev \
17+
sqlite3 \
18+
libsqlite3-dev \
19+
chromium \
20+
libvips \
21+
chromium-driver \
22+
&& rm -rf /var/cache/apt/lists/*
23+
24+
RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
25+
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' $PG_VERSION > /etc/apt/sources.list.d/pgdg.list
26+
27+
RUN curl -sSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -
28+
29+
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade && \
30+
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
31+
libpq-dev \
32+
postgresql-client-$PG_VERSION \
33+
default-mysql-client \
34+
nodejs \
35+
&& rm -rf /var/lib/apt/lists/*
36+
37+
ENV APP_USER=solidus_storefront_user \
38+
LANG=C.UTF-8 \
39+
BUNDLE_JOBS=4 \
40+
BUNDLE_RETRY=3
41+
ENV GEM_HOME=/home/$APP_USER/gems
42+
ENV APP_HOME=/home/$APP_USER/app
43+
ENV PATH=$PATH:$GEM_HOME/bin
44+
45+
RUN useradd -ms /bin/bash $APP_USER
46+
47+
RUN gem update --system \
48+
&& gem install bundler:$BUNDLER_VERSION \
49+
&& chown -R $APP_USER:$(id -g $APP_USER) /home/$APP_USER/gems
50+
51+
USER $APP_USER
52+
53+
RUN mkdir -p /home/$APP_USER/history
54+
55+
WORKDIR /home/$APP_USER/app

storefront/.erb-lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
linters:
2+
Rubocop:
3+
enabled: true
4+
rubocop_config:
5+
inherit_from:
6+
- .rubocop.yml
7+
Layout/InitialIndentation:
8+
Enabled: false
9+
Layout/TrailingBlankLines:
10+
Enabled: false
11+
Layout/TrailingWhitespace:
12+
Enabled: false
13+
Naming/FileName:
14+
Enabled: false
15+
Style/FrozenStringLiteralComment:
16+
Enabled: false
17+
Metrics/LineLength:
18+
Enabled: false
19+
Lint/UselessAssignment:
20+
Enabled: false
21+
Rails/OutputSafety:
22+
Enabled: false

0 commit comments

Comments
 (0)