sunrise-cms 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/CHANGELOG.rdoc +4 -0
  2. data/README.md +14 -2
  3. data/app/assets/stylesheets/sunrise/main.css +4 -4
  4. data/app/controllers/sunrise/manager_controller.rb +1 -0
  5. data/app/views/sunrise/manager/_field.html.erb +1 -1
  6. data/app/views/sunrise/manager/_nested_field.html.erb +1 -1
  7. data/lib/sunrise/config/field.rb +1 -3
  8. data/lib/sunrise/version.rb +1 -1
  9. data/spec/dummy/log/test.log +4210 -0
  10. data/spec/requests/manager/default/new_spec.rb +11 -0
  11. metadata +2 -70
  12. data/spec/tmp/app/models/defaults/ability.rb +0 -18
  13. data/spec/tmp/app/models/defaults/asset.rb +0 -7
  14. data/spec/tmp/app/models/defaults/attachment_file.rb +0 -5
  15. data/spec/tmp/app/models/defaults/avatar.rb +0 -7
  16. data/spec/tmp/app/models/defaults/picture.rb +0 -7
  17. data/spec/tmp/app/models/defaults/position_type.rb +0 -7
  18. data/spec/tmp/app/models/defaults/role_type.rb +0 -8
  19. data/spec/tmp/app/models/defaults/settings.rb +0 -6
  20. data/spec/tmp/app/models/defaults/structure.rb +0 -10
  21. data/spec/tmp/app/models/defaults/structure_type.rb +0 -9
  22. data/spec/tmp/app/models/defaults/user.rb +0 -14
  23. data/spec/tmp/app/models/sunrise/sunrise_navigation.rb +0 -14
  24. data/spec/tmp/app/models/sunrise/sunrise_page.rb +0 -10
  25. data/spec/tmp/app/models/sunrise/sunrise_structure.rb +0 -35
  26. data/spec/tmp/app/models/sunrise/sunrise_user.rb +0 -50
  27. data/spec/tmp/app/uploaders/attachment_file_uploader.rb +0 -5
  28. data/spec/tmp/app/uploaders/avatar_uploader.rb +0 -15
  29. data/spec/tmp/app/uploaders/picture_uploader.rb +0 -15
  30. data/spec/tmp/app/views/layouts/application.html.erb +0 -22
  31. data/spec/tmp/app/views/pages/show.html.erb +0 -2
  32. data/spec/tmp/app/views/shared/_notice.html.erb +0 -17
  33. data/spec/tmp/config/application.rb +0 -63
  34. data/spec/tmp/config/database.yml.sample +0 -34
  35. data/spec/tmp/config/initializers/sunrise.rb +0 -51
  36. data/spec/tmp/config/logrotate-config.sample +0 -9
  37. data/spec/tmp/config/nginx-config.sample +0 -67
  38. data/spec/tmp/config/routes.rb +0 -10
  39. data/spec/tmp/db/seeds.rb +0 -30
  40. data/spec/tmp/spec/controllers/pages_controller_spec.rb +0 -22
  41. data/spec/tmp/spec/controllers/welcome_controller_spec.rb +0 -18
  42. data/spec/tmp/spec/factories/structure_factory.rb +0 -22
  43. data/spec/tmp/spec/factories/user_factory.rb +0 -61
  44. data/spec/tmp/spec/spec_helper.rb +0 -37
  45. data/spec/tmp/spec/support/helpers/controller_macros.rb +0 -52
@@ -34,6 +34,17 @@ describe "Sunrise Manager New" do
34
34
  end
35
35
  end
36
36
  end
37
+
38
+ describe "GET /manage/structures/new with params" do
39
+ before(:each) do
40
+ @title = "Default-title"
41
+ visit new_path(:model_name => "structures", :structure => { :title => @title })
42
+ end
43
+
44
+ it "should pre-fill attributes" do
45
+ should have_selector "input[@value='#{@title}']"
46
+ end
47
+ end
37
48
  end
38
49
 
39
50
  describe "anonymous user" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunrise-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-12 00:00:00.000000000 Z
13
+ date: 2013-05-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -671,40 +671,6 @@ files:
671
671
  - Rakefile
672
672
  - README.md
673
673
  - CHANGELOG.rdoc
