mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Add skeleton for OrderManagement engine
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -10,6 +10,7 @@ gem 'i18n-js', '~> 3.1.0'
|
||||
# Patched version. See http://rubysec.com/advisories/CVE-2015-5312/.
|
||||
gem 'nokogiri', '>= 1.6.7.1'
|
||||
|
||||
gem "order_management", path: "./engines/order_management"
|
||||
gem 'web', path: './engines/web'
|
||||
|
||||
gem 'pg'
|
||||
|
||||
@@ -133,6 +133,11 @@ GIT
|
||||
activemodel (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
|
||||
PATH
|
||||
remote: engines/order_management
|
||||
specs:
|
||||
order_management (0.0.1)
|
||||
|
||||
PATH
|
||||
remote: engines/web
|
||||
specs:
|
||||
@@ -826,6 +831,7 @@ DEPENDENCIES
|
||||
oauth2 (~> 1.4.1)
|
||||
ofn-qz!
|
||||
oj
|
||||
order_management!
|
||||
paper_trail (~> 5.2.3)
|
||||
paperclip
|
||||
pg
|
||||
|
||||
@@ -118,8 +118,9 @@ Openfoodnetwork::Application.routes.draw do
|
||||
|
||||
get 'sitemap.xml', to: 'sitemap#index', defaults: { format: 'xml' }
|
||||
|
||||
# Mount Web engine routes
|
||||
# Mount engine routes
|
||||
mount Web::Engine, :at => '/'
|
||||
mount OrderManagement::Engine, :at => '/'
|
||||
|
||||
# Mount Spree's routes
|
||||
mount Spree::Core::Engine, :at => '/'
|
||||
|
||||
5
engines/order_management/README.md
Normal file
5
engines/order_management/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Order Management
|
||||
|
||||
This is the rails engine for the Order Management domain.
|
||||
|
||||
See our wiki for [more info about domains and engines in OFN](https://github.com/openfoodfoundation/openfoodnetwork/wiki/Tech-Doc:-How-OFN-is-organized-in-Domains-using-Rails-Engines).
|
||||
@@ -0,0 +1 @@
|
||||
//= require_tree .
|
||||
@@ -0,0 +1,5 @@
|
||||
module OrderManagement
|
||||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery with: :exception
|
||||
end
|
||||
end
|
||||
2
engines/order_management/config/routes.rb
Normal file
2
engines/order_management/config/routes.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
OrderManagement::Engine.routes.draw do
|
||||
end
|
||||
4
engines/order_management/lib/order_management.rb
Normal file
4
engines/order_management/lib/order_management.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
require "order_management/engine"
|
||||
|
||||
module OrderManagement
|
||||
end
|
||||
5
engines/order_management/lib/order_management/engine.rb
Normal file
5
engines/order_management/lib/order_management/engine.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
module OrderManagement
|
||||
class Engine < ::Rails::Engine
|
||||
isolate_namespace OrderManagement
|
||||
end
|
||||
end
|
||||
3
engines/order_management/lib/order_management/version.rb
Normal file
3
engines/order_management/lib/order_management/version.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
module OrderManagement
|
||||
VERSION = "0.0.1".freeze
|
||||
end
|
||||
13
engines/order_management/order_management.gemspec
Normal file
13
engines/order_management/order_management.gemspec
Normal file
@@ -0,0 +1,13 @@
|
||||
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
||||
|
||||
require "order_management/version"
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "order_management"
|
||||
s.version = OrderManagement::VERSION
|
||||
s.authors = ["developers@ofn"]
|
||||
s.summary = "Order Management domain of the OFN solution."
|
||||
|
||||
s.files = Dir["{app,config,db,lib}/**/*"] + ["LICENSE.txt", "Rakefile", "README.rdoc"]
|
||||
s.test_files = Dir["spec/**/*"]
|
||||
end
|
||||
9
engines/order_management/spec/spec_helper.rb
Normal file
9
engines/order_management/spec/spec_helper.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
|
||||
require "../../spec/spec_helper"
|
||||
|
||||
# Require factories in Spree and main application.
|
||||
require 'spree/testing_support/factories'
|
||||
require '../../spec/factories'
|
||||
|
||||
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
||||
Reference in New Issue
Block a user