Permalink
Browse files

upgraded i18n dependency to 0.5 because the options for raising an ex…

…ception have changed from :throw to :raise.
  • Loading branch information...
1 parent da25441 commit ca77f54319f67a99701e41c5fc5fd2ea1497fb80 Alain Bloch and Thomas Shafer committed with Nov 22, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 faker.gemspec
  2. +2 −2 lib/faker.rb
View
@@ -10,10 +10,10 @@ Gem::Specification.new do |s|
s.homepage = "http://faker.rubyforge.org"
s.summary = %q{Easily generate fake data}
s.description = %q{Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.}
-
+
s.rubyforge_project = "faker"
- s.add_dependency('i18n', '~> 0.4')
+ s.add_dependency('i18n', '~> 0.5')
s.files = `git ls-files -- lib/*`.split("\n") + %w(History.txt License.txt README.md)
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
View
@@ -66,9 +66,9 @@ def parse(key)
def translate(*args)
opts = args.last.is_a?(Hash) ? args.pop : {}
opts[:locale] ||= Faker::Config.locale
- opts[:throw] = true
+ opts[:raise] = true
I18n.translate(*(args.push(opts)))
- rescue
+ rescue I18n::MissingTranslationData => e
# Super-simple fallback -- fallback to en if the
# translation was missing. If the translation isn't
# in en either, then it will raise again.

0 comments on commit ca77f54

Please sign in to comment.