Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
143 changes: 143 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
version: 2.1

defaults: &defaults
environment: &environment
CIRCLE_TEST_REPORTS: /tmp/test-results
CIRCLE_ARTIFACTS: /tmp/test-artifacts
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_PATH: ~/spree/vendor/bundle
working_directory: ~/spree
docker:
- image: &ruby_image cimg/ruby:3.4-browsers

run_tests: &run_tests
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- spree-bundle-{{ .Branch }}
- run:
name: Add keyserver
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
- run:
name: Install libvips
command: sudo apt-get update && sudo apt-get install libvips
- run:
name: Set bundle path
command: bundle config --local path vendor/bundle
- run:
name: Ensure bundle Install
command: |
bundle check || bundle install
- run:
name: Create test app
command: |
bundle exec rake test_app
- run:
name: Run Rspec
command: |
TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
bundle exec rspec --format documentation \
--format RspecJunitFormatter \
-o ~/rspec/rspec.xml \
-- ${TESTFILES}
- store_test_results:
path: ~/rspec
- store_artifacts:
path: tmp/capybara

jobs:
bundle:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- spree-bundle-{{ .Branch }}
- run:
name: Add keyserver
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
- run:
name: Install libvips
command: sudo apt-get update && sudo apt-get install libvips
- run:
name: Set bundle path
command: bundle config --local path vendor/bundle
- run:
name: Bundle Install
command: |
bundle check || bundle install
- save_cache:
paths:
- vendor/bundle
key: spree-bundle-{{ .Branch }}

tests_postgres: &tests_postgres
<<: *run_tests
environment: &postgres_environment
<<: *environment
DB: postgres
DB_HOST: localhost
DB_USERNAME: postgres
docker:
- image: *ruby_image
- image: &postgres_image cimg/postgres:16.2
environment:
POSTGRES_USER: postgres

tests_mysql: &tests_mysql
<<: *run_tests
environment: &mysql_environment
<<: *environment
DB: mysql
DB_HOST: 127.0.0.1
DB_USERNAME: root
COVERAGE: true
COVERAGE_DIR: /tmp/workspace/simplecov
docker:
- image: *ruby_image
- image: &mysql_image cimg/mysql:8.0

brakeman:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- spree-bundle-{{ .Branch }}
- run:
name: Set bundle path
command: bundle config --local path vendor/bundle
- run:
name: Ensure bundle Install
command: |
bundle check || bundle install
- run:
name: Brakeman
command: bundle exec brakeman --exit-on-warn --exit-on-error -o brakeman.json -o brakeman.html
- run:
name: Move brakeman reports to artifacts directory
command: |
mkdir -p /tmp/test-artifacts/
mv brakeman.json /tmp/test-artifacts/
mv brakeman.html /tmp/test-artifacts/
- store_artifacts:
path: /tmp/test-artifacts
destination: brakeman-reports

workflows:
version: 2
main:
jobs:
- bundle
- tests_postgres:
requires:
- bundle
- tests_mysql:
requires:
- bundle
- brakeman:
requires:
- bundle
3 changes: 3 additions & 0 deletions .gem_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bump:
file: "lib/spree_multi_vendor/version.rb"

11 changes: 11 additions & 0 deletions .github/.dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "bundler" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
7 changes: 0 additions & 7 deletions .github/dependabot.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
.idea
.localeapp/locales
.project
.vscode
coverage
default
Gemfile.lock
tmp
nbproject
Expand All @@ -17,5 +19,6 @@ spec/dummy
public/spree
.ruby-version
.ruby-gemset
gemfiles/*.gemfile.lock
*.gem
*.gem
*/*.gem
.rspec_status
24 changes: 24 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins:
- rubocop-rails

AllCops:
DisplayCopNames: true
TargetRubyVersion: 3.3
Include:
- '**/Gemfile'
- '**/Rakefile'
- '**/Appraisals'
Exclude:
- 'spec/dummy/**/*'
- 'lib/generators/**/*'

Layout/LineLength:
Max: 150

# DISABLED

