Hello community,
here is the log from the commit of package rubygem-activesupport-4_2 for
openSUSE:Factory checked in at 2015-06-30 10:19:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activesupport-4_2 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-activesupport-4_2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-activesupport-4_2"
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-activesupport-4_2/rubygem-activesupport-4_2.changes
2015-06-23 11:56:09.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-activesupport-4_2.new/rubygem-activesupport-4_2.changes
2015-06-30 10:19:08.000000000 +0200
@@ -1,0 +2,16 @@
+Fri Jun 26 04:32:28 UTC 2015 - [email protected]
+
+- updated to version 4.2.3
+ see installed CHANGELOG.md
+
+ ## Rails 4.2.3 (June 25, 2015) ##
+
+ * Fix a range of values for parameters of the Time#change
+
+ *Nikolay Kondratyev*
+
+ * Add some missing `require 'active_support/deprecation'`
+
+ *Akira Matsuda*
+
+-------------------------------------------------------------------
Old:
----
activesupport-4.2.2.gem
New:
----
activesupport-4.2.3.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-activesupport-4_2.spec ++++++
--- /var/tmp/diff_new_pack.7xyWxW/_old 2015-06-30 10:19:09.000000000 +0200
+++ /var/tmp/diff_new_pack.7xyWxW/_new 2015-06-30 10:19:09.000000000 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-activesupport-4_2
-Version: 4.2.2
+Version: 4.2.3
Release: 0
%define mod_name activesupport
%define mod_full_name %{mod_name}-%{version}
++++++ activesupport-4.2.2.gem -> activesupport-4.2.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2015-06-16 20:01:34.000000000 +0200
+++ new/CHANGELOG.md 2015-06-25 23:28:54.000000000 +0200
@@ -1,3 +1,14 @@
+## Rails 4.2.3 (June 25, 2015) ##
+
+* Fix a range of values for parameters of the Time#change
+
+ *Nikolay Kondratyev*
+
+* Add some missing `require 'active_support/deprecation'`
+
+ *Akira Matsuda*
+
+
## Rails 4.2.2 (June 16, 2015) ##
* Fix XSS vulnerability in `ActiveSupport::JSON.encode` method.
@@ -13,7 +24,7 @@
*Aaron Patterson*
-## Rails 4.2.1 (March 19, 2014) ##
+## Rails 4.2.1 (March 19, 2015) ##
* Fixed a problem where String#truncate_words would get stuck with a complex
string.
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/cache.rb
new/lib/active_support/cache.rb
--- old/lib/active_support/cache.rb 2015-06-16 20:01:34.000000000 +0200
+++ new/lib/active_support/cache.rb 2015-06-25 23:28:54.000000000 +0200
@@ -562,7 +562,7 @@
def handle_expired_entry(entry, key, options)
if entry && entry.expired?
race_ttl = options[:race_condition_ttl].to_i
- if race_ttl && (Time.now.to_f - entry.expires_at <= race_ttl)
+ if (race_ttl > 0) && (Time.now.to_f - entry.expires_at <= race_ttl)
# When an entry has :race_condition_ttl defined, put the stale
entry back into the cache
# for a brief period while the entry is begin recalculated.
entry.expires_at = Time.now + race_ttl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/callbacks.rb
new/lib/active_support/callbacks.rb
--- old/lib/active_support/callbacks.rb 2015-06-16 20:01:34.000000000 +0200
+++ new/lib/active_support/callbacks.rb 2015-06-25 23:28:54.000000000 +0200
@@ -78,14 +78,10 @@
# save
# end
def run_callbacks(kind, &block)
- send "_run_#{kind}_callbacks", &block
- end
-
- private
+ callbacks = send("_#{kind}_callbacks")
- def _run_callbacks(callbacks, &block)
if callbacks.empty?
- block.call if block
+ yield if block_given?
else
runner = callbacks.compile
e = Filters::Environment.new(self, false, nil, block)
@@ -93,6 +89,8 @@
end
end
+ private
+
# A hook invoked every time a before callback is halted.
# This can be overridden in AS::Callback implementors in order
# to provide better debugging/logging.
@@ -636,10 +634,12 @@
#
# ===== Options
#
- # * <tt>:if</tt> - A symbol naming an instance method or a proc; the
- # callback will be called only when it returns a +true+ value.
- # * <tt>:unless</tt> - A symbol naming an instance method or a proc; the
- # callback will be called only when it returns a +false+ value.
+ # * <tt>:if</tt> - A symbol, a string or an array of symbols and strings,
+ # each naming an instance method or a proc; the callback will be called
+ # only when they all return a true value.
+ # * <tt>:unless</tt> - A symbol, a string or an array of symbols and
+ # strings, each naming an instance method or a proc; the callback will
+ # be called only when they all return a false value.
# * <tt>:prepend</tt> - If +true+, the callback will be prepended to the
# existing chain rather than appended.
def set_callback(name, *filter_list, &block)
@@ -770,12 +770,6 @@
names.each do |name|
class_attribute "_#{name}_callbacks"
set_callbacks name, CallbackChain.new(name, options)
-
- module_eval <<-RUBY, __FILE__, __LINE__ + 1
- def _run_#{name}_callbacks(&block)
- _run_callbacks(_#{name}_callbacks, &block)
- end
- RUBY
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/concern.rb
new/lib/active_support/concern.rb
--- old/lib/active_support/concern.rb 2015-06-16 20:01:34.000000000 +0200
+++ new/lib/active_support/concern.rb 2015-06-25 23:28:54.000000000 +0200
@@ -132,7 +132,7 @@
end
def class_methods(&class_methods_module_definition)
- mod = const_defined?(:ClassMethods) ?
+ mod = const_defined?(:ClassMethods, false) ?
const_get(:ClassMethods) :
const_set(:ClassMethods, Module.new)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_support/core_ext/big_decimal/yaml_conversions.rb
new/lib/active_support/core_ext/big_decimal/yaml_conversions.rb
--- old/lib/active_support/core_ext/big_decimal/yaml_conversions.rb
2015-06-16 20:01:34.000000000 +0200
+++ new/lib/active_support/core_ext/big_decimal/yaml_conversions.rb
2015-06-25 23:28:54.000000000 +0200
@@ -1,3 +1,5 @@
+require 'active_support/deprecation'
+
ActiveSupport::Deprecation.warn 'core_ext/big_decimal/yaml_conversions is
deprecated and will be removed in the future.'
require 'bigdecimal'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/date/conversions.rb
new/lib/active_support/core_ext/date/conversions.rb
--- old/lib/active_support/core_ext/date/conversions.rb 2015-06-16
20:01:34.000000000 +0200
+++ new/lib/active_support/core_ext/date/conversions.rb 2015-06-25
23:28:54.000000000 +0200
@@ -35,6 +35,7 @@
# date.to_s(:db) # => "2007-11-10"
#
# date.to_formatted_s(:short) # => "10 Nov"
+ # date.to_formatted_s(:number) # => "20071110"
# date.to_formatted_s(:long) # => "November 10, 2007"
# date.to_formatted_s(:long_ordinal) # => "November 10th, 2007"
# date.to_formatted_s(:rfc822) # => "10 Nov 2007"
@@ -82,6 +83,11 @@
::Time.send(form, year, month, day)
end
+ # Returns a string which represents the time in used time zone as DateTime
+ # defined by XML Schema:
+ #
+ # date = Date.new(2015, 05, 23) # => Sat, 23 May 2015
+ # date.xmlschema # => "2015-05-23T00:00:00+04:00"
def xmlschema
in_time_zone.xmlschema
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_support/core_ext/date_and_time/calculations.rb
new/lib/active_support/core_ext/date_and_time/calculations.rb
--- old/lib/active_support/core_ext/date_and_time/calculations.rb
2015-06-16 20:01:34.000000000 +0200
+++ new/lib/active_support/core_ext/date_and_time/calculations.rb
2015-06-25 23:28:54.000000000 +0200
@@ -109,9 +109,20 @@
alias :at_beginning_of_year :beginning_of_year
# Returns a new date/time representing the given day in the next week.
+ #
+ # today = Date.today # => Thu, 07 May 2015
+ # today.next_week # => Mon, 11 May 2015
+ #
# The +given_day_in_next_week+ defaults to the beginning of the week
# which is determined by +Date.beginning_of_week+ or
+config.beginning_of_week+
+ #
+ # today = Date.today # => Thu, 07 May 2015
+ # today.next_week(:friday) # => Fri, 15 May 2015
+ #
# when set. +DateTime+ objects have their time set to 0:00.
+ #
+ # now = Time.current # => Thu, 07 May 2015 13:31:16 UTC +00:00
+ # now.next_week # => Mon, 11 May 2015 00:00:00 UTC +00:00
def next_week(given_day_in_next_week = Date.beginning_of_week)
first_hour(weeks_since(1).beginning_of_week.days_since(days_span(given_day_in_next_week)))
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_support/core_ext/date_time/calculations.rb
new/lib/active_support/core_ext/date_time/calculations.rb
--- old/lib/active_support/core_ext/date_time/calculations.rb 2015-06-16
20:01:34.000000000 +0200
+++ new/lib/active_support/core_ext/date_time/calculations.rb 2015-06-25
23:28:54.000000000 +0200
@@ -164,7 +164,7 @@
if other.kind_of?(Infinity)
super
elsif other.respond_to? :to_datetime
- super other.to_datetime
+ super other.to_datetime rescue nil
else
nil
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/integer/time.rb
new/lib/active_support/core_ext/integer/time.rb
--- old/lib/active_support/core_ext/integer/time.rb 2015-06-16
20:01:34.000000000 +0200
+++ new/lib/active_support/core_ext/integer/time.rb 2015-06-25
23:28:54.000000000 +0200
@@ -17,21 +17,6 @@
#
# # equivalent to Time.now.advance(months: 4, years: 5)
# (4.months + 5.years).from_now
- #
- # While these methods provide precise calculation when used as in the
examples
- # above, care should be taken to note that this is not true if the result of
- # +months+, +years+, etc is converted before use:
- #
- # # equivalent to 30.days.to_i.from_now
- # 1.month.to_i.from_now
- #
- # # equivalent to 365.25.days.to_f.from_now
- # 1.year.to_f.from_now
- #
- # In such cases, Ruby's core
- # Date[http://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and
- # Time[http://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used
for precision
- # date and time arithmetic.
def months
ActiveSupport::Duration.new(self * 30.days, [[:months, self]])
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/kernel/reporting.rb
new/lib/active_support/core_ext/kernel/reporting.rb
--- old/lib/active_support/core_ext/kernel/reporting.rb 2015-06-16
20:01:34.000000000 +0200
+++ new/lib/active_support/core_ext/kernel/reporting.rb 2015-06-25
23:28:54.000000000 +0200
@@ -1,5 +1,6 @@
require 'rbconfig'
require 'tempfile'
+require 'active_support/deprecation'
module Kernel
# Sets $VERBOSE to nil for the duration of the block and back to its original
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/numeric/time.rb
new/lib/active_support/core_ext/numeric/time.rb
--- old/lib/active_support/core_ext/numeric/time.rb 2015-06-16
20:01:34.000000000 +0200
+++ new/lib/active_support/core_ext/numeric/time.rb 2015-06-25
23:28:54.000000000 +0200
@@ -16,21 +16,6 @@
#
# # equivalent to Time.current.advance(months: 4, years: 5)
# (4.months + 5.years).from_now
- #
- # While these methods provide precise calculation when used as in the
examples above, care
- # should be taken to note that this is not true if the result of `months',
`years', etc is
- # converted before use:
- #
- # # equivalent to 30.days.to_i.from_now
- # 1.month.to_i.from_now
- #
- # # equivalent to 365.25.days.to_f.from_now
- # 1.year.to_f.from_now
- #
- # In such cases, Ruby's core
- # Date[http://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and
- # Time[http://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used
for precision
- # date and time arithmetic.
def seconds
ActiveSupport::Duration.new(self, [[:seconds, self]])
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/object/json.rb
new/lib/active_support/core_ext/object/json.rb
--- old/lib/active_support/core_ext/object/json.rb 2015-06-16
20:01:35.000000000 +0200
+++ new/lib/active_support/core_ext/object/json.rb 2015-06-25
23:28:54.000000000 +0200
@@ -28,7 +28,7 @@
# should give exactly the same results with or without active support.
[Object, Array, FalseClass, Float, Hash, Integer, NilClass, String, TrueClass,
Enumerable].each do |klass|
klass.class_eval do
- def to_json_with_active_support_encoder(options = nil)
+ def to_json_with_active_support_encoder(options = nil) # :nodoc:
if options.is_a?(::JSON::State)
# Called from JSON.{generate,dump}, forward it to JSON gem's to_json
self.to_json_without_active_support_encoder(options)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/string/filters.rb
new/lib/active_support/core_ext/string/filters.rb
--- old/lib/active_support/core_ext/string/filters.rb 2015-06-16
20:01:35.000000000 +0200
+++ new/lib/active_support/core_ext/string/filters.rb 2015-06-25
23:28:54.000000000 +0200
@@ -26,6 +26,7 @@
# Returns a new string with all occurrences of the patterns removed.
# str = "foo bar test"
# str.remove(" test") # => "foo bar"
+ # str.remove(" test", /bar/) # => "foo "
# str # => "foo bar test"
def remove(*patterns)
dup.remove!(*patterns)
@@ -33,8 +34,8 @@
# Alters the string by removing all occurrences of the patterns.
# str = "foo bar test"
- # str.remove!(" test") # => "foo bar"
- # str # => "foo bar"
+ # str.remove!(" test", /bar/) # => "foo "
+ # str # => "foo "
def remove!(*patterns)
patterns.each do |pattern|
gsub! pattern, ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/core_ext/time/calculations.rb
new/lib/active_support/core_ext/time/calculations.rb
--- old/lib/active_support/core_ext/time/calculations.rb 2015-06-16
20:01:35.000000000 +0200
+++ new/lib/active_support/core_ext/time/calculations.rb 2015-06-25
23:28:54.000000000 +0200
@@ -94,7 +94,7 @@
elsif zone
::Time.local(new_year, new_month, new_day, new_hour, new_min, new_sec,
new_usec)
else
- raise ArgumentError, 'argument out of range' if new_usec > 999999
+ raise ArgumentError, 'argument out of range' if new_usec >= 1000000
::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec +
(new_usec.to_r / 1000000), utc_offset)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/duration.rb
new/lib/active_support/duration.rb
--- old/lib/active_support/duration.rb 2015-06-16 20:01:35.000000000 +0200
+++ new/lib/active_support/duration.rb 2015-06-25 23:28:54.000000000 +0200
@@ -56,6 +56,30 @@
@value.to_s
end
+ # Returns the number of seconds that this Duration represents.
+ #
+ # 1.minute.to_i # => 60
+ # 1.hour.to_i # => 3600
+ # 1.day.to_i # => 86400
+ #
+ # Note that this conversion makes some assumptions about the
+ # duration of some periods, e.g. months are always 30 days
+ # and years are 365.25 days:
+ #
+ # # equivalent to 30.days.to_i
+ # 1.month.to_i # => 2592000
+ #
+ # # equivalent to 365.25.days.to_i
+ # 1.year.to_i # => 31557600
+ #
+ # In such cases, Ruby's core
+ # Date[http://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and
+ # Time[http://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be
used for precision
+ # date and time arithmetic.
+ def to_i
+ @value.to_i
+ end
+
# Returns +true+ if +other+ is also a Duration instance, which has the
# same parts as this one.
def eql?(other)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/gem_version.rb
new/lib/active_support/gem_version.rb
--- old/lib/active_support/gem_version.rb 2015-06-16 20:01:35.000000000
+0200
+++ new/lib/active_support/gem_version.rb 2015-06-25 23:28:54.000000000
+0200
@@ -7,7 +7,7 @@
module VERSION
MAJOR = 4
MINOR = 2
- TINY = 2
+ TINY = 3
PRE = nil
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/json/encoding.rb
new/lib/active_support/json/encoding.rb
--- old/lib/active_support/json/encoding.rb 2015-06-16 20:01:35.000000000
+0200
+++ new/lib/active_support/json/encoding.rb 2015-06-25 23:28:54.000000000
+0200
@@ -1,5 +1,6 @@
require 'active_support/core_ext/object/json'
require 'active_support/core_ext/module/delegation'
+require 'active_support/deprecation'
module ActiveSupport
class << self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/multibyte/chars.rb
new/lib/active_support/multibyte/chars.rb
--- old/lib/active_support/multibyte/chars.rb 2015-06-16 20:01:35.000000000
+0200
+++ new/lib/active_support/multibyte/chars.rb 2015-06-25 23:28:54.000000000
+0200
@@ -86,7 +86,7 @@
@wrapped_string.split(*args).map { |i| self.class.new(i) }
end
- # Works like like <tt>String#slice!</tt>, but returns an instance of
+ # Works like <tt>String#slice!</tt>, but returns an instance of
# Chars, or nil if the string was not modified.
def slice!(*args)
chars(@wrapped_string.slice!(*args))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lib/active_support/number_helper/number_to_rounded_converter.rb
new/lib/active_support/number_helper/number_to_rounded_converter.rb
--- old/lib/active_support/number_helper/number_to_rounded_converter.rb
2015-06-16 20:01:35.000000000 +0200
+++ new/lib/active_support/number_helper/number_to_rounded_converter.rb
2015-06-25 23:28:54.000000000 +0200
@@ -23,7 +23,7 @@
precision = 0 if precision < 0 # don't let it be negative
else
rounded_number = number.round(precision)
- rounded_number = rounded_number.to_i if precision == 0
+ rounded_number = rounded_number.to_i if precision == 0 &&
rounded_number.finite?
rounded_number = rounded_number.abs if rounded_number.zero? #
prevent showing negative zeros
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-06-16 20:01:34.000000000 +0200
+++ new/metadata 2015-06-25 23:28:54.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: activesupport
version: !ruby/object:Gem::Version
- version: 4.2.2
+ version: 4.2.3
platform: ruby
authors:
- David Heinemeier Hansson
autorequire:
bindir: bin
cert_chain: []
-date: 2015-06-16 00:00:00.000000000 Z
+date: 2015-06-25 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: i18n