localizable_routes 4.0.0.0 → 4.0.0.1
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/README.md +18 -6
- data/lib/localizable_routes/railtie.rb +1 -1
- data/lib/localizable_routes/version.rb +1 -1
- data/test/dummy/config/database.yml +5 -2
- data/test/dummy/log/test.log +30 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f44462ca27e04be3df91f12c35bd410ab8c07f7
|
4
|
+
data.tar.gz: b358f05757bf4adf1029dcc39dee93ffd1177412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41c2c66539e8de2b856f73e152dbc7908a0f72189883f2dd28e8aa09f58288675c151fbc1d485771c618dc7334a320109e91ad5d567244dc7843284a46e0f180
|
7
|
+
data.tar.gz: 9bbba27d618a5aa4393d555b98071ab328fe1ef3ca8a31da081303af05fbaed502834aec7bd25638166412468c26c3d6c7a1e40fdc5b77b1fa46e834c64b8631
|
data/README.md
CHANGED
@@ -61,22 +61,34 @@ NOTE: There is no need to put the full path, just localize each part individuall
|
|
61
61
|
|
62
62
|
Url helpers will continue working the same:
|
63
63
|
```ruby
|
64
|
-
param_path
|
64
|
+
param_path
|
65
|
+
# => /en/pagina if I18n.locale is :es
|
65
66
|
|
66
|
-
subdomain_url
|
67
|
+
subdomain_url
|
68
|
+
# => http://uy.domain.com/pagina if current subdomain is uy
|
67
69
|
|
68
|
-
domain_url
|
70
|
+
domain_url
|
71
|
+
# => http://domain.uy/pagina if current domain is domain.uy
|
69
72
|
```
|
70
73
|
|
71
74
|
And you can change the locale by passing the corresponding parameter:
|
72
75
|
```ruby
|
73
|
-
param_path locale: :en
|
76
|
+
param_path locale: :en
|
77
|
+
# => /en/page
|
74
78
|
|
75
|
-
subdomain_url sudomain: 'us'
|
79
|
+
subdomain_url sudomain: 'us'
|
80
|
+
# => http://us.domain.com/page
|
76
81
|
|
77
|
-
domain_url domain: 'domain.us'
|
82
|
+
domain_url domain: 'domain.us'
|
83
|
+
# => http://domain.us/page
|
78
84
|
```
|
79
85
|
|
86
|
+
## Contributing
|
87
|
+
|
88
|
+
Any issue, pull request, comment of any kind is more than welcome!
|
89
|
+
|
90
|
+
I will mainly ensure compatibility to PostgreSQL, AWS, Redis, Elasticsearch, FreeBSD and Memcached.
|
91
|
+
|
80
92
|
## Credits
|
81
93
|
|
82
94
|
This gem is maintained and funded by [mmontossi](https://github.com/mmontossi).
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module LocalizableRoutes
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
|
4
|
-
initializer 'localizable_routes.
|
4
|
+
initializer 'localizable_routes.action_dispatch' do
|
5
5
|
::ActionDispatch::Routing::RouteSet::NamedRouteCollection.include(
|
6
6
|
LocalizableRoutes::Extensions::ActionDispatch::NamedRouteCollection
|
7
7
|
)
|
data/test/dummy/log/test.log
CHANGED
@@ -82,3 +82,33 @@ HelpersTest: test_methods
|
|
82
82
|
-----------------------
|
83
83
|
RoutesTest: test_params
|
84
84
|
-----------------------
|
85
|
+
----------------------
|
86
|
+
RouteTest: test_params
|
87
|
+
----------------------
|
88
|
+
------------------------
|
89
|
+
HelperTest: test_methods
|
90
|
+
------------------------
|
91
|
+
------------------------
|
92
|
+
HelperTest: test_methods
|
93
|
+
------------------------
|
94
|
+
----------------------
|
95
|
+
RouteTest: test_params
|
96
|
+
----------------------
|
97
|
+
----------------------
|
98
|
+
RouteTest: test_params
|
99
|
+
----------------------
|
100
|
+
------------------------
|
101
|
+
HelperTest: test_methods
|
102
|
+
------------------------
|
103
|
+
----------------------
|
104
|
+
RouteTest: test_params
|
105
|
+
----------------------
|
106
|
+
------------------------
|
107
|
+
HelperTest: test_methods
|
108
|
+
------------------------
|
109
|
+
------------------------
|
110
|
+
HelperTest: test_methods
|
111
|
+
------------------------
|
112
|
+
----------------------
|
113
|
+
RouteTest: test_params
|
114
|
+
----------------------
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localizable_routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmontossi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|