[DRE-commits] r4480 - in trunk/redmine/debian: . patches

Jérémy Lal kapouer-guest at alioth.debian.org
Thu Dec 24 09:07:02 UTC 2009


Author: kapouer-guest
Date: 2009-12-24 09:06:55 +0000 (Thu, 24 Dec 2009)
New Revision: 4480

Modified:
   trunk/redmine/debian/copyright
   trunk/redmine/debian/patches/revert_rails_2.3.patch
Log:
Add copyright for the monkey patch taken from rails 2.3.

Modified: trunk/redmine/debian/copyright
===================================================================
--- trunk/redmine/debian/copyright	2009-12-24 09:06:26 UTC (rev 4479)
+++ trunk/redmine/debian/copyright	2009-12-24 09:06:55 UTC (rev 4480)
@@ -153,3 +153,7 @@
 License: LGPL-2.1
  On Debian systems, the complete text of the GNU Lesser General
  Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
+
+Files: config/initializers/action_group.rb
+Copyright: (c) 2004 David Heinemeier Hansson
+License: MIT

Modified: trunk/redmine/debian/patches/revert_rails_2.3.patch
===================================================================
--- trunk/redmine/debian/patches/revert_rails_2.3.patch	2009-12-24 09:06:26 UTC (rev 4479)
+++ trunk/redmine/debian/patches/revert_rails_2.3.patch	2009-12-24 09:06:55 UTC (rev 4480)
@@ -259,12 +259,22 @@
  
  # Bootstrap the Rails environment, frameworks, and default configuration
  require File.join(File.dirname(__FILE__), 'boot')
+diff --git a/config/environments/test.rb b/config/environments/test.rb
+index 0d1b42e..fd764b8 100644
+--- a/config/environments/test.rb
++++ b/config/environments/test.rb
+@@ -26,4 +26,4 @@ config.action_controller.allow_forgery_protection  = false
+ 
+ config.gem "thoughtbot-shoulda", :lib => "shoulda", :source => "http://gems.github.com"
+ config.gem "nofxx-object_daddy", :lib => "object_daddy", :source => "http://gems.github.com"
+-config.gem "mocha"
++#config.gem "mocha"
 diff --git a/config/initializers/action_group.rb b/config/initializers/action_group.rb
 new file mode 100644
-index 0000000..8957e44
+index 0000000..e5761ec
 --- /dev/null
 +++ b/config/initializers/action_group.rb
-@@ -0,0 +1,16 @@
+@@ -0,0 +1,46 @@
 +module ActionView
 +  module Helpers
 +    module FormOptionsHelper
@@ -279,8 +289,38 @@
 +      end
 +    end
 +  end
++
++  require 'action_view/test_case'
++  class FormOptionsHelperTest < TestCase
++    def test_grouped_options_for_select_with_array
++      assert_dom_equal(
++            "<optgroup label=\"North America\"><option value=\"US\">United States</option>\n<option value=\"Canada\">Canada</option></optgroup><optgroup label=\"Europe\"><option value=\"GB\">Great Britain</option>\n<option value=\"Germany\">Germany</option></optgroup>",
++            grouped_options_for_select([
++               ["North America",
++                       [['United States','US'],"Canada"]],
++               ["Europe",
++                       [["Great Britain","GB"], "Germany"]]
++             ])
++      )
++    end
++
++    def test_grouped_options_for_select_with_selected_and_prompt
++      assert_dom_equal(
++              "<option value=\"\">Choose a product...</option><optgroup label=\"Hats\"><option value=\"Baseball Cap\">Baseball Cap</option>\n<option selected=\"selected\" value=\"Cowboy Hat\">Cowboy Hat</option></optgroup>",
++              grouped_options_for_select([["Hats", ["Baseball Cap","Cowboy Hat"]]], "Cowboy Hat", "Choose a product...")
++      )
++    end
++
++    def test_optgroups_with_with_options_with_hash
++      assert_dom_equal(
++             "<optgroup label=\"Europe\"><option value=\"Denmark\">Denmark</option>\n<option value=\"Germany\">Germany</option></optgroup><optgroup label=\"North America\"><option value=\"United States\">United States</option>\n<option value=\"Canada\">Canada</option></optgroup>",
++             grouped_options_for_select({'North America' => ['United States','Canada'], 'Europe' => ['Denmark','Germany']})
++      )
++    end
++  end
 +end
 +
++
 diff --git a/config/initializers/action_group_test.rb b/config/initializers/action_group_test.rb
 new file mode 100644
 index 0000000..8ac2f4c




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