Style/Documentation:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

23 changes: 18 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
source 'https://rubygems.org'

gem 'spree', github: 'spree/spree', branch: 'main'
gem 'spree_backend', github: 'spree/spree_backend', branch: 'main'
gem 'spree_frontend', github: 'spree/spree_legacy_frontend', branch: 'main'
gem 'spree_emails', github: 'spree/spree', branch: 'main'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: 'main'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
"https://github.com/#{repo_name}.git"
end

gem 'rails-controller-testing'

spree_opts = { github: 'spree/spree', branch: 'main' }
gem 'spree', spree_opts
gem 'spree_emails', spree_opts
gem 'spree_admin', spree_opts
gem 'spree_storefront', spree_opts

gem 'mysql2' if ENV['DB'] == 'mysql' || ENV['CI']
gem 'pg' if ENV['DB'] == 'postgres' || ENV['CI']

gem 'sqlite3', '>= 2.0'

gemspec

gem "sprockets-rails", "~> 3.5"
26 changes: 0 additions & 26 deletions LICENSE

This file was deleted.

14 changes: 14 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# LICENSE

Copyright (c) 2025 Vendo Connect Inc., Vendo Sp. z o.o.
All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see [https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).
64 changes: 49 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,59 @@
# Spree Commerce Multi Vendor Marketplace Open Source
# Spree Multi vendor

This is a Spree Commerce open-source [multi vendor marketplace](https://spreecommerce.org/marketplace-ecommerce/) extension. It's a great starting point if you're building a marketplace on top of [Spree](https://spreecommerce.org). Our goal was flexibility to allow you to tweak it to your needs.
This is a Multi vendor extension for [Spree Commerce](https://spreecommerce.org), an open source e-commerce platform built with Ruby on Rails.

## Installation

Please [follow our Multi-Vendor quickstart guide](https://spreecommerce.org/docs/developer/multi-vendor/quickstart).
1. Add this extension to your Gemfile with this line:

## Community Edition vs Enterprise Edition
```ruby
bundle add spree_multi_vendor
```

If you need a product that has all of the marketplace features out of the box, such as supplier onboarding, Stripe Connect payment splitting and payouts, and doesn't require much custom development, we recommend using [Spree Enterprise Edition](https://spreecommerce.org/pricing/).
2. Run the install generator

### [Multi-vendor Marketplace](https://spreecommerce.org/marketplace-ecommerce/) Enterprise Edition
Run your own marketplace with multiple suppliers, each with a dedicated supplier dashboard
- [Marketplace eCommerce Capabilities](https://spreecommerce.org/docs/use-case/marketplace/capabilities)
- [Marketplace eCommerce Admin Panel](https://spreecommerce.org/docs/use-case/marketplace/admin-dashboard)
- [Marketplace eCommerce Vendor Panel](https://spreecommerce.org/docs/use-case/marketplace/vendor-dashboard)
- [Marketplace eCommerce Customer Experience](https://spreecommerce.org/docs/use-case/marketplace/customer-ux)
```ruby
bundle exec rails g spree_multi_vendor:install
```

## License
3. Restart your server

Spree Multi-Vendor extension is free software, and may be redistributed under the terms specified in the
[LICENCE](LICENSE) file.
If your server was running, restart it so that it can find the assets properly.

[LICENSE]: https://github.com/spree-contrib/spree_multi_vendor/blob/main/LICENSE
## Developing

1. Create a dummy app

```bash
bundle update
bundle exec rake test_app
```

2. Add your new code
3. Run tests

```bash
bundle exec rspec
```

When testing your applications integration with this extension you may use it's factories.
Simply add this require statement to your spec_helper:

```ruby
require 'spree_multi_vendor/factories'
```

## Releasing a new version

```shell
bundle exec gem bump -p -t
bundle exec gem release
```

For more options please see [gem-release README](https://github.com/svenfuchs/gem-release)

## Contributing

If you'd like to contribute, please take a look at the
[instructions](CONTRIBUTING.md) for installing dependencies and crafting a good
pull request.
Loading