674
- - spec/tmp/spec/support/helpers/controller_macros.rb
675
- - spec/tmp/spec/spec_helper.rb
676
- - spec/tmp/spec/factories/structure_factory.rb
677
- - spec/tmp/spec/factories/user_factory.rb
678
- - spec/tmp/spec/controllers/pages_controller_spec.rb
679
- - spec/tmp/spec/controllers/welcome_controller_spec.rb
680
- - spec/tmp/app/views/layouts/application.html.erb
681
- - spec/tmp/app/views/pages/show.html.erb
682
- - spec/tmp/app/views/shared/_notice.html.erb
683
- - spec/tmp/app/models/defaults/role_type.rb
684
- - spec/tmp/app/models/defaults/avatar.rb
685
- - spec/tmp/app/models/defaults/asset.rb
686
- - spec/tmp/app/models/defaults/settings.rb
687
- - spec/tmp/app/models/defaults/position_type.rb
688
- - spec/tmp/app/models/defaults/picture.rb
689
- - spec/tmp/app/models/defaults/structure.rb
690
- - spec/tmp/app/models/defaults/attachment_file.rb
691
- - spec/tmp/app/models/defaults/ability.rb
692
- - spec/tmp/app/models/defaults/structure_type.rb
693
- - spec/tmp/app/models/defaults/user.rb
694
- - spec/tmp/app/models/sunrise/sunrise_user.rb
695
- - spec/tmp/app/models/sunrise/sunrise_page.rb
696
- - spec/tmp/app/models/sunrise/sunrise_navigation.rb
697
- - spec/tmp/app/models/sunrise/sunrise_structure.rb
698
- - spec/tmp/app/uploaders/attachment_file_uploader.rb
699
- - spec/tmp/app/uploaders/picture_uploader.rb
700
- - spec/tmp/app/uploaders/avatar_uploader.rb
701
- - spec/tmp/config/routes.rb
702
- - spec/tmp/config/application.rb
703
- - spec/tmp/config/database.yml.sample
704
- - spec/tmp/config/nginx-config.sample
705
- - spec/tmp/config/logrotate-config.sample
706
- - spec/tmp/config/initializers/sunrise.rb
707
- - spec/tmp/db/seeds.rb
708
674
  - spec/support/hooks/structure.rb
709
675
  - spec/support/helpers/controller_macros.rb
710
676
  - spec/support/helpers/controller_helper.rb
@@ -928,40 +894,6 @@ signing_key:
928
894
  specification_version: 3
929
895
  summary: Rails CMS
930
896
  test_files:
931
- - spec/tmp/spec/support/helpers/controller_macros.rb
932
- - spec/tmp/spec/spec_helper.rb
933
- - spec/tmp/spec/factories/structure_factory.rb
934
- - spec/tmp/spec/factories/user_factory.rb
935
- - spec/tmp/spec/controllers/pages_controller_spec.rb
936
- - spec/tmp/spec/controllers/welcome_controller_spec.rb
937
- - spec/tmp/app/views/layouts/application.html.erb
938
- - spec/tmp/app/views/pages/show.html.erb
939
- - spec/tmp/app/views/shared/_notice.html.erb
940
- - spec/tmp/app/models/defaults/role_type.rb
941
- - spec/tmp/app/models/defaults/avatar.rb
942
- - spec/tmp/app/models/defaults/asset.rb
943
- - spec/tmp/app/models/defaults/settings.rb
944
- - spec/tmp/app/models/defaults/position_type.rb
945
- - spec/tmp/app/models/defaults/picture.rb
946
- - spec/tmp/app/models/defaults/structure.rb
947
- - spec/tmp/app/models/defaults/attachment_file.rb
948
- - spec/tmp/app/models/defaults/ability.rb
949
- - spec/tmp/app/models/defaults/structure_type.rb
950
- - spec/tmp/app/models/defaults/user.rb
951
- - spec/tmp/app/models/sunrise/sunrise_user.rb
952
- - spec/tmp/app/models/sunrise/sunrise_page.rb
953
- - spec/tmp/app/models/sunrise/sunrise_navigation.rb
954
- - spec/tmp/app/models/sunrise/sunrise_structure.rb
955
- - spec/tmp/app/uploaders/attachment_file_uploader.rb
956
- - spec/tmp/app/uploaders/picture_uploader.rb
957
- - spec/tmp/app/uploaders/avatar_uploader.rb
958
- - spec/tmp/config/routes.rb
959
- - spec/tmp/config/application.rb
960
- - spec/tmp/config/database.yml.sample
961
- - spec/tmp/config/nginx-config.sample
962
- - spec/tmp/config/logrotate-config.sample
963
- - spec/tmp/config/initializers/sunrise.rb
964
- - spec/tmp/db/seeds.rb
965
897
  - spec/support/hooks/structure.rb
