diff options
author | 2012-01-21 13:27:19 +0000 | |
---|---|---|
committer | 2012-01-21 13:27:19 +0000 | |
commit | f03cddeef178194f325eccc861b40127202e2e75 (patch) | |
tree | 25e866cff8dde16126f7558e3d90ed8e232c8c61 /dev-ruby | |
parent | Drop old. (diff) | |
download | gentoo-2-f03cddeef178194f325eccc861b40127202e2e75.tar.gz gentoo-2-f03cddeef178194f325eccc861b40127202e2e75.tar.bz2 gentoo-2-f03cddeef178194f325eccc861b40127202e2e75.zip |
Revision bump, replacing the patch to disable tests with one that fixes them, and another issue as well.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/best_in_place/ChangeLog | 11 | ||||
-rw-r--r-- | dev-ruby/best_in_place/best_in_place-1.0.4-r1.ebuild (renamed from dev-ruby/best_in_place/best_in_place-1.0.4.ebuild) | 7 | ||||
-rw-r--r-- | dev-ruby/best_in_place/files/best_in_place-1.0.4-disable-some-tests.patch | 53 | ||||
-rw-r--r-- | dev-ruby/best_in_place/files/best_in_place-1.0.4-gentoo.patch | 77 |
4 files changed, 91 insertions, 57 deletions
diff --git a/dev-ruby/best_in_place/ChangeLog b/dev-ruby/best_in_place/ChangeLog index 87286d682d43..e165d755ace8 100644 --- a/dev-ruby/best_in_place/ChangeLog +++ b/dev-ruby/best_in_place/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-ruby/best_in_place # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/best_in_place/ChangeLog,v 1.1 2012/01/17 23:48:49 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/best_in_place/ChangeLog,v 1.2 2012/01/21 13:27:18 flameeyes Exp $ + +*best_in_place-1.0.4-r1 (21 Jan 2012) + + 21 Jan 2012; Diego E. Pettenò <flameeyes@gentoo.org> + +best_in_place-1.0.4-r1.ebuild, +files/best_in_place-1.0.4-gentoo.patch, + -best_in_place-1.0.4.ebuild, + -files/best_in_place-1.0.4-disable-some-tests.patch: + Revision bump, replacing the patch to disable tests with one that fixes them, + and another issue as well. *best_in_place-1.0.4 (17 Jan 2012) diff --git a/dev-ruby/best_in_place/best_in_place-1.0.4.ebuild b/dev-ruby/best_in_place/best_in_place-1.0.4-r1.ebuild index e3b38367b7d8..a571377d007b 100644 --- a/dev-ruby/best_in_place/best_in_place-1.0.4.ebuild +++ b/dev-ruby/best_in_place/best_in_place-1.0.4-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/best_in_place/best_in_place-1.0.4.ebuild,v 1.1 2012/01/17 23:48:49 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/best_in_place/best_in_place-1.0.4-r1.ebuild,v 1.1 2012/01/21 13:27:18 flameeyes Exp $ EAPI=4 USE_RUBY="ruby18 ree18" @@ -50,9 +50,10 @@ all_ruby_prepare() { ${RUBY_FAKEGEM_GEMSPEC} || die rm test_app/Gemfile.lock - # this disables two tests that seem to be timing-related + # improve timing-resilience on two tests that would otherwise fail # https://github.com/bernat/best_in_place/issues/87 - epatch "${FILESDIR}"/${P}-disable-some-tests.patch + # fix an issue with the :display_as option, that has been sent upstream + epatch "${FILESDIR}"/${P}-gentoo.patch } each_ruby_test() { diff --git a/dev-ruby/best_in_place/files/best_in_place-1.0.4-disable-some-tests.patch b/dev-ruby/best_in_place/files/best_in_place-1.0.4-disable-some-tests.patch deleted file mode 100644 index 8db8554f4617..000000000000 --- a/dev-ruby/best_in_place/files/best_in_place-1.0.4-disable-some-tests.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: best_in_place-1.0.4/spec/integration/js_spec.rb -=================================================================== ---- best_in_place-1.0.4.orig/spec/integration/js_spec.rb -+++ best_in_place-1.0.4/spec/integration/js_spec.rb -@@ -279,23 +279,6 @@ describe "JS behaviour", :js => true do - text.should == "Via Roma 99" - end - end -- -- it "should display the updated content after editing the field two consecutive times" do -- @user.save! -- retry_on_timeout do -- visit user_path(@user) -- -- bip_text @user, :address, "New address" -- -- id = BestInPlace::Utils.build_best_in_place_id @user, :address -- page.execute_script <<-JS -- $("##{id}").click(); -- JS -- -- text = page.find("##{id} input").value -- text.should == "New address" -- end -- end - end - - describe "display_with" do -@@ -347,24 +330,6 @@ describe "JS behaviour", :js => true do - end - end - -- it "should display the updated content after editing the field two consecutive times" do -- @user.save! -- -- retry_on_timeout do -- visit user_path(@user) -- -- bip_text @user, :money, "40" -- -- id = BestInPlace::Utils.build_best_in_place_id @user, :money -- page.execute_script <<-JS -- $("##{id}").click(); -- JS -- -- text = page.find("##{id} input").value -- text.should == "40" -- end -- end -- - it "should show the money in euros" do - @user.save! - visit double_init_user_path(@user) diff --git a/dev-ruby/best_in_place/files/best_in_place-1.0.4-gentoo.patch b/dev-ruby/best_in_place/files/best_in_place-1.0.4-gentoo.patch new file mode 100644 index 000000000000..d143d7eed1c9 --- /dev/null +++ b/dev-ruby/best_in_place/files/best_in_place-1.0.4-gentoo.patch @@ -0,0 +1,77 @@ +diff --git a/lib/best_in_place/helper.rb b/lib/best_in_place/helper.rb +index 7ab2561..7d40f58 100644 +--- a/lib/best_in_place/helper.rb ++++ b/lib/best_in_place/helper.rb +@@ -43,7 +43,7 @@ module BestInPlace + out << " data-type='#{opts[:type]}'" + out << " data-inner-class='#{opts[:inner_class]}'" if opts[:inner_class] + out << " data-html-attrs='#{opts[:html_attrs].to_json}'" unless opts[:html_attrs].blank? +- out << " data-original-content='#{object.send(field)}'" if opts[:display_as] || opts[:display_with] ++ out << " data-original-content='#{attribute_escape(object.send(field))}'" if opts[:display_as] || opts[:display_with] + if !opts[:sanitize].nil? && !opts[:sanitize] + out << " data-sanitize='false'>" + out << sanitize(value, :tags => %w(b i u s a strong em p h1 h2 h3 h4 h5 ul li ol hr pre span img br), :attributes => %w(id class href)) +@@ -80,6 +80,10 @@ module BestInPlace + object.send(field).to_s.presence || "" + end + end ++ ++ def attribute_escape(data) ++ data.to_s.gsub("&", "&").gsub("'", "'") unless data.nil? ++ end + end + end + +diff --git a/spec/integration/js_spec.rb b/spec/integration/js_spec.rb +index 38e09c8..e773108 100644 +--- a/spec/integration/js_spec.rb ++++ b/spec/integration/js_spec.rb +@@ -466,15 +466,32 @@ describe "JS behaviour", :js => true do + + bip_text @user, :address, "New address" + ++ sleep 1 ++ + id = BestInPlace::Utils.build_best_in_place_id @user, :address + page.execute_script <<-JS + $("##{id}").click(); + JS + ++ sleep 1 ++ + text = page.find("##{id} input").value + text.should == "New address" + end + end ++ ++ it "should quote properly the data-original-content attribute" do ++ @user.address = "A's & B's" ++ @user.save! ++ retry_on_timeout do ++ visit user_path(@user) ++ ++ id = BestInPlace::Utils.build_best_in_place_id @user, :address ++ ++ text = page.find("##{id}")["data-original-content"] ++ text.should == "A's & B's" ++ end ++ end + end + + describe "display_with" do +@@ -534,11 +551,15 @@ describe "JS behaviour", :js => true do + + bip_text @user, :money, "40" + ++ sleep 1 ++ + id = BestInPlace::Utils.build_best_in_place_id @user, :money + page.execute_script <<-JS + $("##{id}").click(); + JS + ++ sleep 1 ++ + text = page.find("##{id} input").value + text.should == "40" + end |