gluttonberg-core 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/installer/500.html +102 -0
- data/installer/Procfile +2 -0
- data/installer/access_denied.html.haml +11 -0
- data/installer/add_artist_and_link_to_assets.rb +6 -0
- data/installer/application_helper.rb +7 -0
- data/installer/bootstrap-theme.min.css +9 -0
- data/installer/bootstrap.min.css +9 -0
- data/installer/bootstrap.min.js +9 -0
- data/installer/gluttonberg_advance_settings.rb +77 -0
- data/installer/gluttonberg_basic_settings.rb +53 -0
- data/installer/gluttonberg_migration.rb +358 -0
- data/installer/gluttonberg_migration2.rb +49 -0
- data/installer/not_found.html.haml +11 -0
- data/installer/page_descriptions.rb +70 -0
- data/installer/public.html.haml +47 -0
- data/installer/sidekiq.rb +7 -0
- data/installer/sidekiq.yml +4 -0
- data/installer/sitemap.rb +70 -0
- data/installer/unicorn.rb +22 -0
- data/lib/gluttonberg/version.rb +1 -1
- data/public/images/thumb_for_backend/missing.png +0 -0
- data/public/swf/soundmanager2.swf +0 -0
- data/public/swf/soundmanager2_debug.swf +0 -0
- data/public/swf/soundmanager2_flash9.swf +0 -0
- data/public/swf/soundmanager2_flash9_debug.swf +0 -0
- data/public/swf/soundmanager2_flash_xdomain.zip +0 -0
- metadata +29 -4
@@ -0,0 +1,49 @@
|
|
1
|
+
class GluttonbergMigration2 < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
begin
|
4
|
+
Gluttonberg::PlainTextContentLocalization.create_versioned_table
|
5
|
+
rescue => e
|
6
|
+
puts e
|
7
|
+
end
|
8
|
+
|
9
|
+
begin
|
10
|
+
Gluttonberg::HtmlContentLocalization.create_versioned_table
|
11
|
+
rescue => e
|
12
|
+
puts e
|
13
|
+
end
|
14
|
+
|
15
|
+
begin
|
16
|
+
Gluttonberg::TextareaContentLocalization.create_versioned_table
|
17
|
+
rescue => e
|
18
|
+
puts e
|
19
|
+
end
|
20
|
+
|
21
|
+
begin
|
22
|
+
Gluttonberg::ImageContent.create_versioned_table
|
23
|
+
rescue => e
|
24
|
+
puts e
|
25
|
+
end
|
26
|
+
|
27
|
+
begin
|
28
|
+
Gluttonberg::SelectContent.create_versioned_table
|
29
|
+
rescue => e
|
30
|
+
puts e
|
31
|
+
end
|
32
|
+
|
33
|
+
begin
|
34
|
+
Gluttonberg::Stylesheet.create_versioned_table
|
35
|
+
rescue => e
|
36
|
+
puts e
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
def down
|
42
|
+
Gluttonberg::PlainTextContentLocalization.drop_versioned_table
|
43
|
+
Gluttonberg::HtmlContentLocalization.drop_versioned_table
|
44
|
+
Gluttonberg::TextareaContentLocalization.drop_versioned_table
|
45
|
+
Gluttonberg::ImageContent.drop_versioned_table
|
46
|
+
Gluttonberg::SelectContent.drop_versioned_table
|
47
|
+
Gluttonberg::Stylesheet.drop_versioned_table
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
Gluttonberg::PageDescription.add do
|
2
|
+
|
3
|
+
# home page page description
|
4
|
+
page :home do
|
5
|
+
label "Home"
|
6
|
+
description "Homepage"
|
7
|
+
home true
|
8
|
+
view "home"
|
9
|
+
layout "public"
|
10
|
+
end
|
11
|
+
|
12
|
+
# page description with two three sections.
|
13
|
+
page :generic_page do
|
14
|
+
label "Generic"
|
15
|
+
description "Generic Page"
|
16
|
+
view "generic"
|
17
|
+
layout "public"
|
18
|
+
|
19
|
+
section :title do
|
20
|
+
label "Title"
|
21
|
+
type :plain_text_content
|
22
|
+
end
|
23
|
+
|
24
|
+
section :description do
|
25
|
+
label "Description"
|
26
|
+
type :html_content
|
27
|
+
end
|
28
|
+
|
29
|
+
section :image do
|
30
|
+
label "Image"
|
31
|
+
type :image_content
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
# page description which redirects to rails defined route examples
|
37
|
+
page :examples do
|
38
|
+
label "Examples"
|
39
|
+
description "Examples Page"
|
40
|
+
rewrite_to 'examples'
|
41
|
+
layout "public"
|
42
|
+
end
|
43
|
+
|
44
|
+
# page description with a single content section
|
45
|
+
page :about do
|
46
|
+
label "About"
|
47
|
+
description "About Page"
|
48
|
+
view "about"
|
49
|
+
layout "public"
|
50
|
+
|
51
|
+
section :top_content do
|
52
|
+
label "Content"
|
53
|
+
type :html_content
|
54
|
+
end
|
55
|
+
|
56
|
+
# section :excerpt do
|
57
|
+
# label "Excerpt"
|
58
|
+
# type :textarea_content
|
59
|
+
# end
|
60
|
+
|
61
|
+
# section :theme do
|
62
|
+
# label "Theme"
|
63
|
+
# type :select_content
|
64
|
+
# select_options_data lambda{ THEMES }
|
65
|
+
# select_options_default_value lambda{ THEMES.first.last }
|
66
|
+
# end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
- @slug = @locale ? @locale.slug : ""
|
2
|
+
- if @page
|
3
|
+
- @pages = (@page.number_of_children == 0 && @page.children.published.blank?) && !@page.parent.blank? ? @page.parent.children.published : @page.children.published
|
4
|
+
|
5
|
+
!!!
|
6
|
+
%html
|
7
|
+
%head
|
8
|
+
%title
|
9
|
+
= page_title
|
10
|
+
= javascript_include_tag "application", :charset => "utf-8"
|
11
|
+
= stylesheet_link_tag "application"
|
12
|
+
= csrf_meta_tag
|
13
|
+
%meta{ :charset =>"utf-8"}
|
14
|
+
= google_analytics_js_tag
|
15
|
+
- if !page_keywords.blank?
|
16
|
+
%meta{:content=>"#{page_keywords}",:property=>"keywords"}
|
17
|
+
- if !page_description.blank?
|
18
|
+
%meta{:content=>"#{page_description}",:property=>"description"}
|
19
|
+
%meta{:content=>"#{page_description}",:property=>"og:description"}
|
20
|
+
- if !og_image.blank?
|
21
|
+
%meta{:content=>"#{og_image}",:property=>"og:image"}
|
22
|
+
- if !og_site_name.blank?
|
23
|
+
%meta{:content=>"#{og_site_name}",:property=>"og:site_name"}
|
24
|
+
- if !page_title.blank?
|
25
|
+
%meta{:content=>"#{og_title}",:property=>"og:title"}
|
26
|
+
%link{ :rel=>"shortcut icon", :href=>"/assets/favicon.png"}
|
27
|
+
%body{:class=>body_class(@page)}
|
28
|
+
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
29
|
+
.container
|
30
|
+
.navbar-header
|
31
|
+
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
32
|
+
%span.sr-only Toggle navigation
|
33
|
+
%span.icon-bar
|
34
|
+
%span.icon-bar
|
35
|
+
%span.icon-bar
|
36
|
+
%a.navbar-brand{href: "/"}
|
37
|
+
= website_title
|
38
|
+
.collapse.navbar-collapse
|
39
|
+
= navigation_tree(nil, :slug => @slug, :class => "nav navbar-nav", :max_depth => 0)
|
40
|
+
|
41
|
+
.container
|
42
|
+
.row
|
43
|
+
.col-md-3
|
44
|
+
= navigation_tree(@pages, :id => "list-group", :slug => @slug, :class => "nav nav-pills nav-stacked", :max_depth => 0)
|
45
|
+
|
46
|
+
.col-md-9
|
47
|
+
= yield
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Sidekiq.configure_server do |config|
|
2
|
+
config.redis = { :url => ENV['REDISTOGO_URL'] ? ENV['REDISTOGO_URL'] : 'redis://localhost:6379/', :namespace => 'gluttonberg' }
|
3
|
+
end
|
4
|
+
|
5
|
+
Sidekiq.configure_client do |config|
|
6
|
+
config.redis = { :url => ENV['REDISTOGO_URL'] ? ENV['REDISTOGO_URL'] : 'redis://localhost:6379/', :namespace => 'gluttonberg' }
|
7
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Set the host name for URL creation
|
2
|
+
SitemapGenerator::Sitemap.default_host = "http://www.example.com"
|
3
|
+
|
4
|
+
SitemapGenerator::Sitemap.create do
|
5
|
+
Gluttonberg::Sitemap.sitemap = sitemap
|
6
|
+
# Put links creation logic here.
|
7
|
+
#
|
8
|
+
# The root path '/' and sitemap index file are added automatically for you.
|
9
|
+
# Links are added to the Sitemap in the order they are specified.
|
10
|
+
|
11
|
+
|
12
|
+
# add all published pages to html sitemap in tree format
|
13
|
+
def add_pages_to_sitemap_in_tree_format(parent)
|
14
|
+
unless parent.blank?
|
15
|
+
parent.children.published.each do |page|
|
16
|
+
page.localizations.each do |loc|
|
17
|
+
#page.load_default_localizations
|
18
|
+
Gluttonberg::Sitemap.add({:path => loc.public_path , :title => page.nav_label} , page.updated_at , "page" )
|
19
|
+
end
|
20
|
+
add_pages_to_sitemap_in_tree_format(page) unless page.children.blank?
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
add_pages_to_sitemap_in_tree_format(Gluttonberg::Page.home_page)
|
25
|
+
|
26
|
+
# Add All published Blog Articles to html and xml sitemap
|
27
|
+
begin
|
28
|
+
if Gluttonberg.localized?
|
29
|
+
Gluttonberg::Locale.all.each do |locale|
|
30
|
+
Gluttonberg::Sitemap.add({:path => blogs_path(:locale => locale.slug ) , :title => "Blogs" } , nil , "blogs")
|
31
|
+
end
|
32
|
+
else
|
33
|
+
Gluttonberg::Sitemap.add({:path => blogs_path , :title => "Blogs" } , nil , "blogs")
|
34
|
+
end
|
35
|
+
|
36
|
+
Gluttonberg::Article.published.each do |article|
|
37
|
+
if Gluttonberg.localized?
|
38
|
+
article.localizations.each do |loc|
|
39
|
+
Gluttonberg::Sitemap.add({:path => blog_article_path(:locale => loc.locale.slug , :blog_id => article.blog.slug, :id => article.slug) , :title => article.title } , article.updated_at , "article")
|
40
|
+
end
|
41
|
+
else #non localized
|
42
|
+
Gluttonberg::Sitemap.add({:path => blog_article_path(:blog_id => article.blog.slug, :id => article.slug) , :title => article.title } , article.updated_at , "article")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
rescue => e
|
46
|
+
puts e
|
47
|
+
end
|
48
|
+
|
49
|
+
if Gluttonberg::Member.enable_members == true
|
50
|
+
if Gluttonberg.localized?
|
51
|
+
Gluttonberg::Locale.all.each do |locale|
|
52
|
+
Gluttonberg::Sitemap.add({:path => new_member_path(:locale => locale.slug) , :title => "Member Register" } , nil , "members")
|
53
|
+
Gluttonberg::Sitemap.add({:path => member_login_path(:locale => locale.slug) , :title => "Member Login" } , nil , "members")
|
54
|
+
end
|
55
|
+
else
|
56
|
+
Gluttonberg::Sitemap.add({:path => new_member_path , :title => "Member Register" } , nil , "members")
|
57
|
+
Gluttonberg::Sitemap.add({:path => member_login_path , :title => "Member Login" } , nil , "members")
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
# add custom models
|
63
|
+
#Gluttonberg::Sitemap.add_custom_model(Model , title_field_name_as_symbol , pages)
|
64
|
+
#Gluttonberg::Sitemap.add_custom_model(Book , :title)
|
65
|
+
#Gluttonberg::Sitemap.add_custom_model(Book , :title, [:index , :show] ) # same as previous example
|
66
|
+
#Gluttonberg::Sitemap.add_custom_model(Book , :title, [:index ]) #only index page
|
67
|
+
#Gluttonberg::Sitemap.add_custom_model(Book , :title , [ :show]) #only detail pages
|
68
|
+
|
69
|
+
|
70
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
|
2
|
+
timeout 30
|
3
|
+
preload_app true
|
4
|
+
|
5
|
+
before_fork do |server, worker|
|
6
|
+
Signal.trap 'TERM' do
|
7
|
+
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
|
8
|
+
Process.kill 'QUIT', Process.pid
|
9
|
+
end
|
10
|
+
|
11
|
+
defined?(ActiveRecord::Base) and
|
12
|
+
ActiveRecord::Base.connection.disconnect!
|
13
|
+
end
|
14
|
+
|
15
|
+
after_fork do |server, worker|
|
16
|
+
Signal.trap 'TERM' do
|
17
|
+
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
|
18
|
+
end
|
19
|
+
|
20
|
+
defined?(ActiveRecord::Base) and
|
21
|
+
ActiveRecord::Base.establish_connection
|
22
|
+
end
|
data/lib/gluttonberg/version.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gluttonberg-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Crowther
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: authlogic
|
@@ -243,14 +243,14 @@ dependencies:
|
|
243
243
|
requirements:
|
244
244
|
- - '='
|
245
245
|
- !ruby/object:Gem::Version
|
246
|
-
version: 1.
|
246
|
+
version: 1.43.1
|
247
247
|
type: :runtime
|
248
248
|
prerelease: false
|
249
249
|
version_requirements: !ruby/object:Gem::Requirement
|
250
250
|
requirements:
|
251
251
|
- - '='
|
252
252
|
- !ruby/object:Gem::Version
|
253
|
-
version: 1.
|
253
|
+
version: 1.43.1
|
254
254
|
- !ruby/object:Gem::Dependency
|
255
255
|
name: highline
|
256
256
|
requirement: !ruby/object:Gem::Requirement
|
@@ -658,6 +658,25 @@ files:
|
|
658
658
|
- config/locales/en_gb.yml
|
659
659
|
- config/routes.rb
|
660
660
|
- db/migrate/20130801050257_create_repeater.rb
|
661
|
+
- installer/500.html
|
662
|
+
- installer/Procfile
|
663
|
+
- installer/access_denied.html.haml
|
664
|
+
- installer/add_artist_and_link_to_assets.rb
|
665
|
+
- installer/application_helper.rb
|
666
|
+
- installer/bootstrap-theme.min.css
|
667
|
+
- installer/bootstrap.min.css
|
668
|
+
- installer/bootstrap.min.js
|
669
|
+
- installer/gluttonberg_advance_settings.rb
|
670
|
+
- installer/gluttonberg_basic_settings.rb
|
671
|
+
- installer/gluttonberg_migration.rb
|
672
|
+
- installer/gluttonberg_migration2.rb
|
673
|
+
- installer/not_found.html.haml
|
674
|
+
- installer/page_descriptions.rb
|
675
|
+
- installer/public.html.haml
|
676
|
+
- installer/sidekiq.rb
|
677
|
+
- installer/sidekiq.yml
|
678
|
+
- installer/sitemap.rb
|
679
|
+
- installer/unicorn.rb
|
661
680
|
- lib/audio_job.rb
|
662
681
|
- lib/engine.rb
|
663
682
|
- lib/generators/gluttonberg/resource/USAGE
|
@@ -768,6 +787,12 @@ files:
|
|
768
787
|
- lib/gluttonberg/version.rb
|
769
788
|
- lib/pagination_list_link_renderer.rb
|
770
789
|
- lib/photo_job.rb
|
790
|
+
- public/images/thumb_for_backend/missing.png
|
791
|
+
- public/swf/soundmanager2.swf
|
792
|
+
- public/swf/soundmanager2_debug.swf
|
793
|
+
- public/swf/soundmanager2_flash9.swf
|
794
|
+
- public/swf/soundmanager2_flash9_debug.swf
|
795
|
+
- public/swf/soundmanager2_flash_xdomain.zip
|
771
796
|
- spec/controllers/auto_save_controller_spec.rb
|
772
797
|
- spec/controllers/record_history_spec.rb
|
773
798
|
- spec/dummy/README.rdoc
|