diff --git a/README.rdoc b/README.rdoc index 9b608665..347a9aae 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,4 +1,4 @@ -== Number_to_words_ru +== numbers_and_words Перевод чисел в слова при помощи библиотеки I18n. @@ -64,27 +64,27 @@ Convert numbers to words using I18n library. == Установка Для установки: - gem install number_to_words_ru + gem install numbers_and_words === Ruby on Rails -Существует два варианта использования number_to_words вместе с Rails: +Существует два варианта использования numbers_and_words вместе с Rails: 1. Установка gem ==== Rails 3 -В файле Gemfile сделайте ссылку на gem number_to_words_ru: +В файле Gemfile сделайте ссылку на gem numbers_and_words: - gem 'number_to_words' + gem 'numbers_and_words' Чтобы установить gem, используйте команду bundle install ==== Rails 2 -В файле config/environment.rb сделайте ссылку на gem number_to_words_ru: +В файле config/environment.rb сделайте ссылку на gem numbers_and_words: Rails::Initializer.run do |config| - config.gem 'number_to_words_ru' + config.gem 'numbers_and_words' end Чтобы установить gem, используйте команду @@ -93,13 +93,13 @@ Convert numbers to words using I18n library. 2. Установка плагина -Для того, чтобы установить number_to_words_ru как плагин к Rails, используйте команду +Для того, чтобы установить numbers_and_words как плагин к Rails, используйте команду - script/plugin install git://github.com/kslazarev/number_to_words_ru.git + script/plugin install git://github.com/kslazarev/numbers_and_words.git ==== Использование в irb - require 'number_to_words' + require 'numbers_and_words' == Автор diff --git a/Rakefile b/Rakefile index 721838f3..d85a970b 100644 --- a/Rakefile +++ b/Rakefile @@ -11,11 +11,11 @@ end require 'rake/gempackagetask' require 'rubygems/specification' -GEM = "number_to_words_ru" +GEM = "numbers_and_words" GEM_VERSION = "0.2.3" AUTHOR = "Kirill Lazarev" EMAIL = "k.s.lazarev@gmail.com" -HOMEPAGE = "http://github.com/kslazarev/number_to_words_ru" +HOMEPAGE = "http://github.com/kslazarev/numbers_and_words" SUMMARY = "Simple convert number to russian words using I18N." LICENSE = "MIT" diff --git a/lib/number_to_words_ru/array_additions.rb b/lib/number_to_words_ru/array_additions.rb deleted file mode 100644 index 166ed4d4..00000000 --- a/lib/number_to_words_ru/array_additions.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'number_to_words_ru/array_additions/helpers' -require 'number_to_words_ru/array_additions/validations' diff --git a/lib/number_to_words_ru/strategies.rb b/lib/number_to_words_ru/strategies.rb deleted file mode 100644 index a03a2bfd..00000000 --- a/lib/number_to_words_ru/strategies.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'number_to_words_ru/strategies/base' -require 'number_to_words_ru/strategies/ru' -require 'number_to_words_ru/strategies/en' diff --git a/lib/number_to_words_ru/translations_helpers.rb b/lib/number_to_words_ru/translations_helpers.rb deleted file mode 100644 index 69c22abb..00000000 --- a/lib/number_to_words_ru/translations_helpers.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'number_to_words_ru/translations_helpers/base' -require 'number_to_words_ru/translations_helpers/ru' -require 'number_to_words_ru/translations_helpers/en' diff --git a/lib/number_to_words_ru.rb b/lib/numbers_and_words.rb similarity index 53% rename from lib/number_to_words_ru.rb rename to lib/numbers_and_words.rb index 2af7c03a..23172215 100644 --- a/lib/number_to_words_ru.rb +++ b/lib/numbers_and_words.rb @@ -3,13 +3,13 @@ require 'initializers/i18n' require 'active_support/inflector' -require 'number_to_words_ru/translations_helpers' -require 'number_to_words_ru/strategies' -require 'number_to_words_ru/array_additions' -require 'number_to_words_ru/figures_array' +require 'numbers_and_words/translations_helpers' +require 'numbers_and_words/strategies' +require 'numbers_and_words/array_additions' +require 'numbers_and_words/figures_array' -require 'number_to_words_ru/core_ext/integer' -require 'number_to_words_ru/core_ext/array' +require 'numbers_and_words/core_ext/integer' +require 'numbers_and_words/core_ext/array' module I18nInitialization extend self diff --git a/lib/numbers_and_words/array_additions.rb b/lib/numbers_and_words/array_additions.rb new file mode 100644 index 00000000..8055fffc --- /dev/null +++ b/lib/numbers_and_words/array_additions.rb @@ -0,0 +1,2 @@ +require 'numbers_and_words/array_additions/helpers' +require 'numbers_and_words/array_additions/validations' diff --git a/lib/number_to_words_ru/array_additions/helpers.rb b/lib/numbers_and_words/array_additions/helpers.rb similarity index 100% rename from lib/number_to_words_ru/array_additions/helpers.rb rename to lib/numbers_and_words/array_additions/helpers.rb diff --git a/lib/number_to_words_ru/array_additions/validations.rb b/lib/numbers_and_words/array_additions/validations.rb similarity index 100% rename from lib/number_to_words_ru/array_additions/validations.rb rename to lib/numbers_and_words/array_additions/validations.rb diff --git a/lib/number_to_words_ru/core_ext/array.rb b/lib/numbers_and_words/core_ext/array.rb similarity index 100% rename from lib/number_to_words_ru/core_ext/array.rb rename to lib/numbers_and_words/core_ext/array.rb diff --git a/lib/number_to_words_ru/core_ext/integer.rb b/lib/numbers_and_words/core_ext/integer.rb similarity index 100% rename from lib/number_to_words_ru/core_ext/integer.rb rename to lib/numbers_and_words/core_ext/integer.rb diff --git a/lib/number_to_words_ru/figures_array.rb b/lib/numbers_and_words/figures_array.rb similarity index 100% rename from lib/number_to_words_ru/figures_array.rb rename to lib/numbers_and_words/figures_array.rb diff --git a/lib/number_to_words_ru/pluralization.rb b/lib/numbers_and_words/pluralization.rb similarity index 100% rename from lib/number_to_words_ru/pluralization.rb rename to lib/numbers_and_words/pluralization.rb diff --git a/lib/numbers_and_words/strategies.rb b/lib/numbers_and_words/strategies.rb new file mode 100644 index 00000000..dde1484b --- /dev/null +++ b/lib/numbers_and_words/strategies.rb @@ -0,0 +1,3 @@ +require 'numbers_and_words/strategies/base' +require 'numbers_and_words/strategies/ru' +require 'numbers_and_words/strategies/en' diff --git a/lib/number_to_words_ru/strategies/base.rb b/lib/numbers_and_words/strategies/base.rb similarity index 100% rename from lib/number_to_words_ru/strategies/base.rb rename to lib/numbers_and_words/strategies/base.rb diff --git a/lib/number_to_words_ru/strategies/en.rb b/lib/numbers_and_words/strategies/en.rb similarity index 100% rename from lib/number_to_words_ru/strategies/en.rb rename to lib/numbers_and_words/strategies/en.rb diff --git a/lib/number_to_words_ru/strategies/ru.rb b/lib/numbers_and_words/strategies/ru.rb similarity index 100% rename from lib/number_to_words_ru/strategies/ru.rb rename to lib/numbers_and_words/strategies/ru.rb diff --git a/lib/numbers_and_words/translations_helpers.rb b/lib/numbers_and_words/translations_helpers.rb new file mode 100644 index 00000000..8bca2302 --- /dev/null +++ b/lib/numbers_and_words/translations_helpers.rb @@ -0,0 +1,3 @@ +require 'numbers_and_words/translations_helpers/base' +require 'numbers_and_words/translations_helpers/ru' +require 'numbers_and_words/translations_helpers/en' diff --git a/lib/number_to_words_ru/translations_helpers/base.rb b/lib/numbers_and_words/translations_helpers/base.rb similarity index 100% rename from lib/number_to_words_ru/translations_helpers/base.rb rename to lib/numbers_and_words/translations_helpers/base.rb diff --git a/lib/number_to_words_ru/translations_helpers/en.rb b/lib/numbers_and_words/translations_helpers/en.rb similarity index 100% rename from lib/number_to_words_ru/translations_helpers/en.rb rename to lib/numbers_and_words/translations_helpers/en.rb diff --git a/lib/number_to_words_ru/translations_helpers/ru.rb b/lib/numbers_and_words/translations_helpers/ru.rb similarity index 100% rename from lib/number_to_words_ru/translations_helpers/ru.rb rename to lib/numbers_and_words/translations_helpers/ru.rb diff --git a/number_to_words_ru.gemspec b/number_to_words_ru.gemspec deleted file mode 100644 index 2e998327..00000000 --- a/number_to_words_ru.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- encoding: utf-8 -*- - -Gem::Specification.new do |s| - s.name = "number_to_words_ru" - s.version = "0.2.3" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Kirill Lazarev"] - s.autorequire = "number_to_words_ru" - s.date = "2011-12-15" - s.description = "Simple convert number to russian words using I18N." - s.email = "k.s.lazarev@gmail.com" - s.files = ["lib/initializers", "lib/initializers/i18n.rb", "lib/locales", "lib/locales/numbers.en.yml", "lib/locales/numbers.ru.yml", "lib/locales/plurals.rb", "lib/number_to_words_ru", "lib/number_to_words_ru/array_additions", "lib/number_to_words_ru/array_additions/helpers.rb", "lib/number_to_words_ru/array_additions/validations.rb", "lib/number_to_words_ru/array_additions.rb", "lib/number_to_words_ru/core_ext", "lib/number_to_words_ru/core_ext/array.rb", "lib/number_to_words_ru/core_ext/integer.rb", "lib/number_to_words_ru/figures_array.rb", "lib/number_to_words_ru/pluralization.rb", "lib/number_to_words_ru/strategies", "lib/number_to_words_ru/strategies/base.rb", "lib/number_to_words_ru/strategies/en.rb", "lib/number_to_words_ru/strategies/ru.rb", "lib/number_to_words_ru/strategies.rb", "lib/number_to_words_ru/translations_helpers", "lib/number_to_words_ru/translations_helpers/base.rb", "lib/number_to_words_ru/translations_helpers/en.rb", "lib/number_to_words_ru/translations_helpers/ru.rb", "lib/number_to_words_ru/translations_helpers.rb", "lib/number_to_words_ru.rb", "spec/number_to_words_ru", "spec/number_to_words_ru/array", "spec/number_to_words_ru/array/ru_spec.rb", "spec/number_to_words_ru/integer", "spec/number_to_words_ru/integer/ru_spec.rb", "spec/spec_helper.rb"] - s.homepage = "http://github.com/kslazarev/number_to_words_ru" - s.licenses = ["MIT"] - s.require_paths = ["lib"] - s.rubygems_version = "1.8.10" - s.summary = "Simple convert number to russian words using I18N." - - if s.respond_to? :specification_version then - s.specification_version = 3 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - else - end - else - end -end diff --git a/numbers_and_words.gemspec b/numbers_and_words.gemspec new file mode 100644 index 00000000..ff5c44e2 --- /dev/null +++ b/numbers_and_words.gemspec @@ -0,0 +1,28 @@ +# -*- encoding: utf-8 -*- + +Gem::Specification.new do |s| + s.name = "numbers_and_words" + s.version = "0.2.3" + + s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.authors = ["Kirill Lazarev"] + s.autorequire = "numbers_and_words" + s.date = "2011-12-15" + s.description = "Simple convert number to russian words using I18N." + s.email = "k.s.lazarev@gmail.com" + s.files = ["lib/initializers", "lib/initializers/i18n.rb", "lib/locales", "lib/locales/numbers.en.yml", "lib/locales/numbers.ru.yml", "lib/locales/plurals.rb", "lib/numbers_and_words", "lib/numbers_and_words/array_additions", "lib/numbers_and_words/array_additions/helpers.rb", "lib/numbers_and_words/array_additions/validations.rb", "lib/numbers_and_words/array_additions.rb", "lib/numbers_and_words/core_ext", "lib/numbers_and_words/core_ext/array.rb", "lib/numbers_and_words/core_ext/integer.rb", "lib/numbers_and_words/figures_array.rb", "lib/numbers_and_words/pluralization.rb", "lib/numbers_and_words/strategies", "lib/numbers_and_words/strategies/base.rb", "lib/numbers_and_words/strategies/en.rb", "lib/numbers_and_words/strategies/ru.rb", "lib/numbers_and_words/strategies.rb", "lib/numbers_and_words/translations_helpers", "lib/numbers_and_words/translations_helpers/base.rb", "lib/numbers_and_words/translations_helpers/en.rb", "lib/numbers_and_words/translations_helpers/ru.rb", "lib/numbers_and_words/translations_helpers.rb", "lib/numbers_and_words.rb", "spec/numbers_and_words", "spec/numbers_and_words/array", "spec/numbers_and_words/array/ru_spec.rb", "spec/numbers_and_words/integer", "spec/numbers_and_words/integer/ru_spec.rb", "spec/spec_helper.rb"] + s.homepage = "http://github.com/kslazarev/numbers_and_words" + s.licenses = ["MIT"] + s.require_paths = ["lib"] + s.rubygems_version = "1.8.10" + s.summary = "Simple convert number to russian words using I18N." + + if s.respond_to? :specification_version then + s.specification_version = 3 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + else + end + else + end +end diff --git a/spec/number_to_words_ru/array/ru_spec.rb b/spec/numbers_and_words/array/ru_spec.rb similarity index 100% rename from spec/number_to_words_ru/array/ru_spec.rb rename to spec/numbers_and_words/array/ru_spec.rb diff --git a/spec/number_to_words_ru/integer/ru_spec.rb b/spec/numbers_and_words/integer/ru_spec.rb similarity index 100% rename from spec/number_to_words_ru/integer/ru_spec.rb rename to spec/numbers_and_words/integer/ru_spec.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a6caf5ba..684c8d16 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,7 @@ $TESTING=true $:.unshift File.join(File.dirname(__FILE__), '..', 'lib') -require 'number_to_words_ru' +require 'numbers_and_words' RSpec.configure do include TranslationsHelpers::Base