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
@@ -0,0 +1,33 @@
|
|
1
|
+
class CreateVideos < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table "videos" do |t|
|
4
|
+
t.integer "user_id"
|
5
|
+
t.string "title"
|
6
|
+
t.string "thumbnail_file_name"
|
7
|
+
t.string "thumbnail_content_type"
|
8
|
+
t.integer "thumbnail_file_size"
|
9
|
+
t.datetime "thumbnail_updated_at"
|
10
|
+
t.string "video_file_name"
|
11
|
+
t.string "video_content_type"
|
12
|
+
t.integer "video_file_size"
|
13
|
+
t.datetime "video_updated_at"
|
14
|
+
t.datetime "created_at"
|
15
|
+
t.datetime "updated_at"
|
16
|
+
t.string "encoded_state"
|
17
|
+
t.string "mobile_encoded_state"
|
18
|
+
t.string "output_url"
|
19
|
+
t.string "mobile_output_url"
|
20
|
+
t.integer "job_id"
|
21
|
+
t.text "description"
|
22
|
+
t.boolean "published", :default => true
|
23
|
+
t.boolean "allow_comments", :default => true
|
24
|
+
end
|
25
|
+
|
26
|
+
add_index "videos", ["job_id"], :name => "index_videos_on_job_id"
|
27
|
+
add_index "videos", ["user_id"], :name => "index_videos_on_user_id"
|
28
|
+
end
|
29
|
+
|
30
|
+
def down
|
31
|
+
drop_table :videos
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateEvents < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table "events" do |t|
|
4
|
+
t.string "title"
|
5
|
+
t.string "location"
|
6
|
+
t.text "description"
|
7
|
+
t.datetime "starts_at"
|
8
|
+
t.datetime "ends_at"
|
9
|
+
t.boolean "published", :default => false
|
10
|
+
t.datetime "created_at"
|
11
|
+
t.datetime "updated_at"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def down
|
16
|
+
drop_table :events
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
class CreateDispatches < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table "dispatch_bounces" do |t|
|
4
|
+
t.integer "dispatch_id"
|
5
|
+
t.integer "subscriber_id"
|
6
|
+
t.string "bounce_code"
|
7
|
+
t.datetime "created_at"
|
8
|
+
t.datetime "updated_at"
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index "dispatch_bounces", ["dispatch_id"], :name => "index_dispatch_bounces_on_dispatch_id"
|
12
|
+
add_index "dispatch_bounces", ["subscriber_id"], :name => "index_dispatch_bounces_on_subscriber_id"
|
13
|
+
|
14
|
+
create_table "dispatch_link_clicks" do |t|
|
15
|
+
t.integer "dispatch_link_id"
|
16
|
+
t.string "ip"
|
17
|
+
t.datetime "created_at"
|
18
|
+
t.datetime "updated_at"
|
19
|
+
end
|
20
|
+
|
21
|
+
add_index "dispatch_link_clicks", ["dispatch_link_id"], :name => "index_dispatch_link_clicks_on_dispatch_link_id"
|
22
|
+
|
23
|
+
create_table "dispatch_links" do |t|
|
24
|
+
t.integer "dispatch_id"
|
25
|
+
t.string "uri"
|
26
|
+
t.integer "position"
|
27
|
+
t.integer "clicks_count", :default => 0
|
28
|
+
t.datetime "created_at"
|
29
|
+
t.datetime "updated_at"
|
30
|
+
end
|
31
|
+
|
32
|
+
add_index "dispatch_links", ["clicks_count"], :name => "index_dispatch_links_on_clicks_count"
|
33
|
+
add_index "dispatch_links", ["dispatch_id"], :name => "index_dispatch_links_on_dispatch_id"
|
34
|
+
|
35
|
+
create_table "dispatch_opens" do |t|
|
36
|
+
t.integer "dispatch_id"
|
37
|
+
t.string "email"
|
38
|
+
t.string "ip"
|
39
|
+
t.datetime "created_at"
|
40
|
+
t.datetime "updated_at"
|
41
|
+
end
|
42
|
+
|
43
|
+
add_index "dispatch_opens", ["created_at"], :name => "index_dispatch_opens_on_created_at"
|
44
|
+
add_index "dispatch_opens", ["dispatch_id"], :name => "index_dispatch_opens_on_dispatch_id"
|
45
|
+
|
46
|
+
create_table "dispatch_unsubscribes" do |t|
|
47
|
+
t.integer "dispatch_id"
|
48
|
+
t.string "email"
|
49
|
+
t.datetime "created_at"
|
50
|
+
t.datetime "updated_at"
|
51
|
+
end
|
52
|
+
|
53
|
+
add_index "dispatch_unsubscribes", ["dispatch_id"], :name => "index_dispatch_unsubscribes_on_dispatch_id"
|
54
|
+
|
55
|
+
create_table "dispatches" do |t|
|
56
|
+
t.string "subject"
|
57
|
+
t.text "content"
|
58
|
+
t.datetime "sent_at"
|
59
|
+
t.integer "creator_id"
|
60
|
+
t.integer "updater_id"
|
61
|
+
t.datetime "created_at"
|
62
|
+
t.datetime "updated_at"
|
63
|
+
t.integer "queued_message_count"
|
64
|
+
t.integer "sent_message_count"
|
65
|
+
t.integer "failed_message_count"
|
66
|
+
t.integer "opened_message_count"
|
67
|
+
t.text "display_content"
|
68
|
+
end
|
69
|
+
|
70
|
+
add_index "dispatches", ["creator_id"], :name => "index_dispatches_on_creator_id"
|
71
|
+
add_index "dispatches", ["updater_id"], :name => "index_dispatches_on_updater_id"
|
72
|
+
|
73
|
+
create_table "queued_dispatches" do |t|
|
74
|
+
t.integer "dispatch_id"
|
75
|
+
t.integer "subscriber_id"
|
76
|
+
t.datetime "sent_at"
|
77
|
+
t.integer "failed_attempts", :default => 0
|
78
|
+
t.datetime "opened_at"
|
79
|
+
t.datetime "last_failed_attempt"
|
80
|
+
t.text "last_error"
|
81
|
+
t.datetime "created_at"
|
82
|
+
t.datetime "updated_at"
|
83
|
+
end
|
84
|
+
|
85
|
+
add_index "queued_dispatches", ["dispatch_id"], :name => "index_queued_dispatches_on_dispatch_id"
|
86
|
+
add_index "queued_dispatches", ["subscriber_id"], :name => "index_queued_dispatches_on_subscriber_id"
|
87
|
+
end
|
88
|
+
|
89
|
+
def down
|
90
|
+
drop_table :dispatch_bounces
|
91
|
+
drop_table :dispatch_link_clicks
|
92
|
+
drop_table :dispatch_links
|
93
|
+
drop_table :dispatch_opens
|
94
|
+
drop_table :dispatch_unsubscribes
|
95
|
+
drop_table :dispatches
|
96
|
+
drop_table :queued_dispatches
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class CreateSubscribers < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table "subscriber_group_members" do |t|
|
4
|
+
t.integer "subscriber_id"
|
5
|
+
t.integer "group_id"
|
6
|
+
t.datetime "created_at"
|
7
|
+
t.datetime "updated_at"
|
8
|
+
end
|
9
|
+
|
10
|
+
add_index "subscriber_group_members", ["group_id"], :name => "index_subscriber_group_members_on_group_id"
|
11
|
+
add_index "subscriber_group_members", ["subscriber_id"], :name => "index_subscriber_group_members_on_subscriber_id"
|
12
|
+
|
13
|
+
create_table "subscriber_groups" do |t|
|
14
|
+
t.string "title"
|
15
|
+
t.datetime "created_at"
|
16
|
+
t.datetime "updated_at"
|
17
|
+
end
|
18
|
+
|
19
|
+
create_table "subscribers" do |t|
|
20
|
+
t.string "name"
|
21
|
+
t.string "email"
|
22
|
+
t.datetime "created_at"
|
23
|
+
t.datetime "updated_at"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def down
|
28
|
+
drop_table :subscribers
|
29
|
+
drop_table :subscriber_groups
|
30
|
+
drop_table :subscriber_group_members
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class CreateGalleries < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table "galleries" do |t|
|
4
|
+
t.string "title"
|
5
|
+
t.integer "list_order"
|
6
|
+
t.datetime "created_at"
|
7
|
+
t.datetime "updated_at"
|
8
|
+
end
|
9
|
+
|
10
|
+
create_table "photos" do |t|
|
11
|
+
t.integer "gallery_id"
|
12
|
+
t.integer "list_order"
|
13
|
+
t.string "title"
|
14
|
+
t.integer "file_file_size"
|
15
|
+
t.string "file_file_name"
|
16
|
+
t.string "file_content_type"
|
17
|
+
t.datetime "created_at"
|
18
|
+
t.datetime "updated_at"
|
19
|
+
end
|
20
|
+
|
21
|
+
add_index "photos", ["gallery_id"], :name => "index_photos_on_gallery_id"
|
22
|
+
add_index "photos", ["list_order"], :name => "index_photos_on_list_order"
|
23
|
+
end
|
24
|
+
|
25
|
+
def down
|
26
|
+
drop_table :galleries
|
27
|
+
drop_table :photos
|
28
|
+
end
|
29
|
+
end
|
@@ -1,6 +1,11 @@
|
|
1
1
|
// dispatch statistics
|
2
2
|
#progress-bar { height: 25px; }
|
3
|
-
#dispatch-progress-holder {
|
3
|
+
#dispatch-progress-holder {
|
4
|
+
background:#373737;
|
5
|
+
padding:4px;
|
6
|
+
@include rounded(5px);
|
7
|
+
width: 100%;
|
8
|
+
}
|
4
9
|
#dispatch-progress-read { background:image-url('forge/read-meter-bg.png') $red; color:white; float:left; font-size:12px; font-weight:bold; height:22px; padding-top:3px; @include rounded(5px); }
|
5
10
|
#dispatch-progress-sent { background:#EAEAEA; float:left; height:25px; @include rounded(5px); @include box-shadow-inset(0px 2px 5px #999); }
|
6
11
|
|
@@ -14,8 +19,12 @@
|
|
14
19
|
.grey {
|
15
20
|
.link { float:left; width:70%; }
|
16
21
|
.click { float:right; width:26%; }
|
22
|
+
&.half { width: 280px; }
|
17
23
|
}
|
18
24
|
}
|
25
|
+
.dispatch-animated-bar {
|
26
|
+
margin-top: 25px;
|
27
|
+
}
|
19
28
|
|
20
29
|
|
21
30
|
.chart-legend { margin-top:3px;
|
data/lib/forge/lib/forge.rb
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
module Forge
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
class << self
|
3
|
+
attr_accessor :config
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.configure
|
7
|
+
self.config ||= Configuration.new
|
8
|
+
yield config
|
9
|
+
end
|
10
|
+
|
11
|
+
class Configuration
|
12
|
+
attr_accessor :mobile_layout, :support_instructions_in_layout,
|
13
|
+
:languages, :seo_callout
|
6
14
|
end
|
7
15
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# File: lib/forge/ecommerce.rb
|
2
|
+
# Adds configuration options for ecommerce
|
3
|
+
# eg.
|
4
|
+
#
|
5
|
+
# Forge.configure do |config|
|
6
|
+
# config.ecommerce.payments = :hosted or :integrated
|
7
|
+
# config.ecommerce.shippers = {
|
8
|
+
# :one => One,
|
9
|
+
# :two => Two
|
10
|
+
# }
|
11
|
+
#
|
12
|
+
# config.ecommerce.active_merchant = {
|
13
|
+
# :gateway => "gateway",
|
14
|
+
# :login => "login",
|
15
|
+
# :password => "password"
|
16
|
+
# }
|
17
|
+
#
|
18
|
+
# config.ecommerce.email_receipt = true
|
19
|
+
#
|
20
|
+
# config.ecommerce.currency = "CAD"
|
21
|
+
#
|
22
|
+
# config.ecommerce.paypal_production = {
|
23
|
+
# :account => {}
|
24
|
+
# }
|
25
|
+
#
|
26
|
+
# config.ecommerce.paypal_sandbox = {
|
27
|
+
# :account => {}
|
28
|
+
# }
|
29
|
+
# end
|
30
|
+
|
31
|
+
module Forge
|
32
|
+
class Configuration
|
33
|
+
def ecommerce
|
34
|
+
@ecommerce ||= EcommerceConfiguration.new
|
35
|
+
end
|
36
|
+
|
37
|
+
class EcommerceConfiguration
|
38
|
+
attr_accessor :payments, :flat_rate_shipping, :shippers
|
39
|
+
:email_receipt, :active_merchant, :paypal_production
|
40
|
+
:paypal_sandbox, :currency
|
41
|
+
|
42
|
+
def initialize
|
43
|
+
@payments = :hosted
|
44
|
+
@shippers = {}
|
45
|
+
@active_merchant = {}
|
46
|
+
@paypal_production = {}
|
47
|
+
@paypal_sandbox = {}
|
48
|
+
end
|
49
|
+
|
50
|
+
def payments
|
51
|
+
@payments.to_sym
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# File: lib/forge/videos.rb
|
2
|
+
# Adds configuration options for videos
|
3
|
+
# eg.
|
4
|
+
#
|
5
|
+
# Forge.configure do |config|
|
6
|
+
# config.events.display = :calendar
|
7
|
+
# end
|
8
|
+
|
9
|
+
module Forge
|
10
|
+
class Configuration
|
11
|
+
attr_accessor :events
|
12
|
+
|
13
|
+
def events
|
14
|
+
@events ||= EventConfiguration.new
|
15
|
+
end
|
16
|
+
|
17
|
+
class EventConfiguration
|
18
|
+
attr_accessor :display
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
@display = :list
|
22
|
+
end
|
23
|
+
|
24
|
+
def display
|
25
|
+
@display.to_sym
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# File: lib/forge/videos.rb
|
2
|
+
# Adds configuration options for videos
|
3
|
+
# eg.
|
4
|
+
#
|
5
|
+
# Forge.configure do |config|
|
6
|
+
# config.videos.zencoder_api_key = '123xyz'
|
7
|
+
# config.videos.zencoder_bucket = 'development'
|
8
|
+
# end
|
9
|
+
|
10
|
+
module Forge
|
11
|
+
class Configuration
|
12
|
+
def videos
|
13
|
+
@videos ||= VideoConfiguration.new
|
14
|
+
end
|
15
|
+
|
16
|
+
class VideoConfiguration
|
17
|
+
attr_accessor :zencoder_api_key, :zencoder_bucket
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
File without changes
|
@@ -1,10 +1,9 @@
|
|
1
1
|
module Forge
|
2
2
|
module Controllers
|
3
|
-
module
|
3
|
+
module ECommerce
|
4
4
|
def get_cart_order
|
5
5
|
@cart_order = Order.where(:key => cookies[:order_key], :state => "pending").first if cookies[:order_key]
|
6
6
|
end
|
7
|
-
private_method :get_cart_order
|
8
7
|
|
9
8
|
def require_addresses_for_checkout
|
10
9
|
unless @cart_order.valid_addresses?
|
@@ -12,7 +11,6 @@ module Forge
|
|
12
11
|
return false
|
13
12
|
end
|
14
13
|
end
|
15
|
-
private_method :require_addresses_for_checkout
|
16
14
|
end
|
17
15
|
end
|
18
16
|
end
|
@@ -4,12 +4,10 @@ module Forge
|
|
4
4
|
def get_archive_months
|
5
5
|
@months = Post.get_archive_months
|
6
6
|
end
|
7
|
-
private_method :get_archive_months
|
8
7
|
|
9
8
|
def get_post_categories
|
10
9
|
@post_categories = PostCategory.all(:order => :title)
|
11
10
|
end
|
12
|
-
private_method :get_post_categories
|
13
11
|
end
|
14
12
|
end
|
15
13
|
end
|
@@ -2,19 +2,19 @@ module Forge
|
|
2
2
|
module Generators
|
3
3
|
class I18nMigrationsGenerator < Rails::Generators::Base
|
4
4
|
source_root File.expand_path('../templates', __FILE__)
|
5
|
-
|
5
|
+
|
6
6
|
def copy_files
|
7
7
|
timestamp = Time.now.strftime('%Y%m%d%H%M%S')
|
8
8
|
template("migration.rb", File.join('db/migrate', "#{timestamp}_add_i18n_fields_#{file_hash.capitalize}.rb"))
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
private
|
12
12
|
def yaml
|
13
13
|
@yaml ||= YAML.load_file(File.join(Rails.root, 'config', 'i18n_fields.yml')).symbolize_keys
|
14
14
|
end
|
15
15
|
|
16
16
|
def languages
|
17
|
-
Forge
|
17
|
+
Forge.config.languages.values
|
18
18
|
end
|
19
19
|
|
20
20
|
def tables
|
@@ -142,6 +142,6 @@ namespace :forge do
|
|
142
142
|
|
143
143
|
desc "Get updates from Zencoder"
|
144
144
|
task :encode_notify => :environment do
|
145
|
-
system "zencoder_fetcher -u http://localhost:3000/forge/videos/encode_notify #{Forge
|
145
|
+
system "zencoder_fetcher -u http://localhost:3000/forge/videos/encode_notify #{Forge.config.videos.zencoder_api_key}"
|
146
146
|
end
|
147
147
|
end
|