aboutsummaryrefslogtreecommitdiffstats
path: root/config
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
downloadhmnoweb-f087c23c8600fe197d3a59f4a0cd839754459b37.tar.gz
hmnoweb-f087c23c8600fe197d3a59f4a0cd839754459b37.tar.bz2
hmnoweb-f087c23c8600fe197d3a59f4a0cd839754459b37.zip
Initial commit.
Diffstat (limited to 'config')
-rw-r--r--config/application.rb68
-rw-r--r--config/boot.rb6
-rw-r--r--config/database.yml.mysql20
-rw-r--r--config/database.yml.postgresql58
-rw-r--r--config/database.yml.sqlite318
-rw-r--r--config/environment.rb5
-rw-r--r--config/environments/development.rb37
-rw-r--r--config/environments/production.rb67
-rw-r--r--config/environments/test.rb37
-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
-rw-r--r--config/locales/en.yml5
-rw-r--r--config/routes.rb66
24 files changed, 685 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
new file mode 100644
index 0000000..e27ac93
--- /dev/null
+++ b/config/application.rb
@@ -0,0 +1,68 @@
+require File.expand_path('../boot', __FILE__)
+
+# Pick the frameworks you want:
+require "active_record/railtie"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "active_resource/railtie"
+require "sprockets/railtie"
+# require "rails/test_unit/railtie"
+
+if defined?(Bundler)
+ # If you precompile assets before deploying to production, use this line
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
+ # If you want your assets lazily compiled in production, use this line
+ # Bundler.require(:default, :assets, Rails.env)
+end
+
+module ReligionsfrihetNo
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named.
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running.
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
+
+ # Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password]
+
+ # Enable escaping HTML in JSON.
+ config.active_support.escape_html_entities_in_json = true
+
+ # Use SQL instead of Active Record's schema dumper when creating the database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Enforce whitelist mode for mass assignment.
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
+ # parameters by using an attr_accessible or attr_protected declaration.
+ config.active_record.whitelist_attributes = true
+
+ # Enable the asset pipeline
+ config.assets.enabled = true
+
+ # Version of your assets, change this if you want to expire all your assets
+ config.assets.version = '1.0'
+ end
+end
diff --git a/config/boot.rb b/config/boot.rb
new file mode 100644
index 0000000..4489e58
--- /dev/null
+++ b/config/boot.rb
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
diff --git a/config/database.yml.mysql b/config/database.yml.mysql
new file mode 100644
index 0000000..75cca95
--- /dev/null
+++ b/config/database.yml.mysql
@@ -0,0 +1,20 @@
+development: &development
+ adapter: mysql2
+ host: localhost
+ username: root
+ password:
+ database: your_local_database
+
+test: &test
+ adapter: mysql2
+ host: localhost
+ username: root
+ password:
+ database: your_test_database
+
+production: &production
+ adapter: mysql2
+ host: localhost
+ database: your_production_database
+ username: your_production_database_login
+ password: your_production_database_password
diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql
new file mode 100644
index 0000000..09c55d3
--- /dev/null
+++ b/config/database.yml.postgresql
@@ -0,0 +1,58 @@
+# PostgreSQL. Versions 7.4 and 8.x are supported.
+#
+# Install the pg driver:
+# gem install pg
+# On Mac OS X with macports:
+# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
+# On Windows:
+# gem install pg
+# Choose the win32 build.
+# Install PostgreSQL and put its /bin directory on your path.
+#
+# Configure Using Gemfile
+# gem 'pg'
+#
+development:
+ adapter: postgresql
+ encoding: unicode
+ database: refinery_database_development
+ pool: 5
+ username: postgres
+ password: postgres
+ min_messages: warning
+
+ # Connect on a TCP socket. Omitted by default since the client uses a
+ # domain socket that doesn't need configuration. Windows does not have
+ # domain sockets, so uncomment these lines.
+ #host: localhost
+ #port: 5432
+
+ # Schema search path. The server defaults to $user,public
+ #schema_search_path: myapp,sharedapp,public
+
+ # Minimum log levels, in increasing order:
+ # debug5, debug4, debug3, debug2, debug1,
+ # log, notice, warning, error, fatal, and panic
+ # The server defaults to notice.
+ #min_messages: warning
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: postgresql
+ encoding: unicode
+ database: refinery_database_test
+ pool: 5
+ username: postgres
+ password: postgres
+ min_messages: warning
+
+production:
+ adapter: postgresql
+ encoding: unicode
+ database: refinery_database_production
+ pool: 5
+ username: postgres
+ password: postgres
+ min_messages: warning
diff --git a/config/database.yml.sqlite3 b/config/database.yml.sqlite3
new file mode 100644
index 0000000..a511ffe
--- /dev/null
+++ b/config/database.yml.sqlite3
@@ -0,0 +1,18 @@
+# SQLite version 3.x
+development:
+ adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
+ database: db/development.sqlite3
+ timeout: 5000
+
+# Warning: The database defined as 'test' will be erased and
+# re-generated from your development database when you run 'rake'.
+# Do not set this db to the same as development or production.
+test:
+ adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
+ database: db/test.sqlite3
+ timeout: 5000
+
+production:
+ adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
+ database: db/production.sqlite3
+ timeout: 5000
diff --git a/config/environment.rb b/config/environment.rb
new file mode 100644
index 0000000..3417c7b
--- /dev/null
+++ b/config/environment.rb
@@ -0,0 +1,5 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+ReligionsfrihetNo::Application.initialize!
diff --git a/config/environments/development.rb b/config/environments/development.rb
new file mode 100644
index 0000000..31efae2
--- /dev/null
+++ b/config/environments/development.rb
@@ -0,0 +1,37 @@
+ReligionsfrihetNo::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
+ config.cache_classes = false
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger
+ config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
+
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
+
+ # Do not compress assets
+ config.assets.compress = false
+
+ # Expands the lines which load the assets
+ config.assets.debug = true
+end
diff --git a/config/environments/production.rb b/config/environments/production.rb
new file mode 100644
index 0000000..8ccb3a8
--- /dev/null
+++ b/config/environments/production.rb
@@ -0,0 +1,67 @@
+ReligionsfrihetNo::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # Code is not reloaded between requests
+ config.cache_classes = true
+
+ # Full error reports are disabled and caching is turned on
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # Disable Rails's static asset server (Apache or nginx will already do this)
+ config.serve_static_assets = false
+
+ # Compress JavaScripts and CSS
+ config.assets.compress = true
+
+ # Don't fallback to assets pipeline if a precompiled asset is missed
+ config.assets.compile = true
+
+ # Generate digests for assets URLs
+ config.assets.digest = true
+
+ # Defaults to nil and saved in location specified by config.assets.prefix
+ # config.assets.manifest = YOUR_PATH
+
+ # Specifies the header that your server uses for sending files
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
+
+ # See everything in the log (default is :info)
+ # config.log_level = :debug
+
+ # Prepend all log lines with the following tags
+ # config.log_tags = [ :subdomain, :uuid ]
+
+ # Use a different logger for distributed setups
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+
+ # Use a different cache store in production
+ # config.cache_store = :mem_cache_store
+
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
+ # config.action_controller.asset_host = "http://assets.example.com"
+
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+ # config.assets.precompile += %w( search.js )
+
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable threaded mode
+ # config.threadsafe!
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found)
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners
+ config.active_support.deprecation = :notify
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
+end
diff --git a/config/environments/test.rb b/config/environments/test.rb
new file mode 100644
index 0000000..efec97a
--- /dev/null
+++ b/config/environments/test.rb
@@ -0,0 +1,37 @@
+ReligionsfrihetNo::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Configure static asset server for tests with Cache-Control for performance
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Log error messages when you accidentally call methods on nil
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
+end
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
diff --git a/config/locales/en.yml b/config/locales/en.yml
new file mode 100644
index 0000000..179c14c
--- /dev/null
+++ b/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+ hello: "Hello world"
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644
index 0000000..86c7a47
--- /dev/null
+++ b/config/routes.rb
@@ -0,0 +1,66 @@
+ReligionsfrihetNo::Application.routes.draw do
+
+ # This line mounts Refinery's routes at the root of your application.
+ # This means, any requests to the root URL of your application will go to Refinery::PagesController#home.
+ # If you would like to change where this extension is mounted, simply change the :at option to something different.
+ #
+ # We ask that you don't use the :as option here, as Refinery relies on it being the default of "refinery"
+ mount Refinery::Core::Engine, :at => '/'
+
+ # The priority is based upon order of creation:
+ # first created -> highest priority.
+
+ # Sample of regular route:
+ # match 'products/:id' => 'catalog#view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # resources :products
+
+ # Sample resource route with options:
+ # resources :products do
+ # member do
+ # get 'short'
+ # post 'toggle'
+ # end
+ #
+ # collection do
+ # get 'sold'
+ # end
+ # end
+
+ # Sample resource route with sub-resources:
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
+
+ # Sample resource route with more complex sub-resources
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get 'recent', :on => :collection
+ # end
+ # end
+
+ # Sample resource route within a namespace:
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
+
+ # You can have the root of your site routed with "root"
+ # just remember to delete public/index.html.
+ # root :to => 'welcome#index'
+
+ # See how all your routes lay out with "rake routes"
+
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
+ # Note: This route will make all actions in every controller accessible via GET requests.
+ # match ':controller(/:action(/:id))(.:format)'
+end