inflections 3.2.9.20121206 → 3.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -2
- data/README.markdown +5 -1
- data/lib/inflections/railtie.rb +9 -7
- data/lib/inflections/version.rb +2 -2
- metadata +2 -2
data/.travis.yml
CHANGED
data/README.markdown
CHANGED
@@ -24,7 +24,11 @@ $ bundle
|
|
24
24
|
|
25
25
|
### Ruby on Rails
|
26
26
|
|
27
|
-
If you're using Rails, you're done. The default inflections defined in ActiveSupport will be overwritten, and you can continue to define your own special cases in `config/intializers/inflections.rb`. I18n's default locale (set in `config/application.rb` will determine which inflections are loaded
|
27
|
+
If you're using Rails, you're done. The default inflections defined in ActiveSupport will be overwritten, and you can continue to define your own special cases in `config/intializers/inflections.rb`. I18n's default locale (set in `config/application.rb`) will determine which inflections are loaded. If you do not wish to use your default locale, you can require a locale manually in your Gemfile:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
gem 'inflections', :require => 'inflections/en'
|
31
|
+
```
|
28
32
|
|
29
33
|
### Otherwise
|
30
34
|
|
data/lib/inflections/railtie.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
module Inflections
|
2
2
|
class Railtie < Rails::Railtie
|
3
|
-
|
4
|
-
|
3
|
+
initializer 'inflections.require_inflections' do
|
4
|
+
begin
|
5
5
|
require "inflections/#{Rails.configuration.i18n.default_locale}"
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
rescue LoadError => e
|
7
|
+
if Rails.configuration.i18n.default_locale.nil?
|
8
|
+
warn "Inflections: no default locale set. Defaulting to English (en)."
|
9
|
+
else
|
10
|
+
warn "Inflections: no support for #{Rails.configuration.i18n.default_locale}. Defaulting to English (en)."
|
11
|
+
require 'inflections/en'
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
data/lib/inflections/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inflections
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|