varvara 1.0.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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +16 -0
- data/LICENSE.txt +22 -0
- data/README.md +43 -0
- data/Rakefile +33 -0
- data/app/assets/javascripts/varvara/application.js +1 -0
- data/app/assets/javascripts/varvara/varvara,js +0 -0
- data/app/assets/stylesheets/varvara/application.css +13 -0
- data/app/assets/stylesheets/varvara/varvara.css.scss +74 -0
- data/app/controllers/varvara/application_controller.rb +16 -0
- data/app/controllers/varvara/varvara_controller.rb +23 -0
- data/app/views/layouts/varvara/_footer.html.haml +2 -0
- data/app/views/layouts/varvara/_header.html.haml +6 -0
- data/app/views/layouts/varvara/application.html.erb +17 -0
- data/app/views/varvara/varvara/_route.html.erb +16 -0
- data/app/views/varvara/varvara/_route_wrapper.html.erb +12 -0
- data/app/views/varvara/varvara/controllers.html.erb +9 -0
- data/app/views/varvara/varvara/index.html.erb +13 -0
- data/app/views/varvara/varvara/models.html.erb +24 -0
- data/app/views/varvara/varvara/routes.html.erb +11 -0
- data/config/routes.rb +8 -0
- data/lib/varvara/engine.rb +5 -0
- data/lib/varvara/version.rb +3 -0
- data/lib/varvara.rb +51 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/foo_controller.rb +4 -0
- data/test/dummy/app/foo_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/foo/index.html +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +44 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +22 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +25 -0
- data/test/dummy/config/environments/production.rb +49 -0
- data/test/dummy/config/environments/test.rb +35 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +64 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/log/test.log +17 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/index.html +1 -0
- data/test/dummy/script/rails +6 -0
- data/test/integration/varvara_test.rb +17 -0
- data/test/route_inspector_test.rb +7 -0
- data/test/support/integration_case.rb +5 -0
- data/test/test_helper.rb +32 -0
- data/varvara.gemspec +35 -0
- metadata +263 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5844c61371821088110d611b66250bb10be24a6c
|
4
|
+
data.tar.gz: e798c1a4c2b2d2ff861b2d4bfadf813514ff6150
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 92714b3c8629e465ea910b34781d5ca3c2428c8456a6ee622211924f01b53c78c65041d1666cea9abc8a8496e986d531780eab0c196e91d63eb6b52a31f7e3ad
|
7
|
+
data.tar.gz: 7f455c02e72c5b2cb3fa20565c89f9d8241cec5830d251da8ba93393bf48364d5f475d15533ffc65159775f9c888bad6bb6c45589078b5a41849de76b6703cf8
|
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
gemspec
|
3
|
+
|
4
|
+
rails_version = ENV["RAILS_VERSION"] || "default"
|
5
|
+
|
6
|
+
version = case rails_version
|
7
|
+
when "master"
|
8
|
+
{github: "rails/rails"}
|
9
|
+
when "default"
|
10
|
+
">= 3.2"
|
11
|
+
else
|
12
|
+
"~> #{rails_version}"
|
13
|
+
end
|
14
|
+
|
15
|
+
gem "rails", version
|
16
|
+
gem 'haml'
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Ostap256
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Varvara
|
2
|
+
|
3
|
+
Displays your routes, controllers, models, their columns associations and their methods & variables. Provides full stack of hierarchy, dependencies, associations of your project.
|
4
|
+
|
5
|
+

|
6
|
+

