summaryrefslogtreecommitdiff
path: root/dev-ruby/twitter-text
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
commite748ba9741f6540f4675c23e3e37b73e822c13a4 (patch)
tree23dece8beabb3a3d7c6c0273b0eb40b21c62a889 /dev-ruby/twitter-text
parent908778078736bd36f7a60a2d576d415cb8e000fa (diff)
gentoo resync : 31.05.2021
Diffstat (limited to 'dev-ruby/twitter-text')
-rw-r--r--dev-ruby/twitter-text/Manifest2
-rw-r--r--dev-ruby/twitter-text/files/twitter-text-3.1.0-frozen-string.patch69
-rw-r--r--dev-ruby/twitter-text/twitter-text-3.1.0-r1.ebuild38
3 files changed, 109 insertions, 0 deletions
diff --git a/dev-ruby/twitter-text/Manifest b/dev-ruby/twitter-text/Manifest
index b5afb9a88c5e..d796b7f38327 100644
--- a/dev-ruby/twitter-text/Manifest
+++ b/dev-ruby/twitter-text/Manifest
@@ -1,3 +1,5 @@
+AUX twitter-text-3.1.0-frozen-string.patch 3372 BLAKE2B 2c6eb1fcb05561a8bed4114f8b86547532f53c4b2981e14387518ccc7daa69ff0ddbdabeb892cb125c97420a74e8c121f5241b500803ba6a8ef27e6c6d297c1f SHA512 153e0eb1d41e43517ea9604aaebcea40ab814c168654c76276a94833d393250ae10a3be54b83ee839660c37645df25f4144a124e4942aa34b5fd8471ef065320
DIST twitter-text-3.1.0.gem 59392 BLAKE2B 91f906db8d4cc17086b7bc421f1730646756aec9e041166e18d816da4b680282f312743c52e412e6595d7565c2c7faf0dd18fea815f3bbc53afa675a33ac3c66 SHA512 b0d5a876bd9c1d4788378ebd5029bed51db6a0c3a7cd2c97433eab3ec3655d7bc427c3873364a368c0a10216871c7373e762cfd57c4bdd69800adc95869aa03a
+EBUILD twitter-text-3.1.0-r1.ebuild 784 BLAKE2B e0fc371ae59480613b87c22503c8528ec9aa7e419ea18c3f8799f40cb95095d8ce215711dbc9fc0a036ab6374c72f2fb9d95905b0bf85d01de744010dc667989 SHA512 355e14ac0acceec1e330f0a388b8f1c86bb1fd7e3e5765e0130bccff907cb3fdd2109c96303a34b55f48ff10be1ee5736fed06089ead5463efbb8b0ba92d6942
EBUILD twitter-text-3.1.0.ebuild 717 BLAKE2B a2c2697c6e3425ad1020b702b423b6edae1c2eed07253d06417f456f15d8e72ec599fcc95f31edbfc382e053269e1a0f15ddffdd8a82a6738578950dd8116612 SHA512 a74baba26339ee53568978ce19d35e28fecee4ff924542d9f35f7c9c6fabca22776bb443f23de444fba8ca892704a5a2070c2d026155ad3ca80483334e9a2cf5
MISC metadata.xml 346 BLAKE2B 3c20459269b0d8df90be33c5884c0e5925e9f2cde075ebac70a03e74e8afc51cb0d652aa4825099a775cd266e50e47ed6b2efc12a1ac253b68fce15a97766101 SHA512 89f26f9a6f6b3ae47bfbfcdb944b44b17f4fc9217c6858d88c3127dbe580f8e00575c6214cbe62f8e5e83e3d662255757c03d4c5608e69229c0417f55ae23bb1
diff --git a/dev-ruby/twitter-text/files/twitter-text-3.1.0-frozen-string.patch b/dev-ruby/twitter-text/files/twitter-text-3.1.0-frozen-string.patch
new file mode 100644
index 000000000000..02959cafb983
--- /dev/null
+++ b/dev-ruby/twitter-text/files/twitter-text-3.1.0-frozen-string.patch
@@ -0,0 +1,69 @@
+# https://github.com/twitter/twitter-text/pull/337
+diff --git a/lib/twitter-text/deprecation.rb b/lib/twitter-text/deprecation.rb
+index b377abf9..bc66d60f 100644
+--- a/lib/twitter-text/deprecation.rb
++++ b/lib/twitter-text/deprecation.rb
+@@ -8,7 +8,7 @@ module Deprecation
+ def deprecate(method, new_method = nil)
+ deprecated_method = :"deprecated_#{method}"
+ message = "Deprecation: `#{method}` is deprecated."
+- message << " Please use `#{new_method}` instead." if new_method
++ message += " Please use `#{new_method}` instead." if new_method
+
+ alias_method(deprecated_method, method)
+ define_method method do |*args, &block|
+
+diff --git a/lib/twitter-text/autolink.rb b/lib/twitter-text/autolink.rb
+index 82f35302..9b243ec6 100644
+--- a/lib/twitter-text/autolink.rb
++++ b/lib/twitter-text/autolink.rb
+@@ -325,10 +326,10 @@ def link_url_with_entity(entity, options)
+ # <span style='font-size:0'>&nbsp;</span>
+ # …
+ # </span>
+- %(<span class="tco-ellipsis">#{preceding_ellipsis}<span #{invisible_tag_attrs}>&nbsp;</span></span>) <<
+- %(<span #{invisible_tag_attrs}>#{html_escape(before_display_url)}</span>) <<
+- %(<span class="js-display-url">#{html_escape(display_url_sans_ellipses)}</span>) <<
+- %(<span #{invisible_tag_attrs}>#{html_escape(after_display_url)}</span>) <<
++ %(<span class="tco-ellipsis">#{preceding_ellipsis}<span #{invisible_tag_attrs}>&nbsp;</span></span>) +
++ %(<span #{invisible_tag_attrs}>#{html_escape(before_display_url)}</span>) +
++ %(<span class="js-display-url">#{html_escape(display_url_sans_ellipses)}</span>) +
++ %(<span #{invisible_tag_attrs}>#{html_escape(after_display_url)}</span>) +
+ %(<span class="tco-ellipsis"><span #{invisible_tag_attrs}>&nbsp;</span>#{following_ellipsis}</span>)
+ else
+ html_escape(display_url)
+@@ -444,7 +445,7 @@ def tag_attrs(attributes)
+ else
+ value
+ end
+- attrs << %( #{html_escape(key)}="#{html_escape(value)}")
++ attrs = attrs + %( #{html_escape(key)}="#{html_escape(value)}")
+ end
+
+ attrs
+diff --git a/lib/twitter-text/deprecation.rb b/lib/twitter-text/deprecation.rb
+index bc66d60f..cfc4858c 100644
+--- a/lib/twitter-text/deprecation.rb
++++ b/lib/twitter-text/deprecation.rb
+@@ -8,7 +9,7 @@ module Deprecation
+ def deprecate(method, new_method = nil)
+ deprecated_method = :"deprecated_#{method}"
+ message = "Deprecation: `#{method}` is deprecated."
+- message += " Please use `#{new_method}` instead." if new_method
++ message = "#{message} Please use `#{new_method}` instead." if new_method
+
+ alias_method(deprecated_method, method)
+ define_method method do |*args, &block|
+diff --git a/lib/twitter-text/extractor.rb b/lib/twitter-text/extractor.rb
+index a2fd7db7..c96ec200 100644
+--- a/lib/twitter-text/extractor.rb
++++ b/lib/twitter-text/extractor.rb
+@@ -19,7 +20,7 @@ def codepoint_length
+
+ # Helper function to convert this string into an array of unicode code points.
+ def to_codepoint_a
+- @to_codepoint_a ||= if chars.kind_of?(Enumerable)
++ if chars.kind_of?(Enumerable)
+ chars.to_a
+ else
+ codepoint_array = []
diff --git a/dev-ruby/twitter-text/twitter-text-3.1.0-r1.ebuild b/dev-ruby/twitter-text/twitter-text-3.1.0-r1.ebuild
new file mode 100644
index 000000000000..ec9980d121a6
--- /dev/null
+++ b/dev-ruby/twitter-text/twitter-text-3.1.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+USE_RUBY="ruby24 ruby25 ruby26 ruby27"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_EXTRAINSTALL="config"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Text handling for Twitter"
+HOMEPAGE="https://github.com/twitter/twitter-text"
+
+LICENSE="MIT"
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+IUSE=""
+
+ruby_add_rdepend "
+ dev-ruby/idn-ruby
+ =dev-ruby/unf-0.1*
+"
+
+ruby_add_bdepend "test? ( >=dev-ruby/multi_json-1.3
+ >=dev-ruby/nokogiri-1.8.0 )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.1.0-frozen-string.patch"
+)
+
+all_ruby_prepare() {
+ #sed -i -e 's/2.14.0/2.14/' twitter-text.gemspec || die
+ sed -i -e '/simplecov/,/end/ s:^:#:' spec/spec_helper.rb || die
+}