sunrise-cms 0.5.0.rc5 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/sunrise/customize.css +55 -1
- data/app/controllers/sunrise/manager_controller.rb +0 -1
- data/app/views/sunrise/manager/show.html.erb +1 -1
- data/lib/generators/sunrise/templates/models/sunrise/sunrise_structure.rb +1 -1
- data/lib/sunrise/config/model.rb +0 -16
- data/lib/sunrise/models/asset.rb +1 -1
- data/lib/sunrise/version.rb +1 -1
- data/spec/dummy/log/test.log +7053 -0
- metadata +5 -73
- data/spec/tmp/app/models/defaults/ability.rb +0 -18
- data/spec/tmp/app/models/defaults/asset.rb +0 -7
- data/spec/tmp/app/models/defaults/attachment_file.rb +0 -5
- data/spec/tmp/app/models/defaults/avatar.rb +0 -7
- data/spec/tmp/app/models/defaults/picture.rb +0 -7
- data/spec/tmp/app/models/defaults/position_type.rb +0 -7
- data/spec/tmp/app/models/defaults/role_type.rb +0 -8
- data/spec/tmp/app/models/defaults/settings.rb +0 -3
- data/spec/tmp/app/models/defaults/structure.rb +0 -9
- data/spec/tmp/app/models/defaults/structure_type.rb +0 -9
- data/spec/tmp/app/models/defaults/user.rb +0 -13
- data/spec/tmp/app/models/sunrise/sunrise_navigation.rb +0 -14
- data/spec/tmp/app/models/sunrise/sunrise_page.rb +0 -10
- data/spec/tmp/app/models/sunrise/sunrise_structure.rb +0 -35
- data/spec/tmp/app/models/sunrise/sunrise_user.rb +0 -50
- data/spec/tmp/app/uploaders/attachment_file_uploader.rb +0 -5
- data/spec/tmp/app/uploaders/avatar_uploader.rb +0 -15
- data/spec/tmp/app/uploaders/picture_uploader.rb +0 -15
- data/spec/tmp/app/views/layouts/application.html.erb +0 -22
- data/spec/tmp/app/views/pages/show.html.erb +0 -2
- data/spec/tmp/app/views/shared/_notice.html.erb +0 -17
- data/spec/tmp/config/application.rb +0 -63
- data/spec/tmp/config/database.yml.sample +0 -34
- data/spec/tmp/config/initializers/sunrise.rb +0 -18
- data/spec/tmp/config/logrotate-config.sample +0 -9
- data/spec/tmp/config/nginx-config.sample +0 -99
- data/spec/tmp/config/routes.rb +0 -9
- data/spec/tmp/db/seeds.rb +0 -31
- data/spec/tmp/spec/controllers/pages_controller_spec.rb +0 -22
- data/spec/tmp/spec/controllers/welcome_controller_spec.rb +0 -18
- data/spec/tmp/spec/factories/structure_factory.rb +0 -22
- data/spec/tmp/spec/factories/user_factory.rb +0 -61
- data/spec/tmp/spec/spec_helper.rb +0 -37
- data/spec/tmp/spec/support/helpers/controller_macros.rb +0 -52
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunrise-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Igor Galeta
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-02-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -640,40 +640,6 @@ files:
|
|
640
640
|
- Rakefile
|
641
641
|
- README.md
|
642
642
|
- CHANGELOG.rdoc
|
643
|
-
- spec/tmp/spec/support/helpers/controller_macros.rb
|
644
|
-
- spec/tmp/spec/spec_helper.rb
|
645
|
-
- spec/tmp/spec/factories/structure_factory.rb
|
646
|
-
- spec/tmp/spec/factories/user_factory.rb
|
647
|
-
- spec/tmp/spec/controllers/pages_controller_spec.rb
|
648
|
-
- spec/tmp/spec/controllers/welcome_controller_spec.rb
|
649
|
-
- spec/tmp/app/views/layouts/application.html.erb
|
650
|
-
- spec/tmp/app/views/pages/show.html.erb
|
651
|
-
- spec/tmp/app/views/shared/_notice.html.erb
|
652
|
-
- spec/tmp/app/models/defaults/role_type.rb
|
653
|
-
- spec/tmp/app/models/defaults/avatar.rb
|
654
|
-
- spec/tmp/app/models/defaults/asset.rb
|
655
|
-
- spec/tmp/app/models/defaults/settings.rb
|
656
|
-
- spec/tmp/app/models/defaults/position_type.rb
|
657
|
-
- spec/tmp/app/models/defaults/picture.rb
|
658
|
-
- spec/tmp/app/models/defaults/structure.rb
|
659
|
-
- spec/tmp/app/models/defaults/attachment_file.rb
|
660
|
-
- spec/tmp/app/models/defaults/ability.rb
|
661
|
-
- spec/tmp/app/models/defaults/structure_type.rb
|
662
|
-
- spec/tmp/app/models/defaults/user.rb
|
663
|
-
- spec/tmp/app/models/sunrise/sunrise_user.rb
|
664
|
-
- spec/tmp/app/models/sunrise/sunrise_page.rb
|
665
|
-
- spec/tmp/app/models/sunrise/sunrise_navigation.rb
|
666
|
-
- spec/tmp/app/models/sunrise/sunrise_structure.rb
|
667
|
-
- spec/tmp/app/uploaders/attachment_file_uploader.rb
|
668
|
-
- spec/tmp/app/uploaders/picture_uploader.rb
|
669
|
-
- spec/tmp/app/uploaders/avatar_uploader.rb
|
670
|
-
- spec/tmp/config/routes.rb
|
671
|
-
- spec/tmp/config/application.rb
|
672
|
-
- spec/tmp/config/database.yml.sample
|
673
|
-
- spec/tmp/config/nginx-config.sample
|
674
|
-
- spec/tmp/config/logrotate-config.sample
|
675
|
-
- spec/tmp/config/initializers/sunrise.rb
|
676
|
-
- spec/tmp/db/seeds.rb
|
677
643
|
- spec/support/hooks/structure.rb
|
678
644
|
- spec/support/helpers/controller_macros.rb
|
679
645
|
- spec/support/helpers/controller_helper.rb
|
@@ -799,9 +765,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
799
765
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
800
766
|
none: false
|
801
767
|
requirements:
|
802
|
-
- - ! '
|
768
|
+
- - ! '>='
|
803
769
|
- !ruby/object:Gem::Version
|
804
|
-
version:
|
770
|
+
version: '0'
|
805
771
|
requirements: []
|
806
772
|
rubyforge_project: sunrise-cms
|
807
773
|
rubygems_version: 1.8.23
|
@@ -809,40 +775,6 @@ signing_key:
|
|
809
775
|
specification_version: 3
|
810
776
|
summary: Rails CMS
|
811
777
|
test_files:
|
812
|
-
- spec/tmp/spec/support/helpers/controller_macros.rb
|
813
|
-
- spec/tmp/spec/spec_helper.rb
|
814
|
-
- spec/tmp/spec/factories/structure_factory.rb
|
815
|
-
- spec/tmp/spec/factories/user_factory.rb
|
816
|
-
- spec/tmp/spec/controllers/pages_controller_spec.rb
|
817
|
-
- spec/tmp/spec/controllers/welcome_controller_spec.rb
|
818
|
-
- spec/tmp/app/views/layouts/application.html.erb
|
819
|
-
- spec/tmp/app/views/pages/show.html.erb
|
820
|
-
- spec/tmp/app/views/shared/_notice.html.erb
|
821
|
-
- spec/tmp/app/models/defaults/role_type.rb
|
822
|
-
- spec/tmp/app/models/defaults/avatar.rb
|
823
|
-
- spec/tmp/app/models/defaults/asset.rb
|
824
|
-
- spec/tmp/app/models/defaults/settings.rb
|
825
|
-
- spec/tmp/app/models/defaults/position_type.rb
|
826
|
-
- spec/tmp/app/models/defaults/picture.rb
|
827
|
-
- spec/tmp/app/models/defaults/structure.rb
|
828
|
-
- spec/tmp/app/models/defaults/attachment_file.rb
|
829
|
-
- spec/tmp/app/models/defaults/ability.rb
|
830
|
-
- spec/tmp/app/models/defaults/structure_type.rb
|
831
|
-
- spec/tmp/app/models/defaults/user.rb
|
832
|
-
- spec/tmp/app/models/sunrise/sunrise_user.rb
|
833
|
-
- spec/tmp/app/models/sunrise/sunrise_page.rb
|
834
|
-
- spec/tmp/app/models/sunrise/sunrise_navigation.rb
|
835
|
-
- spec/tmp/app/models/sunrise/sunrise_structure.rb
|
836
|
-
- spec/tmp/app/uploaders/attachment_file_uploader.rb
|
837
|
-
- spec/tmp/app/uploaders/picture_uploader.rb
|
838
|
-
- spec/tmp/app/uploaders/avatar_uploader.rb
|
839
|
-
- spec/tmp/config/routes.rb
|
840
|
-
- spec/tmp/config/application.rb
|
841
|
-
- spec/tmp/config/database.yml.sample
|
842
|
-
- spec/tmp/config/nginx-config.sample
|
843
|
-
- spec/tmp/config/logrotate-config.sample
|
844
|
-
- spec/tmp/config/initializers/sunrise.rb
|
845
|
-
- spec/tmp/db/seeds.rb
|
846
778
|
- spec/support/hooks/structure.rb
|
847
779
|
- spec/support/helpers/controller_macros.rb
|
848
780
|
- spec/support/helpers/controller_helper.rb
|
@@ -1,8 +0,0 @@
|
|
1
|
-
class RoleType < Sunrise::Models::RoleType
|
2
|
-
define_enum do |builder|
|
3
|
-
builder.member :default, :object => new("default")
|
4
|
-
builder.member :redactor, :object => new("redactor")
|
5
|
-
builder.member :moderator, :object => new("moderator")
|
6
|
-
builder.member :admin, :object => new("admin")
|
7
|
-
end
|
8
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
class StructureType < Sunrise::Models::StructureType
|
2
|
-
define_enum do |builder|
|
3
|
-
builder.member :page, :object => new("page")
|
4
|
-
builder.member :posts, :object => new("posts")
|
5
|
-
builder.member :main, :object => new("main")
|
6
|
-
builder.member :redirect, :object => new("redirect")
|
7
|
-
builder.member :group, :object => new("group")
|
8
|
-
end
|
9
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class User < ActiveRecord::Base
|
2
|
-
include Sunrise::Models::User
|
3
|
-
include ActiveModel::ForbiddenAttributesProtection
|
4
|
-
|
5
|
-
# Include default devise modules.
|
6
|
-
devise :database_authenticatable, :confirmable, :lockable, :timeoutable,
|
7
|
-
:recoverable, :rememberable, :trackable, :validatable,
|
8
|
-
:encryptable, :encryptor => :sha512
|
9
|
-
|
10
|
-
fileuploads :avatar
|
11
|
-
|
12
|
-
# audited :protect => false, :only => [:name, :email, :password]
|
13
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class SunriseNavigation < Sunrise::Config::Navigation
|
2
|
-
navigation :main do |m|
|
3
|
-
m.item :dashboard, root_path, :class => "icon1"
|
4
|
-
m.item :structures, index_path(:model_name => "structures"), :class => "icon2"
|
5
|
-
m.item :users, index_path(:model_name => "users"), :class => "icon3"
|
6
|
-
m.item :services, "#", :class => "icon4"
|
7
|
-
m.item :settings, edit_settings_path, :class => "icon4"
|
8
|
-
end
|
9
|
-
|
10
|
-
navigation :creates do |c|
|
11
|
-
c.item :structures, new_path(:model_name => "structures")
|
12
|
-
c.item :users, new_path(:model_name => "users")
|
13
|
-
end
|
14
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
class SunriseStructure < Sunrise::AbstractModel
|
3
|
-
self.resource_name = "Structure"
|
4
|
-
|
5
|
-
default_list_view :tree
|
6
|
-
available_list_view [:tree, :thumbs]
|
7
|
-
|
8
|
-
list :tree do
|
9
|
-
field :title
|
10
|
-
field :updated_at
|
11
|
-
field :id
|
12
|
-
end
|
13
|
-
|
14
|
-
show do
|
15
|
-
field :title
|
16
|
-
field :redirect_url
|
17
|
-
field :is_visible
|
18
|
-
end
|
19
|
-
|
20
|
-
edit do
|
21
|
-
field :title
|
22
|
-
field :redirect_url
|
23
|
-
field :slug
|
24
|
-
field :parent_id, :collection => lambda { Structure.nested_set_options() {|i| "#{'–' * i.depth} #{i.title}"} }, :if => lambda { |s| s.moveable? }
|
25
|
-
field :kind, :collection => lambda { StructureType.all }, :include_blank => false
|
26
|
-
field :position, :collection => lambda { PositionType.all }, :include_blank => false
|
27
|
-
field :is_visible, :as => :boolean
|
28
|
-
|
29
|
-
group :meta_tags, :holder => :sidebar do
|
30
|
-
field :tag_title
|
31
|
-
field :tag_keywords
|
32
|
-
field :tag_description
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
class SunriseUser < Sunrise::AbstractModel
|
2
|
-
self.resource_name = "User"
|
3
|
-
|
4
|
-
list :table do
|
5
|
-
field :email
|
6
|
-
field :updated_at
|
7
|
-
field :id
|
8
|
-
|
9
|
-
group :search do
|
10
|
-
field :email
|
11
|
-
field :name
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
list :thumbs do
|
16
|
-
scope { User.includes(:avatar) }
|
17
|
-
preview lambda { |user| user.avatar.try(:url, :thumb) }
|
18
|
-
|
19
|
-
field :email, :label => false
|
20
|
-
field :updated_at, :label => false
|
21
|
-
field :id
|
22
|
-
|
23
|
-
group :search do
|
24
|
-
field :email
|
25
|
-
field :name
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
edit do
|
30
|
-
permited_attributes lambda { |user|
|
31
|
-
user.admin? ? :all : [:name, :password, :password_confirmation, :avatar_attributes]
|
32
|
-
}
|
33
|
-
|
34
|
-
field :name
|
35
|
-
field :email
|
36
|
-
field :password
|
37
|
-
field :password_confirmation
|
38
|
-
field :role_type_id, :collection => lambda { RoleType.all }
|
39
|
-
|
40
|
-
group :bottom, :holder => :bottom do
|
41
|
-
field :avatar, :as => :uploader
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
list :export do
|
46
|
-
field :id
|
47
|
-
field :name
|
48
|
-
field :email
|
49
|
-
end
|
50
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class AvatarUploader < Sunrise::CarrierWave::BaseUploader
|
2
|
-
process :quality => 90
|
3
|
-
|
4
|
-
version :thumb do
|
5
|
-
process :resize_to_fill => [50, 50]
|
6
|
-
end
|
7
|
-
|
8
|
-
version :small do
|
9
|
-
process :resize_to_fill => [32, 32]
|
10
|
-
end
|
11
|
-
|
12
|
-
def extension_white_list
|
13
|
-
%w(jpg jpeg gif png)
|
14
|
-
end
|
15
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class PictureUploader < Sunrise::CarrierWave::BaseUploader
|
2
|
-
process :quality => 90
|
3
|
-
|
4
|
-
version :thumb do
|
5
|
-
process :resize_to_fill => [50, 50]
|
6
|
-
end
|
7
|
-
|
8
|
-
version :content do
|
9
|
-
process :resize_to_fit => [575, 500]
|
10
|
-
end
|
11
|
-
|
12
|
-
def extension_white_list
|
13
|
-
%w(jpg jpeg gif png)
|
14
|
-
end
|
15
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
|
-
<%= csrf_meta_tag %>
|
6
|
-
<%= raw(render_meta_tags(@structure)) %>
|
7
|
-
<title><%= render_page_title(@structure) %></title>
|
8
|
-
<%= stylesheet_link_tag "application" %>
|
9
|
-
<%= javascript_include_tag "application" %>
|
10
|
-
<%= yield(:head) %>
|
11
|
-
</head>
|
12
|
-
<body>
|
13
|
-
<%#= render :partial => "manage/shared/panel" if content_manager? %>
|
14
|
-
<%= render :partial => 'shared/notice' if flash %>
|
15
|
-
|
16
|
-
<div class='content'>
|
17
|
-
<%= yield %>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
<%= yield(:footer) %>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<% unless flash.keys.empty? %>
|
2
|
-
<div class="message" style="display:none;z-index:5000;">
|
3
|
-
<div class="alert-container">
|
4
|
-
<div class="alert">
|
5
|
-
<% flash.each do |key, text| %>
|
6
|
-
<%= content_tag(:div, text, :class => "flash_#{key}") %>
|
7
|
-
<% end %>
|
8
|
-
<%= link_to_function(image_tag("cross_ico.png", :title=>t('label.close')), "$(this).parents('div.message').slideUp()", :class=>"close") %>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
<script type='text/javascript' charset='UTF-8'>
|
12
|
-
$(document).ready(function(){
|
13
|
-
$('div.message').slideDown('slow');
|
14
|
-
})
|
15
|
-
</script>
|
16
|
-
</div>
|
17
|
-
<% end %>
|
@@ -1,63 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
unless defined?(SUNRISE_ORM)
|
6
|
-
SUNRISE_ORM = (ENV["SUNRISE_ORM"] || :active_record).to_sym
|
7
|
-
end
|
8
|
-
|
9
|
-
if defined?(Bundler)
|
10
|
-
# If you precompile assets before deploying to production, use this line
|
11
|
-
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
12
|
-
# If you want your assets lazily compiled in production, use this line
|
13
|
-
Bundler.require(SUNRISE_ORM)
|
14
|
-
end
|
15
|
-
|
16
|
-
require "sunrise-cms"
|
17
|
-
|
18
|
-
module Dummy
|
19
|
-
class Application < Rails::Application
|
20
|
-
# Settings in config/environments/* take precedence over those specified here.
|
21
|
-
# Application configuration should go into files in config/initializers
|
22
|
-
# -- all .rb files in that directory are automatically loaded.
|
23
|
-
|
24
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
25
|
-
config.autoload_paths += %W(
|
26
|
-
#{config.root}/../../lib/generators/sunrise/templates/models/#{SUNRISE_ORM}
|
27
|
-
#{config.root}/../../lib/generators/sunrise/templates/uploaders
|
28
|
-
#{config.root}/../../lib/generators/sunrise/templates/models/sunrise
|
29
|
-
#{config.root}/app/models/#{SUNRISE_ORM}
|
30
|
-
#{config.root}/app/models/sunrise)
|
31
|
-
|
32
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
33
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
34
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
35
|
-
|
36
|
-
# Activate observers that should always be running.
|
37
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
38
|
-
|
39
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
40
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
41
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
42
|
-
|
43
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
44
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
45
|
-
# config.i18n.default_locale = :de
|
46
|
-
|
47
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
48
|
-
config.encoding = "utf-8"
|
49
|
-
|
50
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
51
|
-
config.filter_parameters += [:password]
|
52
|
-
|
53
|
-
# Enable the asset pipeline
|
54
|
-
config.assets.enabled = true
|
55
|
-
|
56
|
-
# Version of your assets, change this if you want to expire all your assets
|
57
|
-
config.assets.version = '1.0'
|
58
|
-
|
59
|
-
# Disable the default whitelisting that occurs in later versions of Rails
|
60
|
-
config.active_record.whitelist_attributes = false
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# And be sure to use new-style password hashing:
|
2
|
-
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
3
|
-
development:
|
4
|
-
adapter: mysql2
|
5
|
-
encoding: utf8
|
6
|
-
reconnect: false
|
7
|
-
database: dummy
|
8
|
-
pool: 5
|
9
|
-
username: root
|
10
|
-
password:
|
11
|
-
socket: /var/run/mysqld/mysqld.sock
|
12
|
-
|
13
|
-
# Warning: The database defined as "test" will be erased and
|
14
|
-
# re-generated from your development database when you run "rake".
|
15
|
-
# Do not set this db to the same as development or production.
|
16
|
-
test:
|
17
|
-
adapter: mysql2
|
18
|
-
encoding: utf8
|
19
|
-
reconnect: false
|
20
|
-
database: dummy_test
|
21
|
-
pool: 5
|
22
|
-
username: root
|
23
|
-
password:
|
24
|
-
socket: /var/run/mysqld/mysqld.sock
|
25
|
-
|
26
|
-
production:
|
27
|
-
adapter: mysql2
|
28
|
-
encoding: utf8
|
29
|
-
reconnect: true
|
30
|
-
database: dummy
|
31
|
-
pool: 5
|
32
|
-
username: root
|
33
|
-
password:
|
34
|
-
socket: /var/run/mysqld/mysqld.sock
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# Use this hook to configure sunrise
|
2
|
-
if Object.const_defined?("Sunrise")
|
3
|
-
Sunrise.setup do |config|
|
4
|
-
# Flash keys
|
5
|
-
#config.flash_keys = [ :success, :failure ]
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
# Assuming HistoryTracker is your tracker class
|
10
|
-
# Mongoid::History.tracker_class_name = :history_tracker
|
11
|
-
|
12
|
-
# Assuming you're using devise/authlogic
|
13
|
-
# Mongoid::History.current_user_method = :current_user
|
14
|
-
|
15
|
-
#if Settings.table_exists?
|
16
|
-
# Settings.defaults[:some_setting] = "value"
|
17
|
-
# Settings.defaults[:some_setting2] = "value2"
|
18
|
-
#end
|
@@ -1,99 +0,0 @@
|
|
1
|
-
# dummy
|
2
|
-
#
|
3
|
-
upstream dummy_backend {
|
4
|
-
server unix:/var/www/dummy/tmp/sockets/unicorn.sock;
|
5
|
-
}
|
6
|
-
|
7
|
-
server {
|
8
|
-
listen 5.9.17.136:80;
|
9
|
-
server_name dummy.fodojo.com;
|
10
|
-
|
11
|
-
access_log off;
|
12
|
-
error_log off;
|
13
|
-
server_tokens off;
|
14
|
-
|
15
|
-
root /var/www/dummy/public;
|
16
|
-
|
17
|
-
if (-f $request_filename) {
|
18
|
-
break;
|
19
|
-
}
|
20
|
-
|
21
|
-
if (-f /cache$request_filename) {
|
22
|
-
rewrite (.*) /cache$1 break;
|
23
|
-
break;
|
24
|
-
}
|
25
|
-
|
26
|
-
if (-f /cache$request_filename.html) {
|
27
|
-
rewrite (.*) /cache$1.html break;
|
28
|
-
break;
|
29
|
-
}
|
30
|
-
|
31
|
-
if (-f $document_root/cache$request_uri.html) {
|
32
|
-
rewrite (.*) /cache$1.html break;
|
33
|
-
}
|
34
|
-
|
35
|
-
if (-f $document_root/cache$request_uri/index.html) {
|
36
|
-
rewrite (.*) /cache$1/index.html break;
|
37
|
-
}
|
38
|
-
|
39
|
-
# This directive prohibits direct access to the cache directory from outside
|
40
|
-
location ^~ /cache {
|
41
|
-
internal;
|
42
|
-
}
|
43
|
-
|
44
|
-
location ~ /\.[^\/]+ {
|
45
|
-
return 404;
|
46
|
-
}
|
47
|
-
|
48
|
-
location / {
|
49
|
-
proxy_redirect off;
|
50
|
-
proxy_set_header Host $host;
|
51
|
-
proxy_set_header X-Real-IP $remote_addr;
|
52
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
53
|
-
# proxy_set_header X-Forwarded-Proto https; # for SSL, add this
|
54
|
-
|
55
|
-
client_max_body_size 20m;
|
56
|
-
client_body_buffer_size 128k;
|
57
|
-
|
58
|
-
proxy_connect_timeout 90;
|
59
|
-
proxy_send_timeout 90;
|
60
|
-
proxy_read_timeout 90;
|
61
|
-
|
62
|
-
proxy_buffer_size 4k;
|
63
|
-
proxy_buffers 4 32k;
|
64
|
-
proxy_busy_buffers_size 64k;
|
65
|
-
proxy_temp_file_write_size 64k;
|
66
|
-
|
67
|
-
if (!-f $request_filename) {
|
68
|
-
proxy_pass http://dummy_backend;
|
69
|
-
break;
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
location ~ ^/(assets|ckeditor_assets|images|javascripts|stylesheets)/ {
|
74
|
-
expires 1y;
|
75
|
-
add_header Cache-Control public;
|
76
|
-
|
77
|
-
# Some browsers still send conditional-GET requests if there's a
|
78
|
-
# Last-Modified header or an ETag header even if they haven't
|
79
|
-
# reached the expiry date sent in the Expires header.
|
80
|
-
add_header Last-Modified "";
|
81
|
-
add_header ETag "";
|
82
|
-
break;
|
83
|
-
}
|
84
|
-
|
85
|
-
# This rewrites all the requests to the maintenance.html page if it exists in the doc root.
|
86
|
-
if (-f $document_root/system/maintenance.html) {
|
87
|
-
return 503;
|
88
|
-
}
|
89
|
-
|
90
|
-
error_page 503 @503;
|
91
|
-
location @503 {
|
92
|
-
# Serve static assets if found.
|
93
|
-
if (-f $request_filename) {
|
94
|
-
break;
|
95
|
-
}
|
96
|
-
|
97
|
-
rewrite ^(.*)$ /system/maintenance.html break;
|
98
|
-
}
|
99
|
-
}
|