lightrail 0.0.1 → 0.99.0
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/.gitignore +7 -0
- data/.rspec +4 -0
- data/.travis.yml +11 -0
- data/CHANGES.md +8 -0
- data/Gemfile +3 -0
- data/LICENSE +19 -0
- data/README.md +205 -0
- data/Rakefile +5 -0
- data/bin/lightrail +2 -1
- data/lib/lightrail.rb +2 -0
- data/lib/lightrail/action_controller/metal.rb +0 -2
- data/lib/lightrail/cli.rb +16 -0
- data/lib/lightrail/commands/application.rb +26 -0
- data/lib/lightrail/generators.rb +323 -0
- data/lib/lightrail/generators/app_base.rb +281 -0
- data/lib/lightrail/generators/app_generator.rb +299 -0
- data/lib/lightrail/generators/base.rb +378 -0
- data/lib/lightrail/generators/templates/Gemfile +25 -0
- data/lib/lightrail/generators/templates/README +259 -0
- data/lib/lightrail/generators/templates/Rakefile +7 -0
- data/lib/lightrail/generators/templates/app/assets/images/rails.png +0 -0
- data/lib/lightrail/generators/templates/app/assets/javascripts/application.js.tt +17 -0
- data/lib/lightrail/generators/templates/app/assets/stylesheets/application.css +13 -0
- data/lib/lightrail/generators/templates/app/controllers/application_controller.rb +3 -0
- data/lib/lightrail/generators/templates/app/helpers/application_helper.rb +2 -0
- data/lib/lightrail/generators/templates/app/mailers/.empty_directory +0 -0
- data/lib/lightrail/generators/templates/app/models/.empty_directory +0 -0
- data/lib/lightrail/generators/templates/app/views/layouts/application.html.erb.tt +14 -0
- data/lib/lightrail/generators/templates/config.ru +4 -0
- data/lib/lightrail/generators/templates/config/application.rb +67 -0
- data/lib/lightrail/generators/templates/config/boot.rb +6 -0
- data/lib/lightrail/generators/templates/config/databases/frontbase.yml +31 -0
- data/lib/lightrail/generators/templates/config/databases/ibm_db.yml +86 -0
- data/lib/lightrail/generators/templates/config/databases/jdbc.yml +62 -0
- data/lib/lightrail/generators/templates/config/databases/jdbcmysql.yml +33 -0
- data/lib/lightrail/generators/templates/config/databases/jdbcpostgresql.yml +43 -0
- data/lib/lightrail/generators/templates/config/databases/jdbcsqlite3.yml +20 -0
- data/lib/lightrail/generators/templates/config/databases/mysql.yml +51 -0
- data/lib/lightrail/generators/templates/config/databases/oracle.yml +39 -0
- data/lib/lightrail/generators/templates/config/databases/postgresql.yml +55 -0
- data/lib/lightrail/generators/templates/config/databases/sqlite3.yml +25 -0
- data/lib/lightrail/generators/templates/config/environment.rb +5 -0
- data/lib/lightrail/generators/templates/config/environments/development.rb.tt +38 -0
- data/lib/lightrail/generators/templates/config/environments/production.rb.tt +76 -0
- data/lib/lightrail/generators/templates/config/environments/test.rb.tt +36 -0
- data/lib/lightrail/generators/templates/config/initializers/backtrace_silencers.rb +7 -0
- data/lib/lightrail/generators/templates/config/initializers/inflections.rb +15 -0
- data/lib/lightrail/generators/templates/config/initializers/mime_types.rb +5 -0
- data/lib/lightrail/generators/templates/config/initializers/secret_token.rb.tt +7 -0
- data/lib/lightrail/generators/templates/config/initializers/session_store.rb.tt +8 -0
- data/lib/lightrail/generators/templates/config/initializers/wrap_parameters.rb.tt +16 -0
- data/lib/lightrail/generators/templates/config/locales/en.yml +5 -0
- data/lib/lightrail/generators/templates/config/routes.rb +58 -0
- data/lib/lightrail/generators/templates/db/seeds.rb.tt +7 -0
- data/lib/lightrail/generators/templates/gitignore +16 -0
- data/lib/lightrail/generators/templates/public/404.html +26 -0
- data/lib/lightrail/generators/templates/public/422.html +26 -0
- data/lib/lightrail/generators/templates/public/500.html +25 -0
- data/lib/lightrail/generators/templates/public/favicon.ico +0 -0
- data/lib/lightrail/generators/templates/public/index.html +241 -0
- data/lib/lightrail/generators/templates/public/robots.txt +5 -0
- data/lib/lightrail/generators/templates/public/stylesheets/.empty_directory +0 -0
- data/lib/lightrail/generators/templates/script/rails +5 -0
- data/lib/lightrail/generators/templates/test/fixtures/.empty_directory +0 -0
- data/lib/lightrail/generators/templates/test/functional/.empty_directory +0 -0
- data/lib/lightrail/generators/templates/test/integration/.empty_directory +0 -0
- data/lib/lightrail/generators/templates/test/performance/browsing_test.rb +12 -0
- data/lib/lightrail/generators/templates/test/test_helper.rb +15 -0
- data/lib/lightrail/generators/templates/test/unit/.empty_directory +0 -0
- data/lib/lightrail/version.rb +1 -1
- data/lightrail.gemspec +23 -0
- data/logo.png +0 -0
- data/spec/lightrail/action_controller/metal_spec.rb +8 -0
- data/spec/spec_helper.rb +1 -0
- data/tasks/rspec.task +7 -0
- metadata +105 -13
- data/lib/lightrail/action_controller/param.rb +0 -12
- data/lib/lightrail/core_ext/regexp.rb +0 -7
- data/lib/lightrail/encryptor.rb +0 -62
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
<%= app_const %>.load_tasks
|
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
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
<% unless options[:skip_javascript] -%>
|
14
|
+
//= require <%= options[:javascript] %>
|
15
|
+
//= require <%= options[:javascript] %>_ujs
|
16
|
+
<% end -%>
|
17
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%= camelized %></title>
|
5
|
+
<%%= stylesheet_link_tag "application", :media => "all" %>
|
6
|
+
<%%= javascript_include_tag "application" %>
|
7
|
+
<%%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'lightrail/railtie'
|
4
|
+
|
5
|
+
# Pick the frameworks you want:
|
6
|
+
require "active_record/railtie"
|
7
|
+
require "active_resource/railtie"
|
8
|
+
require "action_mailer/railtie"
|
9
|
+
require "sprockets/railtie"
|
10
|
+
require "rails/test_unit/railtie"
|
11
|
+
|
12
|
+
if defined?(Bundler)
|
13
|
+
# If you precompile assets before deploying to production, use this line.
|
14
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
15
|
+
# If you want your assets lazily compiled in production, use this line.
|
16
|
+
# Bundler.require(:default, :assets, Rails.env)
|
17
|
+
end
|
18
|
+
|
19
|
+
module <%= app_const_base %>
|
20
|
+
class Application < Rails::Application
|
21
|
+
# Settings in config/environments/* take precedence over those specified here.
|
22
|
+
# Application configuration should go into files in config/initializers
|
23
|
+
# -- all .rb files in that directory are automatically loaded.
|
24
|
+
|
25
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
26
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
27
|
+
|
28
|
+
# Activate observers that should always be running.
|
29
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
30
|
+
|
31
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
32
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
33
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
34
|
+
|
35
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
36
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
37
|
+
# config.i18n.default_locale = :de
|
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
|
+
|
45
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
46
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
47
|
+
# like if you have constraints or database-specific column types.
|
48
|
+
# config.active_record.schema_format = :sql
|
49
|
+
|
50
|
+
# Enforce whitelist mode for mass assignment.
|
51
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
52
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
53
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
54
|
+
config.active_record.whitelist_attributes = true
|
55
|
+
|
56
|
+
# Specifies wether or not has_many or has_one association option :dependent => :restrict raises
|
57
|
+
# an exception. If set to true, then an ActiveRecord::DeleteRestrictionError exception would be
|
58
|
+
# raised. If set to false, then an error will be added on the model instead.
|
59
|
+
config.active_record.dependent_restrict_raises = false
|
60
|
+
|
61
|
+
# Enable the asset pipeline.
|
62
|
+
config.assets.enabled = true
|
63
|
+
|
64
|
+
# Version of your assets, change this if you want to expire all your assets.
|
65
|
+
config.assets.version = '1.0'
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# FrontBase versions 4.x
|
2
|
+
#
|
3
|
+
# Get the bindings:
|
4
|
+
# gem install ruby-frontbase
|
5
|
+
#
|
6
|
+
# Configure Using Gemfile
|
7
|
+
# gem 'ruby-frontbase'
|
8
|
+
#
|
9
|
+
development:
|
10
|
+
adapter: frontbase
|
11
|
+
host: localhost
|
12
|
+
database: <%= app_name %>_development
|
13
|
+
username: <%= app_name %>
|
14
|
+
password: ''
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
adapter: frontbase
|
21
|
+
host: localhost
|
22
|
+
database: <%= app_name %>_test
|
23
|
+
username: <%= app_name %>
|
24
|
+
password: ''
|
25
|
+
|
26
|
+
production:
|
27
|
+
adapter: frontbase
|
28
|
+
host: localhost
|
29
|
+
database: <%= app_name %>_production
|
30
|
+
username: <%= app_name %>
|
31
|
+
password: ''
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# IBM Dataservers
|
2
|
+
#
|
3
|
+
# Home Page
|
4
|
+
# http://rubyforge.org/projects/rubyibm/
|
5
|
+
#
|
6
|
+
# To install the ibm_db gem:
|
7
|
+
#
|
8
|
+
# On Linux:
|
9
|
+
# . /home/db2inst1/sqllib/db2profile
|
10
|
+
# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include
|
11
|
+
# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib32
|
12
|
+
# gem install ibm_db
|
13
|
+
#
|
14
|
+
# On Mac OS X 10.5:
|
15
|
+
# . /home/db2inst1/sqllib/db2profile
|
16
|
+
# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include
|
17
|
+
# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib32
|
18
|
+
# export ARCHFLAGS="-arch i386"
|
19
|
+
# gem install ibm_db
|
20
|
+
#
|
21
|
+
# On Mac OS X 10.6:
|
22
|
+
# . /home/db2inst1/sqllib/db2profile
|
23
|
+
# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include
|
24
|
+
# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib64
|
25
|
+
# export ARCHFLAGS="-arch x86_64"
|
26
|
+
# gem install ibm_db
|
27
|
+
#
|
28
|
+
# On Windows:
|
29
|
+
# Issue the command: gem install ibm_db
|
30
|
+
#
|
31
|
+
# Configure Using Gemfile
|
32
|
+
# gem 'ibm_db'
|
33
|
+
#
|
34
|
+
# For more details on the installation and the connection parameters below,
|
35
|
+
# please refer to the latest documents at http://rubyforge.org/docman/?group_id=2361
|
36
|
+
|
37
|
+
development:
|
38
|
+
adapter: ibm_db
|
39
|
+
username: db2inst1
|
40
|
+
password:
|
41
|
+
database: <%= app_name[0,4] %>_dev
|
42
|
+
#schema: db2inst1
|
43
|
+
#host: localhost
|
44
|
+
#port: 50000
|
45
|
+
#account: my_account
|
46
|
+
#app_user: my_app_user
|
47
|
+
#application: my_application
|
48
|
+
#workstation: my_workstation
|
49
|
+
#security: SSL
|
50
|
+
#timeout: 10
|
51
|
+
#authentication: SERVER
|
52
|
+
#parameterized: false
|
53
|
+
|
54
|
+
test:
|
55
|
+
adapter: ibm_db
|
56
|
+
username: db2inst1
|
57
|
+
password:
|
58
|
+
database: <%= app_name[0,4] %>_tst
|
59
|
+
#schema: db2inst1
|
60
|
+
#host: localhost
|
61
|
+
#port: 50000
|
62
|
+
#account: my_account
|
63
|
+
#app_user: my_app_user
|
64
|
+
#application: my_application
|
65
|
+
#workstation: my_workstation
|
66
|
+
#security: SSL
|
67
|
+
#timeout: 10
|
68
|
+
#authentication: SERVER
|
69
|
+
#parameterized: false
|
70
|
+
|
71
|
+
production:
|
72
|
+
adapter: ibm_db
|
73
|
+
username: db2inst1
|
74
|
+
password:
|
75
|
+
database: <%= app_name[0,8] %>
|
76
|
+
#schema: db2inst1
|
77
|
+
#host: localhost
|
78
|
+
#port: 50000
|
79
|
+
#account: my_account
|
80
|
+
#app_user: my_app_user
|
81
|
+
#application: my_application
|
82
|
+
#workstation: my_workstation
|
83
|
+
#security: SSL
|
84
|
+
#timeout: 10
|
85
|
+
#authentication: SERVER
|
86
|
+
#parameterized: false
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# If you are using mssql, derby, hsqldb, or h2 with one of the
|
2
|
+
# ActiveRecord JDBC adapters, install the appropriate driver, e.g.,:
|
3
|
+
# gem install activerecord-jdbcmssql-adapter
|
4
|
+
#
|
5
|
+
# Configure using Gemfile:
|
6
|
+
# gem 'activerecord-jdbcmssql-adapter'
|
7
|
+
#
|
8
|
+
#development:
|
9
|
+
# adapter: mssql
|
10
|
+
# username: <%= app_name %>
|
11
|
+
# password:
|
12
|
+
# host: localhost
|
13
|
+
# database: <%= app_name %>_development
|
14
|
+
#
|
15
|
+
# Warning: The database defined as "test" will be erased and
|
16
|
+
# re-generated from your development database when you run "rake".
|
17
|
+
# Do not set this db to the same as development or production.
|
18
|
+
#
|
19
|
+
#test:
|
20
|
+
# adapter: mssql
|
21
|
+
# username: <%= app_name %>
|
22
|
+
# password:
|
23
|
+
# host: localhost
|
24
|
+
# database: <%= app_name %>_test
|
25
|
+
#
|
26
|
+
#production:
|
27
|
+
# adapter: mssql
|
28
|
+
# username: <%= app_name %>
|
29
|
+
# password:
|
30
|
+
# host: localhost
|
31
|
+
# database: <%= app_name %>_production
|
32
|
+
|
33
|
+
# If you are using oracle, db2, sybase, informix or prefer to use the plain
|
34
|
+
# JDBC adapter, configure your database setting as the example below (requires
|
35
|
+
# you to download and manually install the database vendor's JDBC driver .jar
|
36
|
+
# file). See your driver documentation for the apropriate driver class and
|
37
|
+
# connection string:
|
38
|
+
|
39
|
+
development:
|
40
|
+
adapter: jdbc
|
41
|
+
username: <%= app_name %>
|
42
|
+
password:
|
43
|
+
driver:
|
44
|
+
url: jdbc:db://localhost/<%= app_name %>_development
|
45
|
+
|
46
|
+
# Warning: The database defined as "test" will be erased and
|
47
|
+
# re-generated from your development database when you run "rake".
|
48
|
+
# Do not set this db to the same as development or production.
|
49
|
+
|
50
|
+
test:
|
51
|
+
adapter: jdbc
|
52
|
+
username: <%= app_name %>
|
53
|
+
password:
|
54
|
+
driver:
|
55
|
+
url: jdbc:db://localhost/<%= app_name %>_test
|
56
|
+
|
57
|
+
production:
|
58
|
+
adapter: jdbc
|
59
|
+
username: <%= app_name %>
|
60
|
+
password:
|
61
|
+
driver:
|
62
|
+
url: jdbc:db://localhost/<%= app_name %>_production
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# MySQL. Versions 4.1 and 5.0 are recommended.
|
2
|
+
#
|
3
|
+
# Install the MySQL driver:
|
4
|
+
# gem install activerecord-jdbcmysql-adapter
|
5
|
+
#
|
6
|
+
# Configure Using Gemfile
|
7
|
+
# gem 'activerecord-jdbcmysql-adapter'
|
8
|
+
#
|
9
|
+
# And be sure to use new-style password hashing:
|
10
|
+
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
11
|
+
development:
|
12
|
+
adapter: mysql
|
13
|
+
database: <%= app_name %>_development
|
14
|
+
username: root
|
15
|
+
password:
|
16
|
+
host: localhost
|
17
|
+
|
18
|
+
# Warning: The database defined as "test" will be erased and
|
19
|
+
# re-generated from your development database when you run "rake".
|
20
|
+
# Do not set this db to the same as development or production.
|
21
|
+
test:
|
22
|
+
adapter: mysql
|
23
|
+
database: <%= app_name %>_test
|
24
|
+
username: root
|
25
|
+
password:
|
26
|
+
host: localhost
|
27
|
+
|
28
|
+
production:
|
29
|
+
adapter: mysql
|
30
|
+
database: <%= app_name %>_production
|
31
|
+
username: root
|
32
|
+
password:
|
33
|
+
host: localhost
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# PostgreSQL. Versions 8.2 and up are supported.
|
2
|
+
#
|
3
|
+
# Configure Using Gemfile
|
4
|
+
# gem 'activerecord-jdbcpostgresql-adapter'
|
5
|
+
|
6
|
+
development:
|
7
|
+
adapter: postgresql
|
8
|
+
encoding: unicode
|
9
|
+
database: <%= app_name %>_development
|
10
|
+
username: <%= app_name %>
|
11
|
+
password:
|
12
|
+
|
13
|
+
# Connect on a TCP socket. Omitted by default since the client uses a
|
14
|
+
# domain socket that doesn't need configuration. Windows does not have
|
15
|
+
# domain sockets, so uncomment these lines.
|
16
|
+
#host: localhost
|
17
|
+
#port: 5432
|
18
|
+
|
19
|
+
# Schema search path. The server defaults to $user,public
|
20
|
+
#schema_search_path: myapp,sharedapp,public
|
21
|
+
|
22
|
+
# Minimum log levels, in increasing order:
|
23
|
+
# debug5, debug4, debug3, debug2, debug1,
|
24
|
+
# log, notice, warning, error, fatal, and panic
|
25
|
+
# The server defaults to notice.
|
26
|
+
#min_messages: warning
|
27
|
+
|
28
|
+
# Warning: The database defined as "test" will be erased and
|
29
|
+
# re-generated from your development database when you run "rake".
|
30
|
+
# Do not set this db to the same as development or production.
|
31
|
+
test:
|
32
|
+
adapter: postgresql
|
33
|
+
encoding: unicode
|
34
|
+
database: <%= app_name %>_test
|
35
|
+
username: <%= app_name %>
|
36
|
+
password:
|
37
|
+
|
38
|
+
production:
|
39
|
+
adapter: postgresql
|
40
|
+
encoding: unicode
|
41
|
+
database: <%= app_name %>_production
|
42
|
+
username: <%= app_name %>
|
43
|
+
password:
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem 'activerecord-jdbcsqlite3-adapter'
|
3
|
+
#
|
4
|
+
# Configure Using Gemfile
|
5
|
+
# gem 'activerecord-jdbcsqlite3-adapter'
|
6
|
+
#
|
7
|
+
development:
|
8
|
+
adapter: sqlite3
|
9
|
+
database: db/development.sqlite3
|
10
|
+
|
11
|
+
# Warning: The database defined as "test" will be erased and
|
12
|
+
# re-generated from your development database when you run "rake".
|
13
|
+
# Do not set this db to the same as development or production.
|
14
|
+
test:
|
15
|
+
adapter: sqlite3
|
16
|
+
database: db/test.sqlite3
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# MySQL. Versions 4.1 and 5.0 are recommended.
|
2
|
+
#
|
3
|
+
# Install the MYSQL driver
|
4
|
+
# gem install mysql2
|
5
|
+
#
|
6
|
+
# Ensure the MySQL gem is defined in your Gemfile
|
7
|
+
# gem 'mysql2'
|
8
|
+
#
|
9
|
+
# And be sure to use new-style password hashing:
|
10
|
+
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
11
|
+
development:
|
12
|
+
adapter: mysql2
|
13
|
+
encoding: utf8
|
14
|
+
database: <%= app_name %>_development
|
15
|
+
pool: 5
|
16
|
+
username: root
|
17
|
+
password:
|
18
|
+
<% if mysql_socket -%>
|
19
|
+
socket: <%= mysql_socket %>
|
20
|
+
<% else -%>
|
21
|
+
host: localhost
|
22
|
+
<% end -%>
|
23
|
+
|
24
|
+
# Warning: The database defined as "test" will be erased and
|
25
|
+
# re-generated from your development database when you run "rake".
|
26
|
+
# Do not set this db to the same as development or production.
|
27
|
+
test:
|
28
|
+
adapter: mysql2
|
29
|
+
encoding: utf8
|
30
|
+
database: <%= app_name %>_test
|
31
|
+
pool: 5
|
32
|
+
username: root
|
33
|
+
password:
|
34
|
+
<% if mysql_socket -%>
|
35
|
+
socket: <%= mysql_socket %>
|
36
|
+
<% else -%>
|
37
|
+
host: localhost
|
38
|
+
<% end -%>
|
39
|
+
|
40
|
+
production:
|
41
|
+
adapter: mysql2
|
42
|
+
encoding: utf8
|
43
|
+
database: <%= app_name %>_production
|
44
|
+
pool: 5
|
45
|
+
username: root
|
46
|
+
password:
|
47
|
+
<% if mysql_socket -%>
|
48
|
+
socket: <%= mysql_socket %>
|
49
|
+
<% else -%>
|
50
|
+
host: localhost
|
51
|
+
<% end -%>
|