jmoses_apipie-rails 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/.gitignore +11 -0
  2. data/.rspec +2 -0
  3. data/.travis.yml +4 -0
  4. data/APACHE-LICENSE-2.0 +202 -0
  5. data/CHANGELOG +55 -0
  6. data/Gemfile +3 -0
  7. data/MIT-LICENSE +20 -0
  8. data/NOTICE +4 -0
  9. data/README.rst +938 -0
  10. data/Rakefile +13 -0
  11. data/apipie-rails.gemspec +26 -0
  12. data/app/controllers/apipie/apipies_controller.rb +105 -0
  13. data/app/public/apipie/javascripts/apipie.js +6 -0
  14. data/app/public/apipie/javascripts/bundled/bootstrap-collapse.js +138 -0
  15. data/app/public/apipie/javascripts/bundled/bootstrap.js +1726 -0
  16. data/app/public/apipie/javascripts/bundled/jquery-1.7.2.js +9404 -0
  17. data/app/public/apipie/javascripts/bundled/prettify.js +28 -0
  18. data/app/public/apipie/stylesheets/application.css +20 -0
  19. data/app/public/apipie/stylesheets/bundled/bootstrap-responsive.min.css +12 -0
  20. data/app/public/apipie/stylesheets/bundled/bootstrap.min.css +689 -0
  21. data/app/public/apipie/stylesheets/bundled/prettify.css +30 -0
  22. data/app/views/apipie/apipies/_disqus.html.erb +11 -0
  23. data/app/views/apipie/apipies/_params.html.erb +29 -0
  24. data/app/views/apipie/apipies/_params_plain.html.erb +16 -0
  25. data/app/views/apipie/apipies/apipie_404.html.erb +12 -0
  26. data/app/views/apipie/apipies/getting_started.html.erb +4 -0
  27. data/app/views/apipie/apipies/index.html.erb +43 -0
  28. data/app/views/apipie/apipies/method.html.erb +71 -0
  29. data/app/views/apipie/apipies/plain.html.erb +70 -0
  30. data/app/views/apipie/apipies/resource.html.erb +98 -0
  31. data/app/views/apipie/apipies/static.html.erb +101 -0
  32. data/app/views/layouts/apipie/apipie.html.erb +26 -0
  33. data/lib/apipie-rails.rb +15 -0
  34. data/lib/apipie/apipie_module.rb +62 -0
  35. data/lib/apipie/application.rb +334 -0
  36. data/lib/apipie/client/generator.rb +135 -0
  37. data/lib/apipie/configuration.rb +128 -0
  38. data/lib/apipie/dsl_definition.rb +379 -0
  39. data/lib/apipie/error_description.rb +25 -0
  40. data/lib/apipie/errors.rb +38 -0
  41. data/lib/apipie/extractor.rb +151 -0
  42. data/lib/apipie/extractor/collector.rb +113 -0
  43. data/lib/apipie/extractor/recorder.rb +124 -0
  44. data/lib/apipie/extractor/writer.rb +367 -0
  45. data/lib/apipie/helpers.rb +52 -0
  46. data/lib/apipie/markup.rb +48 -0
  47. data/lib/apipie/method_description.rb +191 -0
  48. data/lib/apipie/param_description.rb +204 -0
  49. data/lib/apipie/railtie.rb +9 -0
  50. data/lib/apipie/resource_description.rb +102 -0
  51. data/lib/apipie/routing.rb +15 -0
  52. data/lib/apipie/see_description.rb +39 -0
  53. data/lib/apipie/static_dispatcher.rb +59 -0
  54. data/lib/apipie/validator.rb +310 -0
  55. data/lib/apipie/version.rb +3 -0
  56. data/lib/generators/apipie/install/README +6 -0
  57. data/lib/generators/apipie/install/install_generator.rb +25 -0
  58. data/lib/generators/apipie/install/templates/initializer.rb.erb +7 -0
  59. data/lib/tasks/apipie.rake +166 -0
  60. data/rel-eng/packages/.readme +3 -0
  61. data/rel-eng/packages/rubygem-apipie-rails +1 -0
  62. data/rel-eng/tito.props +5 -0
  63. data/spec/controllers/api/v1/architectures_controller_spec.rb +30 -0
  64. data/spec/controllers/api/v2/architectures_controller_spec.rb +12 -0
  65. data/spec/controllers/api/v2/nested/resources_controller_spec.rb +11 -0
  66. data/spec/controllers/apipies_controller_spec.rb +141 -0
  67. data/spec/controllers/concerns_controller_spec.rb +42 -0
  68. data/spec/controllers/users_controller_spec.rb +473 -0
  69. data/spec/dummy/Rakefile +7 -0
  70. data/spec/dummy/app/controllers/api/base_controller.rb +4 -0
  71. data/spec/dummy/app/controllers/api/v1/architectures_controller.rb +42 -0
  72. data/spec/dummy/app/controllers/api/v1/base_controller.rb +11 -0
  73. data/spec/dummy/app/controllers/api/v2/architectures_controller.rb +30 -0
  74. data/spec/dummy/app/controllers/api/v2/base_controller.rb +11 -0
  75. data/spec/dummy/app/controllers/api/v2/nested/architectures_controller.rb +30 -0
  76. data/spec/dummy/app/controllers/api/v2/nested/resources_controller.rb +33 -0
  77. data/spec/dummy/app/controllers/application_controller.rb +6 -0
  78. data/spec/dummy/app/controllers/concerns/sample_controller.rb +39 -0
  79. data/spec/dummy/app/controllers/concerns_controller.rb +8 -0
  80. data/spec/dummy/app/controllers/twitter_example_controller.rb +302 -0
  81. data/spec/dummy/app/controllers/users_controller.rb +251 -0
  82. data/spec/dummy/app/views/layouts/application.html.erb +21 -0
  83. data/spec/dummy/config.ru +4 -0
  84. data/spec/dummy/config/application.rb +45 -0
  85. data/spec/dummy/config/boot.rb +10 -0
  86. data/spec/dummy/config/database.yml +21 -0
  87. data/spec/dummy/config/environment.rb +8 -0
  88. data/spec/dummy/config/environments/development.rb +25 -0
  89. data/spec/dummy/config/environments/production.rb +49 -0
  90. data/spec/dummy/config/environments/test.rb +35 -0
  91. data/spec/dummy/config/initializers/apipie.rb +102 -0
  92. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  93. data/spec/dummy/config/initializers/inflections.rb +10 -0
  94. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  95. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  96. data/spec/dummy/config/initializers/session_store.rb +8 -0
  97. data/spec/dummy/config/locales/en.yml +5 -0
  98. data/spec/dummy/config/routes.rb +22 -0
  99. data/spec/dummy/db/.gitkeep +0 -0
  100. data/spec/dummy/doc/apipie_examples.yml +28 -0
  101. data/spec/dummy/public/404.html +26 -0
  102. data/spec/dummy/public/422.html +26 -0
  103. data/spec/dummy/public/500.html +26 -0
  104. data/spec/dummy/public/favicon.ico +0 -0
  105. data/spec/dummy/public/javascripts/application.js +2 -0
  106. data/spec/dummy/public/javascripts/controls.js +965 -0
  107. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  108. data/spec/dummy/public/javascripts/effects.js +1123 -0
  109. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  110. data/spec/dummy/public/javascripts/rails.js +202 -0
  111. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  112. data/spec/dummy/script/rails +6 -0
  113. data/spec/lib/application_spec.rb +38 -0
  114. data/spec/lib/method_description_spec.rb +30 -0
  115. data/spec/lib/param_description_spec.rb +174 -0
  116. data/spec/lib/param_group_spec.rb +45 -0
  117. data/spec/lib/resource_description_spec.rb +30 -0
  118. data/spec/lib/validator_spec.rb +46 -0
  119. data/spec/spec_helper.rb +32 -0
  120. metadata +337 -0
