Skip to content
Snippets Groups Projects
Commit 26952f39 authored by Robert Glaser's avatar Robert Glaser
Browse files

First modifications for Rails 3, more to come...

parent 1f9004a2
Branches
Tags
No related merge requests found
Showing
with 611 additions and 371 deletions
.bundle
db/*.sqlite3
log/*.log
tmp/*
config/database.yml
config/services.yml
tmp/**/*
.svn
.DS_Store
*.tmproj
nbproject
.svn
rerun.txt
\ No newline at end of file
Gemfile 0 → 100644
source 'http://rubygems.org'
gem 'rails', '3.0.0'
gem 'will_paginate', '3.0.pre2'
gem 'authlogic'
gem 'cancan'
gem 'iq_rdf'
group :development do
gem 'mongrel'
platforms :mri do
gem 'mysql2'
end
platforms :jruby do
gem 'activerecord-jdbcmysql-adapter'
end
end
group :test, :cucumber do
gem 'cucumber'
gem 'cucumber-rails'
gem 'database_cleaner'
gem 'capybara'
gem 'factory_girl_rails'
gem 'faker'
gem 'culerity'
end
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.0)
actionpack (= 3.0.0)
mail (~> 2.2.5)
actionpack (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4.1)
rack (~> 1.2.1)
rack-mount (~> 0.6.12)
rack-test (~> 0.5.4)
tzinfo (~> 0.3.23)
activemodel (3.0.0)
activesupport (= 3.0.0)
builder (~> 2.1.2)
i18n (~> 0.4.1)
activerecord (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
arel (~> 1.0.0)
tzinfo (~> 0.3.23)
activeresource (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
activesupport (3.0.0)
arel (1.0.1)
activesupport (~> 3.0.0)
authlogic (2.1.6)
activesupport
builder (2.1.2)
cancan (1.3.3)
capybara (0.3.9)
culerity (>= 0.2.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (>= 0.0.3)
cgi_multipart_eof_fix (2.5.0)
cucumber (0.8.5)
builder (~> 2.1.2)
diff-lcs (~> 1.1.2)
gherkin (~> 2.1.4)
json_pure (~> 1.4.3)
term-ansicolor (~> 1.0.4)
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
culerity (0.2.12)
daemons (1.1.0)
database_cleaner (0.5.2)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
factory_girl (1.3.2)
factory_girl_rails (1.0)
factory_girl (~> 1.3)
rails (>= 3.0.0.beta4)
faker (0.3.1)
fastthread (1.0.7)
ffi (0.6.3)
rake (>= 0.8.7)
gem_plugin (0.2.3)
gherkin (2.1.5)
trollop (~> 1.16.2)
i18n (0.4.1)
iq_rdf (0.0.6)
json_pure (1.4.6)
mail (2.2.5)
activesupport (>= 2.3.6)
mime-types
treetop (>= 1.4.5)
mime-types (1.16)
mongrel (1.1.5)
cgi_multipart_eof_fix (>= 2.4)
daemons (>= 1.0.3)
fastthread (>= 1.0.1)
gem_plugin (>= 0.2.3)
mysql2 (0.2.3)
nokogiri (1.4.3.1)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.12)
rack (>= 1.0.0)
rack-test (0.5.4)
rack (>= 1.0)
rails (3.0.0)
actionmailer (= 3.0.0)
actionpack (= 3.0.0)
activerecord (= 3.0.0)
activeresource (= 3.0.0)
activesupport (= 3.0.0)
bundler (~> 1.0.0)
railties (= 3.0.0)
railties (3.0.0)
actionpack (= 3.0.0)
activesupport (= 3.0.0)
rake (>= 0.8.4)
thor (~> 0.14.0)
rake (0.8.7)
rubyzip (0.9.4)
selenium-webdriver (0.0.28)
ffi (>= 0.6.1)
json_pure
rubyzip
term-ansicolor (1.0.5)
thor (0.14.0)
treetop (1.4.8)
polyglot (>= 0.3.1)
trollop (1.16.2)
tzinfo (0.3.23)
will_paginate (3.0.pre2)
PLATFORMS
ruby
DEPENDENCIES
activerecord-jdbcmysql-adapter
authlogic
cancan
capybara
cucumber
cucumber-rails
culerity
database_cleaner
factory_girl_rails
faker
iq_rdf
mongrel
mysql2
rails (= 3.0.0)
will_paginate (= 3.0.pre2)
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require File.expand_path('../config/application', __FILE__)
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
task :default => ['test:units', 'test:functionals']
Iqvoc::Application.load_tasks
......@@ -7,13 +7,11 @@ class ApplicationController < ActionController::Base
helper :all
helper_method :current_user_session, :current_user
filter_parameter_logging :password, :password_confirmation
rescue_from ActiveRecord::RecordNotFound, Iqvoc::NotFound, :with => :handle_not_found
rescue_from Iqvoc::MultipleChoices, :with => :handle_multiple_choices
rescue_from CanCan::AccessDenied, :with => :handle_access_denied
# protect_from_forgery # :secret => '1435541cd4331702e8f0a97a91feced4'
protect_from_forgery
protected
......
......@@ -2,7 +2,8 @@
<html data-locale="<%= I18n.locale %>">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<%= csrf_meta_tag %>
<title>UMTHES&reg; - Der UmweltThesaurus</title>
<%= stylesheet_link_tag "/stylesheets/blueprint/screen.css", :media => "screen, projection" %>
<%= stylesheet_link_tag "/stylesheets/blueprint/print.css", :media => "print" %>
......@@ -55,7 +56,6 @@
<% end %>
<a href="http://www.w3.org/2001/sw/" id="w3c_link"></a>
</div>
<!-- iQvoc build <%= "#{REVISION_NUMBER} (#{APP_CODENAME})" %> -->
</div>
</div>
......
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Iqvoc::Application
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
module Iqvoc
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
# config.i18n.available_locales = [:de, :en]
# JavaScript files you want as :defaults (application.js is always included).
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
# 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, :password_confirmation]
# The default URI prefix for RDF data. This will be followed by a document
# specific shnippet like (specimenType) and the id.
config.rdf_data_uri_prefix = "http://virtuoso.dyndns.org/umthes/"
# The JDBC driver url for the coinnection to the virtuoso triple store.
# Login crdentials have to be stored here too. See
# http://docs.openlinksw.com/virtuoso/VirtuosoDriverJDBC.html#jdbcurl4mat for
# more details.
# Example: "jdbc:virtuoso://localhost:1111/UID=dba/PWD=dba"
# Use nil to disable virtuoso triple synchronization
config.virtuoso_jdbc_driver_url = nil
# Set up the virtuoso synchronization (which is a triggered pull from the
# virtuoso server) to be run in a new thread.
# This is needed in environments where the webserver only runs in a single
# process/thread (mostly in development environments).
# When a synchronizaion would be triggered e.g. from a running
# update action in the UPB, the update would trigger virtuoso to do a HTTP GET
# back to the UPB to fetch the RDF data. But the only process in the UPB would be
# blocked by the update... => Deadlock. You can avoid this by using the threaded
# mode.
config.virtuoso_sync_threaded = false
end
end
# Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
module Rails
class << self
def boot!
unless booted?
preinitialize
pick_boot.run
end
end
def booted?
defined? Rails::Initializer
end
def pick_boot
(vendor_rails? ? VendorBoot : GemBoot).new
end
def vendor_rails?
File.exist?("#{RAILS_ROOT}/vendor/rails")
end
def preinitialize
load(preinitializer_path) if File.exist?(preinitializer_path)
end
def preinitializer_path
"#{RAILS_ROOT}/config/preinitializer.rb"
end
end
class Boot
def run
load_initializer
Rails::Initializer.run(:set_load_path)
end
end
class VendorBoot < Boot
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
Rails::GemDependency.add_frozen_gem_path
end
end
class GemBoot < Boot
def load_initializer
self.class.load_rubygems
load_rails_gem
require 'initializer'
end
def load_rails_gem
if version = self.class.gem_version
gem 'rails', version
else
gem 'rails'
end
rescue Gem::LoadError => load_error
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
exit 1
end
class << self
def rubygems_version
Gem::RubyGemsVersion rescue nil
end
def gem_version
if defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION
elsif ENV.include?('RAILS_GEM_VERSION')
ENV['RAILS_GEM_VERSION']
else
parse_gem_version(read_environment_rb)
end
end
def load_rubygems
min_version = '1.3.2'
require 'rubygems'
unless rubygems_version >= min_version
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
end
rescue LoadError
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
exit 1
end
def parse_gem_version(text)
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
end
private
def read_environment_rb
File.read("#{RAILS_ROOT}/config/environment.rb")
end
end
end
end
# # Bundler
# class Rails::Boot
# def run
# load_initializer
#
# Rails::Initializer.class_eval do
# def load_gems
# @bundler_loaded ||= Bundler.require :default, Rails.env
# end
# end
#
# Rails::Initializer.run(:set_load_path)
# end
# end
# All that for this:
Rails.boot!
# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
# MySQL. Versions 4.1 and 5.0 are recommended.
#
#
# Be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
encoding: utf8
username: root
password:
database: iqvoc_development
<% if defined?(JRuby) %>
adapter: jdbcmysql
hostname: localhost
<% else %>
adapter: mysql2
<% end %>
import_test:
encoding: utf8
username: root
password:
database: iqvoc_test
<% if defined?(JRuby) %>
adapter: jdbcmysql
hostname: localhost
<% else %>
adapter: mysql2
<% end %>
test:
encoding: utf8
username: root
password:
database: iqvoc_test
<% if defined?(JRuby) %>
adapter: jdbcmysql
hostname: localhost
<% else %>
adapter: mysql2
<% end %>
\ No newline at end of file
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
# Load the rails application
require File.expand_path('../application', __FILE__)
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
# 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.
# See Rails::Configuration for more options.
# Skip frameworks you're not going to use (only works if using vendor/rails).
# To use Rails without a database, you must remove the Active Record framework
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
# Only load the plugins named here, in the order given. By default, all plugins
# in vendor/plugins are loaded in alphabetical order.
# :all can be used as a placeholder for all plugins not explicitly named
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Add additional load paths for your own custom dirs
# config.load_paths += %W( #{RAILS_ROOT}/app/classes )
config.gem "will_paginate"
config.gem "authlogic"
config.gem "cancan"
config.gem "configatron"
config.gem "iq_rdf"
# Force all environments to use the same logger level
# (by default production uses :info, the others :debug)
# config.log_level = :debug
# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions 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.
config.action_controller.session = {
:session_key => '_iqvoc_server_session',
:secret => 'b1a59e4f637e3ac20098b0066662ff916c2558fe857fd7cface967a743a68b50caa30d6d2087a91823bb2e94c129bd4160a370cf622d790e3c6ee32fbca8a5fa'
}
# 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 'rake db:sessions:create')
# config.action_controller.session_store = :active_record_store
# Use SQL instead of Active Record's schema dumper when creating the test 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
# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector
# Make Active Record use UTC-base instead of local time
# config.active_record.default_timezone = :utc
config.i18n.default_locale = :de
require "configatron"
# The default URI prefix for RDF data. This will be followed by a document
# specific shnippet like (specimenType) and the id.
configatron.rdf_data_uri_prefix = "http://virtuoso.dyndns.org/umthes/"
# The JDBC driver url for the coinnection to the virtuoso triple store.
# Login crdentials have to be stored here too. See
# http://docs.openlinksw.com/virtuoso/VirtuosoDriverJDBC.html#jdbcurl4mat for
# more details.
# Example: "jdbc:virtuoso://localhost:1111/UID=dba/PWD=dba"
# Use nil to disable virtuoso triple synchronization
configatron.virtuoso_jdbc_driver_url = nil
# Set up the virtuoso synchronization (which is a triggered pull from the
# virtuoso server) to be run in a new thread.
# This is needed in environments where the webserver only runs in a single
# process/thread (mostly in development environments).
# When a synchronizaion would be triggered e.g. from a running
# update action in the UPB, the update would trigger virtuoso to do a HTTP GET
# back to the UPB to fetch the RDF data. But the only process in the UPB would be
# blocked by the update... => Deadlock. You can avoid this by using the threaded
# mode.
configatron.virtuoso_sync_threaded = false
end
# Der Default ist FALSE!!! Rails speichert somit nur den Klassennamen ohne Namespace in der "type" Spalte!
ActiveRecord::Base.store_full_sti_class = true
REVISION_NUMBER = `svn info`.split("\n")[4][/\d+/].to_i rescue ''
APP_CODENAME = IO.readlines('/usr/share/dict/words')[REVISION_NUMBER].chomp rescue ''
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
if instance.error_message.kind_of?(Array)
%(#{html_tag}<span class="fieldWithErrors">&nbsp;</span>)
else
%(#{html_tag}<span class="fieldWithErrors">&nbsp;</span>)
end
end
\ No newline at end of file
# Initialize the rails application
Iqvoc::Application.initialize!
# Edit at your own peril - it's recommended to regenerate this file
# in the future when you upgrade to a newer version of Cucumber.
Iqvoc::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# IMPORTANT: Setting config.cache_classes to false is known to
# break Cucumber's use_transactional_fixtures method.
# For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165
# 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
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
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
......@@ -21,10 +25,11 @@ config.action_controller.allow_forgery_protection = false
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
config.gem 'cucumber', :version => ">=0.6.2"
config.gem 'cucumber-rails', :lib => false, :version => '>=0.3.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
config.gem 'database_cleaner', :lib => false, :version => '>=0.5.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/database_cleaner'))
config.gem 'capybara', :lib => false, :version => '>=0.3.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/capybara'))
config.gem 'factory_girl', :version => ">=1.2.3"
config.gem 'faker', :version => ">=0.3.1"
config.gem 'culerity', :version => ">=0.2.9"
\ No newline at end of file
# Use SQL instead of Active Record's schema dumper when creating the test 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
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
config.cache_classes = false
Iqvoc::Application.configure do
# Settings specified here will take precedence over those in config/environment.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
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_view.cache_template_loading = 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
......@@ -14,9 +23,13 @@ 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 = :persistent
config.action_mailer.delivery_method = :test
config.after_initialize do
require 'culerity/persistent_delivery'
end
# Use SQL instead of Active Record's schema dumper when creating the test 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
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
Iqvoc::Application.configure do
# Settings specified here will take precedence over those in config/environment.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 webserver when you make code changes.
......@@ -7,13 +10,19 @@ config.cache_classes = false
config.whiny_nils = true
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.consider_all_requests_local = true
config.action_view.debug_rjs = 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
# The default URI prefix for RDF data. This will be followed by a document
# specific shnippet like (specimenType) and the id.
......@@ -24,7 +33,7 @@ config.action_mailer.raise_delivery_errors = false
# Example: "jdbc:virtuoso://localhost:1111/UID=dba/PWD=dba"
# Use nil to disable virtuoso triple synchronization
# configatron.virtuoso_jdbc_driver_url = "jdbc:virtuoso://virtuoso.dyndns.org:1111/UID=iqvoc/PWD=vocpass!/charset=UTF-8"
configatron.virtuoso_jdbc_driver_url = nil
config.virtuoso_jdbc_driver_url = nil
# Set up the virtuoso synchronization (which is a triggered pull from the
# virtuoso server) to be run in a new thread.
......@@ -35,4 +44,5 @@ configatron.virtuoso_jdbc_driver_url = nil
# back to the UPB to fetch the RDF data. But the only process in the UPB would be
# blocked by the update... => Deadlock. You can avoid this by using the threaded
# mode.
configatron.virtuoso_sync_threaded = false
config.virtuoso_sync_threaded = false
end
# 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 webserver when you make code changes.
config.cache_classes = false
Iqvoc::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
# See everything in the log (default is :info)
# config.log_level = :debug
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = false
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# 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
end
Iqvoc::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# The production environment is meant for finished, "live" apps.
# 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
# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
# See everything in the log (default is :info)
# config.log_level = :debug
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = false
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# 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
end
Iqvoc::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# The production environment is meant for finished, "live" apps.
# 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
# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
# See everything in the log (default is :info)
# config.log_level = :debug
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.action_view.cache_template_loading = true
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = false
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
......@@ -16,4 +37,13 @@ config.action_view.cache_template_loading = true
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/iqvoc"
# 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
end
Iqvoc::Application.configure do
# Settings specified here will take precedence over those in config/environment.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
......@@ -8,9 +11,12 @@ config.cache_classes = true
config.whiny_nils = true
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
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
......@@ -19,7 +25,11 @@ config.action_controller.allow_forgery_protection = false
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# config.action_controller.session = { :key => "_myapp_session", :secret => "e5e8915f9ca3ac54fae632718ece6929056f95e310332a70d273e2bebe267a36688e0fcda8c8426c50c97ba7752f2d0ccbf8a38d5acb9ade3109ff93e6e10f1e" }
# Use SQL instead of Active Record's schema dumper when creating the test 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
# require 'capybara/rails'
# require 'capybara/session'
\ No newline at end of file
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
if instance.error_message.kind_of?(Array)
%(#{html_tag}<span class="fieldWithErrors">&nbsp;</span>)
else
%(#{html_tag}<span class="fieldWithErrors">&nbsp;</span>)
end
end
ActiveRecord::Base.store_full_sti_class = true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment