summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/best_in_place')
-rw-r--r--dev-ruby/best_in_place/Manifest1
-rw-r--r--dev-ruby/best_in_place/best_in_place-3.0.3.ebuild61
-rw-r--r--dev-ruby/best_in_place/files/best_in_place-1.1.0-kramdown.patch35
-rw-r--r--dev-ruby/best_in_place/metadata.xml8
4 files changed, 105 insertions, 0 deletions
diff --git a/dev-ruby/best_in_place/Manifest b/dev-ruby/best_in_place/Manifest
new file mode 100644
index 000000000000..27869b11be2c
--- /dev/null
+++ b/dev-ruby/best_in_place/Manifest
@@ -0,0 +1 @@
+DIST best_in_place-3.0.3.gem 73216 SHA256 495226571d111d1a1a65ac96b853b4560028e2c06d57e67929241a255c8a5b59 SHA512 61a48e36debb611a4055fec071cfc124fd862b695f7d4b991a1c66403a24576abd45f6ab0d065d92b2bce45cdd6397d68f4d10627360696bf1ebee02e89fd1ed WHIRLPOOL 2855200530ea107d1b7d5377e839f12960a50eab8339916ade003297f3e6221fb04a8b7695cf941c84ed60f2ee9bd63d668c0f95e7d551b99bb5e203f60471b0
diff --git a/dev-ruby/best_in_place/best_in_place-3.0.3.ebuild b/dev-ruby/best_in_place/best_in_place-3.0.3.ebuild
new file mode 100644
index 000000000000..295ecef57be0
--- /dev/null
+++ b/dev-ruby/best_in_place/best_in_place-3.0.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+USE_RUBY="ruby19 ruby20 ruby21"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+
+# if ever needed
+#GITHUB_USER="bernat"
+#GITHUB_PROJECT="${PN}"
+#RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*"
+
+inherit virtualx ruby-fakegem
+
+DESCRIPTION="In-place editor helper for Rails 3"
+HOMEPAGE="https://github.com/bernat/best_in_place"
+
+LICENSE="MIT"
+SLOT="3"
+KEYWORDS="~amd64"
+IUSE=""
+
+ruby_add_rdepend "
+ >=dev-ruby/actionpack-3.2:*
+ >=dev-ruby/railties-3.2:*
+"
+
+ruby_add_bdepend "
+ test? (
+ dev-ruby/rdiscount
+ dev-ruby/rspec-rails:3
+ >=dev-ruby/nokogiri-1.5.0
+ >=dev-ruby/capybara-1.1.2:0
+ dev-ruby/poltergeist
+ >=dev-ruby/rails-3.2
+ >=dev-ruby/sqlite3-1.3.4-r1
+ dev-ruby/launchy
+ dev-ruby/bundler
+ )"
+
+all_ruby_prepare() {
+ sed -i \
+ -e '/git ls-files/d' \
+ ${RUBY_FAKEGEM_GEMSPEC} || die
+
+ # Tweak Gemfile so we can use it to run specs but can avoid missing
+ # dependencies. Also use packaged versions of jquery and jquery-ui.
+ sed -i -e '/\(rails-assets\|appraisal\)/ s:^:#:' \
+ -e '2agem "rspec", "~>3.0"' \
+ -e '2agem "jquery-rails"' -e '2agem "jquery-ui-rails"' \
+ Gemfile
+}
+
+each_ruby_test() {
+ ${RUBY} -S bundle exec rspec-3 spec || die
+}
diff --git a/dev-ruby/best_in_place/files/best_in_place-1.1.0-kramdown.patch b/dev-ruby/best_in_place/files/best_in_place-1.1.0-kramdown.patch
new file mode 100644
index 000000000000..33ae5e0b9a68
--- /dev/null
+++ b/dev-ruby/best_in_place/files/best_in_place-1.1.0-kramdown.patch
@@ -0,0 +1,35 @@
+diff --git a/Gemfile b/Gemfile
+index 7ae9d6a..5858f12 100644
+--- a/Gemfile
++++ b/Gemfile
+@@ -5,4 +5,4 @@ gemspec
+
+ gem 'sqlite3'
+ gem 'jquery-rails'
+-gem 'rdiscount'
++gem 'kramdown'
+diff --git a/test_app/Gemfile b/test_app/Gemfile
+index 6d53037..32676b2 100644
+--- a/test_app/Gemfile
++++ b/test_app/Gemfile
+@@ -7,7 +7,7 @@ gem 'best_in_place', :path => ".."
+
+ gem 'jquery-rails'
+
+-gem 'rdiscount'
++gem 'kramdown'
+
+ group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+diff --git a/test_app/app/models/user.rb b/test_app/app/models/user.rb
+index 604f5ba..7cc9248 100644
+--- a/test_app/app/models/user.rb
++++ b/test_app/app/models/user.rb
+@@ -19,6 +19,6 @@ class User < ActiveRecord::Base
+ end
+
+ def markdown_desc
+- RDiscount.new(description).to_html.html_safe
++ Kramdown::Document.new(description).to_html.html_safe
+ end
+ end
diff --git a/dev-ruby/best_in_place/metadata.xml b/dev-ruby/best_in_place/metadata.xml
new file mode 100644
index 000000000000..97e8f142291f
--- /dev/null
+++ b/dev-ruby/best_in_place/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>ruby</herd>
+ <upstream>
+ <remote-id type="github">bernat/best_in_place</remote-id>
+ </upstream>
+</pkgmetadata>