phoenixbricks 3.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +674 -0
- data/README.md +85 -0
- data/bin/rbricks +5 -0
- data/lib/railsbricks.rb +115 -0
- data/lib/railsbricks/app_generator.rb +352 -0
- data/lib/railsbricks/assets/config/admin_post_routes.rbr +3 -0
- data/lib/railsbricks/assets/config/application.yml +9 -0
- data/lib/railsbricks/assets/config/contact_routes.rbr +2 -0
- data/lib/railsbricks/assets/config/initializers/devise_email/devise.rb +267 -0
- data/lib/railsbricks/assets/config/initializers/devise_username/devise.rb +267 -0
- data/lib/railsbricks/assets/config/post_routes.rbr +2 -0
- data/lib/railsbricks/assets/config/routes.rb +15 -0
- data/lib/railsbricks/assets/config/unicorn.rb +22 -0
- data/lib/railsbricks/assets/controllers/admin/base_controller.rb +10 -0
- data/lib/railsbricks/assets/controllers/admin/devise_email/users_controller.rb +66 -0
- data/lib/railsbricks/assets/controllers/admin/devise_username/users_controller.rb +69 -0
- data/lib/railsbricks/assets/controllers/admin/posts_controller.rb +73 -0
- data/lib/railsbricks/assets/controllers/brick_contact.rbr +23 -0
- data/lib/railsbricks/assets/controllers/devise_email/application_controller.rb +54 -0
- data/lib/railsbricks/assets/controllers/devise_username/application_controller.rb +56 -0
- data/lib/railsbricks/assets/controllers/pages_controller.rb +13 -0
- data/lib/railsbricks/assets/controllers/posts_controller.rbr +10 -0
- data/lib/railsbricks/assets/database/postgresql.yml +12 -0
- data/lib/railsbricks/assets/database/sqlite3.yml +8 -0
- data/lib/railsbricks/assets/gemfile/Gemfile +44 -0
- data/lib/railsbricks/assets/git/gitignore +30 -0
- data/lib/railsbricks/assets/javascripts/analytics.js.coffee +5 -0
- data/lib/railsbricks/assets/lib/markdown_writer.rb +19 -0
- data/lib/railsbricks/assets/mailers/contact_mailer.rb +13 -0
- data/lib/railsbricks/assets/migrations/20141010133702_create_posts.rb +17 -0
- data/lib/railsbricks/assets/migrations/devise_email/20141010133701_devise_create_users.rb +48 -0
- data/lib/railsbricks/assets/migrations/devise_username/20141010133701_devise_create_users.rb +54 -0
- data/lib/railsbricks/assets/models/devise_email/user.rb +41 -0
- data/lib/railsbricks/assets/models/devise_username/user.rb +57 -0
- data/lib/railsbricks/assets/models/post.rb +30 -0
- data/lib/railsbricks/assets/procfile/Procfile +1 -0
- data/lib/railsbricks/assets/seeds/devise_email/seeds_no_test_users.rb +11 -0
- data/lib/railsbricks/assets/seeds/devise_email/seeds_test_users.rb +24 -0
- data/lib/railsbricks/assets/seeds/devise_username/seeds_no_test_users.rb +12 -0
- data/lib/railsbricks/assets/seeds/devise_username/seeds_test_users.rb +26 -0
- data/lib/railsbricks/assets/stylesheets/application.scss +6 -0
- data/lib/railsbricks/assets/stylesheets/railsbricks_custom.scss +562 -0
- data/lib/railsbricks/assets/views/admin/base/admin_posts_link.rbr +1 -0
- data/lib/railsbricks/assets/views/admin/base/devise_email/index.html.erb +41 -0
- data/lib/railsbricks/assets/views/admin/base/devise_username/index.html.erb +41 -0
- data/lib/railsbricks/assets/views/admin/posts/_form.html.erb +54 -0
- data/lib/railsbricks/assets/views/admin/posts/dashboard.html.erb +9 -0
- data/lib/railsbricks/assets/views/admin/posts/drafts.html.erb +23 -0
- data/lib/railsbricks/assets/views/admin/posts/edit.html.erb +10 -0
- data/lib/railsbricks/assets/views/admin/posts/index.html.erb +23 -0
- data/lib/railsbricks/assets/views/admin/posts/new.html.erb +6 -0
- data/lib/railsbricks/assets/views/admin/users/devise_email/edit.html.erb +65 -0
- data/lib/railsbricks/assets/views/admin/users/devise_email/index.html.erb +54 -0
- data/lib/railsbricks/assets/views/admin/users/devise_username/edit.html.erb +74 -0
- data/lib/railsbricks/assets/views/admin/users/devise_username/index.html.erb +56 -0
- data/lib/railsbricks/assets/views/contact_mailer/contact_message.html.erb +5 -0
- data/lib/railsbricks/assets/views/devise/allow_signup_links.rbr +11 -0
- data/lib/railsbricks/assets/views/devise/devise_email/confirmations/new.html.erb +31 -0
- data/lib/railsbricks/assets/views/devise/devise_email/mailer/confirmation_instructions.html.erb +12 -0
- data/lib/railsbricks/assets/views/devise/devise_email/mailer/reset_password_instructions.html.erb +15 -0
- data/lib/railsbricks/assets/views/devise/devise_email/passwords/edit.html.erb +43 -0
- data/lib/railsbricks/assets/views/devise/devise_email/passwords/new.html.erb +31 -0
- data/lib/railsbricks/assets/views/devise/devise_email/registrations/edit.html.erb +63 -0
- data/lib/railsbricks/assets/views/devise/devise_email/registrations/new.html.erb +49 -0
- data/lib/railsbricks/assets/views/devise/devise_email/sessions/new.html.erb +49 -0
- data/lib/railsbricks/assets/views/devise/devise_email/shared/_links.erb +19 -0
- data/lib/railsbricks/assets/views/devise/devise_username/confirmations/new.html.erb +31 -0
- data/lib/railsbricks/assets/views/devise/devise_username/mailer/confirmation_instructions.html.erb +12 -0
- data/lib/railsbricks/assets/views/devise/devise_username/mailer/reset_password_instructions.html.erb +15 -0
- data/lib/railsbricks/assets/views/devise/devise_username/passwords/edit.html.erb +43 -0
- data/lib/railsbricks/assets/views/devise/devise_username/passwords/new.html.erb +31 -0
- data/lib/railsbricks/assets/views/devise/devise_username/registrations/edit.html.erb +63 -0
- data/lib/railsbricks/assets/views/devise/devise_username/registrations/new.html.erb +58 -0
- data/lib/railsbricks/assets/views/devise/devise_username/sessions/new.html.erb +49 -0
- data/lib/railsbricks/assets/views/devise/devise_username/shared/_links.erb +19 -0
- data/lib/railsbricks/assets/views/layouts/_navigation_links.html.erb +15 -0
- data/lib/railsbricks/assets/views/layouts/brick_analytics.rbr +11 -0
- data/lib/railsbricks/assets/views/pages/contact.html.erb +46 -0
- data/lib/railsbricks/assets/views/pages/inside.html.erb +4 -0
- data/lib/railsbricks/assets/views/pages/posts.html.erb +18 -0
- data/lib/railsbricks/assets/views/pages/show_post.html.erb +6 -0
- data/lib/railsbricks/auth_builder.rb +147 -0
- data/lib/railsbricks/config_helpers.rb +27 -0
- data/lib/railsbricks/config_values.rb +14 -0
- data/lib/railsbricks/errors.rb +18 -0
- data/lib/railsbricks/file_helpers.rb +54 -0
- data/lib/railsbricks/foundation/README.md +24 -0
- data/lib/railsbricks/foundation/Rakefile +6 -0
- data/lib/railsbricks/foundation/app/assets/images/.keep +0 -0
- data/lib/railsbricks/foundation/app/assets/images/apple-touch-icon-precomposed.png +0 -0
- data/lib/railsbricks/foundation/app/assets/images/apple-touch-icon.png +0 -0
- data/lib/railsbricks/foundation/app/assets/images/favicon.ico +0 -0
- data/lib/railsbricks/foundation/app/assets/javascripts/application.js +17 -0
- data/lib/railsbricks/foundation/app/assets/javascripts/common.js +7 -0
- data/lib/railsbricks/foundation/app/controllers/application_controller.rb +5 -0
- data/lib/railsbricks/foundation/app/controllers/concerns/.keep +0 -0
- data/lib/railsbricks/foundation/app/controllers/pages_controller.rb +7 -0
- data/lib/railsbricks/foundation/app/helpers/application_helper.rb +7 -0
- data/lib/railsbricks/foundation/app/helpers/email_helper.rb +5 -0
- data/lib/railsbricks/foundation/app/mailers/.keep +0 -0
- data/lib/railsbricks/foundation/app/models/.keep +0 -0
- data/lib/railsbricks/foundation/app/models/concerns/.keep +0 -0
- data/lib/railsbricks/foundation/app/views/layouts/_footer.html.erb +18 -0
- data/lib/railsbricks/foundation/app/views/layouts/_messages.html.erb +9 -0
- data/lib/railsbricks/foundation/app/views/layouts/_navigation.html.erb +18 -0
- data/lib/railsbricks/foundation/app/views/layouts/_navigation_links.html.erb +3 -0
- data/lib/railsbricks/foundation/app/views/layouts/application.html.erb +38 -0
- data/lib/railsbricks/foundation/app/views/pages/home.html.erb +2 -0
- data/lib/railsbricks/foundation/bin/bundle +3 -0
- data/lib/railsbricks/foundation/bin/rails +4 -0
- data/lib/railsbricks/foundation/bin/rake +4 -0
- data/lib/railsbricks/foundation/config.ru +4 -0
- data/lib/railsbricks/foundation/config/application.rb +34 -0
- data/lib/railsbricks/foundation/config/boot.rb +4 -0
- data/lib/railsbricks/foundation/config/environment.rb +5 -0
- data/lib/railsbricks/foundation/config/environments/development.rb +41 -0
- data/lib/railsbricks/foundation/config/environments/production.rb +95 -0
- data/lib/railsbricks/foundation/config/environments/test.rb +51 -0
- data/lib/railsbricks/foundation/config/initializers/backtrace_silencers.rb +7 -0
- data/lib/railsbricks/foundation/config/initializers/date_format.rb +27 -0
- data/lib/railsbricks/foundation/config/initializers/filter_parameter_logging.rb +4 -0
- data/lib/railsbricks/foundation/config/initializers/friendly_id.rb +88 -0
- data/lib/railsbricks/foundation/config/initializers/inflections.rb +16 -0
- data/lib/railsbricks/foundation/config/initializers/kaminari_config.rb +10 -0
- data/lib/railsbricks/foundation/config/initializers/mime_types.rb +5 -0
- data/lib/railsbricks/foundation/config/initializers/secret_token.rb +25 -0
- data/lib/railsbricks/foundation/config/initializers/session_store.rb +3 -0
- data/lib/railsbricks/foundation/config/initializers/wrap_parameters.rb +14 -0
- data/lib/railsbricks/foundation/config/locales/en.yml +23 -0
- data/lib/railsbricks/foundation/config/routes.rb +7 -0
- data/lib/railsbricks/foundation/db/migrate/20131103142222_create_friendly_id_slugs.rb +15 -0
- data/lib/railsbricks/foundation/db/schema.rb +29 -0
- data/lib/railsbricks/foundation/db/seeds.rb +0 -0
- data/lib/railsbricks/foundation/lib/assets/.keep +0 -0
- data/lib/railsbricks/foundation/lib/tasks/.keep +0 -0
- data/lib/railsbricks/foundation/public/404.html +58 -0
- data/lib/railsbricks/foundation/public/422.html +58 -0
- data/lib/railsbricks/foundation/public/500.html +57 -0
- data/lib/railsbricks/foundation/public/favicon.ico +0 -0
- data/lib/railsbricks/foundation/public/robots.txt +5 -0
- data/lib/railsbricks/foundation/vendor/assets/javascripts/.keep +0 -0
- data/lib/railsbricks/foundation/vendor/assets/stylesheets/.keep +0 -0
- data/lib/railsbricks/gemfile_builder.rb +118 -0
- data/lib/railsbricks/menu.rb +533 -0
- data/lib/railsbricks/post_builder.rb +103 -0
- data/lib/railsbricks/string_helpers.rb +39 -0
- data/lib/railsbricks/style_builder.rb +97 -0
- data/lib/railsbricks/ui_helpers.rb +11 -0
- data/lib/railsbricks/validator.rb +68 -0
- data/lib/railsbricks/version.rb +34 -0
- data/railsbricks.gemspec +16 -0
- metadata +198 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module ConfigHelpers
|
5
|
+
|
6
|
+
CONFIG_PATH = ".rbricks"
|
7
|
+
|
8
|
+
def self.create_config(app_dir, options = {})
|
9
|
+
FileUtils::mkdir_p "#{app_dir}/#{CONFIG_PATH}"
|
10
|
+
dup_options = options.dup
|
11
|
+
dup_options[:email_config][:password] = "******"
|
12
|
+
saved_options = dup_options.to_json
|
13
|
+
|
14
|
+
File.open("#{app_dir}/#{CONFIG_PATH}/config", "w") { |f| f.write(saved_options)}
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.load_config
|
19
|
+
config_json = File.read("#{CONFIG_PATH}/config")
|
20
|
+
JSON.parse(config_json)
|
21
|
+
rescue
|
22
|
+
options = {}
|
23
|
+
options["rake_command"] = "rake"
|
24
|
+
options
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative "string_helpers"
|
2
|
+
require_relative "config_values"
|
3
|
+
|
4
|
+
module Errors
|
5
|
+
|
6
|
+
def self.display_error(msg, show_issues_url = false)
|
7
|
+
puts
|
8
|
+
StringHelpers.wputs msg, :error
|
9
|
+
puts
|
10
|
+
|
11
|
+
if show_issues_url
|
12
|
+
StringHelpers.wputs "If you can't fix this error, please file an issue report at #{ConfigValues.issue_path}"
|
13
|
+
puts
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require "fileutils"
|
2
|
+
require_relative "errors"
|
3
|
+
module FileHelpers
|
4
|
+
|
5
|
+
def self.replace_string(key,new_value,original_file,target_file = nil)
|
6
|
+
target_file = original_file if target_file == nil
|
7
|
+
text_update = File.read(original_file)
|
8
|
+
text_update = text_update.gsub(key, new_value)
|
9
|
+
|
10
|
+
File.open(target_file, "w") { |f| f.write(text_update) }
|
11
|
+
rescue
|
12
|
+
Errors.display_error "Something went wrong. The file '#{target_file}' couldn't be created and/or updated. Aborting app creation.", true
|
13
|
+
abort
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.override_file(source_file, target_file)
|
17
|
+
FileUtils.rm(target_file)
|
18
|
+
FileUtils.cp(source_file,target_file)
|
19
|
+
rescue
|
20
|
+
Errors.display_error "Couldn't override #{target_file}. Aborting app creation.", true
|
21
|
+
abort
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.add_to_file(target_file, text)
|
25
|
+
content = File.read(target_file)
|
26
|
+
|
27
|
+
File.open(target_file, "a") do |f|
|
28
|
+
f.puts
|
29
|
+
f.puts
|
30
|
+
f.write(text)
|
31
|
+
|
32
|
+
end
|
33
|
+
rescue
|
34
|
+
Errors.display_error "Couldn't write inside #{target_file}. Aborting app creation.", true
|
35
|
+
abort
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.get_file(template = :none)
|
39
|
+
rbricks_dir = File.dirname(__FILE__)
|
40
|
+
replacement_text = ""
|
41
|
+
case template
|
42
|
+
when :brick_contact_controller then replacement_text = File.read(rbricks_dir + "/assets/controllers/brick_contact.rbr")
|
43
|
+
when :brick_contact_routes then replacement_text = File.read(rbricks_dir + "/assets/config/contact_routes.rbr")
|
44
|
+
when :brick_allow_signup_links then replacement_text = File.read(rbricks_dir + "/assets/views/devise/allow_signup_links.rbr")
|
45
|
+
when :brick_analytics then replacement_text = File.read(rbricks_dir + "/assets/views/layouts/brick_analytics.rbr")
|
46
|
+
when :brick_post_routes then replacement_text = File.read(rbricks_dir + "/assets/config/post_routes.rbr")
|
47
|
+
when :brick_admin_post_routes then replacement_text = File.read(rbricks_dir + "/assets/config/admin_post_routes.rbr")
|
48
|
+
when :brick_posts_controller then replacement_text = File.read(rbricks_dir + "/assets/controllers/posts_controller.rbr")
|
49
|
+
when :brick_admin_posts_link then replacement_text = File.read(rbricks_dir + "/assets/views/admin/base/admin_posts_link.rbr")
|
50
|
+
end
|
51
|
+
replacement_text
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
16
|
+
//= require bootstrap BRICK_ANALYTICS_SCRIPT
|
17
|
+
//= require common
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div id="footer">
|
2
|
+
<div class="container">
|
3
|
+
|
4
|
+
<div class="row footer-first-row">
|
5
|
+
|
6
|
+
<div class="col-xs-12 text-center">
|
7
|
+
<p><small>
|
8
|
+
© <%= Time.now.year %> - Yourself!
|
9
|
+
<br/>
|
10
|
+
Assembled with <%= link_to "RailsBricks", "http://www.railsbricks.net" %>
|
11
|
+
</small></p>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
</div>
|
15
|
+
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
BRICK_ANALYTICS
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%# Rails flash messages styled for Bootstrap 3.0 %>
|
2
|
+
<% flash.each do |name, msg| %>
|
3
|
+
<% if msg.is_a?(String) %>
|
4
|
+
<div class="alert alert-<%= name == "notice" ? "success" : "danger" %>">
|
5
|
+
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
6
|
+
<%= content_tag :div, msg, :id => "flash_#{name}" %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<nav class="navbar BRICK_NAVBAR_COLOR">
|
2
|
+
<div class="container">
|
3
|
+
<div class="navbar-header">
|
4
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
5
|
+
<span class="sr-only">Toggle navigation</span>
|
6
|
+
<span class="icon-bar"></span>
|
7
|
+
<span class="icon-bar"></span>
|
8
|
+
<span class="icon-bar"></span>
|
9
|
+
</button>
|
10
|
+
<%= link_to 'Home', root_path, class: 'navbar-brand' %>
|
11
|
+
</div>
|
12
|
+
<div class="collapse navbar-collapse">
|
13
|
+
<ul class="nav navbar-nav">
|
14
|
+
<%= render 'layouts/navigation_links' %>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</nav>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
5
|
+
<title><%= @title || "BRICK_APP_NAME" %></title>
|
6
|
+
<%= favicon_link_tag 'favicon.ico' %>
|
7
|
+
<%= favicon_link_tag 'apple-touch-icon.png', rel: 'apple-touch-icon', type: 'image/png' %>
|
8
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
9
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
10
|
+
<%= csrf_meta_tags %>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<div id="wrap">
|
14
|
+
<header>
|
15
|
+
<%= render 'layouts/navigation' %>
|
16
|
+
</header>
|
17
|
+
|
18
|
+
<div class="container">
|
19
|
+
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-sm-6 col-sm-offset-3 text-center">
|
22
|
+
<%= render 'layouts/messages' %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="row">
|
27
|
+
<div class="col-sm-12">
|
28
|
+
<%= yield %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<%= render 'layouts/footer' %>
|
36
|
+
|
37
|
+
</body>
|
38
|
+
</html>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env)
|
8
|
+
|
9
|
+
module BRICK_APP_NAME
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
+
|
19
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
+
# config.i18n.default_locale = :de
|
22
|
+
|
23
|
+
# turn off warnings triggered by friendly_id
|
24
|
+
I18n.enforce_available_locales = false
|
25
|
+
|
26
|
+
# Test framework
|
27
|
+
config.generators.test_framework false
|
28
|
+
|
29
|
+
# autoload lib path
|
30
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
31
|
+
config.autoload_paths += Dir["#{config.root}/lib/**/"]
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
BRICK_APP_NAME::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 web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
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
|
+
# Print deprecation notices to the Rails logger.
|
17
|
+
config.active_support.deprecation = :log
|
18
|
+
|
19
|
+
# Raise an error on page load if there are pending migrations
|
20
|
+
config.active_record.migration_error = :page_load
|
21
|
+
|
22
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
23
|
+
# This option may cause significant delays in view rendering with a large
|
24
|
+
# number of complex assets.
|
25
|
+
config.assets.debug = true
|
26
|
+
|
27
|
+
# Mailer
|
28
|
+
config.action_mailer.raise_delivery_errors = true
|
29
|
+
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
30
|
+
config.action_mailer.delivery_method = :smtp
|
31
|
+
config.action_mailer.smtp_settings = {
|
32
|
+
address: ENV["SMTP_SERVER"],
|
33
|
+
openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE,
|
34
|
+
port: ENV["SMTP_PORT"].to_i,
|
35
|
+
domain: ENV["MAILER_DOMAIN"],
|
36
|
+
authentication: "plain",
|
37
|
+
enable_starttls_auto: true,
|
38
|
+
user_name: ENV["SMTP_USER"],
|
39
|
+
password: ENV["SMTP_PWD"]
|
40
|
+
}
|
41
|
+
end
|