966
898
  - spec/support/helpers/controller_macros.rb
967
899
  - spec/support/helpers/controller_helper.rb
@@ -1,18 +0,0 @@
1
- class Ability < Sunrise::Models::Ability
2
-
3
- def guest
4
- # TODO
5
- end
6
-
7
- def default
8
- # TODO
9
- end
10
-
11
- def redactor
12
- # TODO
13
- end
14
-
15
- def moderator
16
- # TODO
17
- end
18
- end
@@ -1,7 +0,0 @@
1
- class Asset < ActiveRecord::Base
2
- include Sunrise::Models::Asset
3
-
4
- validates_presence_of :data
5
-
6
- default_scope order("#{quoted_table_name}.sort_order")
7
- end
@@ -1,5 +0,0 @@
1
- class AttachmentFile < Asset
2
- sunrise_uploader AttachmentFileUploader
3
-
4
- validates_filesize_of :data, :maximum => 100.megabytes.to_i
5
- end
@@ -1,7 +0,0 @@
1
- class Avatar < Asset
2
- sunrise_uploader AvatarUploader
3
-
4
- validates :data_content_type, :inclusion => {:in => Sunrise::Utils::IMAGE_TYPES }
5
- validates_integrity_of :data
6
- validates_filesize_of :data, :maximum => 1.megabytes.to_i
7
- end
@@ -1,7 +0,0 @@
1
- class Picture < Asset
2
- sunrise_uploader PictureUploader
3
-
4
- validates :data_content_type, :inclusion => {:in => Sunrise::Utils::IMAGE_TYPES }
5
- validates_integrity_of :data
6
- validates_filesize_of :data, :maximum => 2.megabytes.to_i
7
- end
@@ -1,7 +0,0 @@
1
- class PositionType < Sunrise::Models::PositionType
2
- define_enum do |builder|
3
- builder.member :default, :object => new("default")
4
- builder.member :menu, :object => new("menu")
5
- builder.member :bottom, :object => new("bottom")
6
- end
7
- end
@@ -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,6 +0,0 @@
1
- class Settings < ActiveRecord::Base
2
- include Sunrise::Models::Settings
3
- include PublicActivity::Model
4
-
5
- tracked owner: ->(controller, model) { controller.try(:current_user) }
6
- end
@@ -1,10 +0,0 @@
1
- class Structure < ActiveRecord::Base
2
- include Sunrise::Models::Structure
3
- include PageParts::Extension
4
- include MetaManager::Taggable
5
- include PublicActivity::Model
6
- include ActiveModel::ForbiddenAttributesProtection
7
-
8
- tracked owner: ->(controller, model) { controller.try(:current_user) }
9
- # page_parts :content
10
- 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,14 +0,0 @@
1
- class User < ActiveRecord::Base
2
- include Sunrise::Models::User
3
- include PublicActivity::Model
4
- include ActiveModel::ForbiddenAttributesProtection
5
-
6
- # Include default devise modules.
7
- devise :database_authenticatable, :confirmable, :lockable, :timeoutable,
8
- :recoverable, :rememberable, :trackable, :validatable,
9
- :encryptable, :encryptor => :sha512
10
-
11
- fileuploads :avatar
12
-
13
- tracked owner: ->(controller, model) { controller.try(:current_user) }
14
- 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,10 +0,0 @@
1
- class SunrisePage < Sunrise::AbstractModel
2
- self.resource_name = "Structure"
3
-
4
- list false
5
-
6
- edit do
7
- field :main, :as => :text
8
- field :sidebar, :as => :text
9
- end
10
- 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 :structure_type_id, :collection => lambda { StructureType.all }, :include_blank => false
26
- field :position_type_id, :collection => lambda { PositionType.all }, :include_blank => false
27
- field :is_visible
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,5 +0,0 @@
1
- class AttachmentFileUploader < Sunrise::CarrierWave::BaseUploader
2
- def extension_white_list
3
- %w(pdf doc docx xls xlsx ppt pptx zip rar csv)
4
- end
5
- 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,2 +0,0 @@
1
- <h1><%= @structure.title %></h1>
2
- <%=raw Nokogiri::HTML.fragment(@page.content).to_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,51 +0,0 @@
1
- require 'meta_manager/orm/active_record'
2
- require 'page_parts/orm/active_record'
3
-
4
- # Use this hook to configure sunrise
5
- Sunrise.setup do |config|
6
- # Paginate records per page (default: 25)
7
- # config.default_items_per_page = 25
8
-
9
- # Display audits events on dashboard (default: 50)
10
- # config.activities_per_page = 50
11
-
12
- # By default show latest first (default: :desc)
13
- # config.default_sort_mode = :desc
14
-
15
- # The display for a model instance (i.e. a single database record).
16
- # config.label_methods = [:title, :name]
17
-
18
- # Defailt list template view (default: "thumbs")
19
- # config.default_list_view = "thumbs"
20
-
21
- # Avariable lists views (default: [:list, :thumbs, :table])
22
- # config.available_list_view = [:list, :thumbs, :table]
23
-
24
- # Defailt list template view (default: "sort_order")
25
- # config.sort_column = "sort_order"
26
-
27
- # Find template before rendering (default: true)
28
- # config.scoped_views = true
29
-
30
- # Set available locales in app (default: [])
31
- # config.available_locales = []
32
-
33
- # Set transliteration for babosa gem
34
- # more info here: https://github.com/norman/babosa (default: :russian)
35
- # config.transliteration = :russian
36
-
37
- # Set list toolbar buttons (default: [:delete, :edit, :new, :sort, :export])
38
- # config.default_toolbar_buttons = [:delete, :edit, :new, :sort, :export]
39
-
40
- # Lists the formats that should be treated as navigational (default: [:html, :json])
41
- # config.navigational_formats = [:html, :json]
42
- end
43
-
44
- PublicActivity::Config.set do
45
- orm :active_record
46
- end
47
-
48
- #if Settings.table_exists?
49
- # Settings.defaults[:some_setting] = "value"
50
- # Settings.defaults[:some_setting2] = "value2"
51
- #end
@@ -1,9 +0,0 @@
1
- /var/www/gems/sunrise/spec/dummy/log/*.log {
2
- copytruncate
3
- daily
4
- rotate 4
5
- missingok
6
- notifempty
7
- compress
8
- nodelaycompress
9
- }
@@ -1,67 +0,0 @@
1
- # dummy
2
- #
3
- upstream dummy_backend {
4
- server unix:/var/www/dummy/tmp/sockets/unicorn.sock fail_timeout=0;
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
- try_files $uri $uri.html $uri/index.html cache$uri/index.html cache$uri.html cache$uri @app;
18
-
19
- location ^~ /cache {
20
- return 404;
21
- }
22
-
23
- location ~ /\.[^\/]+ {
24
- return 404;
25
- }
26
-
27
- location @app {
28
- proxy_redirect off;
29
- proxy_set_header Host $host;
30
- proxy_set_header X-Real-IP $remote_addr;
31
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
32
- # proxy_set_header X-Forwarded-Proto https; # for SSL, add this
33
-
34
- client_max_body_size 20m;
35
- client_body_buffer_size 128k;
36
-
37
- proxy_connect_timeout 90;
38
- proxy_send_timeout 90;
39
- proxy_read_timeout 90;
40
-
41
- proxy_buffer_size 4k;
42
- proxy_buffers 4 32k;
43
- proxy_busy_buffers_size 64k;
44
- proxy_temp_file_write_size 64k;
45
-
46
- proxy_pass http://dummy_backend;
47
- }
48
-
49
- location ~ ^/(assets|uploads|images|javascripts|stylesheets)/ {
50
- expires 1y;
51
- add_header Cache-Control public;
52
- add_header Last-Modified "";
53
- add_header ETag "";
54
- break;
55
- }
56
-
57
- # This rewrites all the requests to the maintenance.html page if it exists in the doc root.
58
- if (-f $document_root/system/maintenance.html) {
59
- return 503;
60
- }
61
-
62
- error_page 503 @503;
63
- location @503 {
64
- root /var/www/dummy/public;
65
- rewrite ^(.*)$ /system/maintenance.html break;
66
- }
67
- }