Skip to content

Commit 9d2e3ec

Browse files
committed
Run spree install generator
Add the result of running: bundle exec rails g spree:install
1 parent 18c0d8c commit 9d2e3ec

File tree

218 files changed

+3221
-0
lines changed

Some content is hidden

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

218 files changed

+3221
-0
lines changed

config/application.rb

+17
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@
1919

2020
module CypressStore
2121
class Application < Rails::Application
22+
# Load application's model / class decorators
23+
initializer 'spree.decorators' do |app|
24+
config.to_prepare do
25+
Dir.glob(Rails.root.join('app/**/*_decorator*.rb')) do |path|
26+
require_dependency(path)
27+
end
28+
end
29+
end
30+
31+
# Load application's view overrides
32+
initializer 'spree.overrides' do |app|
33+
config.to_prepare do
34+
Dir.glob(Rails.root.join('app/overrides/*.rb')) do |path|
35+
require_dependency(path)
36+
end
37+
end
38+
end
2239
# Initialize configuration defaults for originally generated Rails version.
2340
config.load_defaults 5.2
2441

config/initializers/spree.rb

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Configure Solidus Preferences
2+
# See http://docs.solidus.io/Spree/AppConfiguration.html for details
3+
4+
Spree.config do |config|
5+
# Core:
6+
7+
# Default currency for new sites
8+
config.currency = "USD"
9+
10+
# from address for transactional emails
11+
config.mails_from = "[email protected]"
12+
13+
# Uncomment to stop tracking inventory levels in the application
14+
# config.track_inventory_levels = false
15+
16+
# When set, product caches are only invalidated when they fall below or rise
17+
# above the inventory_cache_threshold that is set. Default is to invalidate cache on
18+
# any inventory changes.
19+
# config.inventory_cache_threshold = 3
20+
21+
# Enable Paperclip adapter for attachments on images and taxons
22+
config.image_attachment_module = 'Spree::Image::PaperclipAttachment'
23+
config.taxon_attachment_module = 'Spree::Taxon::PaperclipAttachment'
24+
25+
26+
# Permission Sets:
27+
28+
# Uncomment and customize the following line to add custom permission sets
29+
# to a custom users role:
30+
# config.roles.assign_permissions :role_name, ['Spree::PermissionSets::CustomPermissionSet']
31+
32+
33+
# Frontend:
34+
35+
# Custom logo for the frontend
36+
# config.logo = "logo/solidus.svg"
37+
38+
# Template to use when rendering layout
39+
# config.layout = "spree/layouts/spree_application"
40+
41+
42+
# Admin:
43+
44+
# Custom logo for the admin
45+
# config.admin_interface_logo = "logo/solidus.svg"
46+
47+
# Gateway credentials can be configured statically here and referenced from
48+
# the admin. They can also be fully configured from the admin.
49+
#
50+
# Please note that you need to use the solidus_stripe gem to have
51+
# Stripe working: https://github.com/solidusio-contrib/solidus_stripe
52+
#
53+
# config.static_model_preferences.add(
54+
# Spree::PaymentMethod::StripeCreditCard,
55+
# 'stripe_env_credentials',
56+
# secret_key: ENV['STRIPE_SECRET_KEY'],
57+
# publishable_key: ENV['STRIPE_PUBLISHABLE_KEY'],
58+
# server: Rails.env.production? ? 'production' : 'test',
59+
# test_mode: !Rails.env.production?
60+
# )
61+
end
62+
63+
Spree::Frontend::Config.configure do |config|
64+
config.locale = 'en'
65+
end
66+
67+
Spree::Backend::Config.configure do |config|
68+
config.locale = 'en'
69+
70+
# Uncomment and change the following configuration if you want to add
71+
# a new menu item:
72+
#
73+
# config.menu_items << config.class::MenuItem.new(
74+
# [:section],
75+
# 'icon-name',
76+
# url: 'https://solidus.io/'
77+
# )
78+
end
79+
80+
Spree::Api::Config.configure do |config|
81+
config.requires_authentication = true
82+
end
83+
84+
Spree.user_class = "Spree::LegacyUser"
85+
86+
# If you want to add a field to the whitelisted ransackable attributes,
87+
# just uncomment the following code and change it as you need.
88+
#
89+
# Spree::Model.whitelisted_ransackable_attributes << 'field'

config/routes.rb

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
Rails.application.routes.draw do
2+
# This line mounts Solidus's routes at the root of your application.
3+
# This means, any requests to URLs such as /products, will go to Spree::ProductsController.
4+
# If you would like to change where this engine is mounted, simply change the :at option to something different.
5+
#
6+
# We ask that you don't use the :as option here, as Solidus relies on it being the default of "spree"
7+
mount Spree::Core::Engine, at: '/'
8+
29
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
310
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This migration comes from active_storage (originally 20170806125915)
2+
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
3+
def change
4+
create_table :active_storage_blobs do |t|
5+
t.string :key, null: false
6+
t.string :filename, null: false
7+
t.string :content_type
8+
t.text :metadata
9+
t.bigint :byte_size, null: false
10+
t.string :checksum, null: false
11+
t.datetime :created_at, null: false
12+
13+
t.index [ :key ], unique: true
14+
end
15+
16+
create_table :active_storage_attachments do |t|
17+
t.string :name, null: false
18+
t.references :record, null: false, polymorphic: true, index: false
19+
t.references :blob, null: false
20+
21+
t.datetime :created_at, null: false
22+
23+
t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
24+
t.foreign_key :active_storage_blobs, column: :blob_id
25+
end
26+
end
27+
end

0 commit comments

Comments
 (0)