[DRE-commits] [SCM] redmine.git branch, master-stable, updated. debian/1.4.4+dfsg1-3-4-gecc5240

Jérémy Lal kapouer at melix.org
Sun Jun 9 23:13:45 UTC 2013


The following commit has been merged in the master-stable branch:
commit a98af695a6fc80d07003121165c21fa262e598ab
Author: Jérémy Lal <kapouer at melix.org>
Date:   Mon Jun 10 00:52:17 2013 +0200

    Make 1001_Parsedate.parsedate.patch ruby1.9 and ruby1.8 compatible.

diff --git a/debian/patches/1001_Parsedate.parsedate.patch b/debian/patches/1001_Parsedate.parsedate.patch
index e42e01f..fb70763 100644
--- a/debian/patches/1001_Parsedate.parsedate.patch
+++ b/debian/patches/1001_Parsedate.parsedate.patch
@@ -1,28 +1,40 @@
-Description: Replace missing ParseDate with DateTime (Closes: #700754)
+Description: Use DateTime.parse for ruby1.9, ParseDate.parsedate for ruby1.8 (Closes: #700754)
 Origin: upstream, http://www.redmine.org/projects/redmine/repository/revisions/10439
 Origin: upstream, http://www.redmine.org/projects/redmine/repository/revisions/11091
-Last-Update: 2013-02-26
+Last-Update: 2013-06-10
 --- a/lib/SVG/Graph/Schedule.rb
 +++ b/lib/SVG/Graph/Schedule.rb
-@@ -159,8 +159,7 @@ module SVG
+@@ -159,8 +159,13 @@
            if im3 == 0
              y << data[:data][i]
            else
 -            arr = ParseDate.parsedate( data[:data][i] )
 -            t = Time.local( *arr[0,6].compact )
-+            t = DateTime.parse( data[:data][i] ).to_time
++            t = data[:data][i]
++            if DateTime.respond_to?(:parse)
++              t = DateTime.parse( t ).to_time
++            else
++              arr = ParseDate.parsedate( t )
++              t = Time.local( *arr[0,6].compact )
++            end
              (im3 == 1 ? x_start : x_end) << t.to_i
            end
          }
 --- a/lib/SVG/Graph/TimeSeries.rb
 +++ b/lib/SVG/Graph/TimeSeries.rb
-@@ -157,8 +157,7 @@ module SVG
+@@ -157,8 +157,13 @@
          y = []
          data[:data].each_index {|i|
            if i%2 == 0
 -            arr = ParseDate.parsedate( data[:data][i] )
 -            t = Time.local( *arr[0,6].compact )
-+            t = DateTime.parse( data[:data][i] ).to_time
++            t = data[:data][i]
++            if DateTime.respond_to?(:parse)
++              t = DateTime.parse( t ).to_time
++            else
++              arr = ParseDate.parsedate( t )
++              t = Time.local( *arr[0,6].compact )
++            end
              x << t.to_i
            else
              y << data[:data][i]

-- 
redmine.git



More information about the Pkg-ruby-extras-commits mailing list