aboutsummaryrefslogtreecommitdiffstats
path: root/config/initializers
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2013-01-25 21:53:05 +0100
committerHarald Eilertsen <haraldei@anduin.net>2013-01-25 21:53:05 +0100
commitf087c23c8600fe197d3a59f4a0cd839754459b37 (patch)
tree5577105a38545b143efec0bdb8c134bea04005c8 /config/initializers
downloadhmnoweb-f087c23c8600fe197d3a59f4a0cd839754459b37.tar.gz
hmnoweb-f087c23c8600fe197d3a59f4a0cd839754459b37.tar.bz2
hmnoweb-f087c23c8600fe197d3a59f4a0cd839754459b37.zip
Initial commit.
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/backtrace_silencers.rb7
-rw-r--r--config/initializers/inflections.rb15
-rw-r--r--config/initializers/mime_types.rb5
-rw-r--r--config/initializers/refinery/authentication.rb5
-rw-r--r--config/initializers/refinery/core.rb52
-rw-r--r--config/initializers/refinery/core.rb.example52
-rw-r--r--config/initializers/refinery/i18n.rb10
-rw-r--r--config/initializers/refinery/images.rb45
-rw-r--r--config/initializers/refinery/pages.rb53
-rw-r--r--config/initializers/refinery/resources.rb27
-rw-r--r--config/initializers/secret_token.rb7
-rw-r--r--config/initializers/session_store.rb6
-rw-r--r--config/initializers/wrap_parameters.rb14
13 files changed, 298 insertions, 0 deletions
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
new file mode 100644
index 0000000..59385cd
--- /dev/null
+++ b/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
new file mode 100644
index 0000000..5d8d9be
--- /dev/null
+++ b/config/initializers/inflections.rb
@@ -0,0 +1,15 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
+#
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.acronym 'RESTful'
+# end
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
new file mode 100644
index 0000000..72aca7e
--- /dev/null
+++ b/config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
diff --git a/config/initializers/refinery/authentication.rb b/config/initializers/refinery/authentication.rb
new file mode 100644
index 0000000..d90a392
--- /dev/null
+++ b/config/initializers/refinery/authentication.rb
@@ -0,0 +1,5 @@
+# encoding: utf-8
+Refinery::Authentication.configure do |config|
+ # Configure whether to allow superuser to assign roles
+ # config.superuser_can_assign_roles = false
+end
diff --git a/config/initializers/refinery/core.rb b/config/initializers/refinery/core.rb
new file mode 100644
index 0000000..0d08447
--- /dev/null
+++ b/config/initializers/refinery/core.rb
@@ -0,0 +1,52 @@
+# encoding: utf-8
+Refinery::Core.configure do |config|
+ # When true will rescue all not found errors and display a friendly error page
+ config.rescue_not_found = Rails.env.production?
+
+ # When true this will force SSL redirection in all Refinery backend controllers.
+ # config.force_ssl = false
+
+ # When true will use Amazon's Simple Storage Service instead of
+ # the default file system for storing resources and images
+ config.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)
+
+ # Whenever Refinery caches anything and can set a cache key, it will add
+ # a prefix to the cache key containing the string you set here.
+ # config.base_cache_key = :refinery
+
+ # Site name
+ config.site_name = "Religionsfrihet i Praksis"
+
+ # This activates Google Analytics tracking within your website. If this
+ # config is left blank or set to UA-xxxxxx-x then no remote calls to
+ # Google Analytics are made.
+ # config.google_analytics_page_code = "UA-xxxxxx-x"
+
+ # Enable/disable authenticity token on frontend
+ # config.authenticity_token_on_frontend = true
+
+ # Hide/show child pages in menu
+ # config.menu_hide_children = false
+
+ # CSS class selectors for menu helper
+ # config.menu_css = {:selected=>"selected", :first=>"first", :last=>"last"}
+
+ # Should set this if concerned about DOS attacks. See
+ # http://markevans.github.com/dragonfly/file.Configuration.html#Configuration
+ # config.dragonfly_secret = "d1122d494d5ff96a870d13bcd2ea0b9f2d9bf1fbd0cbc59b"
+
+ # Show/hide IE6 upgrade message in the backend
+ # config.ie6_upgrade_message_enabled = true
+
+ # Show/hide browser update message in the backend
+ # config.show_internet_explorer_upgrade_message = false
+
+ # Add extra tags to the wymeditor whitelist e.g. = {'tag' => {'attributes' => {'1' => 'href'}}} or just {'tag' => {}}
+ # config.wymeditor_whitelist_tags = {}
+
+ # Register extra javascript for backend
+ # config.register_javascript "prototype-rails"
+
+ # Register extra stylesheet for backend (optional options)
+ # config.register_stylesheet "custom", :media => 'screen'
+end
diff --git a/config/initializers/refinery/core.rb.example b/config/initializers/refinery/core.rb.example
new file mode 100644
index 0000000..0d08447
--- /dev/null
+++ b/config/initializers/refinery/core.rb.example
@@ -0,0 +1,52 @@
+# encoding: utf-8
+Refinery::Core.configure do |config|
+ # When true will rescue all not found errors and display a friendly error page
+ config.rescue_not_found = Rails.env.production?
+
+ # When true this will force SSL redirection in all Refinery backend controllers.
+ # config.force_ssl = false
+
+ # When true will use Amazon's Simple Storage Service instead of
+ # the default file system for storing resources and images
+ config.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)
+
+ # Whenever Refinery caches anything and can set a cache key, it will add
+ # a prefix to the cache key containing the string you set here.
+ # config.base_cache_key = :refinery
+
+ # Site name
+ config.site_name = "Religionsfrihet i Praksis"
+
+ # This activates Google Analytics tracking within your website. If this
+ # config is left blank or set to UA-xxxxxx-x then no remote calls to
+ # Google Analytics are made.
+ # config.google_analytics_page_code = "UA-xxxxxx-x"
+
+ # Enable/disable authenticity token on frontend
+ # config.authenticity_token_on_frontend = true
+
+ # Hide/show child pages in menu
+ # config.menu_hide_children = false
+
+ # CSS class selectors for menu helper
+ # config.menu_css = {:selected=>"selected", :first=>"first", :last=>"last"}
+
+ # Should set this if concerned about DOS attacks. See
+ # http://markevans.github.com/dragonfly/file.Configuration.html#Configuration
+ # config.dragonfly_secret = "d1122d494d5ff96a870d13bcd2ea0b9f2d9bf1fbd0cbc59b"
+
+ # Show/hide IE6 upgrade message in the backend
+ # config.ie6_upgrade_message_enabled = true
+
+ # Show/hide browser update message in the backend
+ # config.show_internet_explorer_upgrade_message = false
+
+ # Add extra tags to the wymeditor whitelist e.g. = {'tag' => {'attributes' => {'1' => 'href'}}} or just {'tag' => {}}
+ # config.wymeditor_whitelist_tags = {}
+
+ # Register extra javascript for backend
+ # config.register_javascript "prototype-rails"
+
+ # Register extra stylesheet for backend (optional options)
+ # config.register_stylesheet "custom", :media => 'screen'
+end
diff --git a/config/initializers/refinery/i18n.rb b/config/initializers/refinery/i18n.rb
new file mode 100644
index 0000000..96671d4
--- /dev/null
+++ b/config/initializers/refinery/i18n.rb
@@ -0,0 +1,10 @@
+# encoding: utf-8
+
+Refinery::I18n.configure do |config|
+ config.enabled = true
+ config.default_locale = :nb
+ config.current_locale = :nb
+ config.default_frontend_locale = :nb
+ config.frontend_locales = [:nb, :en]
+ config.locales = {:en=>"English", :fr=>"Français", :nl=>"Nederlands", :"pt-BR"=>"Português", :da=>"Dansk", :nb=>"Norsk Bokmål", :sl=>"Slovenian", :es=>"Español", :it=>"Italiano", :de=>"Deutsch", :lv=>"Latviski", :ru=>"Русский", :sv=>"Svenska", :pl=>"Polski", :"zh-CN"=>"Simplified Chinese", :"zh-TW"=>"Traditional Chinese", :el=>"Ελληνικά", :rs=>"Srpski", :cs=>"Česky", :sk=>"Slovenský", :ja=>"日本語", :bg=>"Български"}
+end
diff --git a/config/initializers/refinery/images.rb b/config/initializers/refinery/images.rb
new file mode 100644
index 0000000..58c01ff
--- /dev/null
+++ b/config/initializers/refinery/images.rb
@@ -0,0 +1,45 @@
+# encoding: utf-8
+Refinery::Images.configure do |config|
+ # Configures the maximum allowed upload size (in bytes) for an image
+ # config.max_image_size = 5242880
+
+ # Configure how many images per page should be displayed when a dialog is presented that contains images
+ # config.pages_per_dialog = 18
+
+ # Configure how many images per page should be displayed when a dialog is presented that
+ # contains images and image resize options
+ # config.pages_per_dialog_that_have_size_options = 12
+
+ # Configure how many images per page should be displayed in the list of images in the admin area
+ # config.pages_per_admin_index = 20
+
+ # Configure image sizes
+ # config.user_image_sizes = {:small=>"110x110>", :medium=>"225x255>", :large=>"450x450>"}
+
+ # Configure white-listed mime types for validation
+ # config.whitelisted_mime_types = ["image/jpeg", "image/png", "image/gif", "image/tiff"]
+
+ # Configure image view options
+ # config.image_views = [:grid, :list]
+
+ # Configure default image view
+ # config.preferred_image_view = :grid
+
+ # Configure S3 (you can also use ENV for this)
+ # The s3_backend setting by default defers to the core setting for this but can be set just for images.
+ # config.s3_backend = Refinery::Core.s3_backend
+ # config.s3_bucket_name = ENV['S3_BUCKET']
+ # config.s3_access_key_id = ENV['S3_KEY']
+ # config.s3_secret_access_key = ENV['S3_SECRET']
+ # config.s3_region = ENV['S3_REGION]
+
+ # Configure Dragonfly
+ # This is where in the middleware stack to insert the Dragonfly middleware
+ # config.dragonfly_insert_before = "ActionDispatch::Callbacks"
+ # config.dragonfly_secret = "d1122d494d5ff96a870d13bcd2ea0b9f2d9bf1fbd0cbc59b"
+ # If you decide to trust file extensions replace :ext below with :format
+ # config.dragonfly_url_format = "/system/images/:job/:basename.:ext"
+ # config.datastore_root_path = "/home/haraldei/src/religionsfrihet.no/public/system/refinery/images"
+ # config.trust_file_extensions = false
+
+end
diff --git a/config/initializers/refinery/pages.rb b/config/initializers/refinery/pages.rb
new file mode 100644
index 0000000..c1d10a8
--- /dev/null
+++ b/config/initializers/refinery/pages.rb
@@ -0,0 +1,53 @@
+# encoding: utf-8
+Refinery::Pages.configure do |config|
+ # Configure specific page templates
+ # config.types.register :home do |home|
+ # home.parts = %w[intro body]
+ # end
+
+ # Configure global page default parts
+ # config.default_parts = ["Body", "Side Body"]
+
+ # Configure whether to allow adding new page parts
+ # config.new_page_parts = false
+
+ # Configure whether to enable marketable_urls
+ # config.marketable_urls = true
+
+ # Configure how many pages per page should be displayed when a dialog is presented that contains a links to pages
+ # config.pages_per_dialog = 14
+
+ # Configure how many pages per page should be displayed in the list of pages in the admin area
+ # config.pages_per_admin_index = 20
+
+ # Configure whether to strip diacritics from Western characters
+ # config.approximate_ascii = false
+
+ # Configure whether to strip non-ASCII characters from the friendly_id string
+ # config.strip_non_ascii = false
+
+ # Set this to true if you want to override slug which automatically gets generated
+ # when you create a page
+ # config.use_custom_slugs = false
+
+ # Set this to true if you want backend pages to be cached
+ # config.cache_pages_backend = false
+
+ # Set this to true to activate full-page-cache
+ # config.cache_pages_full = false
+
+ # Set this to true to fully expand the page hierarchy in the admin
+ # config.auto_expand_admin_tree = true
+
+ # config.layout_template_whitelist = ["application"]
+
+ # config.view_template_whitelist = ["home", "show"]
+
+ # config.use_layout_templates = false
+
+ # config.use_view_templates = false
+
+ # config.page_title = {:chain_page_title=>false, :ancestors=>{:separator=>" | ", :class=>"ancestors", :tag=>"span"}, :page_title=>{:class=>nil, :tag=>nil, :wrap_if_not_chained=>false}}
+
+ # config.absolute_page_links = false
+end
diff --git a/config/initializers/refinery/resources.rb b/config/initializers/refinery/resources.rb
new file mode 100644
index 0000000..d2fe7f9
--- /dev/null
+++ b/config/initializers/refinery/resources.rb
@@ -0,0 +1,27 @@
+# encoding: utf-8
+Refinery::Resources.configure do |config|
+ # Configures the maximum allowed upload size (in bytes) for a file upload
+ # config.max_file_size = 52428800
+
+ # Configure how many resources per page should be displayed when a dialog is presented that contains resources
+ # config.pages_per_dialog = 12
+
+ # Configure how many resources per page should be displayed in the list of resources in the admin area
+ # config.pages_per_admin_index = 20
+
+ # Configure S3 (you can also use ENV for this)
+ # The s3_backend setting by default defers to the core setting for this but can be set just for resources.
+ # config.s3_backend = Refinery::Core.s3_backend
+ # config.s3_bucket_name = ENV['S3_BUCKET']
+ # config.s3_access_key_id = ENV['S3_KEY']
+ # config.s3_secret_access_key = ENV['S3_SECRET']
+ # config.s3_region = ENV['S3_REGION]
+
+ # Configure Dragonfly
+ # This is where in the middleware stack to insert the Dragonfly middleware
+ # config.dragonfly_insert_before = "ActionDispatch::Callbacks"
+ # config.dragonfly_secret = "d1122d494d5ff96a870d13bcd2ea0b9f2d9bf1fbd0cbc59b"
+ # config.dragonfly_url_format = "/system/resources/:job/:basename.:format"
+ # config.datastore_root_path = "/home/haraldei/src/religionsfrihet.no/public/system/refinery/resources"
+
+end
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
new file mode 100644
index 0000000..4169eb1
--- /dev/null
+++ b/config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+ReligionsfrihetNo::Application.config.secret_token = '326727027aa26095e98aeccc39abfdabb117fb93d843ea3f89330f6120bcbd3a56566124c3667d554793783b45a0d1aed68b4923944032c14ee40752870667d5'
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
new file mode 100644
index 0000000..0eb8a1e
--- /dev/null
+++ b/config/initializers/session_store.rb
@@ -0,0 +1,6 @@
+# Be sure to restart your server when you modify this file.
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+ReligionsfrihetNo::Application.config.session_store :active_record_store
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
new file mode 100644
index 0000000..999df20
--- /dev/null
+++ b/config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+ self.include_root_in_json = false
+end