localize_multi_digit 2.0 → 3.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.
@@ -0,0 +1,8 @@
|
|
1
|
+
class LocalizeMultiDigitGenerator < Rails::Generators::Base
|
2
|
+
source_root(File.expand_path(File.dirname(__FILE__)))
|
3
|
+
|
4
|
+
def copy_initializer
|
5
|
+
copy_file 'localize_multi_digit.rb', 'config/initializers/localize_multi_digit.rb'
|
6
|
+
copy_file 'localized_digits.yml', 'config/locales/localized_digits.yml'
|
7
|
+
end
|
8
|
+
end
|
File without changes
|
data/lib/localize_multi_digit.rb
CHANGED
@@ -28,8 +28,8 @@ end
|
|
28
28
|
module LocalizedDigits
|
29
29
|
require 'yaml'
|
30
30
|
class Base
|
31
|
-
def initialize
|
32
|
-
@digits = YAML.load_file("#{Rails.root}/config/locales/localized_digits.yml")
|
31
|
+
def initialize
|
32
|
+
@digits = YAML.load_file("#{Rails.root}/config/locales/localized_digits.yml")
|
33
33
|
end
|
34
34
|
def get_localized_digits
|
35
35
|
@digits
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localize_multi_digit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '3.0'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -18,8 +18,9 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- lib/localize_multi_digit.rb
|
21
|
-
-
|
22
|
-
-
|
21
|
+
- lib/generators/localize_multi_digit.rb
|
22
|
+
- lib/generators/localize_multi_digit_generator.rb
|
23
|
+
- lib/generators/localized_digits.yml
|
23
24
|
homepage:
|
24
25
|
licenses: []
|
25
26
|
post_install_message:
|
@@ -43,5 +44,6 @@ rubyforge_project:
|
|
43
44
|
rubygems_version: 1.8.17
|
44
45
|
signing_key:
|
45
46
|
specification_version: 3
|
46
|
-
summary: localize_multi_digit localizes digits from
|
47
|
+
summary: localize_multi_digit localizes digits from String, Fixnum, Float, Date, Time,
|
48
|
+
ActiveSupport::TimeWithZone
|
47
49
|
test_files: []
|
data/init.rb
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
require File.dirname(File.dirname(__FILE__)) + "/lib/localize_multi_digit.rb"
|
2
|
-
|
3
|
-
$ld = LocalizedDigits::Base.new(File.dirname(File.dirname(__FILE__)) + "/localized_digits.yml")
|
4
|
-
|
5
|
-
|
6
|
-
[String, Fixnum, Float, Date, Time].each do |item|
|
7
|
-
item.send(:include, LocalizeMultiDigit)
|
8
|
-
end
|