forge-cli 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +1 -3
- data/lib/forge-cli.rb +3 -0
- data/lib/forge-cli/application_creator.rb +33 -0
- data/lib/forge-cli/custom_file_copier.rb +27 -0
- data/lib/forge-cli/forge_addon_requirer.rb +14 -0
- data/lib/forge-cli/logo.txt +11 -0
- data/lib/forge-cli/module_installer.rb +31 -5
- data/lib/forge-cli/modules/banners/forge_routes.rb +3 -0
- data/lib/forge-cli/modules/banners/manifest.yml +8 -0
- data/lib/forge-cli/modules/banners/post_hooks.rb +12 -0
- data/lib/forge-cli/modules/banners/routes.rb +15 -0
- data/lib/forge-cli/modules/base/forge_routes.rb +5 -0
- data/lib/forge-cli/modules/base/manifest.yml +7 -12
- data/lib/forge-cli/modules/base/post_hooks.rb +10 -29
- data/lib/forge-cli/modules/dispatches/forge_routes.rb +6 -0
- data/lib/forge-cli/modules/dispatches/manifest.yml +25 -0
- data/lib/forge-cli/modules/dispatches/post_hooks.rb +13 -0
- data/lib/forge-cli/modules/dispatches/routes.rb +4 -0
- data/lib/forge-cli/modules/ecommerce/forge_routes.rb +33 -0
- data/lib/forge-cli/modules/ecommerce/manifest.yml +49 -1
- data/lib/forge-cli/modules/ecommerce/post_hooks.rb +33 -0
- data/lib/forge-cli/modules/ecommerce/routes.rb +43 -0
- data/lib/forge-cli/modules/events/forge_routes.rb +1 -0
- data/lib/forge-cli/modules/events/manifest.yml +12 -0
- data/lib/forge-cli/modules/events/post_hooks.rb +16 -0
- data/lib/forge-cli/modules/events/routes.rb +4 -0
- data/lib/forge-cli/modules/galleries/forge_routes.rb +3 -0
- data/lib/forge-cli/modules/galleries/manifest.yml +9 -0
- data/lib/forge-cli/modules/galleries/post_hooks.rb +11 -0
- data/lib/forge-cli/modules/posts/forge_routes.rb +6 -0
- data/lib/forge-cli/modules/posts/post_hooks.rb +30 -0
- data/lib/forge-cli/modules/posts/routes.rb +15 -0
- data/lib/forge-cli/modules/subscribers/forge_routes.rb +4 -0
- data/lib/forge-cli/modules/subscribers/manifest.yml +14 -0
- data/lib/forge-cli/modules/subscribers/post_hooks.rb +12 -0
- data/lib/forge-cli/modules/subscribers/routes.rb +1 -0
- data/lib/forge-cli/modules/videos/forge_routes.rb +4 -0
- data/lib/forge-cli/modules/videos/manifest.yml +9 -0
- data/lib/forge-cli/modules/videos/post_hooks.rb +14 -0
- data/lib/forge-cli/modules/videos/routes.rb +15 -0
- data/lib/forge-cli/output.rb +10 -0
- data/lib/forge-cli/post_hooks.rb +24 -11
- data/lib/forge-cli/version.rb +1 -1
- data/lib/forge/Gemfile +2 -2
- data/lib/forge/app/controllers/application_controller.rb +2 -2
- data/lib/forge/app/controllers/events_controller.rb +2 -2
- data/lib/forge/app/controllers/hosted_payment_controller.rb +1 -1
- data/lib/forge/app/controllers/integrated_payment_controller.rb +1 -1
- data/lib/forge/app/controllers/orders_controller.rb +1 -1
- data/lib/forge/app/form_builders/forge_form_builder.rb +2 -2
- data/lib/forge/app/helpers/form_helper.rb +2 -2
- data/lib/forge/app/models/event.rb +4 -0
- data/lib/forge/app/models/order.rb +3 -3
- data/lib/forge/app/models/order_transaction.rb +1 -1
- data/lib/forge/app/models/post.rb +5 -0
- data/lib/forge/app/models/video.rb +24 -19
- data/lib/forge/app/views/forge/dispatches/show.html.haml +2 -2
- data/lib/forge/app/views/forge/help_topics/show.html.haml +4 -4
- data/lib/forge/app/views/forge/settings/show.html.haml +2 -2
- data/lib/forge/app/views/forge/shared/_seo_fields.html.haml +1 -1
- data/lib/forge/app/views/forge/shared/menu_items/_subscribers.html.haml +8 -0
- data/lib/forge/app/views/hosted_payment/_paypal.html.haml +3 -3
- data/lib/forge/app/views/hosted_payment/billing.html.haml +2 -2
- data/lib/forge/app/views/integrated_payment/_credit_card_form.html.haml +3 -3
- data/lib/forge/app/views/integrated_payment/billing.html.haml +3 -3
- data/lib/forge/app/views/layouts/application.html.haml +1 -1
- data/lib/forge/app/views/layouts/forge.html.haml +1 -1
- data/lib/forge/app/views/orders/paid.html.haml +3 -3
- data/lib/forge/config/initializers/ecommerce.rb +2 -2
- data/lib/forge/config/initializers/forge.rb +33 -0
- data/lib/forge/config/routes.rb +2 -4
- data/lib/forge/db/migrate/20130404140735_create_base_forge.rb +187 -0
- data/lib/forge/db/migrate/20130405172025_create_post_categories.rb +1 -1
- data/lib/forge/db/migrate/20130405172026_create_addresses.rb +28 -0
- data/lib/forge/db/migrate/20130405172027_create_countries.rb +20 -0
- data/lib/forge/db/migrate/20130405172028_create_orders.rb +22 -0
- data/lib/forge/db/migrate/20130405172029_create_order_transactions.rb +22 -0
- data/lib/forge/db/migrate/20130405172030_create_products.rb +34 -0
- data/lib/forge/db/migrate/20130405172031_create_product_categories.rb +20 -0
- data/lib/forge/db/migrate/20130405172032_create_product_images.rb +20 -0
- data/lib/forge/db/migrate/20130405172033_create_provinces.rb +19 -0
- data/lib/forge/db/migrate/20130405172034_create_sales.rb +18 -0
- data/lib/forge/db/migrate/20130405172035_create_tax_rates.rb +19 -0
- data/lib/forge/db/migrate/20130405172036_create_banners.rb +20 -0
- data/lib/forge/db/migrate/20130405172037_create_videos.rb +33 -0
- data/lib/forge/db/migrate/20130405172038_create_events.rb +18 -0
- data/lib/forge/db/migrate/20130405172039_create_dispatches.rb +98 -0
- data/lib/forge/db/migrate/20130405172040_create_subscribers copy.rb +32 -0
- data/lib/forge/db/migrate/20130405172041_create_galleries.rb +29 -0
- data/lib/forge/lib/assets/stylesheets/forge/dispatches.css.scss +10 -1
- data/lib/forge/lib/forge.rb +12 -4
- data/lib/forge/{config/initializers → lib/forge}/can_be_foreign.rb +0 -0
- data/lib/forge/{config/initializers → lib/forge}/can_have_comments.rb +0 -0
- data/lib/forge/{config/initializers → lib/forge}/can_use_asset.rb +0 -0
- data/lib/forge/lib/forge/config/ecommerce.rb +55 -0
- data/lib/forge/lib/forge/config/events.rb +29 -0
- data/lib/forge/lib/forge/config/videos.rb +20 -0
- data/lib/forge/{config/initializers → lib/forge}/reorderable.rb +0 -0
- data/lib/forge/{config/initializers/forge/controllers → lib/forge/shared_controller_methods}/ecommerce.rb +1 -3
- data/lib/forge/{config/initializers/forge/controllers → lib/forge/shared_controller_methods}/posts.rb +0 -2
- data/lib/forge/lib/generators/forge/i18n_migrations/i18n_migrations_generator.rb +3 -3
- data/lib/forge/lib/tasks/forge.rake +1 -1
- data/lib/forge/spec/integration/shopping_spec.rb +9 -9
- data/lib/forge/spec/models/order_spec.rb +5 -5
- metadata +169 -120
- data/forge-cli.rdoc +0 -5
- data/lib/forge/app/controllers/product_images_controller.rb +0 -2
- data/lib/forge/config/ferret_server.yml +0 -24
- data/lib/forge/db/migrate/20130404140735_create_assets.rb +0 -24
- data/lib/forge/db/migrate/20130404141259_create_comments.rb +0 -40
- data/lib/forge/db/migrate/20130404142157_create_help_topics.rb +0 -18
- data/lib/forge/db/migrate/20130404143601_create_settings.rb +0 -18
- data/lib/forge/db/migrate/20130404145209_create_roles.rb +0 -22
- data/lib/forge/db/migrate/20130404145329_create_taggings.rb +0 -25
- data/lib/forge/db/migrate/20130404151730_create_users.rb +0 -30
- data/lib/forge/db/migrate/20130405172022_create_pages.rb +0 -35
- data/lib/forge/lib/active_form.rb +0 -12
- data/lib/forge/lib/forge/settings.rb +0 -4
data/README.rdoc
CHANGED
data/lib/forge-cli.rb
CHANGED
@@ -16,7 +16,10 @@ require 'forge-cli/app.rb'
|
|
16
16
|
# This is alphabetical
|
17
17
|
require 'forge-cli/ability_installer.rb'
|
18
18
|
require 'forge-cli/application_creator.rb'
|
19
|
+
require 'forge-cli/custom_file_copier.rb'
|
20
|
+
require 'forge-cli/forge_addon_requirer.rb'
|
19
21
|
require 'forge-cli/module_installer.rb'
|
22
|
+
require 'forge-cli/output.rb'
|
20
23
|
require 'forge-cli/post_hooks.rb'
|
21
24
|
require 'forge-cli/route_installer.rb'
|
22
25
|
|
@@ -17,11 +17,20 @@ class ForgeCLI::ApplicationCreator < ForgeCLI::App
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# Remove some base Rails files that we don't want
|
20
|
+
STDOUT.puts "\nRemoving unneccessary base Rails files..."
|
20
21
|
remove_file File.join(@app, 'app', 'views', 'layouts', 'application.html.erb')
|
21
22
|
remove_file File.join(@app, 'app', 'assets', 'stylesheets', 'application.css')
|
22
23
|
remove_file File.join(@app, 'public', 'index.html')
|
23
24
|
remove_file File.join(@app, 'Gemfile.lock')
|
24
25
|
|
26
|
+
# Copy custom files from ~/.forge
|
27
|
+
if File.exist?(File.join(ENV["HOME"], '.forge'))
|
28
|
+
STDOUT.puts "\nCopying your custom files from ~/.forge"
|
29
|
+
ForgeCLI::CustomFileCopier.copy_files!(@app)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Rewrite Forge3::Application
|
33
|
+
rewrite_app_name
|
25
34
|
|
26
35
|
STDOUT.puts completed_message
|
27
36
|
end
|
@@ -35,5 +44,29 @@ class ForgeCLI::ApplicationCreator < ForgeCLI::App
|
|
35
44
|
4. Run 'rake forge:create_admin
|
36
45
|
}
|
37
46
|
end
|
47
|
+
|
48
|
+
private
|
49
|
+
def remove_file(file)
|
50
|
+
if File.exist?(file)
|
51
|
+
STDOUT.puts " #{"remove".foreground(93, 255, 85)} #{file.gsub(@app + '/', '')}"
|
52
|
+
FileUtils.rm(file)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def rewrite_app_name
|
57
|
+
files = [
|
58
|
+
'/config/environments/production.rb',
|
59
|
+
'/config/application.rb'
|
60
|
+
]
|
61
|
+
files.each do |file|
|
62
|
+
old_content = File.read(File.join(@app, file))
|
63
|
+
app_name = File.basename(@app).classify
|
64
|
+
new_content = old_content.gsub('Forge3', app_name)
|
65
|
+
File.open(File.join(@app, file), 'w') do |f|
|
66
|
+
f.puts new_content
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
38
71
|
end
|
39
72
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class ForgeCLI::CustomFileCopier
|
2
|
+
attr_accessor :app
|
3
|
+
def self.copy_files!(app)
|
4
|
+
new(app).copy_files!
|
5
|
+
end
|
6
|
+
|
7
|
+
def initialize(app)
|
8
|
+
@app = app
|
9
|
+
end
|
10
|
+
|
11
|
+
def copy_files!
|
12
|
+
files.each do |file|
|
13
|
+
rel_path = file.gsub(File.join(ENV["HOME"], '.forge') + "/", '')
|
14
|
+
ForgeCLI::Output.write('create', rel_path)
|
15
|
+
FileUtils.cp_r(file, @app)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def files
|
20
|
+
@files ||= Dir.glob(File.join(ENV["HOME"], '.forge', '{*,.*}')).
|
21
|
+
reject { |f| rejects.include?(File.basename(f)) }
|
22
|
+
end
|
23
|
+
|
24
|
+
def rejects
|
25
|
+
%w{. .. .git}
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class ForgeCLI::ForgeAddonRequirer
|
2
|
+
def initialize(app)
|
3
|
+
@app = app
|
4
|
+
end
|
5
|
+
|
6
|
+
def require_addon(addon)
|
7
|
+
file = File.join(@app, 'config', 'initializers', 'forge.rb')
|
8
|
+
content = File.read(file)
|
9
|
+
new_content = content.gsub("require 'forge.rb'", "require 'forge.rb'\nrequire 'forge/config/#{addon}.rb'")
|
10
|
+
File.open(file, 'w') do |f|
|
11
|
+
f.puts new_content
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -12,12 +12,27 @@ class ForgeCLI
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def run!
|
15
|
-
|
16
|
-
|
15
|
+
unless @module_name == "base"
|
16
|
+
STDOUT.puts "\nInstalling #{@module_name.titleize}..."
|
17
|
+
end
|
18
|
+
install_dependencies! if @mod["dependencies"]
|
19
|
+
copy_files! if @mod["files"]
|
20
|
+
delete_files! if @mod["delete"]
|
21
|
+
create_migrations! if @mod["migrations"]
|
22
|
+
|
17
23
|
post_hooks_class.run!(@app) if post_hooks_class
|
24
|
+
unless @module_name == "base"
|
25
|
+
STDOUT.puts "Done!"
|
26
|
+
end
|
18
27
|
end
|
19
28
|
|
20
29
|
private
|
30
|
+
def install_dependencies!
|
31
|
+
@mod["dependencies"].each do |dependency|
|
32
|
+
ForgeCLI::ModuleInstaller.install_module!(dependency, @app)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
21
36
|
def copy_files!
|
22
37
|
@mod["files"].each do |file|
|
23
38
|
source_file = File.join(base_path, file)
|
@@ -29,7 +44,7 @@ class ForgeCLI
|
|
29
44
|
end
|
30
45
|
|
31
46
|
unless File.exist?(destination_dir) && !File.directory?(source_file)
|
32
|
-
|
47
|
+
ForgeCLI::Output.write("create", file)
|
33
48
|
FileUtils.mkdir_p(destination_dir)
|
34
49
|
end
|
35
50
|
|
@@ -49,6 +64,17 @@ class ForgeCLI
|
|
49
64
|
end
|
50
65
|
end
|
51
66
|
|
67
|
+
def delete_files!
|
68
|
+
@mod["delete"].each do |file|
|
69
|
+
raise "You can't delete non-app files" if file.match(/^\//)
|
70
|
+
destination = File.join(app_path, file)
|
71
|
+
if File.exist?(destination)
|
72
|
+
ForgeCLI::Output.write("remove", file)
|
73
|
+
FileUtils.rm(destination)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
52
78
|
def create_migrations!
|
53
79
|
source_path = File.join(base_path, 'db', 'migrate')
|
54
80
|
destination_path = File.join(app_path, 'db', 'migrate')
|
@@ -62,12 +88,12 @@ class ForgeCLI
|
|
62
88
|
content = File.open(source_file, 'r').read
|
63
89
|
|
64
90
|
# Write the new one
|
65
|
-
timestamp = Time.now.
|
91
|
+
timestamp = Time.now.strftime('%Y%m%d%H%M%S')
|
66
92
|
new_file_path = File.join(destination_path, "#{timestamp}_#{migration}.rb")
|
67
93
|
new_file = File.open(new_file_path, "w")
|
68
94
|
new_file.puts content
|
69
95
|
new_file.close
|
70
|
-
|
96
|
+
ForgeCLI::Output.write('migration', new_file_path.gsub("#{destination_path}/", ''))
|
71
97
|
|
72
98
|
# So that they have different timestamps
|
73
99
|
sleep 1
|
@@ -0,0 +1,15 @@
|
|
1
|
+
##############
|
2
|
+
### POSTS ####
|
3
|
+
##############
|
4
|
+
resources :posts, :only => [:index, :show] do
|
5
|
+
collection do
|
6
|
+
get :preview, :feed
|
7
|
+
end
|
8
|
+
member do
|
9
|
+
get :category
|
10
|
+
end
|
11
|
+
end
|
12
|
+
match 'posts/:month/:year', :controller => 'posts', :action => 'index'
|
13
|
+
##############
|
14
|
+
# END POSTS ##
|
15
|
+
##############
|
@@ -4,6 +4,11 @@ resources :assets do
|
|
4
4
|
post 'encode_notify', :on => :collection
|
5
5
|
end
|
6
6
|
|
7
|
+
resources :comments, :only => [:index, :destroy] do
|
8
|
+
put 'approve', :on => :member
|
9
|
+
put 'unapprove', :on => :member
|
10
|
+
end
|
11
|
+
|
7
12
|
resources :pages do
|
8
13
|
post 'reorder', :on => :collection
|
9
14
|
end
|
@@ -84,25 +84,27 @@ files:
|
|
84
84
|
- 'config/settings.yml'
|
85
85
|
- 'config/environments/production.rb'
|
86
86
|
- 'config/initializers/class_extensions'
|
87
|
-
- 'config/initializers/can_be_foreign.rb'
|
88
|
-
- 'config/initializers/can_use_asset.rb'
|
89
87
|
- 'config/initializers/ckeditor.rb'
|
90
88
|
- 'config/initializers/devise.rb'
|
91
89
|
- 'config/initializers/generators.rb'
|
92
90
|
- 'config/initializers/inflections.rb'
|
93
91
|
- 'config/initializers/mime_types.rb'
|
94
|
-
- 'config/initializers/reorderable.rb'
|
95
92
|
- 'config/initializers/mime_types.rb'
|
96
93
|
- 'config/initializers/validators.rb'
|
94
|
+
- 'config/initializers/forge.rb'
|
97
95
|
|
98
96
|
|
99
97
|
# Various
|
100
98
|
- 'db/help/assets_index.help'
|
101
99
|
- 'db/help/visual_editor.help'
|
102
100
|
- 'doc/i18n.md'
|
101
|
+
- 'lib/forge.rb'
|
102
|
+
- 'lib/forge/can_be_foreign.rb'
|
103
|
+
- 'lib/forge/can_have_comments.rb'
|
104
|
+
- 'lib/forge/can_use_asset.rb'
|
105
|
+
- 'lib/forge/reorderable.rb'
|
103
106
|
- 'lib/forge/recipes.rb'
|
104
107
|
- 'lib/forge/s3_signature.rb'
|
105
|
-
- 'lib/forge/settings.rb'
|
106
108
|
- 'lib/generators/forge'
|
107
109
|
- 'lib/tasks/forge.rake'
|
108
110
|
- 'lib/templates/active_record/model/model.rb'
|
@@ -123,11 +125,4 @@ files:
|
|
123
125
|
- 'vendor/assets/stylesheets/jscrollpane.css.scss'
|
124
126
|
|
125
127
|
migrations:
|
126
|
-
-
|
127
|
-
- create_comments
|
128
|
-
- create_help_topics
|
129
|
-
- create_pages
|
130
|
-
- create_roles
|
131
|
-
- create_settings
|
132
|
-
- create_taggings
|
133
|
-
- create_users
|
128
|
+
- create_base_forge
|
@@ -1,48 +1,29 @@
|
|
1
|
-
require 'active_support/core_ext/string'
|
2
|
-
|
3
1
|
class ForgeCLI
|
4
2
|
class BasePostHooks < ForgeCLI::PostHooks
|
5
|
-
def
|
6
|
-
@app = app
|
7
|
-
|
3
|
+
def run!
|
8
4
|
STDOUT.puts "Installing Routes..."
|
9
5
|
ri = ForgeCLI::RouteInstaller.new(@app, module_path)
|
10
6
|
ri.install_routes
|
11
7
|
ri.install_routes(:forge)
|
12
8
|
|
13
|
-
STDOUT.puts "Fixing Application Constant..."
|
14
|
-
rewrite_app_name
|
15
|
-
|
16
9
|
fix_gemfile
|
17
10
|
end
|
18
11
|
|
19
|
-
def
|
20
|
-
|
21
|
-
'/config/environments/production.rb',
|
22
|
-
'/config/application.rb'
|
23
|
-
]
|
24
|
-
files.each do |file|
|
25
|
-
old_content = File.read(File.join(@app, file))
|
26
|
-
app_name = File.basename(@app).classify
|
27
|
-
new_content = old_content.gsub('Forge3', app_name)
|
28
|
-
File.open(File.join(@app, file), 'w') do |f|
|
29
|
-
f.puts new_content
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def self.fix_gemfile
|
35
|
-
unless RUBY_VERSION.match(/^1\.8/)
|
12
|
+
def fix_gemfile
|
13
|
+
if RUBY_VERSION.match(/^1\.9/)
|
36
14
|
gemfile_content = File.read(File.join(@app, 'Gemfile'))
|
37
|
-
new_content = gemfile_content.gsub("gem '
|
15
|
+
new_content = gemfile_content.gsub("gem 'capybara', '~> 2.0.0'", "gem 'capybara'")
|
16
|
+
new_content = new_content.gsub("gem 'forge-rad'", "gem 'forge-rad19'")
|
17
|
+
|
38
18
|
File.open(File.join(@app, 'Gemfile'), 'w') do |f|
|
39
19
|
f.puts new_content
|
40
20
|
end
|
41
21
|
end
|
42
22
|
end
|
43
23
|
|
44
|
-
|
45
|
-
|
46
|
-
|
24
|
+
private
|
25
|
+
def module_path
|
26
|
+
File.dirname(__FILE__)
|
27
|
+
end
|
47
28
|
end
|
48
29
|
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
resources :dispatches do
|
2
|
+
get :queue, :chart_data, :opens, :clicks, :unsubscribes, :on => :member
|
3
|
+
put :test_send, :send_all, :on => :member
|
4
|
+
resources :links, :controller => :dispatch_links, :only => [:index]
|
5
|
+
resources :opens, :controller => :dispatch_opens, :only => [:index]
|
6
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
dependencies:
|
2
|
+
- subscribers
|
3
|
+
|
4
|
+
files:
|
5
|
+
- 'app/controllers/dispatches_controller.rb'
|
6
|
+
- 'app/controllers/dispatch_links_controller.rb'
|
7
|
+
- 'app/controllers/forge/dispatch_clicks_controller.rb'
|
8
|
+
- 'app/controllers/forge/dispatches_controller.rb'
|
9
|
+
- 'app/mailers/dispatch_mailer.rb'
|
10
|
+
- 'app/models/dispatch.rb'
|
11
|
+
- 'app/models/dispatch_bounce.rb'
|
12
|
+
- 'app/models/dispatch_link.rb'
|
13
|
+
- 'app/models/dispatch_link_click.rb'
|
14
|
+
- 'app/models/dispatch_open.rb'
|
15
|
+
- 'app/models/dispatch_unsubscribe.rb'
|
16
|
+
- 'app/models/queued_dispatch.rb'
|
17
|
+
- 'app/views/forge/dispatch_clicks'
|
18
|
+
- 'app/views/forge/dispatches'
|
19
|
+
- 'app/views/forge/shared/menu_items/_dispatches.html.haml'
|
20
|
+
|
21
|
+
delete:
|
22
|
+
- 'app/views/forge/shared/menu_items/_subscribers.html.haml'
|
23
|
+
|
24
|
+
migrations:
|
25
|
+
- create_dispatches
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class ForgeCLI::DispatchPostHooks < ForgeCLI::PostHooks
|
2
|
+
def run!
|
3
|
+
STDOUT.puts "Adding routes..."
|
4
|
+
ri = ForgeCLI::RouteInstaller.new(@app, module_path)
|
5
|
+
ri.install_routes
|
6
|
+
ri.install_routes(:forge)
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
def module_path
|
11
|
+
File.dirname(__FILE__)
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#########################
|
2
|
+
#### eCommerce Stuff ####
|
3
|
+
#########################
|
4
|
+
resources :products, :except => [:show] do
|
5
|
+
post 'reorder', :on => :collection
|
6
|
+
end
|
7
|
+
|
8
|
+
resources :product_categories, :except => [:show, :new] do
|
9
|
+
post 'reorder', :on => :collection
|
10
|
+
end
|
11
|
+
|
12
|
+
resources :orders do
|
13
|
+
put 'fulfill', :on => :member
|
14
|
+
put 'unfulfill', :on => :member
|
15
|
+
end
|
16
|
+
|
17
|
+
resources :sales, :except => [:show] do
|
18
|
+
get 'products', :on => :collection
|
19
|
+
end
|
20
|
+
|
21
|
+
resources :tax_rates, :except => [:show, :new]
|
22
|
+
|
23
|
+
resources :countries, :only => [:index, :update] do
|
24
|
+
member do
|
25
|
+
get 'get_provinces'
|
26
|
+
end
|
27
|
+
collection do
|
28
|
+
get 'get_active_countries'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
#############################
|
32
|
+
#### End eCommerce Stuff ####
|
33
|
+
#############################
|