localizable_routes 4.0.0.1 → 5.1.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 +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +13 -13
- data/Rakefile +1 -3
- data/lib/localizable_routes/extensions/action_dispatch/mapper.rb +10 -14
- data/lib/localizable_routes/extensions/action_dispatch/named_route_collection.rb +1 -1
- data/lib/localizable_routes/version.rb +1 -1
- metadata +24 -108
- data/test/dummy/Rakefile +0 -5
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/controllers/namespace/pages_controller.rb +0 -6
- data/test/dummy/app/controllers/namespace/resources_controller.rb +0 -6
- data/test/dummy/app/controllers/nested_controller.rb +0 -6
- data/test/dummy/app/controllers/pages_controller.rb +0 -12
- data/test/dummy/app/controllers/resources_controller.rb +0 -6
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -12
- data/test/dummy/bin/bundle +0 -4
- data/test/dummy/bin/rails +0 -5
- data/test/dummy/bin/rake +0 -5
- data/test/dummy/bin/setup +0 -30
- data/test/dummy/config/application.rb +0 -27
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -10
- data/test/dummy/config/database.yml.travis +0 -3
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -38
- data/test/dummy/config/environments/production.rb +0 -76
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -11
- data/test/dummy/config/locales/es.yml +0 -11
- data/test/dummy/config/routes.rb +0 -40
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/config.ru +0 -4
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/log/test.log +0 -114
- data/test/dummy/public/404.html +0 -61
- data/test/dummy/public/422.html +0 -61
- data/test/dummy/public/500.html +0 -60
- data/test/dummy/public/favicon.ico +0 -0
- data/test/helper_test.rb +0 -184
- data/test/route_test.rb +0 -185
- data/test/support/i18n_support.rb +0 -18
- data/test/test_helper.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b841ad1878352de8fb2ec0ea69ae600f793ee2ed
|
4
|
+
data.tar.gz: 1565a554b7f8a18cce83a97e89903a68b915dd62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f894054e66777db7887f644a471c285a1995ce54a874549932bafd165a2e233d51ed3a4a6b30113d9988365c1f84b9b20346b78a05c3e63f8779cc484238ba0
|
7
|
+
data.tar.gz: 1382c20f268ed0c3386288a1167cbbc7e58b0e96cb6c30feafc87014e1273b717fab254fb5188d9a0608395b3e3a0ffdd516a06d307d01ed05229a0272557371
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[](http://badge.fury.io/rb/localizable_routes)
|
2
|
-
[](https://codeclimate.com/github/museways/localizable_routes)
|
3
|
+
[](https://travis-ci.org/museways/localizable_routes)
|
4
|
+
[](https://gemnasium.com/museways/localizable_routes)
|
5
5
|
|
6
6
|
# Localizable Routes
|
7
7
|
|
@@ -37,11 +37,11 @@ localized strategy: :param, locales: %i(es en) do
|
|
37
37
|
get 'page' => 'pages#show', as: :param
|
38
38
|
end
|
39
39
|
|
40
|
-
localized strategy: :subdomain, locales: { '
|
40
|
+
localized strategy: :subdomain, locales: { 'es' => :es, 'www' => :en } do
|
41
41
|
get 'page' => 'pages#show', as: :subdomain
|
42
42
|
end
|
43
43
|
|
44
|
-
localized strategy: :domain, locales: { 'domain.
|
44
|
+
localized strategy: :domain, locales: { 'domain.es' => :es, 'domain.com' => :en } do
|
45
45
|
get 'page' => 'pages#show', as: :domain
|
46
46
|
end
|
47
47
|
```
|
@@ -65,10 +65,10 @@ param_path
|
|
65
65
|
# => /en/pagina if I18n.locale is :es
|
66
66
|
|
67
67
|
subdomain_url
|
68
|
-
# => http://
|
68
|
+
# => http://es.domain.com/pagina if current subdomain is es
|
69
69
|
|
70
70
|
domain_url
|
71
|
-
# => http://domain.
|
71
|
+
# => http://domain.es/pagina if current domain is domain.es
|
72
72
|
```
|
73
73
|
|
74
74
|
And you can change the locale by passing the corresponding parameter:
|
@@ -76,22 +76,22 @@ And you can change the locale by passing the corresponding parameter:
|
|
76
76
|
param_path locale: :en
|
77
77
|
# => /en/page
|
78
78
|
|
79
|
-
subdomain_url sudomain: '
|
80
|
-
# => http://
|
79
|
+
subdomain_url sudomain: 'es'
|
80
|
+
# => http://es.domain.com/pagina
|
81
81
|
|
82
|
-
domain_url domain: 'domain.
|
83
|
-
# => http://domain.
|
82
|
+
domain_url domain: 'domain.com'
|
83
|
+
# => http://domain.com/page
|
84
84
|
```
|
85
85
|
|
86
86
|
## Contributing
|
87
87
|
|
88
88
|
Any issue, pull request, comment of any kind is more than welcome!
|
89
89
|
|
90
|
-
I will mainly ensure compatibility to
|
90
|
+
I will mainly ensure compatibility to Rails, AWS, PostgreSQL, Redis, Elasticsearch and FreeBSD.
|
91
91
|
|
92
92
|
## Credits
|
93
93
|
|
94
|
-
This gem is maintained and funded by [
|
94
|
+
This gem is maintained and funded by [museways](https://github.com/museways).
|
95
95
|
|
96
96
|
## License
|
97
97
|
|
data/Rakefile
CHANGED
@@ -4,16 +4,14 @@ rescue LoadError
|
|
4
4
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
5
|
end
|
6
6
|
|
7
|
-
|
7
|
+
require 'bundler/gem_tasks'
|
8
8
|
|
9
9
|
require 'rake/testtask'
|
10
10
|
|
11
11
|
Rake::TestTask.new(:test) do |t|
|
12
|
-
t.libs << 'lib'
|
13
12
|
t.libs << 'test'
|
14
13
|
t.pattern = 'test/**/*_test.rb'
|
15
14
|
t.verbose = false
|
16
|
-
t.warning = false
|
17
15
|
end
|
18
16
|
|
19
17
|
task default: :test
|
@@ -21,30 +21,26 @@ module LocalizableRoutes
|
|
21
21
|
@localization = nil
|
22
22
|
end
|
23
23
|
|
24
|
-
def add_route(action, options)
|
24
|
+
def add_route(action, controller, options, _path, to, via, formatted, anchor, options_constraints)
|
25
25
|
if @localization
|
26
|
+
strategy = @localization[:strategy]
|
26
27
|
@localization[:locales].each do |locale|
|
27
28
|
localized_options = options.dup
|
28
|
-
|
29
|
-
localized_options[:defaults] ||= {}
|
30
|
-
strategy = @localization[:strategy]
|
29
|
+
localized_options_constraints = options_constraints.dup
|
31
30
|
if strategy == :param
|
32
31
|
@locale = locale
|
33
|
-
localized_options[:
|
34
|
-
|
32
|
+
localized_options[:locale] = locale
|
33
|
+
localized_options_constraints[:locale] = locale
|
35
34
|
else
|
36
35
|
@locale = locale.second
|
37
|
-
localized_options[
|
38
|
-
|
36
|
+
localized_options[strategy] = locale.first
|
37
|
+
localized_options_constraints[strategy] = locale.first
|
39
38
|
end
|
40
|
-
super action, localized_options
|
39
|
+
super action, controller, localized_options, _path, to, via, formatted, anchor, localized_options_constraints
|
41
40
|
end
|
42
41
|
@locale = nil
|
43
42
|
if options.fetch(:as, true)
|
44
|
-
@set.named_routes.
|
45
|
-
name_for_action(options[:as], action),
|
46
|
-
@localization
|
47
|
-
)
|
43
|
+
@set.named_routes.add_localized_url_helper name_for_action(options[:as], action), @localization
|
48
44
|
end
|
49
45
|
else
|
50
46
|
super
|
@@ -55,7 +51,7 @@ module LocalizableRoutes
|
|
55
51
|
candidate = super
|
56
52
|
if candidate && @locale
|
57
53
|
suffixed_candidate = "#{super}_#{@locale}"
|
58
|
-
|
54
|
+
unless @set.named_routes.key?(suffixed_candidate)
|
59
55
|
suffixed_candidate
|
60
56
|
end
|
61
57
|
else
|
@@ -4,7 +4,7 @@ module LocalizableRoutes
|
|
4
4
|
module NamedRouteCollection
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
|
-
def
|
7
|
+
def add_localized_url_helper(name, localization)
|
8
8
|
%w(path url).each do |type|
|
9
9
|
helper = :"#{name}_#{type}"
|
10
10
|
target = instance_variable_get("@#{type}_helpers_module")
|
metadata
CHANGED
@@ -1,38 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localizable_routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmontossi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 4.3.0
|
19
|
+
version: '5.1'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
|
26
|
+
version: '5.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pg
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
33
|
+
version: '0.21'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.21'
|
33
41
|
description: Flexible toolkit to localize routes in rails.
|
34
42
|
email:
|
35
|
-
-
|
43
|
+
- hi@museways.com
|
36
44
|
executables: []
|
37
45
|
extensions: []
|
38
46
|
extra_rdoc_files: []
|
@@ -45,53 +53,7 @@ files:
|
|
45
53
|
- lib/localizable_routes/extensions/action_dispatch/named_route_collection.rb
|
46
54
|
- lib/localizable_routes/railtie.rb
|
47
55
|
- lib/localizable_routes/version.rb
|
48
|
-
|
49
|
-
- test/dummy/app/assets/javascripts/application.js
|
50
|
-
- test/dummy/app/assets/stylesheets/application.css
|
51
|
-
- test/dummy/app/controllers/application_controller.rb
|
52
|
-
- test/dummy/app/controllers/namespace/pages_controller.rb
|
53
|
-
- test/dummy/app/controllers/namespace/resources_controller.rb
|
54
|
-
- test/dummy/app/controllers/nested_controller.rb
|
55
|
-
- test/dummy/app/controllers/pages_controller.rb
|
56
|
-
- test/dummy/app/controllers/resources_controller.rb
|
57
|
-
- test/dummy/app/helpers/application_helper.rb
|
58
|
-
- test/dummy/app/views/layouts/application.html.erb
|
59
|
-
- test/dummy/bin/bundle
|
60
|
-
- test/dummy/bin/rails
|
61
|
-
- test/dummy/bin/rake
|
62
|
-
- test/dummy/bin/setup
|
63
|
-
- test/dummy/config.ru
|
64
|
-
- test/dummy/config/application.rb
|
65
|
-
- test/dummy/config/boot.rb
|
66
|
-
- test/dummy/config/database.yml
|
67
|
-
- test/dummy/config/database.yml.travis
|
68
|
-
- test/dummy/config/environment.rb
|
69
|
-
- test/dummy/config/environments/development.rb
|
70
|
-
- test/dummy/config/environments/production.rb
|
71
|
-
- test/dummy/config/environments/test.rb
|
72
|
-
- test/dummy/config/initializers/assets.rb
|
73
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
74
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
75
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
76
|
-
- test/dummy/config/initializers/inflections.rb
|
77
|
-
- test/dummy/config/initializers/mime_types.rb
|
78
|
-
- test/dummy/config/initializers/session_store.rb
|
79
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
80
|
-
- test/dummy/config/locales/en.yml
|
81
|
-
- test/dummy/config/locales/es.yml
|
82
|
-
- test/dummy/config/routes.rb
|
83
|
-
- test/dummy/config/secrets.yml
|
84
|
-
- test/dummy/log/development.log
|
85
|
-
- test/dummy/log/test.log
|
86
|
-
- test/dummy/public/404.html
|
87
|
-
- test/dummy/public/422.html
|
88
|
-
- test/dummy/public/500.html
|
89
|
-
- test/dummy/public/favicon.ico
|
90
|
-
- test/helper_test.rb
|
91
|
-
- test/route_test.rb
|
92
|
-
- test/support/i18n_support.rb
|
93
|
-
- test/test_helper.rb
|
94
|
-
homepage: https://github.com/mmontossi/localizable_routes
|
56
|
+
homepage: https://github.com/museways/localizable_routes
|
95
57
|
licenses:
|
96
58
|
- MIT
|
97
59
|
metadata: {}
|
@@ -103,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
65
|
requirements:
|
104
66
|
- - ">="
|
105
67
|
- !ruby/object:Gem::Version
|
106
|
-
version:
|
68
|
+
version: '0'
|
107
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
70
|
requirements:
|
109
71
|
- - ">="
|
@@ -111,54 +73,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
73
|
version: '0'
|
112
74
|
requirements: []
|
113
75
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
76
|
+
rubygems_version: 2.6.13
|
115
77
|
signing_key:
|
116
78
|
specification_version: 4
|
117
79
|
summary: Localizable routes for rails.
|
118
|
-
test_files:
|
119
|
-
- test/dummy/app/assets/javascripts/application.js
|
120
|
-
- test/dummy/app/assets/stylesheets/application.css
|
121
|
-
- test/dummy/app/controllers/application_controller.rb
|
122
|
-
- test/dummy/app/controllers/namespace/pages_controller.rb
|
123
|
-
- test/dummy/app/controllers/namespace/resources_controller.rb
|
124
|
-
- test/dummy/app/controllers/nested_controller.rb
|
125
|
-
- test/dummy/app/controllers/pages_controller.rb
|
126
|
-
- test/dummy/app/controllers/resources_controller.rb
|
127
|
-
- test/dummy/app/helpers/application_helper.rb
|
128
|
-
- test/dummy/app/views/layouts/application.html.erb
|
129
|
-
- test/dummy/bin/bundle
|
130
|
-
- test/dummy/bin/rails
|
131
|
-
- test/dummy/bin/rake
|
132
|
-
- test/dummy/bin/setup
|
133
|
-
- test/dummy/config/application.rb
|
134
|
-
- test/dummy/config/boot.rb
|
135
|
-
- test/dummy/config/database.yml
|
136
|
-
- test/dummy/config/database.yml.travis
|
137
|
-
- test/dummy/config/environment.rb
|
138
|
-
- test/dummy/config/environments/development.rb
|
139
|
-
- test/dummy/config/environments/production.rb
|
140
|
-
- test/dummy/config/environments/test.rb
|
141
|
-
- test/dummy/config/initializers/assets.rb
|
142
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
143
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
144
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
145
|
-
- test/dummy/config/initializers/inflections.rb
|
146
|
-
- test/dummy/config/initializers/mime_types.rb
|
147
|
-
- test/dummy/config/initializers/session_store.rb
|
148
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
149
|
-
- test/dummy/config/locales/en.yml
|
150
|
-
- test/dummy/config/locales/es.yml
|
151
|
-
- test/dummy/config/routes.rb
|
152
|
-
- test/dummy/config/secrets.yml
|
153
|
-
- test/dummy/config.ru
|
154
|
-
- test/dummy/log/development.log
|
155
|
-
- test/dummy/log/test.log
|
156
|
-
- test/dummy/public/404.html
|
157
|
-
- test/dummy/public/422.html
|
158
|
-
- test/dummy/public/500.html
|
159
|
-
- test/dummy/public/favicon.ico
|
160
|
-
- test/dummy/Rakefile
|
161
|
-
- test/helper_test.rb
|
162
|
-
- test/route_test.rb
|
163
|
-
- test/support/i18n_support.rb
|
164
|
-
- test/test_helper.rb
|
80
|
+
test_files: []
|
data/test/dummy/Rakefile
DELETED
@@ -1,13 +0,0 @@
|
|
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 any plugin's vendor/assets/javascripts directory 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/rails/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,15 +0,0 @@
|
|
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 any plugin's vendor/assets/stylesheets directory 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 bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Dummy</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
|
-
</head>
|
9
|
-
<body>
|
10
|
-
<%= yield %>
|
11
|
-
</body>
|
12
|
-
</html>
|
data/test/dummy/bin/bundle
DELETED
data/test/dummy/bin/rails
DELETED
data/test/dummy/bin/rake
DELETED
data/test/dummy/bin/setup
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'pathname'
|
4
|
-
|
5
|
-
# path to your application root.
|
6
|
-
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
7
|
-
|
8
|
-
Dir.chdir APP_ROOT do
|
9
|
-
# This script is a starting point to setup your application.
|
10
|
-
# Add necessary setup steps to this file:
|
11
|
-
|
12
|
-
puts '== Installing dependencies =='
|
13
|
-
system 'gem install bundler --conservative'
|
14
|
-
system 'bundle check || bundle install'
|
15
|
-
|
16
|
-
# puts "\n== Copying sample files =="
|
17
|
-
# unless File.exist?('config/database.yml')
|
18
|
-
# system 'cp config/database.yml.sample config/database.yml'
|
19
|
-
# end
|
20
|
-
|
21
|
-
puts "\n== Preparing database =="
|
22
|
-
system 'bin/rake db:setup'
|
23
|
-
|
24
|
-
puts "\n== Removing old logs and tempfiles =="
|
25
|
-
system 'rm -f log/*'
|
26
|
-
system 'rm -rf tmp/cache'
|
27
|
-
|
28
|
-
puts "\n== Restarting application server =="
|
29
|
-
system 'touch tmp/restart.txt'
|
30
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'active_model/railtie'
|
4
|
-
require 'action_controller/railtie'
|
5
|
-
require 'action_mailer/railtie'
|
6
|
-
require 'action_view/railtie'
|
7
|
-
require 'sprockets/railtie'
|
8
|
-
require 'rails/test_unit/railtie'
|
9
|
-
|
10
|
-
Bundler.require(*Rails.groups)
|
11
|
-
require 'localizable_routes'
|
12
|
-
|
13
|
-
module Dummy
|
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/test/dummy/config/boot.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
Rails.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
|
-
# 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
|
-
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
28
|
-
# yet still be able to expire them through the digest params.
|
29
|
-
config.assets.digest = true
|
30
|
-
|
31
|
-
# Adds additional error checking when serving assets at runtime.
|
32
|
-
# Checks for improperly declared sprockets dependencies.
|
33
|
-
# Raises helpful error messages.
|
34
|
-
config.assets.raise_runtime_errors = true
|
35
|
-
|
36
|
-
# Raises error for missing translations
|
37
|
-
# config.action_view.raise_on_missing_translations = true
|
38
|
-
end
|