public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] dev/graaff:master commit in: dev-ruby/responds_to_parent/, dev-ruby/responds_to_parent/files/
@ 2012-04-30  9:30 Hans de Graaff
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Graaff @ 2012-04-30  9:30 UTC (permalink / raw
  To: gentoo-commits

commit:     c27764993f63431214fe491be0c109f20710e32f
Author:     Hans de Graaff <hans <AT> degraaff <DOT> org>
AuthorDate: Fri Apr 20 12:44:53 2012 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Fri Apr 20 12:44:53 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/graaff.git;a=commit;h=c2776499

Revision bump to add Rails 3 support.

(Portage version: 2.1.10.49/git/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)

---
 dev-ruby/responds_to_parent/ChangeLog              |    9 ++++-
 dev-ruby/responds_to_parent/Manifest               |   10 +---
 .../responds_to_parent-1.0.20091013-rails3.patch   |   45 ++++++++++++++++++++
 .../responds_to_parent-1.0.20091013-r3.ebuild      |   30 +++++++++++++
 4 files changed, 86 insertions(+), 8 deletions(-)

diff --git a/dev-ruby/responds_to_parent/ChangeLog b/dev-ruby/responds_to_parent/ChangeLog
index 203fec1..d2d2b19 100644
--- a/dev-ruby/responds_to_parent/ChangeLog
+++ b/dev-ruby/responds_to_parent/ChangeLog
@@ -1,7 +1,14 @@
 # ChangeLog for dev-ruby/responds_to_parent
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*responds_to_parent-1.0.20091013-r3 (20 Apr 2012)
+
+  20 Apr 2012; Hans de Graaff <graaff@gentoo.org>
+  +responds_to_parent-1.0.20091013-r3.ebuild,
+  +files/responds_to_parent-1.0.20091013-rails3.patch:
+  Revision bump to add Rails 3 support.
+
 *responds_to_parent-1.0.20091013-r2 (05 Aug 2011)
 
   05 Aug 2011; Hans de Graaff <graaff@gentoo.org>

diff --git a/dev-ruby/responds_to_parent/Manifest b/dev-ruby/responds_to_parent/Manifest
index 30ef1fd..fe68269 100644
--- a/dev-ruby/responds_to_parent/Manifest
+++ b/dev-ruby/responds_to_parent/Manifest
@@ -2,14 +2,10 @@
 Hash: SHA256
 
 DIST responds_to_parent-1.0.20091013.gem 7680 RMD160 91d034a8836acd3161b3a0d0eb3d0cb7bc42e0d1 SHA1 63115eaaee6a7dbd31ae76d22162009f917f2bfc SHA256 5b2158d0d205a1607bb8b9615c3d86bea455f145fd2900e19c8300fe9b7374eb
-EBUILD responds_to_parent-1.0.20091013-r1.ebuild 589 RMD160 618ff64c7f63a83fae4603514e1dc0d9cbfa175c SHA1 5f6c7d9cb17fd4b315ec209854ca0412fc0e6509 SHA256 9725c4db7becdf99d6f31ad918ba3147ddd9439770e92f3434bbc208919fee71
-EBUILD responds_to_parent-1.0.20091013-r2.ebuild 802 RMD160 1a2f8683a9d4e69da7af2216ef76baaef6e28489 SHA1 c007404b32d2abbfc7a427d416463af3067d6454 SHA256 20c9781d5d9c80e132c6f32601c02982c6445909040dd71e327b53890b7d674d
-MISC ChangeLog 994 RMD160 af7b45b463ac906c16b1eee6ee03af08bfe85a30 SHA1 44c71e1da98ddbeebdd797933388c4bed340e7fa SHA256 978cdc34fa2de8523ce531a006c2d7d3d0f0f34be73ae71626b9ae7f9584441f
-MISC metadata.xml 201 RMD160 bbf7920d9809941fb024d20016dbe2fb9f15ff97 SHA1 e629d21795e99a77bd0a6aded1a153fd12d5b2c5 SHA256 c90b12c6600840878686d4544dbc51d97b0715add76b40d9400415cdef6324ad
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iF4EAREIAAYFAk47qE4ACgkQiIP6VqMIqNfgeAEAi9z0+5XhTD2/ysfrP47Mj9k3
-J//0NsfdodH+aMMbzu4BAIvjHbf1K5P7oNNr7VrnAY5urYrW86svXjmPT3LnEJ64
-=uK55
+iF0EAREIAAYFAk+RWkUACgkQiIP6VqMIqNe9egD2I3vorY+jnxx1+YtFNG22vk0q
+cfxdWq7QGQDUShXRlgD+LGusr1Sr70RVQsxA+PXZKFTC5kWoqFjxwISd6/CzVp0=
+=MWAb
 -----END PGP SIGNATURE-----

diff --git a/dev-ruby/responds_to_parent/files/responds_to_parent-1.0.20091013-rails3.patch b/dev-ruby/responds_to_parent/files/responds_to_parent-1.0.20091013-rails3.patch
new file mode 100644
index 0000000..e55f6b4
--- /dev/null
+++ b/dev-ruby/responds_to_parent/files/responds_to_parent-1.0.20091013-rails3.patch
@@ -0,0 +1,45 @@
+Hack the commit below to include substitute code for erase_results.
+
+commit a2f18cb466a9c64b6c9c7234f8bd28be7970e45f
+Author: Jason Rust <jason@rustedcode.com>
+Date:   Thu Mar 1 10:50:07 2012 -0800
+
+    Make rails 3 compatible
+
+diff --git a/lib/responds_to_parent/action_controller.rb b/lib/responds_to_parent/action_controller.rb
+index b2a4495..25b7ea6 100644
+--- a/lib/responds_to_parent/action_controller.rb
++++ b/lib/responds_to_parent/action_controller.rb
+@@ -9,18 +9,21 @@ module RespondsToParent
+     
+       if performed?
+         # Either pull out a redirect or the request body
+-        script =  if location = erase_redirect_results
++        script =  if response.headers['Location']
++                    #TODO: erase_redirect_results is missing in rails 3.0 
+                     "document.location.href = '#{self.class.helpers.escape_javascript location.to_s}'"
+                   else
+                     response.body || ''
+                   end
+ 
+-        # Clear out the previous render to prevent double render
+-        erase_results
++        @_response_body = nil
++        self.response.body = nil
+-
+         # We're returning HTML instead of JS or XML now
+         response.headers['Content-Type'] = 'text/html; charset=UTF-8'
+ 
++        # Clear out the previous render to prevent double render
++        response.request.env['action_controller.instance'].instance_variable_set(:@_response_body, nil)
++
+         # Eval in parent scope and replace document location of this frame 
+         # so back button doesn't replay action on targeted forms
+         # loc = document.location to be set after parent is updated for IE
+@@ -35,4 +36,4 @@ module RespondsToParent
+     end
+     alias respond_to_parent responds_to_parent
+   end
+-end
+\ No newline at end of file
++end

diff --git a/dev-ruby/responds_to_parent/responds_to_parent-1.0.20091013-r3.ebuild b/dev-ruby/responds_to_parent/responds_to_parent-1.0.20091013-r3.ebuild
new file mode 100644
index 0000000..e1d2dbc
--- /dev/null
+++ b/dev-ruby/responds_to_parent/responds_to_parent-1.0.20091013-r3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/zentest/zentest-3.3.0.ebuild,v 1.1 2006/08/28 14:34:06 pclouds Exp $
+
+EAPI=4
+USE_RUBY="ruby18 ruby19"
+
+RUBY_FAKEGEM_EXTRADOC="README"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Adds responds_to_parent to your controller to respond to the parent document of your page."
+HOMEPAGE="http://github.com/markcatley/responds_to_parent"
+LICENSE="MIT"
+
+KEYWORDS="~amd64 ~x86 ~x86-macos"
+SLOT="0"
+IUSE=""
+
+# Tests require additional dependencies.
+RESTRICT="test"
+
+RUBY_PATCHES=( "${P}-rails3.patch" )
+
+all_ruby_prepare() {
+	# Apply ugly hack to work around the effects of the XSS plugin for
+	# Rails 2.3.
+#	sed -i -e 's/response.body/String.new(response.body)/' lib/responds_to_parent/action_controller.rb || die
+echo
+}



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] dev/graaff:master commit in: dev-ruby/responds_to_parent/, dev-ruby/responds_to_parent/files/
@ 2012-09-19 15:25 Hans de Graaff
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Graaff @ 2012-09-19 15:25 UTC (permalink / raw
  To: gentoo-commits

commit:     a186ec113de205dd4cec4c67b59e9e7fef906b54
Author:     Hans de Graaff <hans <AT> degraaff <DOT> org>
AuthorDate: Wed Sep 19 15:25:05 2012 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Wed Sep 19 15:25:05 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/graaff.git;a=commit;h=a186ec11

Add one part of previous patch to properly avoid double renders.

(Portage version: 2.1.11.9/git/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)

---
 dev-ruby/responds_to_parent/ChangeLog              |    7 +++++++
 .../files/responds_to_parent-1.1.0-rails3.patch    |   10 ++++++++++
 ...0.ebuild => responds_to_parent-1.1.0-r1.ebuild} |    2 ++
 3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/dev-ruby/responds_to_parent/ChangeLog b/dev-ruby/responds_to_parent/ChangeLog