@@ -0,0 +1,251 @@
1
+ class UsersController < ApplicationController
2
+
3
+ resource_description do
4
+ short 'Site members'
5
+ path '/users'
6
+ formats ['json']
7
+ param :id, Fixnum, :desc => "User ID", :required => false
8
+ param :resource_param, Hash, :desc => 'Param description for all methods' do
9
+ param :ausername, String, :desc => "Username for login", :required => true
10
+ param :apassword, String, :desc => "Password for login", :required => true
11
+ end
12
+ api_version "development"
13
+ error 404, "Missing"
14
+ error 500, "Server crashed for some <%= reason %>"
15
+ description <<-EOS
16
+ == Long description
17
+
18
+ Example resource for rest api documentation
19
+
20
+ These can now be accessed in <tt>shared/header</tt> with:
21
+
22
+ Headline: <%= headline %>
23
+ First name: <%= person.first_name %>
24
+
25
+ If you need to find out whether a certain local variable has been assigned a value in a particular render call,
26
+ you need to use the following pattern:
27
+
28
+ <% if local_assigns.has_key? :headline %>
29
+ Headline: <%= headline %>
30
+ <% end %>
31
+
32
+ Testing using <tt>defined? headline</tt> will not work. This is an implementation restriction.
33
+
34
+ === Template caching
35
+
36
+ By default, Rails will compile each template to a method in order to render it. When you alter a template,
37
+ Rails will check the file's modification time and recompile it in development mode.
38
+ EOS
39
+ end
40
+
41
+ description <<-eos
42
+ = Action View Base
43
+
44
+ Action View templates can be written in several ways. If the template file has a <tt>.erb</tt> extension then it uses a mixture of ERb
45
+ (included in Ruby) and HTML. If the template file has a <tt>.builder</tt> extension then Jim Weirich's Builder::XmlMarkup library is used.
46
+
47
+ == ERB
48
+
49
+ You trigger ERB by using embeddings such as <% %>, <% -%>, and <%= %>. The <%= %> tag set is used when you want output. Consider the
50
+ following loop for names:
51
+
52
+ <b>Names of all the people</b>
53
+ <% @people.each do |person| %>
54
+ Name: <%= person.name %><br/>
55
+ <% end %>
56
+
57
+ The loop is setup in regular embedding tags <% %> and the name is written using the output embedding tag <%= %>. Note that this
58
+ is not just a usage suggestion. Regular output functions like print or puts won't work with ERB templates. So this would be wrong:
59
+
60
+ <%# WRONG %>
61
+ Hi, Mr. <% puts "Frodo" %>
62
+
63
+ If you absolutely must write from within a function use +concat+.
64
+
65
+ <%- and -%> suppress leading and trailing whitespace, including the trailing newline, and can be used interchangeably with <% and %>.
66
+
67
+ === Using sub templates
68
+
69
+ Using sub templates allows you to sidestep tedious replication and extract common display structures in shared templates. The
70
+ classic example is the use of a header and footer (even though the Action Pack-way would be to use Layouts):
71
+
72
+ <%= render "shared/header" %>
73
+ Something really specific and terrific
74
+ <%= render "shared/footer" %>
75
+
76
+ As you see, we use the output embeddings for the render methods. The render call itself will just return a string holding the
77
+ result of the rendering. The output embedding writes it to the current template.
78
+
79
+ But you don't have to restrict yourself to static includes. Templates can share variables amongst themselves by using instance
80
+ variables defined using the regular embedding tags. Like this:
81
+
82
+ <% @page_title = "A Wonderful Hello" %>
83
+ <%= render "shared/header" %>
84
+
85
+ Now the header can pick up on the <tt>@page_title</tt> variable and use it for outputting a title tag:
86
+
87
+ <title><%= @page_title %></title>
88
+
89
+ === Passing local variables to sub templates
90
+
91
+ You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values:
92
+
93
+ <%= render "shared/header", { :headline => "Welcome", :person => person } %>
94
+
95
+ These can now be accessed in <tt>shared/header</tt> with:
96
+
97
+ Headline: <%= headline %>
98
+ First name: <%= person.first_name %>
99
+
100
+ If you need to find out whether a certain local variable has been assigned a value in a particular render call,
101
+ you need to use the following pattern:
102
+
103
+ <% if local_assigns.has_key? :headline %>
104
+ Headline: <%= headline %>
105
+ <% end %>
106
+
107
+ Testing using <tt>defined? headline</tt> will not work. This is an implementation restriction.
108
+
109
+ === Template caching
110
+
111
+ By default, Rails will compile each template to a method in order to render it. When you alter a template,
112
+ Rails will check the file's modification time and recompile it in development mode.
113
+
114
+ == Builder
115
+
116
+ Builder templates are a more programmatic alternative to ERB. They are especially useful for generating XML content. An XmlMarkup object
117
+ named +xml+ is automatically made available to templates with a <tt>.builder</tt> extension.
118
+
119
+ Here are some basic examples:
120
+
121
+ xml.em("emphasized") # => <em>emphasized</em>
122
+ xml.em { xml.b("emph & bold") } # => <em><b>emph &amp; bold</b></em>
123
+ xml.a("A Link", "href" => "http://onestepback.org") # => <a href="http://onestepback.org">A Link</a>
124
+ xml.target("name" => "compile", "option" => "fast") # => <target option="fast" name="compile"\>
125
+ # NOTE: order of attributes is not specified.
126
+
127
+ Any method with a block will be treated as an XML markup tag with nested markup in the block. For example, the following:
128
+
129
+ xml.div do
130
+ xml.h1(@person.name)
131
+ xml.p(@person.bio)
132
+ end
133
+
134
+ would produce something like:
135
+
136
+ <div>
137
+ <h1>David Heinemeier Hansson</h1>
138
+ <p>A product of Danish Design during the Winter of '79...</p>
139
+ </div>
140
+
141
+ A full-length RSS example actually used on Basecamp:
142
+
143
+ xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
144
+ xml.channel do
145
+ xml.title(@feed_title)
146
+ xml.link(@url)
147
+ xml.description "Basecamp: Recent items"
148
+ xml.language "en-us"
149
+ xml.ttl "40"
150
+
151
+ @recent_items.each do |item|
152
+ xml.item do
153
+ xml.title(item_title(item))
154
+ xml.description(item_description(item)) if item_description(item)
155
+ xml.pubDate(item_pubDate(item))
156
+ xml.guid(@person.firm.account.url + @recent_items.url(item))
157
+ xml.link(@person.firm.account.url + @recent_items.url(item))
158
+
159
+ xml.tag!("dc:creator", item.author_name) if item_has_creator?(item)
160
+ end
161
+ end
162
+ end
163
+ end
164
+
165
+ More builder documentation can be found at http://builder.rubyforge.org.
166
+ eos
167
+ api :GET, "/users/:id", "Show user profile"
168
+ formats ['json', 'jsonp']
169
+ error 401, "Unauthorized"
170
+ error :code => 404, :description => "Not Found"
171
+ param :id, Integer, :desc => "user id", :required => true
172
+ param :session, String, :desc => "user is logged in", :required => true
173
+ param :regexp_param, /^[0-9]* years/, :desc => "regexp param"
174
+ param :array_param, ["100", "one", "two", "1", "2"], :desc => "array validator"
175
+ param :boolean_param, [true, false], :desc => "array validator with boolean"
176
+ param :proc_param, lambda { |val|
177
+ val == "param value" ? true : "The only good value is 'param value'."
178
+ }, :desc => "proc validator"
179
+ param :briefer_dsl, String, "You dont need :desc => from now"
180
+ def show
181
+ unless params[:session] == "secret_hash"
182
+ render :text => "Not authorized", :status => 401
183
+ return
184
+ end
185
+
186
+ unless params[:id].to_i == 5
187
+ render :text => "Not Found", :status => 404 and return
188
+ end
189
+
190
+ render :text => "OK"
191
+ end
192
+
193
+ def_param_group :credentials do
194
+ param :name, String, :desc => "Username for login", :required => true
195
+ param :pass, String, :desc => "Password for login", :required => true
196
+ end
197
+
198
+ def_param_group :user do
199
+ param :user, Hash, :desc => "User info", :required => true, :action_aware => true do
200
+ param_group :credentials
201
+ param :membership, ["standard","premium"], :desc => "User membership", :allow_nil => false
202
+ end
203
+ end
204
+
205
+ api :POST, "/users", "Create user"
206
+ param_group :user
207
+ param :user, Hash do
208
+ param :permalink, String
209
+ end
210
+ param :facts, Hash, :desc => "Additional optional facts about the user", :allow_nil => true
211
+ def create
212
+ render :text => "OK #{params.inspect}"
213
+ end
214
+
215
+ api :PUT, "/users/:id", "Create user"
216
+ param_group :user
217
+ def update
218
+ render :text => "OK #{params.inspect}"
219
+ end
220
+
221
+ api :POST, "/users/admin", "Create admin user"
222
+ param_group :user, :as => :create
223
+ def admin_create
224
+ render :text => "OK #{params.inspect}"
225
+ end
226
+
227
+ api :GET, "/users", "List users"
228
+ error :code => 401, :desc => "Unauthorized"
229
+ error :code => 404, :desc => "Not Found"
230
+ desc "List all users."
231
+ param :oauth, nil,
232
+ :desc => "Hide this global param (eg dont need auth here)"
233
+ def index
234
+ render :text => "List of users"
235
+ end
236
+
237
+ api :GET, '/company_users', 'Get company users'
238
+ api :GET, '/company/:id/users', 'Get users working in given company'
239
+ param :id, Integer, :desc => "Company ID"
240
+ def two_urls
241
+ render :text => 'List of users'
242
+ end
243
+
244
+ api :GET, '/users/see_another', 'Boring method'
245
+ see 'development#users#create'
246
+ see 'development#users#index', "very interesting method reference"
247
+ desc 'This method is boring, look at users#create'
248
+ def see_another
249
+ render :text => 'This is very similar to create action'
250
+ end
251
+ end
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy API</title>
5
+ <%= Apipie.include_stylesheets %>
6
+ </head>
7
+ <body style='background-color: #F5F6F7;'>
8
+ <div class="container">
9
+ <div class="row">
10
+ <div id='container' style='background-color: white;padding:10px;box-shadow:0px 0px 10px rgba(68,68,68,0.6);'>
11
+ <%= yield %>
12
+ <%= render 'disqus' if Apipie.configuration.use_disqus? %>
13
+ </div>
14
+ </div>
15
+ <hr>
16
+ <footer><%= yield :apipie_footer %></footer>
17
+ </div>
18
+
19
+ <%= Apipie.include_javascripts %>
20
+ </body>
21
+ </html>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,45 @@
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
+ require "apipie-rails"
11
+
12
+ module Dummy
13
+ class Application < Rails::Application
14
+ # Settings in config/environments/* take precedence over those specified here.
15
+ # Application configuration should go into files in config/initializers
16
+ # -- all .rb files in that directory are automatically loaded.
17
+
18
+ # Custom directories with classes and modules you want to be autoloadable.
19
+ # config.autoload_paths += %W(#{config.root}/extras)
20
+
21
+ # Only load the plugins named here, in the order given (default is alphabetical).
22
+ # :all can be used as a placeholder for all plugins not explicitly named.
23
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
24
+
25
+ # Activate observers that should always be running.
26
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
27
+
28
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
29
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
30
+ # config.time_zone = 'Central Time (US & Canada)'
31
+
32
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
33
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
34
+ # config.i18n.default_locale = :de
35
+
36
+ # JavaScript files you want as :defaults (application.js is always included).
37
+ # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
38
+
39
+ # Configure the default encoding used in templates for Ruby 1.9.
40
+ config.encoding = "utf-8"
41
+
42
+ # Configure sensitive parameters which will be filtered from the log file.
43
+ config.filter_parameters += [:password]
44
+ end
45
+ end
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,21 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
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: ":memory:"
15
+ timeout: 500
16
+
17
+ production:
18
+ adapter: sqlite3
19
+ database: db/production.sqlite3
20
+ pool: 5
21
+ timeout: 5000
@@ -0,0 +1,8 @@
1
+ # uncomment this line to test rails relative url root
2
+ # ENV['RAILS_RELATIVE_URL_ROOT'] = '/relative/path'
3
+
4
+ # Load the rails application
5
+ require File.expand_path('../application', __FILE__)
6
+
7
+ # Initialize the rails application
8
+ Dummy::Application.initialize!
@@ -0,0 +1,25 @@
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_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+ end
25
+
@@ -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 = true
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