Hello community, here is the log from the commit of package rubygem-gettext_i18n_rails for openSUSE:Factory checked in at 2016-04-28 16:52:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-gettext_i18n_rails (Old) and /work/SRC/openSUSE:Factory/.rubygem-gettext_i18n_rails.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-gettext_i18n_rails" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-gettext_i18n_rails/rubygem-gettext_i18n_rails.changes 2015-12-03 13:30:08.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-gettext_i18n_rails.new/rubygem-gettext_i18n_rails.changes 2016-04-28 16:53:01.000000000 +0200 @@ -1,0 +2,18 @@ +Tue Mar 1 05:45:09 UTC 2016 - coolo@suse.com + +- updated to version 1.5.0 + no changelog found + +------------------------------------------------------------------- +Thu Jan 21 05:36:18 UTC 2016 - coolo@suse.com + +- updated to version 1.4.0 + no changelog found + +------------------------------------------------------------------- +Tue Dec 15 05:30:28 UTC 2015 - coolo@suse.com + +- updated to version 1.3.2 + no changelog found + +------------------------------------------------------------------- Old: ---- gettext_i18n_rails-1.3.1.gem New: ---- gettext_i18n_rails-1.5.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-gettext_i18n_rails.spec ++++++ --- /var/tmp/diff_new_pack.GznRWy/_old 2016-04-28 16:53:02.000000000 +0200 +++ /var/tmp/diff_new_pack.GznRWy/_new 2016-04-28 16:53:02.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-gettext_i18n_rails # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-gettext_i18n_rails -Version: 1.3.1 +Version: 1.5.0 Release: 0 %define mod_name gettext_i18n_rails %define mod_full_name %{mod_name}-%{version} ++++++ gettext_i18n_rails-1.3.1.gem -> gettext_i18n_rails-1.5.0.gem ++++++ Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/active_model/translation.rb new/lib/gettext_i18n_rails/active_model/translation.rb --- old/lib/gettext_i18n_rails/active_model/translation.rb 2015-10-31 22:29:03.000000000 +0100 +++ new/lib/gettext_i18n_rails/active_model/translation.rb 2016-02-29 18:11:37.000000000 +0100 @@ -17,7 +17,15 @@ def inheritance_tree_root(aclass) return aclass unless aclass.respond_to?(:base_class) base = aclass.base_class - base.superclass.abstract_class? ? base.superclass : base + if base.superclass.abstract_class? + if defined?(::ApplicationRecord) && base.superclass == ApplicationRecord + base + else + base.superclass + end + else + base + end end def humanize_class_name(name=nil) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/model_attributes_finder.rb new/lib/gettext_i18n_rails/model_attributes_finder.rb --- old/lib/gettext_i18n_rails/model_attributes_finder.rb 2015-10-31 22:29:03.000000000 +0100 +++ new/lib/gettext_i18n_rails/model_attributes_finder.rb 2016-02-29 18:11:37.000000000 +0100 @@ -42,15 +42,16 @@ end def initialize - @existing_tables = ActiveRecord::Base.connection.tables + connection = ::ActiveRecord::Base.connection + @existing_tables = (Rails::VERSION::MAJOR >= 5 ? connection.data_sources : connection.tables) end - # Rails < 3.0 doesn't have DescendantsTracker. + # Rails < 3.0 doesn't have DescendantsTracker. # Instead of iterating over ObjectSpace (slow) the decision was made NOT to support # class hierarchies with abstract base classes in Rails 2.x def model_attributes(model, ignored_tables, ignored_cols) return [] if model.abstract_class? && Rails::VERSION::MAJOR < 3 - + if model.abstract_class? model.direct_descendants.reject {|m| ignored?(m.table_name, ignored_tables)}.inject([]) do |attrs, m| attrs.push(model_attributes(m, ignored_tables, ignored_cols)).flatten.uniq @@ -63,9 +64,17 @@ end def models - if Rails::VERSION::MAJOR > 2 + if Rails::VERSION::MAJOR >= 3 Rails.application.eager_load! # make sure that all models are loaded so that direct_descendants works - ::ActiveRecord::Base.direct_descendants + descendants = ::ActiveRecord::Base.direct_descendants + + # In rails 5+ user models are supposed to inherit from ApplicationRecord + if defined?(::ApplicationRecord) + descendants += ApplicationRecord.direct_descendants + descendants.delete ApplicationRecord + end + + descendants else ::ActiveRecord::Base.connection.tables \ .map { |t| table_name_to_namespaced_model(t) } \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/railtie.rb new/lib/gettext_i18n_rails/railtie.rb --- old/lib/gettext_i18n_rails/railtie.rb 2015-10-31 22:29:03.000000000 +0100 +++ new/lib/gettext_i18n_rails/railtie.rb 2016-02-29 18:11:37.000000000 +0100 @@ -2,6 +2,7 @@ class Railtie < ::Rails::Railtie config.gettext_i18n_rails = ActiveSupport::OrderedOptions.new config.gettext_i18n_rails.msgmerge = nil + config.gettext_i18n_rails.msgcat = nil config.gettext_i18n_rails.xgettext = nil config.gettext_i18n_rails.use_for_active_record_attributes = true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/tasks.rb new/lib/gettext_i18n_rails/tasks.rb --- old/lib/gettext_i18n_rails/tasks.rb 2015-10-31 22:29:03.000000000 +0100 +++ new/lib/gettext_i18n_rails/tasks.rb 2016-02-29 18:11:37.000000000 +0100 @@ -27,6 +27,11 @@ config || gettext_default_options end + def gettext_msgcat_options + config = (Rails.application.config.gettext_i18n_rails.msgcat if defined?(Rails.application)) + config || gettext_default_options + end + def gettext_xgettext_options config = (Rails.application.config.gettext_i18n_rails.xgettext if defined?(Rails.application)) config || gettext_default_options @@ -45,6 +50,7 @@ task.files = files_to_translate task.enable_description = false task.msgmerge_options = gettext_msgmerge_options + task.msgcat_options = gettext_msgcat_options task.xgettext_options = gettext_xgettext_options end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gettext_i18n_rails/version.rb new/lib/gettext_i18n_rails/version.rb --- old/lib/gettext_i18n_rails/version.rb 2015-10-31 22:29:03.000000000 +0100 +++ new/lib/gettext_i18n_rails/version.rb 2016-02-29 18:11:37.000000000 +0100 @@ -1,3 +1,3 @@ module GettextI18nRails - Version = VERSION = '1.3.1' + Version = VERSION = '1.5.0' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-10-31 22:29:03.000000000 +0100 +++ new/metadata 2016-02-29 18:11:37.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: gettext_i18n_rails version: !ruby/object:Gem::Version - version: 1.3.1 + version: 1.5.0 platform: ruby authors: - Michael Grosser autorequire: bindir: bin cert_chain: [] -date: 2015-10-31 00:00:00.000000000 Z +date: 2016-02-29 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: fast_gettext