index 7986747..b131191 100644
--- a/dev-ruby/responds_to_parent/ChangeLog
+++ b/dev-ruby/responds_to_parent/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*responds_to_parent-1.1.0-r1 (19 Sep 2012)
+
+  19 Sep 2012; Hans de Graaff <graaff@gentoo.org>
+  -responds_to_parent-1.1.0.ebuild, +responds_to_parent-1.1.0-r1.ebuild,
+  +files/responds_to_parent-1.1.0-rails3.patch:
+  Add one part of previous patch to properly avoid double renders.
+
 *responds_to_parent-1.1.0 (14 Sep 2012)
 
   14 Sep 2012; Hans de Graaff <graaff@gentoo.org>

diff --git a/dev-ruby/responds_to_parent/files/responds_to_parent-1.1.0-rails3.patch b/dev-ruby/responds_to_parent/files/responds_to_parent-1.1.0-rails3.patch
new file mode 100644
index 0000000..f3840a9
--- /dev/null
+++ b/dev-ruby/responds_to_parent/files/responds_to_parent-1.1.0-rails3.patch
@@ -0,0 +1,10 @@
+--- lib/responds_to_parent/action_controller.rb.~1~	2012-09-19 17:10:06.937785043 +0200
++++ lib/responds_to_parent/action_controller.rb	2012-09-19 17:13:19.220322750 +0200
+@@ -20,6 +20,7 @@
+         response.headers['Content-Type'] = 'text/html; charset=UTF-8'
+ 
+         # Clear out the previous render to prevent double render
++        @_response_body = nil
+         response.request.env['action_controller.instance'].instance_variable_set(:@_response_body, nil)
+ 
+         # Eval in parent scope and replace document location of this frame 

diff --git a/dev-ruby/responds_to_parent/responds_to_parent-1.1.0.ebuild b/dev-ruby/responds_to_parent/responds_to_parent-1.1.0-r1.ebuild
similarity index 93%
rename from dev-ruby/responds_to_parent/responds_to_parent-1.1.0.ebuild
rename to dev-ruby/responds_to_parent/responds_to_parent-1.1.0-r1.ebuild
index 1aa537a..365ed3c 100644
--- a/dev-ruby/responds_to_parent/responds_to_parent-1.1.0.ebuild
+++ b/dev-ruby/responds_to_parent/responds_to_parent-1.1.0-r1.ebuild
@@ -17,5 +17,7 @@ KEYWORDS="~amd64 ~x86 ~x86-macos"
 SLOT="0"
 IUSE=""
 
+RUBY_PATCHES=( ${P}-rails3.patch )
+
 # Tests require additional dependencies.
 RESTRICT="test"


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-19 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 15:25 [gentoo-commits] dev/graaff:master commit in: dev-ruby/responds_to_parent/, dev-ruby/responds_to_parent/files/ Hans de Graaff
  -- strict thread matches above, loose matches on Subject: below --
2012-04-30  9:30 Hans de Graaff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox