From 612c7c0d1dbab9a2723e22d56d6d34e36d279d67 Mon Sep 17 00:00:00 2001 From: Brian McQuay Date: Mon, 14 Oct 2013 20:00:37 -0400 Subject: [PATCH 1/3] getting rails 4 upgrade started --- Gemfile.lock | 141 ++++++++++++++++++++--------------------- i18n-timezones.gemspec | 4 +- spec/spec_helper.rb | 6 +- 3 files changed, 72 insertions(+), 79 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 81812a3..01d0e5b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,99 +3,92 @@ PATH specs: i18n-timezones (1.2.3) i18n (~> 0.5) - rails (>= 3.0.0) + rails (>= 4.0.0) GEM remote: http://rubygems.org/ specs: - actionmailer (3.2.2) - actionpack (= 3.2.2) - mail (~> 2.4.0) - actionpack (3.2.2) - activemodel (= 3.2.2) - activesupport (= 3.2.2) - builder (~> 3.0.0) + actionmailer (4.0.0) + actionpack (= 4.0.0) + mail (~> 2.5.3) + actionpack (4.0.0) + activesupport (= 4.0.0) + builder (~> 3.1.0) erubis (~> 2.7.0) - journey (~> 1.0.1) - rack (~> 1.4.0) - rack-cache (~> 1.1) - rack-test (~> 0.6.1) - sprockets (~> 2.1.2) - activemodel (3.2.2) - activesupport (= 3.2.2) - builder (~> 3.0.0) - activerecord (3.2.2) - activemodel (= 3.2.2) - activesupport (= 3.2.2) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.2) - activemodel (= 3.2.2) - activesupport (= 3.2.2) - activesupport (3.2.2) - i18n (~> 0.6) - multi_json (~> 1.0) - arel (3.0.2) - builder (3.0.0) - diff-lcs (1.1.3) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + activemodel (4.0.0) + activesupport (= 4.0.0) + builder (~> 3.1.0) + activerecord (4.0.0) + activemodel (= 4.0.0) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.0) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.3) + activesupport (4.0.0) + i18n (~> 0.6, >= 0.6.4) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) + arel (4.0.0) + atomic (1.1.13) + builder (3.1.4) + diff-lcs (1.2.4) erubis (2.7.0) - hike (1.2.1) - i18n (0.6.0) + hike (1.2.3) + i18n (0.6.5) i18n-spec (0.1.2) - journey (1.0.3) - json (1.6.5) - mail (2.4.4) - i18n (>= 0.4.0) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.25) - multi_json (1.1.0) + minitest (4.7.5) + multi_json (1.7.9) polyglot (0.3.3) - rack (1.4.1) - rack-cache (1.2) - rack (>= 0.4) - rack-ssl (1.3.2) - rack - rack-test (0.6.1) + rack (1.5.2) + rack-test (0.6.2) rack (>= 1.0) - rails (3.2.2) - actionmailer (= 3.2.2) - actionpack (= 3.2.2) - activerecord (= 3.2.2) - activeresource (= 3.2.2) - activesupport (= 3.2.2) - bundler (~> 1.0) - railties (= 3.2.2) - railties (3.2.2) - actionpack (= 3.2.2) - activesupport (= 3.2.2) - rack-ssl (~> 1.3.2) + rails (4.0.0) + actionmailer (= 4.0.0) + actionpack (= 4.0.0) + activerecord (= 4.0.0) + activesupport (= 4.0.0) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.0) + sprockets-rails (~> 2.0.0) + railties (4.0.0) + actionpack (= 4.0.0) + activesupport (= 4.0.0) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (~> 0.14.6) - rake (0.9.2.2) - rdoc (3.12) - json (~> 1.4) - rspec (2.9.0) - rspec-core (~> 2.9.0) - rspec-expectations (~> 2.9.0) - rspec-mocks (~> 2.9.0) - rspec-core (2.9.0) - rspec-expectations (2.9.0) - diff-lcs (~> 1.1.3) - rspec-mocks (2.9.0) - rspec-rails (2.9.0) + thor (>= 0.18.1, < 2.0) + rake (10.1.0) + rspec-core (2.14.2) + rspec-expectations (2.14.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.1) + rspec-rails (2.14.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec (~> 2.9.0) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) spork (1.0.0rc2) - sprockets (2.1.2) + sprockets (2.10.0) hike (~> 1.2) + multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - thor (0.14.6) - tilt (1.3.3) + sprockets-rails (2.0.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + thor (0.18.1) + thread_safe (0.1.2) + atomic + tilt (1.4.1) treetop (1.4.15) polyglot polyglot (>= 0.3.1) @@ -107,5 +100,5 @@ PLATFORMS DEPENDENCIES i18n-spec (>= 0.1.1) i18n-timezones! - rspec-rails (>= 2.7.0) + rspec-rails (>= 2.14.0) spork (~> 1.0rc) diff --git a/i18n-timezones.gemspec b/i18n-timezones.gemspec index c0c6d50..cc45694 100644 --- a/i18n-timezones.gemspec +++ b/i18n-timezones.gemspec @@ -20,8 +20,8 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.add_dependency('i18n', '~> 0.5') - s.add_dependency "rails", ">= 3.0.0" - s.add_development_dependency "rspec-rails", ">= 2.7.0" + s.add_dependency "rails", ">= 4.0.0" + s.add_development_dependency "rspec-rails", ">= 2.14.0" s.add_development_dependency "i18n-spec", ">= 0.1.1" s.add_development_dependency "spork", "~> 1.0rc" end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a2cfa9a..c396b31 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,6 @@ ENV["RAILS_ENV"] = "test" -require 'rspec' +#require 'rspec/rails' require 'i18n-spec' require 'i18n/core_ext/hash' require 'active_support' @@ -12,7 +12,7 @@ config.fail_fast = true end -module Config +module RbConfig class Application < ::Rails::Application # configuration here if needed config.active_support.deprecation = :stderr @@ -20,4 +20,4 @@ class Application < ::Rails::Application end # Initialize the application -Config::Application.initialize! +RbConfig::Application.initialize! From 9e3197320d446a4a07e4a36030166ddef29e1f9d Mon Sep 17 00:00:00 2001 From: Brian McQuay Date: Mon, 14 Oct 2013 20:33:01 -0400 Subject: [PATCH 2/3] adding missing rails 4 timezone translations --- rails/locale/ar.yml | 3 +++ rails/locale/de.yml | 5 ++++- rails/locale/es.yml | 7 ++++++- rails/locale/fr.yml | 6 +++++- rails/locale/it.yml | 3 +++ rails/locale/ja.yml | 3 +++ rails/locale/ko.yml | 3 +++ rails/locale/nl.yml | 3 +++ rails/locale/pt.yml | 3 +++ rails/locale/ru.yml | 5 ++++- rails/locale/zh-TW.yml | 3 +++ spec/unit/translations_spec.rb | 1 - 12 files changed, 40 insertions(+), 5 deletions(-) diff --git a/rails/locale/ar.yml b/rails/locale/ar.yml index 1f89c9e..25480c4 100644 --- a/rails/locale/ar.yml +++ b/rails/locale/ar.yml @@ -144,3 +144,6 @@ ar: "Nuku'alofa": "نوكوالوفا" # +13:00 "Samoa": "ساموا" # +13:00 "Tokelau Is.": "توكيلاو" # +14:00 + "Montevideo": "مونتيفيديو" + "Ulaanbaatar": "أولان باتور" + "Chatham Is.": "هل تشاتام" diff --git a/rails/locale/de.yml b/rails/locale/de.yml index a7cab08..38ced71 100644 --- a/rails/locale/de.yml +++ b/rails/locale/de.yml @@ -143,4 +143,7 @@ de: "Wellington": "Wellington" # +12:00 "Nuku'alofa": "Nuku'alofa" # +13:00 "Samoa": "Samoa" # +13:00 - "Tokelau Is.": "Tokelau" # +14:00 \ No newline at end of file + "Tokelau Is.": "Tokelau" # +14:00 + "Montevideo": "Montevideo" + "Ulaanbaatar": "Ulaanbaatar" + "Chatham Is.": "Chatham Inseln" diff --git a/rails/locale/es.yml b/rails/locale/es.yml index f65605d..19e7fed 100644 --- a/rails/locale/es.yml +++ b/rails/locale/es.yml @@ -142,4 +142,9 @@ es: "Auckland": "Auckland" "Wellington": "Wellington" "Nuku'alofa": "Nuku'alofa" - "Kyiv": "Kiev" \ No newline at end of file + "Kyiv": "Kiev" + "American Samoa": "Samoa Americana" + "Montevideo": "Montevideo" + "Ulaanbaatar": "Ulaanbaatar" + "Chatham Is.": "Isla Chatham" + "Tokelau Is.": "Isla de Tokelau" diff --git a/rails/locale/fr.yml b/rails/locale/fr.yml index c797830..eafafdf 100644 --- a/rails/locale/fr.yml +++ b/rails/locale/fr.yml @@ -143,4 +143,8 @@ fr: "Wellington": "Wellington" # +12:00 "Nuku'alofa": "Nuku'alofa" # +13:00 "Samoa": "Samoa" # +13:00 - "Tokelau Is.": "Tokelau" # +14:00 \ No newline at end of file + "Tokelau Is.": "Tokelau" # +14:00 + "Montevideo": "Montevideo" + "Ulaanbaatar": "Oulan-Bator" + "Chatham Is.": "Îles Chatham" + \ No newline at end of file diff --git a/rails/locale/it.yml b/rails/locale/it.yml index 735faa1..d81d4d3 100644 --- a/rails/locale/it.yml +++ b/rails/locale/it.yml @@ -144,3 +144,6 @@ it: "Nuku'alofa": "Nuku'alofa" "Samoa": "Samoa" "Tokelau Is.": "Isole Tokelau" + "Montevideo": "Montevideo" + "Ulaanbaatar": "Ulaanbaatar" + "Chatham Is.": "Isole Chatham" diff --git a/rails/locale/ja.yml b/rails/locale/ja.yml index a2620f5..29575d4 100644 --- a/rails/locale/ja.yml +++ b/rails/locale/ja.yml @@ -144,3 +144,6 @@ ja: "Wellington": "ウェリントン" "Nuku'alofa": "ヌクアロファ" "Tokelau Is.": "トケラウ諸島" + "Montevideo": "モンテビデオ" + "Ulaanbaatar": "ウランバートル" + "Chatham Is.": "チャタム島" diff --git a/rails/locale/ko.yml b/rails/locale/ko.yml index 94cd424..3152c2f 100644 --- a/rails/locale/ko.yml +++ b/rails/locale/ko.yml @@ -144,3 +144,6 @@ ko: "Wellington": "웰링턴" "Nuku'alofa": "누쿠알로파" "Tokelau Is.": "토켈라우 제도" + "Montevideo": "몬테비데오" + "Ulaanbaatar": "울란바토르" + "Chatham Is.": "채텀 아일랜드" diff --git a/rails/locale/nl.yml b/rails/locale/nl.yml index 89fca0c..3ad894b 100644 --- a/rails/locale/nl.yml +++ b/rails/locale/nl.yml @@ -144,3 +144,6 @@ nl: "Nuku'alofa": "Nuku'alofa" "Samoa": "Samoa" "Tokelau Is.": "Tokelau Eilanden" + "Montevideo": "Montevideo" + "Ulaanbaatar": "Ulaanbaatar" + "Chatham Is.": "Chatham Eilanden" diff --git a/rails/locale/pt.yml b/rails/locale/pt.yml index f5b4256..2f66948 100644 --- a/rails/locale/pt.yml +++ b/rails/locale/pt.yml @@ -144,3 +144,6 @@ pt: "Nuku'alofa": "Nuku'alofa" "Samoa": "Samoa" "Tokelau Is.": "Ilha Tokelau" + "Montevideo": "Montevidéu" + "Ulaanbaatar": "Ulaanbaatar" + "Chatham Is.": "Ilha Chatham" diff --git a/rails/locale/ru.yml b/rails/locale/ru.yml index 9448f13..9c3d21c 100644 --- a/rails/locale/ru.yml +++ b/rails/locale/ru.yml @@ -143,4 +143,7 @@ ru: "Wellington": "Веллингтон" # +12:00 "Nuku'alofa": "Нукуалофа" # +13:00 "Samoa": "Самоа" # +13:00 - "Tokelau Is.": "Токелау" # +14:00 \ No newline at end of file + "Tokelau Is.": "Токелау" # +14:00 + "Montevideo": "Монтевидео" + "Ulaanbaatar": "Улан-Батор" + "Chatham Is.": "Остров Чатем" diff --git a/rails/locale/zh-TW.yml b/rails/locale/zh-TW.yml index 087d3b3..ff7d4c7 100644 --- a/rails/locale/zh-TW.yml +++ b/rails/locale/zh-TW.yml @@ -144,3 +144,6 @@ zh-TW: "Nuku'alofa": "努瓜婁發" "Samoa": "薩摩亞" "Tokelau Is.": "托克勞群島" + "Montevideo": "蒙得維的亞" + "Ulaanbaatar": "烏蘭巴托" + "Chatham Is.": "查塔姆" \ No newline at end of file diff --git a/spec/unit/translations_spec.rb b/spec/unit/translations_spec.rb index 8ea16cd..ade97bf 100644 --- a/spec/unit/translations_spec.rb +++ b/spec/unit/translations_spec.rb @@ -6,7 +6,6 @@ I18n.locale = locale_file.split('/').last.split('.').first ActiveSupport::TimeZone.all.each do |zone| p I18n.t(zone.name, :scope => :timezones, :separator => "\001") if I18n.t(zone.name, :scope => :timezones, :separator => "\001").include?('translation missing') - it { I18n.t(zone.name, :scope => :timezones, :separator => "\001").should_not == zone } it { I18n.t(zone.name, :scope => :timezones, :separator => "\001").include?('translation missing').should == false } end From c828d699c831a2d10533dcbeb263441089344221 Mon Sep 17 00:00:00 2001 From: Brian McQuay Date: Mon, 14 Oct 2013 20:34:18 -0400 Subject: [PATCH 3/3] bumping versions --- README.rdoc | 1 + lib/i18n_timezones/version.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index d7b8cd8..d3ca7d7 100644 --- a/README.rdoc +++ b/README.rdoc @@ -39,6 +39,7 @@ If you find an error in a translation, please let us know. Please help us fill i * Steve Hodges - https://github.com/stevehodges == Version History +* 1.3 - Upgrading to Rails 4 * 1.2.3 - Adding Arabic, Italian, Dutch, Portuguese, and Chinese (Traditional) locales * 1.2.2 - Adding Japansese locale * 1.2.1 - Fixing a German translation diff --git a/lib/i18n_timezones/version.rb b/lib/i18n_timezones/version.rb index cd87ce7..729fb37 100644 --- a/lib/i18n_timezones/version.rb +++ b/lib/i18n_timezones/version.rb @@ -1,3 +1,3 @@ module I18nTimezones - VERSION = "1.2.3" + VERSION = "1.3" end