|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
group :development do
|
13
|
+
gem 'varvara', git: 'git://github.com/ostaptan/varvara.git'
|
14
|
+
end
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install varvara
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
For current version visit `localhost:3000/varvara` in your app and see full stack of hierarchy, dependencies, associations, routes, controllers, models and configurations of your project.
|
27
|
+
|
28
|
+
## Contributing
|
29
|
+
|
30
|
+
1. Fork it
|
31
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
32
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
33
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
34
|
+
5. Create new Pull Request
|
35
|
+
|
36
|
+
## What to do?
|
37
|
+
|
38
|
+
1. Add some stylings and improve the view of pages (add some javascript for models as erd of akira matsuda https://github.com/amatsuda/erd )
|
39
|
+
2. Add hierarchy of controllers.
|
40
|
+
3. maybe: Live rails console as in gem 'better_errors'
|
41
|
+
4. Add displaying some configurations.
|
42
|
+
5. Add ui possibillity to generate models, controllers, scaffolds.
|
43
|
+
6. have fun)
|
data/Rakefile
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require 'bundler'
|
3
|
+
|
4
|
+
begin
|
5
|
+
Bundler.setup(:default, :development, :test)
|
6
|
+
rescue Bundler::BundlerError => e
|
7
|
+
$stderr.puts e.message
|
8
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
9
|
+
exit e.status_code
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
require 'rake'
|
14
|
+
require 'rdoc/task'
|
15
|
+
|
16
|
+
require 'rake/testtask'
|
17
|
+
|
18
|
+
Rake::TestTask.new(:test) do |t|
|
19
|
+
t.libs << 'lib'
|
20
|
+
t.libs << 'test'
|
21
|
+
t.pattern = 'test/**/*_test.rb'
|
22
|
+
t.verbose = false
|
23
|
+
end
|
24
|
+
|
25
|
+
task :default => :test
|
26
|
+
|
27
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
28
|
+
rdoc.rdoc_dir = 'rdoc'
|
29
|
+
rdoc.title = 'Varvara'
|
30
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
31
|
+
rdoc.rdoc_files.include('README.rdoc')
|
32
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
33
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require_tree .
|
File without changes
|
@@ -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
|
+
*/
|
@@ -0,0 +1,74 @@
|
|
1
|
+
.navbar {
|
2
|
+
position:absolute;
|
3
|
+
top: 0px;
|
4
|
+
left:0px;
|
5
|
+
min-width:700px;
|
6
|
+
border-bottom:2px solid #000;
|
7
|
+
|
8
|
+
.navbar-inner {
|
9
|
+
list-style-type: none;
|
10
|
+
padding-left:10px;
|
11
|
+
|
12
|
+
a {
|
13
|
+
text-decoration: none;
|
14
|
+
color: #000;
|
15
|
+
}
|
16
|
+
li {
|
17
|
+
display: inline-block;
|
18
|
+
padding-right:10px;
|
19
|
+
font-size:23px;
|
20
|
+
font-weight:bold;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
.varvara-container {
|
26
|
+
padding-top: 35px;
|
27
|
+
}
|
28
|
+
|
29
|
+
.button {
|
30
|
+
-moz-box-shadow:inset 0px 1px 0px 0px #cae3fc;
|
31
|
+
-webkit-box-shadow:inset 0px 1px 0px 0px #cae3fc;
|
32
|
+
box-shadow:inset 0px 1px 0px 0px #cae3fc;
|
33
|
+
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #4197ee) );
|
34
|
+
background:-moz-linear-gradient( center top, #79bbff 5%, #4197ee 100% );
|
35
|
+
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#4197ee');
|
36
|
+
background-color:#79bbff;
|
37
|
+
-webkit-border-top-left-radius:13px;
|
38
|
+
-moz-border-radius-topleft:13px;
|
39
|
+
border-top-left-radius:13px;
|
40
|
+
-webkit-border-top-right-radius:0px;
|
41
|
+
-moz-border-radius-topright:0px;
|
42
|
+
border-top-right-radius:0px;
|
43
|
+
-webkit-border-bottom-right-radius:13px;
|
44
|
+
-moz-border-radius-bottomright:13px;
|
45
|
+
border-bottom-right-radius:13px;
|
46
|
+
-webkit-border-bottom-left-radius:13px;
|
47
|
+
-moz-border-radius-bottomleft:13px;
|
48
|
+
border-bottom-left-radius:13px;
|
49
|
+
text-indent:-2.07px;
|
50
|
+
border:2px solid #469df5;
|
51
|
+
display:inline-block;
|
52
|
+
font-family:Arial;
|
53
|
+
font-size:17px;
|
54
|
+
font-weight:bold;
|
55
|
+
font-style:normal;
|
56
|
+
height:33px;
|
57
|
+
line-height:33px;
|
58
|
+
width:69px;
|
59
|
+
a {
|
60
|
+
color:#ffffff;
|
61
|
+
text-decoration:none;
|
62
|
+
}
|
63
|
+
text-align:center;
|
64
|
+
text-shadow:4px 3px 0px #287ace;
|
65
|
+
}
|
66
|
+
.button:hover {
|
67
|
+
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #4197ee), color-stop(1, #79bbff) );
|
68
|
+
background:-moz-linear-gradient( center top, #4197ee 5%, #79bbff 100% );
|
69
|
+
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4197ee', endColorstr='#79bbff');
|
70
|
+
background-color:#4197ee;
|
71
|
+
}.button:active {
|
72
|
+
position:relative;
|
73
|
+
top:1px;
|
74
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Varvara
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
|
4
|
+
private
|
5
|
+
def require_local!
|
6
|
+
unless local_request?
|
7
|
+
render :text => '<p>For security purposes, this information is only available to local requests.</p>', :status => :forbidden
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def local_request?
|
12
|
+
Rails.application.config.consider_all_requests_local || request.local?
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Varvara
|
2
|
+
class VarvaraController < Varvara::ApplicationController
|
3
|
+
layout 'varvara/application'
|
4
|
+
|
5
|
+
before_filter :require_local!
|
6
|
+
|
7
|
+
def index
|
8
|
+
end
|
9
|
+
|
10
|
+
def routes
|
11
|
+
@routes = Varvara.format_routes
|
12
|
+
end
|
13
|
+
|
14
|
+
def controllers
|
15
|
+
@controllers = Varvara.format_controllers
|
16
|
+
end
|
17
|
+
|
18
|
+
def models
|
19
|
+
@models = Varvara.format_models
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title>Varvara</title>
|
6
|
+
<%= stylesheet_link_tag "varvara/application" %>
|
7
|
+
<%= javascript_include_tag "varvara/application", :media => "all" %>
|
8
|
+
<%= csrf_meta_tags %>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<%= render partial: 'layouts/varvara/header' %>
|
12
|
+
<div class='varvara-container'>
|
13
|
+
<%= yield %>
|
14
|
+
</div>
|
15
|
+
<%= render partial: 'layouts/varvara/footer' %>
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<tr class='route_row' data-helper='path'>
|
2
|
+
<td data-route-name='<%= route[:name] %>'>
|
3
|
+
<% if route[:name].present? %>
|
4
|
+
<%= route[:name] %><span class='helper'>_path</span>
|
5
|
+
<% end %>
|
6
|
+
</td>
|
7
|
+
<td data-route-verb='<%= route[:verb] %>'>
|
8
|
+
<%= route[:verb] %>
|
9
|
+
</td>
|
10
|
+
<td data-route-path='<%= route[:path] %>'>
|
11
|
+
<%= route[:path] %>
|
12
|
+
</td>
|
13
|
+
<td data-route-reqs='<%= route[:reqs] %>'>
|
14
|
+
<%= route[:reqs] %>
|
15
|
+
</td>
|
16
|
+
</tr>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<h2>
|
2
|
+
Models
|
3
|
+
</h2>
|
4
|
+
|
5
|
+
<ul>
|
6
|
+
<% @models.each do |m| %>
|
7
|
+
<li>
|
8
|
+
<%= m %>
|
9
|
+
<%= m.columns.map(&:name) %>
|
10
|
+
</li>
|
11
|
+
<ul>
|
12
|
+
<% m.reflect_on_all_associations.each do |association| %>
|
13
|
+
<li>
|
14
|
+
<%= association.macro %>
|
15
|
+
<%= association.name %>
|
16
|
+
</li>
|
17
|
+
<li>
|
18
|
+
Foreign Key:
|
19
|
+
<%= association.foreign_key %>
|
20
|
+
</li>
|
21
|
+
<% end %>
|
22
|
+
</ul>
|
23
|
+
<% end %>
|
24
|
+
</ul>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
get "varvara/" => "varvara/varvara#index", :as => "varvara_index"
|
3
|
+
get "varvara/routes" => "varvara/varvara#routes", :as => "varvara_routes"
|
4
|
+
get "varvara/controllers" => "varvara/varvara#controllers", :as => "varvara_controllers"
|
5
|
+
get "varvara/models" => "varvara/varvara#models", :as => "varvara_models"
|
6
|
+
mount Varvara::Engine => "/varvara", :as => "varvara_engine"
|
7
|
+
end
|
8
|
+
|
data/lib/varvara.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
require "varvara/version"
|
2
|
+
require 'varvara/engine'
|
3
|
+
RUBY_VERSION >= '2.0.0' ? require('rails') : require('rails/routes')
|
4
|
+
|
5
|
+
module Varvara
|
6
|
+
|
7
|
+
begin
|
8
|
+
require 'rails/application/route_inspector'
|
9
|
+
ROUTE_INSPECTOR = Rails::Application::RouteInspector.new
|
10
|
+
rescue LoadError
|
11
|
+
require 'action_dispatch/routing/inspector'
|
12
|
+
ROUTE_INSPECTOR = ActionDispatch::Routing::RoutesInspector.new([])
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.format_routes(routes = all_routes)
|
16
|
+
ROUTE_INSPECTOR.send :collect_routes, routes
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.format_models(models = all_models)
|
20
|
+
models.map {|mod| mod.split('::').last.constantize }
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.format_controllers(hash = all_controllers)
|
24
|
+
# output -> array with controllers names
|
25
|
+
hash.map {|c| c[:controller]}.uniq.compact.map {|c_name| "#{c_name.capitalize}Controller" unless c_name.split('/').size >= 2}.compact
|
26
|
+
end
|
27
|
+
|
28
|
+
def format_controller_actions(hash = all_controllers)
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def self.all_routes
|
35
|
+
Rails.application.reload_routes!
|
36
|
+
Rails.application.routes.routes
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.all_controllers
|
40
|
+
Rails.application.routes.routes.map do |route|
|
41
|
+
{controller: route.defaults[:controller], action: route.defaults[:action]}
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.all_models
|
46
|
+
Dir["#{Rails.root}/app/models/**/*.rb"].map do |f|
|
47
|
+
f.chomp('.rb').camelize # works with namespaces e.g. Foo::Bar::MyClass
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
data/test/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
|
File without changes
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require
|
6
|
+
|
7
|
+
require "varvara"
|
8
|
+
|
9
|
+
module Dummy
|
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
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
+
|
18
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
+
|
22
|
+
# Activate observers that should always be running.
|
23
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
+
|
25
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
+
|
29
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
+
# config.i18n.default_locale = :de
|
32
|
+
|
33
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
34
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
35
|
+
|
36
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
+
config.encoding = "utf-8"
|
38
|
+
|
39
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
+
config.filter_parameters += [:password]
|
41
|
+
|
42
|
+
config.assets.enabled = true
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: ":memory:"
|
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
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: ":memory:"
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
@@ -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
|
+
|