rails_bridge 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.rspec +1 -0
- data/Gemfile +21 -0
- data/Gemfile.lock +154 -0
- data/LICENSE +13 -0
- data/README.rdoc +244 -0
- data/Rakefile +46 -0
- data/VERSION +1 -0
- data/app/controllers/rails_bridge/layout_bridge_controller.rb +43 -0
- data/app/views/content.html.erb +13 -0
- data/app/views/rails_bridge/layout_bridge/index.html.erb +6 -0
- data/config/routes.rb +11 -0
- data/lib/generators/content_bridge/USAGE +12 -0
- data/lib/generators/content_bridge/content_bridge_generator.rb +9 -0
- data/lib/generators/content_bridge/templates/content_bridge.rb +47 -0
- data/lib/rails_bridge.rb +16 -0
- data/lib/rails_bridge/content_bridge.rb +137 -0
- data/lib/rails_bridge/content_request.rb +100 -0
- data/lib/rails_bridge/engine.rb +34 -0
- data/rails_bridge.gemspec +186 -0
- data/script/console +2 -0
- data/spec/dummy/.rspec +1 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/rails_bridge/content_bridges/twitter_content_bridge.rb +26 -0
- data/spec/dummy/app/rails_bridge/layout_bridge/layouts/application/content.html.erb +1 -0
- data/spec/dummy/app/rails_bridge/layout_bridge/views/layouts/_partial.html.erb +1 -0
- data/spec/dummy/app/views/layouts/_partial.html.erb +1 -0
- data/spec/dummy/app/views/layouts/alternative.html.erb +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +17 -0
- data/spec/dummy/autotest/discover.rb +2 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +44 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +2 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/javascripts/application.js +2 -0
- data/spec/dummy/public/javascripts/controls.js +965 -0
- data/spec/dummy/public/javascripts/dragdrop.js +974 -0
- data/spec/dummy/public/javascripts/effects.js +1123 -0
- data/spec/dummy/public/javascripts/prototype.js +6001 -0
- data/spec/dummy/public/javascripts/rails.js +175 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/spec/spec_helper.rb +33 -0
- data/spec/integration/content_bridge_spec.rb +82 -0
- data/spec/integration/engine_spec.rb +25 -0
- data/spec/requests/layout_bridge_controller_spec.rb +16 -0
- data/spec/spec_helper.rb +62 -0
- data/spec/support/content_bridge_helper.rb +26 -0
- data/spec/support/layout_bridge_helper.rb +2 -0
- data/spec/support/rails_bridge_helper.rb +12 -0
- data/spec/support/test_server_helper.rb +125 -0
- data/spec/unit/content_bridge_spec.rb +59 -0
- data/spec/unit/content_request_spec.rb +84 -0
- data/spec/unit/rails_bridge_spec.rb +11 -0
- metadata +380 -0
@@ -0,0 +1,186 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{rails_bridge}
|
8
|
+
s.version = "0.0.5"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["shock"]
|
12
|
+
s.date = %q{2011-01-04}
|
13
|
+
s.description = %q{Allows for easy embedding of content from a remote HTTP server and exporting of the Rails HTML layout into another template.}
|
14
|
+
s.email = %q{billdoughty@capitalthought.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".rspec",
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"LICENSE",
|
24
|
+
"README.rdoc",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"app/controllers/rails_bridge/layout_bridge_controller.rb",
|
28
|
+
"app/views/content.html.erb",
|
29
|
+
"app/views/rails_bridge/layout_bridge/index.html.erb",
|
30
|
+
"config/routes.rb",
|
31
|
+
"lib/generators/content_bridge/USAGE",
|
32
|
+
"lib/generators/content_bridge/content_bridge_generator.rb",
|
33
|
+
"lib/generators/content_bridge/templates/content_bridge.rb",
|
34
|
+
"lib/rails_bridge.rb",
|
35
|
+
"lib/rails_bridge/content_bridge.rb",
|
36
|
+
"lib/rails_bridge/content_request.rb",
|
37
|
+
"lib/rails_bridge/engine.rb",
|
38
|
+
"rails_bridge.gemspec",
|
39
|
+
"script/console",
|
40
|
+
"spec/dummy/.rspec",
|
41
|
+
"spec/dummy/Rakefile",
|
42
|
+
"spec/dummy/app/controllers/application_controller.rb",
|
43
|
+
"spec/dummy/app/helpers/application_helper.rb",
|
44
|
+
"spec/dummy/app/rails_bridge/content_bridges/twitter_content_bridge.rb",
|
45
|
+
"spec/dummy/app/rails_bridge/layout_bridge/layouts/application/content.html.erb",
|
46
|
+
"spec/dummy/app/rails_bridge/layout_bridge/views/layouts/_partial.html.erb",
|
47
|
+
"spec/dummy/app/views/layouts/_partial.html.erb",
|
48
|
+
"spec/dummy/app/views/layouts/alternative.html.erb",
|
49
|
+
"spec/dummy/app/views/layouts/application.html.erb",
|
50
|
+
"spec/dummy/autotest/discover.rb",
|
51
|
+
"spec/dummy/config.ru",
|
52
|
+
"spec/dummy/config/application.rb",
|
53
|
+
"spec/dummy/config/boot.rb",
|
54
|
+
"spec/dummy/config/database.yml",
|
55
|
+
"spec/dummy/config/environment.rb",
|
56
|
+
"spec/dummy/config/environments/development.rb",
|
57
|
+
"spec/dummy/config/environments/production.rb",
|
58
|
+
"spec/dummy/config/environments/test.rb",
|
59
|
+
"spec/dummy/config/initializers/backtrace_silencers.rb",
|
60
|
+
"spec/dummy/config/initializers/inflections.rb",
|
61
|
+
"spec/dummy/config/initializers/mime_types.rb",
|
62
|
+
"spec/dummy/config/initializers/secret_token.rb",
|
63
|
+
"spec/dummy/config/initializers/session_store.rb",
|
64
|
+
"spec/dummy/config/locales/en.yml",
|
65
|
+
"spec/dummy/config/routes.rb",
|
66
|
+
"spec/dummy/db/development.sqlite3",
|
67
|
+
"spec/dummy/db/test.sqlite3",
|
68
|
+
"spec/dummy/public/404.html",
|
69
|
+
"spec/dummy/public/422.html",
|
70
|
+
"spec/dummy/public/500.html",
|
71
|
+
"spec/dummy/public/favicon.ico",
|
72
|
+
"spec/dummy/public/javascripts/application.js",
|
73
|
+
"spec/dummy/public/javascripts/controls.js",
|
74
|
+
"spec/dummy/public/javascripts/dragdrop.js",
|
75
|
+
"spec/dummy/public/javascripts/effects.js",
|
76
|
+
"spec/dummy/public/javascripts/prototype.js",
|
77
|
+
"spec/dummy/public/javascripts/rails.js",
|
78
|
+
"spec/dummy/public/stylesheets/.gitkeep",
|
79
|
+
"spec/dummy/script/rails",
|
80
|
+
"spec/dummy/spec/spec_helper.rb",
|
81
|
+
"spec/integration/content_bridge_spec.rb",
|
82
|
+
"spec/integration/engine_spec.rb",
|
83
|
+
"spec/requests/layout_bridge_controller_spec.rb",
|
84
|
+
"spec/spec_helper.rb",
|
85
|
+
"spec/support/content_bridge_helper.rb",
|
86
|
+
"spec/support/layout_bridge_helper.rb",
|
87
|
+
"spec/support/rails_bridge_helper.rb",
|
88
|
+
"spec/support/test_server_helper.rb",
|
89
|
+
"spec/unit/content_bridge_spec.rb",
|
90
|
+
"spec/unit/content_request_spec.rb",
|
91
|
+
"spec/unit/rails_bridge_spec.rb"
|
92
|
+
]
|
93
|
+
s.homepage = %q{http://github.com/capitalthought/rails_bridge}
|
94
|
+
s.require_paths = ["lib"]
|
95
|
+
s.rubygems_version = %q{1.3.7}
|
96
|
+
s.summary = %q{Bridges Rails with an external application.}
|
97
|
+
s.test_files = [
|
98
|
+
"spec/dummy/app/controllers/application_controller.rb",
|
99
|
+
"spec/dummy/app/helpers/application_helper.rb",
|
100
|
+
"spec/dummy/app/rails_bridge/content_bridges/twitter_content_bridge.rb",
|
101
|
+
"spec/dummy/autotest/discover.rb",
|
102
|
+
"spec/dummy/config/application.rb",
|
103
|
+
"spec/dummy/config/boot.rb",
|
104
|
+
"spec/dummy/config/environment.rb",
|
105
|
+
"spec/dummy/config/environments/development.rb",
|
106
|
+
"spec/dummy/config/environments/production.rb",
|
107
|
+
"spec/dummy/config/environments/test.rb",
|
108
|
+
"spec/dummy/config/initializers/backtrace_silencers.rb",
|
109
|
+
"spec/dummy/config/initializers/inflections.rb",
|
110
|
+
"spec/dummy/config/initializers/mime_types.rb",
|
111
|
+
"spec/dummy/config/initializers/secret_token.rb",
|
112
|
+
"spec/dummy/config/initializers/session_store.rb",
|
113
|
+
"spec/dummy/config/routes.rb",
|
114
|
+
"spec/dummy/spec/spec_helper.rb",
|
115
|
+
"spec/integration/content_bridge_spec.rb",
|
116
|
+
"spec/integration/engine_spec.rb",
|
117
|
+
"spec/requests/layout_bridge_controller_spec.rb",
|
118
|
+
"spec/spec_helper.rb",
|
119
|
+
"spec/support/content_bridge_helper.rb",
|
120
|
+
"spec/support/layout_bridge_helper.rb",
|
121
|
+
"spec/support/rails_bridge_helper.rb",
|
122
|
+
"spec/support/test_server_helper.rb",
|
123
|
+
"spec/unit/content_bridge_spec.rb",
|
124
|
+
"spec/unit/content_request_spec.rb",
|
125
|
+
"spec/unit/rails_bridge_spec.rb"
|
126
|
+
]
|
127
|
+
|
128
|
+
if s.respond_to? :specification_version then
|
129
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
130
|
+
s.specification_version = 3
|
131
|
+
|
132
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
133
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 0"])
|
134
|
+
s.add_runtime_dependency(%q<typhoeus>, ["~> 0.2.0"])
|
135
|
+
s.add_runtime_dependency(%q<rails_bridge>, [">= 0"])
|
136
|
+
s.add_runtime_dependency(%q<wdd-ruby-ext>, ["~> 0.2.3"])
|
137
|
+
s.add_development_dependency(%q<rails>, [">= 3.0"])
|
138
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
139
|
+
s.add_development_dependency(%q<sqlite3-ruby>, [">= 0"])
|
140
|
+
s.add_development_dependency(%q<capybara>, [">= 0"])
|
141
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
142
|
+
s.add_development_dependency(%q<rspec-rails>, [">= 0"])
|
143
|
+
s.add_development_dependency(%q<eventmachine>, [">= 0"])
|
144
|
+
s.add_development_dependency(%q<dalli>, [">= 0"])
|
145
|
+
s.add_development_dependency(%q<syntax>, [">= 0"])
|
146
|
+
s.add_development_dependency(%q<tm_helper>, [">= 0"])
|
147
|
+
s.add_development_dependency(%q<typhoeus>, ["~> 0.2.0"])
|
148
|
+
s.add_development_dependency(%q<activesupport>, [">= 2.3.8"])
|
149
|
+
else
|
150
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
151
|
+
s.add_dependency(%q<typhoeus>, ["~> 0.2.0"])
|
152
|
+
s.add_dependency(%q<rails_bridge>, [">= 0"])
|
153
|
+
s.add_dependency(%q<wdd-ruby-ext>, ["~> 0.2.3"])
|
154
|
+
s.add_dependency(%q<rails>, [">= 3.0"])
|
155
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
156
|
+
s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
|
157
|
+
s.add_dependency(%q<capybara>, [">= 0"])
|
158
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
159
|
+
s.add_dependency(%q<rspec-rails>, [">= 0"])
|
160
|
+
s.add_dependency(%q<eventmachine>, [">= 0"])
|
161
|
+
s.add_dependency(%q<dalli>, [">= 0"])
|
162
|
+
s.add_dependency(%q<syntax>, [">= 0"])
|
163
|
+
s.add_dependency(%q<tm_helper>, [">= 0"])
|
164
|
+
s.add_dependency(%q<typhoeus>, ["~> 0.2.0"])
|
165
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.8"])
|
166
|
+
end
|
167
|
+
else
|
168
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
169
|
+
s.add_dependency(%q<typhoeus>, ["~> 0.2.0"])
|
170
|
+
s.add_dependency(%q<rails_bridge>, [">= 0"])
|
171
|
+
s.add_dependency(%q<wdd-ruby-ext>, ["~> 0.2.3"])
|
172
|
+
s.add_dependency(%q<rails>, [">= 3.0"])
|
173
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
174
|
+
s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
|
175
|
+
s.add_dependency(%q<capybara>, [">= 0"])
|
176
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
177
|
+
s.add_dependency(%q<rspec-rails>, [">= 0"])
|
178
|
+
s.add_dependency(%q<eventmachine>, [">= 0"])
|
179
|
+
s.add_dependency(%q<dalli>, [">= 0"])
|
180
|
+
s.add_dependency(%q<syntax>, [">= 0"])
|
181
|
+
s.add_dependency(%q<tm_helper>, [">= 0"])
|
182
|
+
s.add_dependency(%q<typhoeus>, ["~> 0.2.0"])
|
183
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.8"])
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
data/script/console
ADDED
data/spec/dummy/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require File.expand_path('../config/application', __FILE__)
|
5
|
+
require 'rake'
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class TwitterContentBridge < RailsBridge::ContentBridge
|
2
|
+
# Uncomment the following options to create defaults to be used by all requests
|
3
|
+
# self.protocol = 'https' # defaults to 'http'
|
4
|
+
# self.host = 'example.com'
|
5
|
+
# self.port = 8080 # defaults to 80
|
6
|
+
# self.path = '/path/to/resource' # no default
|
7
|
+
# self.params = {:locale=>'en'} # no default
|
8
|
+
# self.default_content = "Content unavailable."
|
9
|
+
# self.on_success {|content| JSON.parse(content)}
|
10
|
+
# request.request_timeout = 1000 # miliseconds
|
11
|
+
# request.cache_timeout = 3600 # seconds
|
12
|
+
|
13
|
+
content_request :get_user_status do |request|
|
14
|
+
# Uncomment the following options to override defaults set on the class.
|
15
|
+
# request.protocol = 'https'
|
16
|
+
# request.host = 'example.com'
|
17
|
+
# request.port = 8080
|
18
|
+
# request.path = '/path/to/resource'
|
19
|
+
# request.params = nil
|
20
|
+
# request.default_content = "Get_user_status content unavailable."
|
21
|
+
# request.on_success nil
|
22
|
+
# request.request_timeout = 500 # miliseconds
|
23
|
+
# request.cache_timeout = 60 # seconds
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
asdf
|
@@ -0,0 +1 @@
|
|
1
|
+
My template partial content.
|
@@ -0,0 +1 @@
|
|
1
|
+
Default partial content.
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag :all %>
|
6
|
+
<%= stylesheet_link_tag 'jumbo' %>
|
7
|
+
<%= javascript_include_tag :defaults %>
|
8
|
+
<%= csrf_meta_tag %>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<%= render :partial => 'layouts/partial' %>
|
13
|
+
<%= link_to( '/' ) %>
|
14
|
+
<%= yield %>
|
15
|
+
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "active_model/railtie"
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_view/railtie"
|
7
|
+
require "action_mailer/railtie"
|
8
|
+
|
9
|
+
Bundler.require
|
10
|
+
|
11
|
+
module Dummy
|
12
|
+
class Application < Rails::Application
|
13
|
+
# Settings in config/environments/* take precedence over those specified here.
|
14
|
+
# Application configuration should go into files in config/initializers
|
15
|
+
# -- all .rb files in that directory are automatically loaded.
|
16
|
+
|
17
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
18
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
19
|
+
|
20
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
21
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
22
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
23
|
+
|
24
|
+
# Activate observers that should always be running.
|
25
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
26
|
+
|
27
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
28
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
29
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
30
|
+
|
31
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
32
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
33
|
+
# config.i18n.default_locale = :de
|
34
|
+
|
35
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
36
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
37
|
+
|
38
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
39
|
+
config.encoding = "utf-8"
|
40
|
+
|
41
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
42
|
+
config.filter_parameters += [:password]
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test:
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Only use best-standards-support built into browsers
|
24
|
+
config.action_dispatch.best_standards_support = :builtin
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
|
43
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
+
# the I18n.default_locale when a translation can not be found)
|
45
|
+
config.i18n.fallbacks = true
|
46
|
+
|
47
|
+
# Send deprecation notices to registered listeners
|
48
|
+
config.active_support.deprecation = :notify
|
49
|
+
end
|