route_translator 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,22 @@ require "rails"
2
2
 
3
3
  module Rails
4
4
  class Application
5
+ if defined?(RoutesReloader)
6
+ class RoutesReloader
7
+ alias :reload_without_translator! :reload!
8
+
9
+ def reload!
10
+ result = reload_without_translator!
11
+
12
+ route_sets.each do |routes|
13
+ routes.default_locale = I18n.default_locale
14
+ routes.translate_from_file
15
+ end
16
+
17
+ result
18
+ end
19
+ end
20
+ else
5
21
  alias :reload_routes_without_translator! :reload_routes!
6
22
  def reload_routes!
7
23
  result = reload_routes_without_translator!
@@ -11,5 +27,6 @@ module Rails
11
27
 
12
28
  result
13
29
  end
30
+ end
14
31
  end
15
32
  end
@@ -1,3 +1,3 @@
1
1
  module RouteTranslator
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
data/test/test_helper.rb CHANGED
@@ -37,6 +37,7 @@ module RouteTranslator
37
37
  app = @@app = Class.new(Rails::Application)
38
38
  app.config.active_support.deprecation = :stderr
39
39
  app.paths["log"] = "#{tmp_path}/log/test.log"
40
+ app.paths["config/routes"] = File.join(app_path, routes_config)
40
41
  app.initialize!
41
42
  Rails.application = app
42
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: route_translator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-10 00:00:00.000000000 Z
13
+ date: 2013-02-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mocha