urb 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +9 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.rdoc +5 -0
- data/Gemfile +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +91 -0
- data/Rakefile +10 -0
- data/VERSION +1 -0
- data/app/assets/javascripts/urb.js.erb +55 -0
- data/app/helpers/urb_helper.rb +7 -0
- data/app/views/urb/_include.html.erb +1 -0
- data/demo/Gemfile +13 -0
- data/demo/README.rdoc +28 -0
- data/demo/Rakefile +6 -0
- data/demo/app/assets/images/.keep +0 -0
- data/demo/app/assets/javascripts/application.js +16 -0
- data/demo/app/assets/stylesheets/application.css +13 -0
- data/demo/app/controllers/application_controller.rb +5 -0
- data/demo/app/controllers/concerns/.keep +0 -0
- data/demo/app/controllers/home_controller.rb +2 -0
- data/demo/app/helpers/application_helper.rb +2 -0
- data/demo/app/mailers/.keep +0 -0
- data/demo/app/models/.keep +0 -0
- data/demo/app/models/concerns/.keep +0 -0
- data/demo/app/views/home/index.html.erb +31 -0
- data/demo/app/views/layouts/application.html.erb +13 -0
- data/demo/bin/bundle +3 -0
- data/demo/bin/rails +4 -0
- data/demo/bin/rake +4 -0
- data/demo/config/application.rb +27 -0
- data/demo/config/boot.rb +4 -0
- data/demo/config/database.yml +30 -0
- data/demo/config/environment.rb +5 -0
- data/demo/config/environments/development.rb +29 -0
- data/demo/config/environments/production.rb +80 -0
- data/demo/config/environments/test.rb +36 -0
- data/demo/config/initializers/backtrace_silencers.rb +7 -0
- data/demo/config/initializers/filter_parameter_logging.rb +4 -0
- data/demo/config/initializers/inflections.rb +16 -0
- data/demo/config/initializers/mime_types.rb +5 -0
- data/demo/config/initializers/secret_token.rb +12 -0
- data/demo/config/initializers/session_store.rb +3 -0
- data/demo/config/initializers/u.rb +7 -0
- data/demo/config/initializers/wrap_parameters.rb +14 -0
- data/demo/config/locales/en.yml +23 -0
- data/demo/config/routes.rb +56 -0
- data/demo/config.ru +4 -0
- data/demo/db/migrate/20140402161002_create_urls.rb +9 -0
- data/demo/db/schema.rb +23 -0
- data/demo/db/seeds.rb +7 -0
- data/demo/lib/assets/.keep +0 -0
- data/demo/lib/tasks/.keep +0 -0
- data/demo/log/.keep +0 -0
- data/demo/public/404.html +58 -0
- data/demo/public/422.html +58 -0
- data/demo/public/500.html +57 -0
- data/demo/public/favicon.ico +0 -0
- data/demo/public/robots.txt +5 -0
- data/demo/test/controllers/.keep +0 -0
- data/demo/test/fixtures/.keep +0 -0
- data/demo/test/helpers/.keep +0 -0
- data/demo/test/integration/.keep +0 -0
- data/demo/test/mailers/.keep +0 -0
- data/demo/test/models/.keep +0 -0
- data/demo/test/test_helper.rb +15 -0
- data/demo/vendor/assets/javascripts/.keep +0 -0
- data/demo/vendor/assets/stylesheets/.keep +0 -0
- data/lib/urb/engine.rb +9 -0
- data/lib/urb/middleware.rb +31 -0
- data/lib/urb/version.rb +7 -0
- data/lib/urb.rb +48 -0
- data/script/console +7 -0
- data/test/test_helper/coverage.rb +8 -0
- data/test/test_helper.rb +7 -0
- data/test/unit/test_urb.rb +114 -0
- data/test/unit/urb/test_middleware.rb +70 -0
- data/urb.gemspec +21 -0
- metadata +166 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YzJiYWI3MDljMDJkMzIwMzk0ZWYxY2I1NzQxNTk2MWU4MWU2MWQwYQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZmRiMDA1MTlmNGFmODU2YTlmY2UyNWMxNjRmMGEzNTgyZGM5ZjQzMA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ODc0Zjc0ZjY0OTU3OTBjODU2N2NmNWEzNTA3NTcxNGY5MmJlMWY1MTYxMjRj
|
10
|
+
OTA1YjI5MjdmOGFhNTJkMTFiNjMyYmUwMWIyNzZmMzA2ZjI1YzU4MDJiOWI5
|
11
|
+
ZTY1NmFlYWE4ZDAyZDcxNzhjOTA4YTJmNTYxMDA2M2IyNzdjYmY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZmQyMmQyMWE5ZDg4ZTc3MzJlODFjY2RhMzY1NDA1OTMyZmMxNzg1ODk3OWUy
|
14
|
+
Y2JkNWNkMTZkZGZiMjc4MDg1YjE1NTliN2FlZjI4NjJhNTA0Y2I1NWQ5YzEw
|
15
|
+
MWYyOTQ1Mzg0MTQ3ZmI3Mjc4YmIwOTI5Y2IxYTAyOTdkZDFhOWY=
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.rdoc
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
group :development, :test do
|
6
|
+
gem "urb", :path => "."
|
7
|
+
end
|
8
|
+
|
9
|
+
group :test do
|
10
|
+
gem "simplecov", :require => false
|
11
|
+
gem "minitest"
|
12
|
+
gem "mocha"
|
13
|
+
gem "rack"
|
14
|
+
gem "rack-minitest", :require => "rack-minitest/test", git: "git://github.com/brandonweiss/rack-minitest.git"
|
15
|
+
end
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Paul Engel
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
== URB {<img src="https://secure.travis-ci.org/archan937/urb.png"/>}[http://travis-ci.org/archan937/urb] {<img src="https://codeclimate.com/github/archan937/urb.png"/>}[https://codeclimate.com/github/archan937/urb]
|
2
|
+
|
3
|
+
Shorten URLs in your Rack / Rails app.
|
4
|
+
|
5
|
+
=== Installation
|
6
|
+
|
7
|
+
==== Using Bundler
|
8
|
+
|
9
|
+
Add <tt>URB</tt> in <tt>Gemfile</tt> as a gem dependency:
|
10
|
+
|
11
|
+
gem "urb"
|
12
|
+
|
13
|
+
Run the following in your console to install with Bundler:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
|
17
|
+
=== Usage
|
18
|
+
|
19
|
+
Invoke the view helper method <tt>urb</tt> within your template:
|
20
|
+
|
21
|
+
<!DOCTYPE html>
|
22
|
+
<html>
|
23
|
+
<head>
|
24
|
+
<title>Killer App</title>
|
25
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
26
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
27
|
+
<%= csrf_meta_tags %>
|
28
|
+
<%= urb %>
|
29
|
+
</head>
|
30
|
+
|
31
|
+
Click on links within your webpage or call the Javascript function <tt>URB.open()</tt>.
|
32
|
+
|
33
|
+
<script>
|
34
|
+
URB.open('/?p=today&f[]=paulengel&f[]=archan937&f[]=URB&f[]=demo&f[]=Rails&f[]=Long%20URL&f[]=foo&f[]=bar&f[]=baz&f[]=Ownage&f[]=AwesomeStuff&bd[]=Paul.Engel&foobarbaz_id[]=3&foobarbaz_id[]=1&foobarbaz_id[]=4&foobarbaz_id[]=5&foobarbaz_id[]=6&foobarbaz_id[]=7&foobarbaz_id[]=67&foobarbaz_id[]=108&foobarbaz_id[]=66&foobarbaz_id[]=65&foobarbaz_id[]=118&foobarbaz_id[]=68&foobarbaz_id[]=8&foobarbaz_id[]=128&foobarbaz_id[]=79&foobarbaz_id[]=78&foobarbaz_id[]=111&foobarbaz_id[]=9&foobarbaz_id[]=10&foobarbaz_id[]=129&foobarbaz_id[]=11&foobarbaz_id[]=124&foobarbaz_id[]=12&foobarbaz_id[]=130&foobarbaz_id[]=13&foobarbaz_id[]=121&foobarbaz_id[]=14&foobarbaz_id[]=77&foobarbaz_id[]=80&foobarbaz_id[]=15&foobarbaz_id[]=69&foobarbaz_id[]=16&foobarbaz_id[]=17&foobarbaz_id[]=131&foobarbaz_id[]=18&foobarbaz_id[]=117&foobarbaz_id[]=19&foobarbaz_id[]=81&foobarbaz_id[]=82&foobarbaz_id[]=20&foobarbaz_id[]=21&foobarbaz_id[]=96&foobarbaz_id[]=97&foobarbaz_id[]=98&foobarbaz_id[]=99&foobarbaz_id[]=112&foobarbaz_id[]=64&foobarbaz_id[]=63&foobarbaz_id[]=62&foobarbaz_id[]=22&foobarbaz_id[]=23&foobarbaz_id[]=120&foobarbaz_id[]=24&foobarbaz_id[]=87&foobarbaz_id[]=88&foobarbaz_id[]=61&foobarbaz_id[]=60&foobarbaz_id[]=70&foobarbaz_id[]=71&foobarbaz_id[]=100&foobarbaz_id[]=101&foobarbaz_id[]=25&foobarbaz_id[]=26&foobarbaz_id[]=132&foobarbaz_id[]=73&foobarbaz_id[]=72&foobarbaz_id[]=56&foobarbaz_id[]=55&foobarbaz_id[]=74&foobarbaz_id[]=75&foobarbaz_id[]=133&foobarbaz_id[]=83&foobarbaz_id[]=84&foobarbaz_id[]=27&foobarbaz_id[]=107&foobarbaz_id[]=28&foobarbaz_id[]=134&foobarbaz_id[]=135&foobarbaz_id[]=136&foobarbaz_id[]=29&foobarbaz_id[]=119&foobarbaz_id[]=113&foobarbaz_id[]=105&foobarbaz_id[]=104&foobarbaz_id[]=114&foobarbaz_id[]=89&foobarbaz_id[]=103&foobarbaz_id[]=30&foobarbaz_id[]=137&foobarbaz_id[]=76&foobarbaz_id[]=90&foobarbaz_id[]=93&foobarbaz_id[]=92&foobarbaz_id[]=109&foobarbaz_id[]=110&foobarbaz_id[]=139&foobarbaz_id[]=31&foobarbaz_id[]=32&foobarbaz_id[]=140&foobarbaz_id[]=33&foobarbaz_id[]=123&foobarbaz_id[]=34&foobarbaz_id[]=141&foobarbaz_id[]=35&foobarbaz_id[]=115&foobarbaz_id[]=36&foobarbaz_id[]=142&foobarbaz_id[]=86&foobarbaz_id[]=85&foobarbaz_id[]=94&foobarbaz_id[]=95&foobarbaz_id[]=37&foobarbaz_id[]=38&foobarbaz_id[]=40&foobarbaz_id[]=39&foobarbaz_id[]=41&foobarbaz_id[]=42&foobarbaz_id[]=43&foobarbaz_id[]=44&foobarbaz_id[]=45&foobarbaz_id[]=102&foobarbaz_id[]=57&foobarbaz_id[]=58&foobarbaz_id[]=46&foobarbaz_id[]=47&foobarbaz_id[]=48&foobarbaz_id[]=49&foobarbaz_id[]=50&foobarbaz_id[]=59&foobarbaz_id[]=51&foobarbaz_id[]=122&foobarbaz_id[]=52&foobarbaz_id[]=53&foobarbaz_id[]=116&foobarbaz_id[]=54&foobarbaz_id[]=106&foobarbaz_id[]=2&foobarbaz_id[]=91&foobarbaz_id[]=138');
|
35
|
+
</script>
|
36
|
+
|
37
|
+
URB will automatically shorten the URL when it refers to the application itself and exceeds <tt>URB::MAXLENGTH</tt> (which is 2000 characters).
|
38
|
+
|
39
|
+
==== URL storage
|
40
|
+
|
41
|
+
The shortened URLs are stored using the {Moneta}[https://github.com/minad/moneta] gem. At default, they will be stored in memory.
|
42
|
+
|
43
|
+
To store them within a database, configure URB with <tt>URB.configure</tt> (shortcut: <tt>URB</tt>) and the arguments will be forwarded to the Moneta constructor:
|
44
|
+
|
45
|
+
(e.g. in config/initializers/u.rb)
|
46
|
+
|
47
|
+
URB.config :ActiveRecord, :table => "urls", :connection => {:adapter => "mysql2", :database => "my_awesome_app", :user => "someone", :password => "letmypass"}
|
48
|
+
|
49
|
+
or probably
|
50
|
+
|
51
|
+
(e.g. in config/initializers/u.rb)
|
52
|
+
|
53
|
+
URB :ActiveRecord, :table => "urls", :connection => ActiveRecord::Base.connection.instance_variable_get(:@config)
|
54
|
+
|
55
|
+
The corresponding migration file should look like:
|
56
|
+
|
57
|
+
class CreateUrls < ActiveRecord::Migration
|
58
|
+
def change
|
59
|
+
create_table :urls do |t|
|
60
|
+
t.text :k
|
61
|
+
t.text :v
|
62
|
+
t.timestamps
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
You can try this out in the provided demo application. Do not forget to uncomment the last line in {config/initializers/u.rb}[https://github.com/archan937/urb/blob/master/demo/config/initializers/u.rb].
|
68
|
+
|
69
|
+
=== Console and demo Rails app
|
70
|
+
|
71
|
+
The URB repository is provided with a console which you can start with <tt>script/console</tt>.
|
72
|
+
|
73
|
+
Also, you can run the provided Rails 4 demo application to try out <tt>URB</tt> in your browser.
|
74
|
+
|
75
|
+
=== Testing
|
76
|
+
|
77
|
+
Run the following command for testing:
|
78
|
+
|
79
|
+
$ rake
|
80
|
+
|
81
|
+
=== License
|
82
|
+
|
83
|
+
Copyright (c) 2014 Paul Engel, released under the MIT license
|
84
|
+
|
85
|
+
http://gettopup.com – http://github.com/archan937 – http://twitter.com/archan937 – {pm_engel@icloud.com}[mailto:pm_engel@icloud.com]
|
86
|
+
|
87
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
88
|
+
|
89
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
90
|
+
|
91
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
if (typeof(URB) == 'undefined') {
|
2
|
+
|
3
|
+
// *
|
4
|
+
// * URB <%= URB::VERSION %> (Uncompressed)
|
5
|
+
// *
|
6
|
+
// * (c) 2014 Paul Engel
|
7
|
+
// * Except otherwise noted, URB is licensed under
|
8
|
+
// * http://creativecommons.org/licenses/by/3.0
|
9
|
+
// *
|
10
|
+
// * $Date: 2014-02-06 23:30:51 $
|
11
|
+
// *
|
12
|
+
|
13
|
+
URB = (function() {
|
14
|
+
var urb_path = '<%= URB::PATH %>', maxlength = <%= URB::MAXLENGTH %>,
|
15
|
+
|
16
|
+
$ = {
|
17
|
+
ready: function(f){'\v'=='v'?setTimeout(f,0):$.on(document,'DOMContentLoaded',f);},
|
18
|
+
on: function(e,t,f,r){if(e.attachEvent?(r?e.detachEvent('on'+t,e[t+f]):1):(r?e.removeEventListener(t,f,0):e.addEventListener(t,f,0))){e['e'+t+f]=f;e[t+f]=function(){e['e'+t+f](window.event);};e.attachEvent('on'+t,e[t+f]);}},
|
19
|
+
hasClass: function(e,c){return $.indexOf(c,e.className.split(' '))>=0;},
|
20
|
+
indexOf: function(v,a,i){for(i=a.length;i--&&a[i]!=v;);return i;},
|
21
|
+
request: function(d,e,f){f=f||'post';var c=document.createElement('form');c.setAttribute('method',f);c.setAttribute('action',d);for(var b in e){if(e.hasOwnProperty(b)){var a=document.createElement('input');a.setAttribute('type','hidden');a.setAttribute('name',b);a.setAttribute('value',e[b]);c.appendChild(a)}}document.body.appendChild(c);c.submit()}
|
22
|
+
},
|
23
|
+
|
24
|
+
init = function() {
|
25
|
+
$.on(document, 'click', function(event) {
|
26
|
+
var target = event.target || event.srcElement || window.event.target || window.event.srcElement, css = URB.css || '';
|
27
|
+
if (target.tagName.toLowerCase() == 'a' && ((css == '') || $.hasClass(target, css))) {
|
28
|
+
event.preventDefault();
|
29
|
+
open(target.getAttribute('href'));
|
30
|
+
}
|
31
|
+
});
|
32
|
+
},
|
33
|
+
|
34
|
+
open = function(url) {
|
35
|
+
var location = document.createElement('a'), path;
|
36
|
+
location.href = url;
|
37
|
+
if (location.host == '') {
|
38
|
+
location.href = location.href;
|
39
|
+
}
|
40
|
+
if ((location.host == window.location.host) && (path = location.pathname + location.search).length > maxlength) {
|
41
|
+
$.request(urb_path, {path: path});
|
42
|
+
} else {
|
43
|
+
window.location = url;
|
44
|
+
}
|
45
|
+
};
|
46
|
+
|
47
|
+
$.ready(init);
|
48
|
+
|
49
|
+
return {
|
50
|
+
version: '<%= URB::VERSION %>',
|
51
|
+
open: open
|
52
|
+
};
|
53
|
+
}());
|
54
|
+
|
55
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= javascript_include_tag :urb %>
|
data/demo/Gemfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '4.0.1'
|
4
|
+
gem 'mysql2'
|
5
|
+
gem 'sass-rails', '~> 4.0.0'
|
6
|
+
gem 'uglifier', '>= 1.3.0'
|
7
|
+
gem 'coffee-rails', '~> 4.0.0'
|
8
|
+
gem 'jquery-rails'
|
9
|
+
gem 'turbolinks'
|
10
|
+
gem 'jbuilder', '~> 1.2'
|
11
|
+
|
12
|
+
gem 'urb', :path => '..'
|
13
|
+
gem 'pry'
|
data/demo/README.rdoc
ADDED
@@ -0,0 +1,28 @@
|
|
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
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/demo/Rakefile
ADDED
File without changes
|
@@ -0,0 +1,16 @@
|
|
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_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
|
File without changes
|
File without changes
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<p>
|
2
|
+
<a href="/">
|
3
|
+
Home
|
4
|
+
</a>
|
5
|
+
/
|
6
|
+
<a href="/?p=today&f[]=paulengel&f[]=archan937">
|
7
|
+
Short URL
|
8
|
+
</a>
|
9
|
+
/
|
10
|
+
<a href="/?p=today&f[]=paulengel&f[]=archan937&f[]=URB&f[]=demo&f[]=Rails&f[]=Long%20URL&f[]=foo&f[]=bar&f[]=baz&f[]=Ownage&f[]=AwesomeStuff&bd[]=Paul.Engel&foobarbaz_id[]=3&foobarbaz_id[]=1&foobarbaz_id[]=4&foobarbaz_id[]=5&foobarbaz_id[]=6&foobarbaz_id[]=7&foobarbaz_id[]=67&foobarbaz_id[]=108&foobarbaz_id[]=66&foobarbaz_id[]=65&foobarbaz_id[]=118&foobarbaz_id[]=68&foobarbaz_id[]=8&foobarbaz_id[]=128&foobarbaz_id[]=79&foobarbaz_id[]=78&foobarbaz_id[]=111&foobarbaz_id[]=9&foobarbaz_id[]=10&foobarbaz_id[]=129&foobarbaz_id[]=11&foobarbaz_id[]=124&foobarbaz_id[]=12&foobarbaz_id[]=130&foobarbaz_id[]=13&foobarbaz_id[]=121&foobarbaz_id[]=14&foobarbaz_id[]=77&foobarbaz_id[]=80&foobarbaz_id[]=15&foobarbaz_id[]=69&foobarbaz_id[]=16&foobarbaz_id[]=17&foobarbaz_id[]=131&foobarbaz_id[]=18&foobarbaz_id[]=117&foobarbaz_id[]=19&foobarbaz_id[]=81&foobarbaz_id[]=82&foobarbaz_id[]=20&foobarbaz_id[]=21&foobarbaz_id[]=96&foobarbaz_id[]=97&foobarbaz_id[]=98&foobarbaz_id[]=99&foobarbaz_id[]=112&foobarbaz_id[]=64&foobarbaz_id[]=63&foobarbaz_id[]=62&foobarbaz_id[]=22&foobarbaz_id[]=23&foobarbaz_id[]=120&foobarbaz_id[]=24&foobarbaz_id[]=87&foobarbaz_id[]=88&foobarbaz_id[]=61&foobarbaz_id[]=60&foobarbaz_id[]=70&foobarbaz_id[]=71&foobarbaz_id[]=100&foobarbaz_id[]=101&foobarbaz_id[]=25&foobarbaz_id[]=26&foobarbaz_id[]=132&foobarbaz_id[]=73&foobarbaz_id[]=72&foobarbaz_id[]=56&foobarbaz_id[]=55&foobarbaz_id[]=74&foobarbaz_id[]=75&foobarbaz_id[]=133&foobarbaz_id[]=83&foobarbaz_id[]=84&foobarbaz_id[]=27&foobarbaz_id[]=107&foobarbaz_id[]=28&foobarbaz_id[]=134&foobarbaz_id[]=135&foobarbaz_id[]=136&foobarbaz_id[]=29&foobarbaz_id[]=119&foobarbaz_id[]=113&foobarbaz_id[]=105&foobarbaz_id[]=104&foobarbaz_id[]=114&foobarbaz_id[]=89&foobarbaz_id[]=103&foobarbaz_id[]=30&foobarbaz_id[]=137&foobarbaz_id[]=76&foobarbaz_id[]=90&foobarbaz_id[]=93&foobarbaz_id[]=92&foobarbaz_id[]=109&foobarbaz_id[]=110&foobarbaz_id[]=139&foobarbaz_id[]=31&foobarbaz_id[]=32&foobarbaz_id[]=140&foobarbaz_id[]=33&foobarbaz_id[]=123&foobarbaz_id[]=34&foobarbaz_id[]=141&foobarbaz_id[]=35&foobarbaz_id[]=115&foobarbaz_id[]=36&foobarbaz_id[]=142&foobarbaz_id[]=86&foobarbaz_id[]=85&foobarbaz_id[]=94&foobarbaz_id[]=95&foobarbaz_id[]=37&foobarbaz_id[]=38&foobarbaz_id[]=40&foobarbaz_id[]=39&foobarbaz_id[]=41&foobarbaz_id[]=42&foobarbaz_id[]=43&foobarbaz_id[]=44&foobarbaz_id[]=45&foobarbaz_id[]=102&foobarbaz_id[]=57&foobarbaz_id[]=58&foobarbaz_id[]=46&foobarbaz_id[]=47&foobarbaz_id[]=48&foobarbaz_id[]=49&foobarbaz_id[]=50&foobarbaz_id[]=59&foobarbaz_id[]=51&foobarbaz_id[]=122&foobarbaz_id[]=52&foobarbaz_id[]=53&foobarbaz_id[]=116&foobarbaz_id[]=54&foobarbaz_id[]=106&foobarbaz_id[]=2&foobarbaz_id[]=91&foobarbaz_id[]=138">
|
11
|
+
Long URL
|
12
|
+
</a>
|
13
|
+
/
|
14
|
+
<a href="http://LOCALHOST:3000?p=today&f[]=paulengel&f[]=archan937&f[]=URB&f[]=demo&f[]=Rails&f[]=Long%20URL&f[]=foo&f[]=bar&f[]=baz&f[]=Ownage&f[]=AwesomeStuff&bd[]=Paul.Engel&foobarbaz_id[]=3&foobarbaz_id[]=1&foobarbaz_id[]=4&foobarbaz_id[]=5&foobarbaz_id[]=6&foobarbaz_id[]=7&foobarbaz_id[]=67&foobarbaz_id[]=108&foobarbaz_id[]=66&foobarbaz_id[]=65&foobarbaz_id[]=118&foobarbaz_id[]=68&foobarbaz_id[]=8&foobarbaz_id[]=128&foobarbaz_id[]=79&foobarbaz_id[]=78&foobarbaz_id[]=111&foobarbaz_id[]=9&foobarbaz_id[]=10&foobarbaz_id[]=129&foobarbaz_id[]=11&foobarbaz_id[]=124&foobarbaz_id[]=12&foobarbaz_id[]=130&foobarbaz_id[]=13&foobarbaz_id[]=121&foobarbaz_id[]=14&foobarbaz_id[]=77&foobarbaz_id[]=80&foobarbaz_id[]=15&foobarbaz_id[]=69&foobarbaz_id[]=16&foobarbaz_id[]=17&foobarbaz_id[]=131&foobarbaz_id[]=18&foobarbaz_id[]=117&foobarbaz_id[]=19&foobarbaz_id[]=81&foobarbaz_id[]=82&foobarbaz_id[]=20&foobarbaz_id[]=21&foobarbaz_id[]=96&foobarbaz_id[]=97&foobarbaz_id[]=98&foobarbaz_id[]=99&foobarbaz_id[]=112&foobarbaz_id[]=64&foobarbaz_id[]=63&foobarbaz_id[]=62&foobarbaz_id[]=22&foobarbaz_id[]=23&foobarbaz_id[]=120&foobarbaz_id[]=24&foobarbaz_id[]=87&foobarbaz_id[]=88&foobarbaz_id[]=61&foobarbaz_id[]=60&foobarbaz_id[]=70&foobarbaz_id[]=71&foobarbaz_id[]=100&foobarbaz_id[]=101&foobarbaz_id[]=25&foobarbaz_id[]=26&foobarbaz_id[]=132&foobarbaz_id[]=73&foobarbaz_id[]=72&foobarbaz_id[]=56&foobarbaz_id[]=55&foobarbaz_id[]=74&foobarbaz_id[]=75&foobarbaz_id[]=133&foobarbaz_id[]=83&foobarbaz_id[]=84&foobarbaz_id[]=27&foobarbaz_id[]=107&foobarbaz_id[]=28&foobarbaz_id[]=134&foobarbaz_id[]=135&foobarbaz_id[]=136&foobarbaz_id[]=29&foobarbaz_id[]=119&foobarbaz_id[]=113&foobarbaz_id[]=105&foobarbaz_id[]=104&foobarbaz_id[]=114&foobarbaz_id[]=89&foobarbaz_id[]=103&foobarbaz_id[]=30&foobarbaz_id[]=137&foobarbaz_id[]=76&foobarbaz_id[]=90&foobarbaz_id[]=93&foobarbaz_id[]=92&foobarbaz_id[]=109&foobarbaz_id[]=110&foobarbaz_id[]=139&foobarbaz_id[]=31&foobarbaz_id[]=32&foobarbaz_id[]=140&foobarbaz_id[]=33&foobarbaz_id[]=123&foobarbaz_id[]=34&foobarbaz_id[]=141&foobarbaz_id[]=35&foobarbaz_id[]=115&foobarbaz_id[]=36&foobarbaz_id[]=142&foobarbaz_id[]=86&foobarbaz_id[]=85&foobarbaz_id[]=94&foobarbaz_id[]=95&foobarbaz_id[]=37&foobarbaz_id[]=38&foobarbaz_id[]=40&foobarbaz_id[]=39&foobarbaz_id[]=41&foobarbaz_id[]=42&foobarbaz_id[]=43&foobarbaz_id[]=44&foobarbaz_id[]=45&foobarbaz_id[]=102&foobarbaz_id[]=57&foobarbaz_id[]=58&foobarbaz_id[]=46&foobarbaz_id[]=47&foobarbaz_id[]=48&foobarbaz_id[]=49&foobarbaz_id[]=50&foobarbaz_id[]=59&foobarbaz_id[]=51&foobarbaz_id[]=122&foobarbaz_id[]=52&foobarbaz_id[]=53&foobarbaz_id[]=116&foobarbaz_id[]=54&foobarbaz_id[]=106&foobarbaz_id[]=2&foobarbaz_id[]=91&foobarbaz_id[]=138">
|
15
|
+
Same long URL
|
16
|
+
</a>
|
17
|
+
/
|
18
|
+
<a href="http://LOCALHOST:3000?p=today&f[]=paulengel&f[]=archan937&f[]=URB&f[]=demo&f[]=Rails&f[]=Long%20URL&f[]=foo&f[]=bar&f[]=baz&f[]=Ownage&f[]=AwesomeStuff&bd[]=Paul.Engel&foobarbaz_id[]=3&foobarbaz_id[]=1&foobarbaz_id[]=4&foobarbaz_id[]=5&foobarbaz_id[]=6&foobarbaz_id[]=7&foobarbaz_id[]=67&foobarbaz_id[]=108&foobarbaz_id[]=66&foobarbaz_id[]=65&foobarbaz_id[]=118&foobarbaz_id[]=68&foobarbaz_id[]=8&foobarbaz_id[]=128&foobarbaz_id[]=79&foobarbaz_id[]=78&foobarbaz_id[]=111&foobarbaz_id[]=9&foobarbaz_id[]=10&foobarbaz_id[]=129&foobarbaz_id[]=11&foobarbaz_id[]=124&foobarbaz_id[]=12&foobarbaz_id[]=130&foobarbaz_id[]=13&foobarbaz_id[]=121&foobarbaz_id[]=14&foobarbaz_id[]=77&foobarbaz_id[]=80&foobarbaz_id[]=15&foobarbaz_id[]=69&foobarbaz_id[]=16&foobarbaz_id[]=17&foobarbaz_id[]=131&foobarbaz_id[]=18&foobarbaz_id[]=117&foobarbaz_id[]=19&foobarbaz_id[]=81&foobarbaz_id[]=82&foobarbaz_id[]=20&foobarbaz_id[]=21&foobarbaz_id[]=96&foobarbaz_id[]=97&foobarbaz_id[]=98&foobarbaz_id[]=99&foobarbaz_id[]=112&foobarbaz_id[]=64&foobarbaz_id[]=63&foobarbaz_id[]=62&foobarbaz_id[]=22&foobarbaz_id[]=23&foobarbaz_id[]=120&foobarbaz_id[]=24&foobarbaz_id[]=87&foobarbaz_id[]=88&foobarbaz_id[]=61&foobarbaz_id[]=60&foobarbaz_id[]=70&foobarbaz_id[]=71&foobarbaz_id[]=100&foobarbaz_id[]=101&foobarbaz_id[]=25&foobarbaz_id[]=26&foobarbaz_id[]=132&foobarbaz_id[]=73&foobarbaz_id[]=72&foobarbaz_id[]=56&foobarbaz_id[]=55&foobarbaz_id[]=74&foobarbaz_id[]=75&foobarbaz_id[]=133&foobarbaz_id[]=83&foobarbaz_id[]=84&foobarbaz_id[]=27&foobarbaz_id[]=107&foobarbaz_id[]=28&foobarbaz_id[]=134&foobarbaz_id[]=135&foobarbaz_id[]=136&foobarbaz_id[]=29&foobarbaz_id[]=119&foobarbaz_id[]=113&foobarbaz_id[]=105&foobarbaz_id[]=104&foobarbaz_id[]=114&foobarbaz_id[]=89&foobarbaz_id[]=103&foobarbaz_id[]=30&foobarbaz_id[]=137&foobarbaz_id[]=76&foobarbaz_id[]=90&foobarbaz_id[]=93&foobarbaz_id[]=92&foobarbaz_id[]=109&foobarbaz_id[]=110&foobarbaz_id[]=139&foobarbaz_id[]=31&foobarbaz_id[]=32&foobarbaz_id[]=140&foobarbaz_id[]=33&foobarbaz_id[]=123&foobarbaz_id[]=34&foobarbaz_id[]=141&foobarbaz_id[]=35&foobarbaz_id[]=115&foobarbaz_id[]=36&foobarbaz_id[]=142&foobarbaz_id[]=86&foobarbaz_id[]=85&foobarbaz_id[]=94&foobarbaz_id[]=95&foobarbaz_id[]=37&foobarbaz_id[]=38&foobarbaz_id[]=40&foobarbaz_id[]=39&foobarbaz_id[]=41&foobarbaz_id[]=42&foobarbaz_id[]=43&foobarbaz_id[]=44&foobarbaz_id[]=45&foobarbaz_id[]=102&foobarbaz_id[]=57&foobarbaz_id[]=58&foobarbaz_id[]=46&foobarbaz_id[]=47&foobarbaz_id[]=48&foobarbaz_id[]=49&foobarbaz_id[]=50&foobarbaz_id[]=59&foobarbaz_id[]=51&foobarbaz_id[]=122&foobarbaz_id[]=52&foobarbaz_id[]=53&foobarbaz_id[]=116&foobarbaz_id[]=54&foobarbaz_id[]=106&foobarbaz_id[]=2">
|
19
|
+
Another long URL
|
20
|
+
</a>
|
21
|
+
/
|
22
|
+
<a href="http://github.com?p=today&f[]=paulengel&f[]=archan937">
|
23
|
+
Github
|
24
|
+
</a>
|
25
|
+
</p>
|
26
|
+
<p>
|
27
|
+
<%= controller.controller_name %>#<%= controller.action_name %>
|
28
|
+
</p>
|
29
|
+
<p>
|
30
|
+
<%= h params %>
|
31
|
+
</p>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>URB</title>
|
5
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
<%= urb %>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<%= yield %>
|
12
|
+
</body>
|
13
|
+
</html>
|
data/demo/bin/bundle
ADDED
data/demo/bin/rails
ADDED
data/demo/bin/rake
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# require 'active_record/railtie'
|
4
|
+
require 'action_controller/railtie'
|
5
|
+
require 'action_mailer/railtie'
|
6
|
+
require 'sprockets/railtie'
|
7
|
+
require 'rails/test_unit/railtie'
|
8
|
+
|
9
|
+
# Require the gems listed in Gemfile, including any gems
|
10
|
+
# you've limited to :test, :development, or :production.
|
11
|
+
Bundler.require(:default, Rails.env)
|
12
|
+
|
13
|
+
module Demo
|
14
|
+
class Application < Rails::Application
|
15
|
+
# Settings in config/environments/* take precedence over those specified here.
|
16
|
+
# Application configuration should go into files in config/initializers
|
17
|
+
# -- all .rb files in that directory are automatically loaded.
|
18
|
+
|
19
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
20
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
21
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
22
|
+
|
23
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
24
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
25
|
+
# config.i18n.default_locale = :de
|
26
|
+
end
|
27
|
+
end
|
data/demo/config/boot.rb
ADDED
@@ -0,0 +1,30 @@
|
|
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
|
+
host: 127.0.0.1
|
14
|
+
database: urb_development
|
15
|
+
username: root
|
16
|
+
pool: 5
|
17
|
+
encoding: utf8
|
18
|
+
local_infile: true
|
19
|
+
|
20
|
+
# Warning: The database defined as "test" will be erased and
|
21
|
+
# re-generated from your development database when you run "rake".
|
22
|
+
# Do not set this db to the same as development or production.
|
23
|
+
test:
|
24
|
+
adapter: mysql2
|
25
|
+
host: 127.0.0.1
|
26
|
+
database: urb_test
|
27
|
+
username: root
|
28
|
+
pool: 5
|
29
|
+
encoding: utf8
|
30
|
+
local_infile: true
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Demo::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
|
+
# 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
|
+
# Raise an error on page load if there are pending migrations
|
23
|
+
# config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
Demo::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both thread web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_assets = false
|
24
|
+
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
28
|
+
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
+
config.assets.compile = false
|
31
|
+
|
32
|
+
# Generate digests for assets URLs.
|
33
|
+
config.assets.digest = true
|
34
|
+
|
35
|
+
# Version of your assets, change this if you want to expire all your assets.
|
36
|
+
config.assets.version = '1.0'
|
37
|
+
|
38
|
+
# Specifies the header that your server uses for sending files.
|
39
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
40
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
41
|
+
|
42
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
|
+
# config.force_ssl = true
|
44
|
+
|
45
|
+
# Set to :debug to see everything in the log.
|
46
|
+
config.log_level = :info
|
47
|
+
|
48
|
+
# Prepend all log lines with the following tags.
|
49
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
50
|
+
|
51
|
+
# Use a different logger for distributed setups.
|
52
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
53
|
+
|
54
|
+
# Use a different cache store in production.
|
55
|
+
# config.cache_store = :mem_cache_store
|
56
|
+
|
57
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
58
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
59
|
+
|
60
|
+
# Precompile additional assets.
|
61
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
62
|
+
# config.assets.precompile += %w( search.js )
|
63
|
+
|
64
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
65
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
66
|
+
# config.action_mailer.raise_delivery_errors = false
|
67
|
+
|
68
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
69
|
+
# the I18n.default_locale when a translation can not be found).
|
70
|
+
config.i18n.fallbacks = true
|
71
|
+
|
72
|
+
# Send deprecation notices to registered listeners.
|
73
|
+
config.active_support.deprecation = :notify
|
74
|
+
|
75
|
+
# Disable automatic flushing of the log to improve performance.
|
76
|
+
# config.autoflush_log = false
|
77
|
+
|
78
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
|
+
config.log_formatter = ::Logger::Formatter.new
|
80
|
+
end
|