forge-cli 0.0.8 → 0.0.9
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/bin/forge +2 -80
- data/lib/forge-cli.rb +19 -9
- data/lib/forge-cli/ability_installer.rb +17 -19
- data/lib/forge-cli/app.rb +26 -0
- data/lib/forge-cli/application_creator.rb +29 -31
- data/lib/forge-cli/module_installer.rb +3 -6
- data/lib/forge-cli/modules/posts/manifest.yml +15 -0
- data/lib/forge-cli/route_installer.rb +32 -34
- data/lib/forge-cli/version.rb +3 -3
- data/lib/forge/app/controllers/application_controller.rb +34 -54
- data/lib/forge/config/initializers/forge/controllers/ecommerce.rb +18 -0
- data/lib/forge/config/initializers/forge/controllers/posts.rb +15 -0
- data/lib/forge/db/migrate/20130405172024_create_posts.rb +28 -0
- data/lib/forge/db/migrate/20130405172025_create_post_categories.rb +20 -0
- metadata +31 -10
- data/lib/modules.yml +0 -127
data/bin/forge
CHANGED
@@ -1,83 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require '
|
2
|
+
require 'thor'
|
3
3
|
require 'forge-cli'
|
4
|
-
include GLI::App
|
5
4
|
|
6
|
-
|
7
|
-
version ForgeCli::VERSION
|
8
|
-
|
9
|
-
|
10
|
-
#############################
|
11
|
-
#
|
12
|
-
# Creating a new app
|
13
|
-
#
|
14
|
-
#############################
|
15
|
-
desc 'Create a new Forge app'
|
16
|
-
command :new do |c|
|
17
|
-
|
18
|
-
c.desc 'Comma separated list of modules you wish to install'
|
19
|
-
c.arg_name 'list,of,modules'
|
20
|
-
c.flag [:m,:modules]
|
21
|
-
|
22
|
-
c.action do |global_options,options,args|
|
23
|
-
help_now!('App name is required (eg. forge new blogsite)') if args.empty?
|
24
|
-
app = args.shift
|
25
|
-
modules = (options[:modules] || '').split(',')
|
26
|
-
ForgeCLI::ApplicationCreator.create!(app, modules)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
#############################
|
32
|
-
#
|
33
|
-
# Installing a module into
|
34
|
-
# an existing app
|
35
|
-
#
|
36
|
-
#############################
|
37
|
-
desc 'Describe install here'
|
38
|
-
arg_name 'Describe arguments to install here'
|
39
|
-
command :install do |c|
|
40
|
-
c.action do |global_options,options,args|
|
41
|
-
puts "install command ran"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
|
46
|
-
#############################
|
47
|
-
#
|
48
|
-
# Listing the modules
|
49
|
-
#
|
50
|
-
#############################
|
51
|
-
desc 'List the available modules'
|
52
|
-
command :list do |c|
|
53
|
-
c.action do |global_options, options, args|
|
54
|
-
puts "The following Forge modules are available: \n"
|
55
|
-
ForgeCLI::MODULES.each do |mod|
|
56
|
-
puts " - #{mod}" unless mod == "base"
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
|
62
|
-
pre do |global,command,options,args|
|
63
|
-
# Pre logic here
|
64
|
-
# Return true to proceed; false to abort and not call the
|
65
|
-
# chosen command
|
66
|
-
# Use skips_pre before a command to skip this block
|
67
|
-
# on that command only
|
68
|
-
true
|
69
|
-
end
|
70
|
-
|
71
|
-
post do |global,command,options,args|
|
72
|
-
# Post logic here
|
73
|
-
# Use skips_post before a command to skip this
|
74
|
-
# block on that command only
|
75
|
-
end
|
76
|
-
|
77
|
-
on_error do |exception|
|
78
|
-
# Error logic here
|
79
|
-
# return false to skip default error handling
|
80
|
-
true
|
81
|
-
end
|
82
|
-
|
83
|
-
exit run(ARGV)
|
5
|
+
ForgeCLI::App.start
|
data/lib/forge-cli.rb
CHANGED
@@ -1,16 +1,26 @@
|
|
1
|
+
class ForgeCLI
|
2
|
+
MODULES = Dir.entries(File.join(File.dirname(__FILE__), 'forge-cli', 'modules')).reject do |e|
|
3
|
+
%w{. ..}.include?(e)
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
# This order is required
|
8
|
+
require 'active_support/core_ext/string'
|
9
|
+
require 'fileutils'
|
10
|
+
require 'rainbow'
|
11
|
+
require 'thor'
|
12
|
+
require 'yaml'
|
1
13
|
require 'forge-cli/version.rb'
|
14
|
+
require 'forge-cli/app.rb'
|
15
|
+
|
16
|
+
# This is alphabetical
|
17
|
+
require 'forge-cli/ability_installer.rb'
|
2
18
|
require 'forge-cli/application_creator.rb'
|
3
19
|
require 'forge-cli/module_installer.rb'
|
4
|
-
require 'forge-cli/ability_installer.rb'
|
5
|
-
require 'forge-cli/route_installer.rb'
|
6
20
|
require 'forge-cli/post_hooks.rb'
|
7
|
-
require '
|
21
|
+
require 'forge-cli/route_installer.rb'
|
22
|
+
|
23
|
+
# Require the post hooks from all the modules
|
8
24
|
Dir[File.join(File.dirname(__FILE__), 'forge-cli', 'modules', '*', 'post_hooks.rb')].each do |hooks|
|
9
25
|
require hooks
|
10
|
-
end
|
11
|
-
|
12
|
-
class ForgeCLI
|
13
|
-
MODULES = Dir.entries(File.join(File.dirname(__FILE__), 'forge-cli', 'modules')).reject do |e|
|
14
|
-
%w{. ..}.include?(e)
|
15
|
-
end
|
16
26
|
end
|
@@ -1,25 +1,23 @@
|
|
1
|
-
class ForgeCLI
|
2
|
-
class
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
f.puts new_content
|
13
|
-
end
|
1
|
+
class ForgeCLI::AbilityInstaller < ForgeCLI::App
|
2
|
+
class << self
|
3
|
+
def install_abilities!(app, ability_class)
|
4
|
+
@app = app
|
5
|
+
@ability_class = ability_class
|
6
|
+
new_content = File.read(ability_file).gsub(
|
7
|
+
/ end\nend\z/,
|
8
|
+
" #{ability_invocation}\n end\nend"
|
9
|
+
)
|
10
|
+
File.open(ability_file, "w") do |f|
|
11
|
+
f.puts new_content
|
14
12
|
end
|
13
|
+
end
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
def ability_file
|
16
|
+
File.join(@app, 'app', 'models', 'ability.rb')
|
17
|
+
end
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
end
|
19
|
+
def ability_invocation
|
20
|
+
"#{@ability_class}.new(u)"
|
23
21
|
end
|
24
22
|
end
|
25
23
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class ForgeCLI::App < Thor
|
2
|
+
include Thor::Actions
|
3
|
+
|
4
|
+
desc 'new', 'Create a new Forge app'
|
5
|
+
def new(app, modules = '')
|
6
|
+
modules = modules.split(',')
|
7
|
+
ForgeCLI::ApplicationCreator.create!(app, modules)
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'install', 'Install modules into the working Forge app'
|
11
|
+
def install(modules)
|
12
|
+
app = Dir.pwd
|
13
|
+
modules = modules.split(',')
|
14
|
+
modules.each do |mod|
|
15
|
+
ForgeCLI::ModuleInstaller.install_module!(app, mod)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
desc 'list', 'List available Forge modules'
|
20
|
+
def list
|
21
|
+
puts "The following Forge modules are available: \n"
|
22
|
+
ForgeCLI::MODULES.each do |mod|
|
23
|
+
puts " - #{mod}" unless mod == "base"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -1,39 +1,37 @@
|
|
1
|
-
class ForgeCLI
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
end
|
1
|
+
class ForgeCLI::ApplicationCreator < ForgeCLI::App
|
2
|
+
def self.create!(app, modules = [])
|
3
|
+
new(app, modules).create_application!
|
4
|
+
end
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
def initialize(app, modules = [])
|
7
|
+
@app = app
|
8
|
+
@modules = modules
|
9
|
+
end
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
def create_application!
|
12
|
+
system("/usr/bin/env rails new #{@app}")
|
13
|
+
ForgeCLI::ModuleInstaller.install_module!(:base, @app)
|
14
|
+
@modules.each do |mod|
|
15
|
+
ForgeCLI::ModuleInstaller.install_module!(mod, @app)
|
16
|
+
end
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
# Remove some base Rails files that we don't want
|
19
|
+
remove_file File.join(@app, 'app', 'views', 'layouts', 'application.html.erb')
|
20
|
+
remove_file File.join(@app, 'app', 'assets', 'stylesheets', 'application.css')
|
21
|
+
remove_file File.join(@app, 'public', 'index.html')
|
22
|
+
remove_file File.join(@app, 'Gemfile.lock')
|
24
23
|
|
25
24
|
|
26
|
-
|
27
|
-
|
25
|
+
STDOUT.puts completed_message
|
26
|
+
end
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
Your new Forge site is almost ready! Next steps:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end
|
28
|
+
def completed_message
|
29
|
+
%{
|
30
|
+
#{"Your new Forge site is almost ready! Next steps:".foreground(:cyan)}
|
31
|
+
1. Run 'bundle install'
|
32
|
+
2. Set up config/database.yml
|
33
|
+
3. Run 'rake db:migrate'
|
34
|
+
4. Run 'rake forge:create_admin
|
35
|
+
}
|
38
36
|
end
|
39
37
|
end
|
@@ -1,6 +1,3 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
require 'active_support/core_ext/string'
|
3
|
-
|
4
1
|
class ForgeCLI
|
5
2
|
class ModuleInstaller
|
6
3
|
def self.install_module!(module_name, app)
|
@@ -31,8 +28,8 @@ class ForgeCLI
|
|
31
28
|
raise "FILE MISSING: #{source_file}"
|
32
29
|
end
|
33
30
|
|
34
|
-
unless
|
35
|
-
STDOUT.puts "
|
31
|
+
unless File.exist?(destination_dir) && !File.directory?(source_file)
|
32
|
+
STDOUT.puts " #{"create".foreground(93, 255, 85)} #{file}"
|
36
33
|
FileUtils.mkdir_p(destination_dir)
|
37
34
|
end
|
38
35
|
|
@@ -70,7 +67,7 @@ class ForgeCLI
|
|
70
67
|
new_file = File.open(new_file_path, "w")
|
71
68
|
new_file.puts content
|
72
69
|
new_file.close
|
73
|
-
STDOUT.puts "
|
70
|
+
STDOUT.puts " wrote ".foreground(93, 255, 85) + new_file_path.gsub("#{destination_path}/", '')
|
74
71
|
|
75
72
|
# So that they have different timestamps
|
76
73
|
sleep 1
|
@@ -0,0 +1,15 @@
|
|
1
|
+
files:
|
2
|
+
- app/views/posts
|
3
|
+
- app/views/forge/posts
|
4
|
+
- app/views/forge/post_categories
|
5
|
+
- app/controllers/posts_controller.rb
|
6
|
+
- app/controllers/forge/posts_controller.rb
|
7
|
+
- app/controllers/forge/post_categories_controller.rb
|
8
|
+
- app/models/post.rb
|
9
|
+
- app/models/post_category.rb
|
10
|
+
- config/initializers/forge/controllers/posts.rb
|
11
|
+
- app/views/forge/shared/menu_items/_posts.html.haml
|
12
|
+
|
13
|
+
migrations:
|
14
|
+
- create_posts
|
15
|
+
- create_post_categories
|
@@ -1,42 +1,40 @@
|
|
1
|
-
class ForgeCLI
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
1
|
+
class ForgeCLI::RouteInstaller < Thor
|
2
|
+
def initialize(app, module_path)
|
3
|
+
@app = app
|
4
|
+
@module_path = module_path
|
5
|
+
end
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
20
|
-
routes = routes_to_add.split("\n").map {|r| " " * indent + r }.join("\n")
|
21
|
-
updated_routes = existing_routes.gsub(line, "#{line}\n#{routes}")
|
22
|
-
File.open(file, 'w') do |f|
|
23
|
-
f.puts updated_routes
|
24
|
-
end
|
7
|
+
def install_routes(type = :normal)
|
8
|
+
file = File.join(@app, 'config', 'routes.rb')
|
9
|
+
existing_routes = File.read(file)
|
10
|
+
if type.to_sym == :normal
|
11
|
+
routes_to_add = routes
|
12
|
+
line = "Application.routes.draw do"
|
13
|
+
indent = 2
|
14
|
+
else
|
15
|
+
routes_to_add = self.send("#{type}_routes")
|
16
|
+
line = "namespace :#{type} do"
|
17
|
+
indent = 4
|
25
18
|
end
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
routes = routes_to_add.split("\n").map {|r| " " * indent + r }.join("\n")
|
20
|
+
updated_routes = existing_routes.gsub(line, "#{line}\n#{routes}")
|
21
|
+
File.open(file, 'w') do |f|
|
22
|
+
f.puts updated_routes
|
29
23
|
end
|
24
|
+
end
|
30
25
|
|
31
|
-
|
32
|
-
|
33
|
-
|
26
|
+
def routes
|
27
|
+
@routes ||= get_routes
|
28
|
+
end
|
29
|
+
|
30
|
+
def forge_routes
|
31
|
+
@forge_routes ||= get_routes('forge_')
|
32
|
+
end
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
end
|
34
|
+
def get_routes(prefix = '')
|
35
|
+
file = File.join(@module_path, "#{prefix}routes.rb")
|
36
|
+
if File.exist?(file)
|
37
|
+
File.open(file, "r").read
|
40
38
|
end
|
41
39
|
end
|
42
40
|
end
|
data/lib/forge-cli/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = '0.0.
|
3
|
-
end
|
1
|
+
class ForgeCLI
|
2
|
+
VERSION = '0.0.9'
|
3
|
+
end
|
@@ -7,72 +7,52 @@ class ApplicationController < ActionController::Base
|
|
7
7
|
|
8
8
|
def app_init
|
9
9
|
# application-wide init stuff here
|
10
|
-
|
11
10
|
@mobile_menu_items = Page.find_for_menu if Forge::Settings[:mobile_layout]
|
12
11
|
end
|
13
12
|
|
14
13
|
private
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
def mobile_device?
|
15
|
+
if devise_controller? || controller_path.match(/forge/)
|
16
|
+
false # default to non-mobile for login page and forge
|
17
|
+
elsif session[:mobile_param]
|
18
|
+
session[:mobile_param] == "1"
|
19
|
+
else
|
20
|
+
using_mobile_device?
|
21
|
+
end
|
22
22
|
end
|
23
|
-
|
24
|
-
helper_method :mobile_device?
|
25
|
-
|
26
|
-
def using_mobile_device?
|
27
|
-
request.user_agent =~ /Mobile|webOS/
|
28
|
-
end
|
29
|
-
helper_method :using_mobile_device?
|
30
|
-
|
31
|
-
def prepare_for_mobile
|
32
|
-
session[:mobile_param] = params[:mobile] if params[:mobile]
|
33
|
-
request.format = :mobile if mobile_device?
|
34
|
-
end
|
35
|
-
|
36
|
-
protected
|
37
|
-
def get_cart_order
|
38
|
-
@cart_order = Order.where(:key => cookies[:order_key], :state => "pending").first if cookies[:order_key]
|
39
|
-
end
|
23
|
+
helper_method :mobile_device?
|
40
24
|
|
41
|
-
|
42
|
-
|
43
|
-
"forge_login"
|
44
|
-
else
|
45
|
-
"application"
|
25
|
+
def using_mobile_device?
|
26
|
+
request.user_agent =~ /Mobile|webOS/
|
46
27
|
end
|
47
|
-
|
28
|
+
helper_method :using_mobile_device?
|
48
29
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
else
|
53
|
-
super
|
30
|
+
def prepare_for_mobile
|
31
|
+
session[:mobile_param] = params[:mobile] if params[:mobile]
|
32
|
+
request.format = :mobile if mobile_device?
|
54
33
|
end
|
55
|
-
end
|
56
34
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
35
|
+
protected
|
36
|
+
def layout_by_resource
|
37
|
+
if devise_controller?
|
38
|
+
"forge_login"
|
39
|
+
else
|
40
|
+
"application"
|
41
|
+
end
|
61
42
|
end
|
62
|
-
end
|
63
43
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
44
|
+
def after_sign_in_path_for(resource)
|
45
|
+
if resource.staff?
|
46
|
+
'/forge'
|
47
|
+
else
|
48
|
+
super
|
49
|
+
end
|
50
|
+
end
|
71
51
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
52
|
+
def require_admin
|
53
|
+
unless current_user && current_user.staff?
|
54
|
+
flash[:warning] = "You're not authorized for that." if current_user
|
55
|
+
redirect_to '/login'
|
56
|
+
end
|
76
57
|
end
|
77
|
-
end
|
78
58
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Forge
|
2
|
+
module Controllers
|
3
|
+
module eCommerce
|
4
|
+
def get_cart_order
|
5
|
+
@cart_order = Order.where(:key => cookies[:order_key], :state => "pending").first if cookies[:order_key]
|
6
|
+
end
|
7
|
+
private_method :get_cart_order
|
8
|
+
|
9
|
+
def require_addresses_for_checkout
|
10
|
+
unless @cart_order.valid_addresses?
|
11
|
+
redirect_to "orders/checkout"
|
12
|
+
return false
|
13
|
+
end
|
14
|
+
end
|
15
|
+
private_method :require_addresses_for_checkout
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Forge
|
2
|
+
module Controllers
|
3
|
+
module Posts
|
4
|
+
def get_archive_months
|
5
|
+
@months = Post.get_archive_months
|
6
|
+
end
|
7
|
+
private_method :get_archive_months
|
8
|
+
|
9
|
+
def get_post_categories
|
10
|
+
@post_categories = PostCategory.all(:order => :title)
|
11
|
+
end
|
12
|
+
private_method :get_post_categories
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class CreatePosts < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table "posts", :force => true do |t|
|
4
|
+
t.string "title"
|
5
|
+
t.text "content"
|
6
|
+
t.integer "user_id"
|
7
|
+
t.datetime "created_at"
|
8
|
+
t.datetime "updated_at"
|
9
|
+
t.boolean "allow_comments", :default => true, :null => false
|
10
|
+
t.integer "creator_id"
|
11
|
+
t.integer "updater_id"
|
12
|
+
t.boolean "published", :default => false
|
13
|
+
t.text "excerpt"
|
14
|
+
t.string "seo_title"
|
15
|
+
t.text "seo_keywords"
|
16
|
+
t.text "seo_description"
|
17
|
+
end
|
18
|
+
|
19
|
+
add_index "posts", ["created_at"], :name => "index_posts_on_created_at"
|
20
|
+
add_index "posts", ["creator_id"], :name => "index_posts_on_creator_id"
|
21
|
+
add_index "posts", ["updater_id"], :name => "index_posts_on_updater_id"
|
22
|
+
add_index "posts", ["user_id"], :name => "index_posts_on_user_id"
|
23
|
+
end
|
24
|
+
|
25
|
+
def down
|
26
|
+
drop_table :posts
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CreatePostCategories << ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table "post_categories" do |t|
|
4
|
+
t.string "title"
|
5
|
+
t.integer "list_order", :default => 999
|
6
|
+
t.datetime "created_at"
|
7
|
+
t.datetime "updated_at"
|
8
|
+
end
|
9
|
+
|
10
|
+
create_table "post_categories_posts", :id => false do |t|
|
11
|
+
t.integer "post_category_id"
|
12
|
+
t.integer "post_id"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def down
|
17
|
+
drop_table :post_categories
|
18
|
+
drop_table :post_categories_posts
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forge-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 3.2.12
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,23 +74,39 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: 3.2.12
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
79
|
+
name: rainbow
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
83
|
-
- - '
|
83
|
+
- - ! '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
85
|
+
version: '0'
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
91
|
-
- - '
|
91
|
+
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: thor
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
94
110
|
description:
|
95
111
|
email: sean@factore.ca
|
96
112
|
executables:
|
@@ -462,6 +478,8 @@ files:
|
|
462
478
|
- lib/forge/config/initializers/class_extensions/hash.rb
|
463
479
|
- lib/forge/config/initializers/devise.rb
|
464
480
|
- lib/forge/config/initializers/ecommerce.rb
|
481
|
+
- lib/forge/config/initializers/forge/controllers/ecommerce.rb
|
482
|
+
- lib/forge/config/initializers/forge/controllers/posts.rb
|
465
483
|
- lib/forge/config/initializers/generators.rb
|
466
484
|
- lib/forge/config/initializers/inflections.rb
|
467
485
|
- lib/forge/config/initializers/mime_types.rb
|
@@ -493,6 +511,8 @@ files:
|
|
493
511
|
- lib/forge/db/migrate/20130404145329_create_taggings.rb
|
494
512
|
- lib/forge/db/migrate/20130404151730_create_users.rb
|
495
513
|
- lib/forge/db/migrate/20130405172022_create_pages.rb
|
514
|
+
- lib/forge/db/migrate/20130405172024_create_posts.rb
|
515
|
+
- lib/forge/db/migrate/20130405172025_create_post_categories.rb
|
496
516
|
- lib/forge/db/schema.rb
|
497
517
|
- lib/forge/db/seeds.rb
|
498
518
|
- lib/forge/doc/i18n.md
|
@@ -1383,6 +1403,7 @@ files:
|
|
1383
1403
|
- lib/forge/vendor/assets/stylesheets/fancybox.css.scss
|
1384
1404
|
- lib/forge/vendor/assets/stylesheets/jscrollpane.css.scss
|
1385
1405
|
- lib/forge-cli/ability_installer.rb
|
1406
|
+
- lib/forge-cli/app.rb
|
1386
1407
|
- lib/forge-cli/application_creator.rb
|
1387
1408
|
- lib/forge-cli/module_installer.rb
|
1388
1409
|
- lib/forge-cli/modules/base/forge_routes.rb
|
@@ -1391,11 +1412,11 @@ files:
|
|
1391
1412
|
- lib/forge-cli/modules/base/routes.rb
|
1392
1413
|
- lib/forge-cli/modules/ecommerce/_settings_forge_menu.html
|
1393
1414
|
- lib/forge-cli/modules/ecommerce/manifest.yml
|
1415
|
+
- lib/forge-cli/modules/posts/manifest.yml
|
1394
1416
|
- lib/forge-cli/post_hooks.rb
|
1395
1417
|
- lib/forge-cli/route_installer.rb
|
1396
1418
|
- lib/forge-cli/version.rb
|
1397
1419
|
- lib/forge-cli.rb
|
1398
|
-
- lib/modules.yml
|
1399
1420
|
- README.rdoc
|
1400
1421
|
- forge-cli.rdoc
|
1401
1422
|
homepage: http://factore.ca/forge-cms
|
data/lib/modules.yml
DELETED
@@ -1,127 +0,0 @@
|
|
1
|
-
base:
|
2
|
-
files:
|
3
|
-
# Models
|
4
|
-
- 'app/models/ability.rb'
|
5
|
-
- 'app/models/asset.rb'
|
6
|
-
- 'app/models/comment.rb'
|
7
|
-
- 'app/models/comment_observer.rb'
|
8
|
-
- 'app/models/comment_subscriber.rb'
|
9
|
-
- 'app/models/help_topic.rb'
|
10
|
-
- 'app/models/i18n_lookup.rb'
|
11
|
-
- 'app/models/my_settings.rb'
|
12
|
-
- 'app/models/role.rb'
|
13
|
-
- 'app/models/s3_direct_upload.rb'
|
14
|
-
- 'app/models/user.rb'
|
15
|
-
|
16
|
-
# Controllers
|
17
|
-
- 'app/controllers/application_controller.rb'
|
18
|
-
- 'app/controllers/comments_controller.rb'
|
19
|
-
- 'app/controllers/forge_controller.rb'
|
20
|
-
- 'app/controllers/index_controller.rb'
|
21
|
-
- 'app/controllers/sessions_controller.rb'
|
22
|
-
- 'app/controllers/forge/assets_controller.rb'
|
23
|
-
- 'app/controllers/forge/comments_controller.rb'
|
24
|
-
- 'app/controllers/forge/help_topics_controller.rb'
|
25
|
-
- 'app/controllers/forge/index_controller.rb'
|
26
|
-
- 'app/controllers/forge/settings_controller.rb'
|
27
|
-
- 'app/controllers/forge/users_controller.rb'
|
28
|
-
|
29
|
-
# Views
|
30
|
-
- 'app/views/layouts'
|
31
|
-
- 'app/views/comment_mailer'
|
32
|
-
- 'app/views/comments'
|
33
|
-
- 'app/views/devise'
|
34
|
-
- 'app/views/index'
|
35
|
-
- 'app/views/layouts'
|
36
|
-
- 'app/views/mobile'
|
37
|
-
- 'app/views/user_mailer'
|
38
|
-
- 'app/views/forge/assets'
|
39
|
-
- 'app/views/forge/comments'
|
40
|
-
- 'app/views/forge/help'
|
41
|
-
- 'app/views/forge/help_topics'
|
42
|
-
- 'app/views/forge/index'
|
43
|
-
- 'app/views/forge/settings'
|
44
|
-
- 'app/views/forge/shared/_asset_drawer.html.haml'
|
45
|
-
- 'app/views/forge/shared/_menu.html.haml'
|
46
|
-
- 'app/views/forge/shared/_new_model_asset.html.haml'
|
47
|
-
- 'app/views/forge/shared/_new_model_asset_swfupload.html.haml'
|
48
|
-
- 'app/views/forge/shared/_section_footer.html.haml'
|
49
|
-
- 'app/views/forge/shared/_section_header.html.haml'
|
50
|
-
- 'app/views/forge/shared/_seo_fields.html.haml'
|
51
|
-
- 'app/views/forge/shared/_settings_nav.html.haml'
|
52
|
-
- 'app/views/forge/shared/menu_items/_assets.html.haml'
|
53
|
-
- 'app/views/forge/shared/menu_items/_comments.html.haml'
|
54
|
-
- 'app/views/forge/shared/menu_items/_settings.html.haml'
|
55
|
-
- 'app/views/forge/shared/menu_items/_users.html.haml'
|
56
|
-
|
57
|
-
# Config
|
58
|
-
- 'config/i18n_fields.yml'
|
59
|
-
- 'config/google_sitemap.yml'
|
60
|
-
- 'config/s3.yml.template'
|
61
|
-
- 'config/database.yml.template'
|
62
|
-
- 'config/environments/production.rb'
|
63
|
-
- 'config/initializers/class_extensions'
|
64
|
-
- 'config/initializers/can_be_foreign.rb'
|
65
|
-
- 'config/initializers/can_use_asset.rb'
|
66
|
-
- 'config/initializers/ckeditor.rb'
|
67
|
-
- 'config/initializers/devise.rb'
|
68
|
-
- 'config/initializers/forge.rb'
|
69
|
-
- 'config/initializers/generators.rb'
|
70
|
-
- 'config/initializers/inflections.rb'
|
71
|
-
- 'config/initializers/mime_types.rb'
|
72
|
-
- 'config/initializers/reorderable.rb'
|
73
|
-
- 'config/initializers/mime_types.rb'
|
74
|
-
- 'config/initializers/session_store.rb'
|
75
|
-
- 'config/initializers/validators.rb'
|
76
|
-
|
77
|
-
|
78
|
-
# Various
|
79
|
-
- 'db/help/assets_index.help'
|
80
|
-
- 'db/help/visual_editor.help'
|
81
|
-
- 'doc/i18n.md'
|
82
|
-
- 'lib/forge/recipes.rb'
|
83
|
-
- 'lib/forge/s3_signature.rb'
|
84
|
-
- 'lib/forge/settings.rb'
|
85
|
-
- 'lib/generators/forge'
|
86
|
-
- 'lib/tasks/forge.rake'
|
87
|
-
- 'lib/templates/active_record/model/model.rb'
|
88
|
-
- 'Gemfile'
|
89
|
-
- '.gitignore'
|
90
|
-
|
91
|
-
# Assets
|
92
|
-
- 'app/assets'
|
93
|
-
- 'lib/assets'
|
94
|
-
- 'public/javascripts/ckeditor'
|
95
|
-
- 'public/404.html'
|
96
|
-
- 'public/500.html'
|
97
|
-
- 'public/pixel.gif'
|
98
|
-
- 'public/flash'
|
99
|
-
- 'vendor/assets/images/fancybox'
|
100
|
-
- 'vendor/assets/javascripts'
|
101
|
-
- 'vendor/assets/stylesheets/fancybox.css.scss'
|
102
|
-
- 'vendor/assets/stylesheets/jscrollpane.css.scss'
|
103
|
-
|
104
|
-
migrations:
|
105
|
-
- create_assets
|
106
|
-
- create_comments
|
107
|
-
- create_help_topics
|
108
|
-
- create_settings
|
109
|
-
- create_roles
|
110
|
-
- create_taggings
|
111
|
-
- create_users
|
112
|
-
|
113
|
-
pages:
|
114
|
-
files:
|
115
|
-
- 'app/models/page.rb'
|
116
|
-
- 'app/controllers/pages_controller.rb'
|
117
|
-
- 'app/controllers/forge/pages_controller.rb'
|
118
|
-
- 'app/views/pages'
|
119
|
-
- 'app/views/forge/pages'
|
120
|
-
- 'app/views/forge/shared/menu_items/_pages.html.haml'
|
121
|
-
|
122
|
-
migrations:
|
123
|
-
- create_pages
|
124
|
-
|
125
|
-
ecommerce:
|
126
|
-
files:
|
127
|
-
- 'lib/models/order'
|