summaryrefslogtreecommitdiff
path: root/dev-ruby/rails-observers
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-ruby/rails-observers
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-ruby/rails-observers')
-rw-r--r--dev-ruby/rails-observers/Manifest1
-rw-r--r--dev-ruby/rails-observers/files/rails-observers-0.1.2-fix-tests.patch72
-rw-r--r--dev-ruby/rails-observers/metadata.xml8
-rw-r--r--dev-ruby/rails-observers/rails-observers-0.1.2.ebuild44
4 files changed, 125 insertions, 0 deletions
diff --git a/dev-ruby/rails-observers/Manifest b/dev-ruby/rails-observers/Manifest
new file mode 100644
index 00000000000..23c67091e58
--- /dev/null
+++ b/dev-ruby/rails-observers/Manifest
@@ -0,0 +1 @@
+DIST rails-observers-0.1.2.tgz 20076 SHA256 c4f614b4438332d35edc8459fbfcad5c44ead0e2cf8c90c76a0ac26cf8e6b4e6 SHA512 8dbf268c2dcaf41817b0859fcaf4f55f337c3b632e735b5352db1691058a6ec65071a46bf0768926daa2b587f824809724874dc106a525b3d20f5fa0b150518d WHIRLPOOL 78c3cb33fbc2a4234614cc8d9ee5e6803ddf34d64519a622a0608387f93b31a02ee31dd1cf6d9b0ef7cd2275347bc2f610f0b055b8a7eee3ea64ad998e47a1d5
diff --git a/dev-ruby/rails-observers/files/rails-observers-0.1.2-fix-tests.patch b/dev-ruby/rails-observers/files/rails-observers-0.1.2-fix-tests.patch
new file mode 100644
index 00000000000..07bc58f3f8d
--- /dev/null
+++ b/dev-ruby/rails-observers/files/rails-observers-0.1.2-fix-tests.patch
@@ -0,0 +1,72 @@
+commit 0757380fb62bc80ab7f1867b36d8a8b77ad3ed5f
+Author: Simon Jesenko <simon.jesenko@gmail.com>
+Date: Fri Jul 18 08:00:52 2014 +0200
+
+ fixing tests, substituting ActiveRecord::TestCase with ActiveSupport::TestCase
+
+diff --git a/test/helper.rb b/test/helper.rb
+index b30895f..b0a647e 100644
+--- a/test/helper.rb
++++ b/test/helper.rb
+@@ -1,6 +1,6 @@
+ require 'minitest/autorun'
+ require 'active_record'
+-
++require 'rails'
+ require 'rails/observers/activerecord/active_record'
+
+ FIXTURES_ROOT = File.expand_path(File.dirname(__FILE__)) + "/fixtures"
+@@ -68,7 +68,3 @@ end
+
+ class Minimalistic < ActiveRecord::Base
+ end
+-
+-ActiveSupport::Deprecation.silence do
+- require 'active_record/test_case'
+-end
+diff --git a/test/lifecycle_test.rb b/test/lifecycle_test.rb
+index 5129670..fb55206 100644
+--- a/test/lifecycle_test.rb
++++ b/test/lifecycle_test.rb
+@@ -118,7 +118,7 @@ class AroundTopicObserver < ActiveRecord::Observer
+ end
+ end
+
+-class LifecycleTest < ActiveRecord::TestCase
++class LifecycleTest < ActiveSupport::TestCase
+ fixtures :topics, :developers, :minimalistics
+
+ def test_before_destroy
+diff --git a/test/observing_test.rb b/test/observing_test.rb
+index a7f63dc..120d531 100644
+--- a/test/observing_test.rb
++++ b/test/observing_test.rb
+@@ -32,6 +32,16 @@ end
+ class ObservingTest < ActiveModel::TestCase
+ def setup
+ ObservedModel.observers.clear
++ FooObserver.singleton_class.instance_eval do
++ alias_method :original_observed_classes, :observed_classes
++ end
++ end
++
++ def teardown
++ FooObserver.singleton_class.instance_eval do
++ undef_method :observed_classes
++ alias_method :observed_classes, :original_observed_classes
++ end
+ end
+
+ test "initializes model with no cached observers" do
+diff --git a/test/transaction_callbacks_test.rb b/test/transaction_callbacks_test.rb
+index 8f14cd3..30cbb03 100644
+--- a/test/transaction_callbacks_test.rb
++++ b/test/transaction_callbacks_test.rb
+@@ -1,6 +1,6 @@
+ require "helper"
+
+-class TransactionCallbacksTest < ActiveRecord::TestCase
++class TransactionCallbacksTest < ActiveSupport::TestCase
+ self.use_transactional_fixtures = false
+ fixtures :topics
+
diff --git a/dev-ruby/rails-observers/metadata.xml b/dev-ruby/rails-observers/metadata.xml
new file mode 100644
index 00000000000..15d7698c35d
--- /dev/null
+++ b/dev-ruby/rails-observers/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">rails/rails-observers</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-ruby/rails-observers/rails-observers-0.1.2.ebuild b/dev-ruby/rails-observers/rails-observers-0.1.2.ebuild
new file mode 100644
index 00000000000..2b210a9af25
--- /dev/null
+++ b/dev-ruby/rails-observers/rails-observers-0.1.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby19 ruby20 ruby21"
+
+RUBY_FAKEGEM_TASK_TEST="test:regular"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+inherit ruby-fakegem versionator
+
+DESCRIPTION="Rails Observers"
+HOMEPAGE="https://github.com/rails/rails-observers"
+SRC_URI="https://github.com/rails/${PN}/archive/v${PV}.tar.gz -> ${P}.tgz"
+
+LICENSE="MIT"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~amd64"
+IUSE=""
+
+RUBY_PATCHES=( "${P}-fix-tests.patch" )
+
+ruby_add_rdepend "=dev-ruby/activemodel-4*"
+
+ruby_add_bdepend "
+ test? (
+ dev-ruby/bundler
+ >=dev-ruby/minitest-3
+ =dev-ruby/railties-4*
+ =dev-ruby/activerecord-4*
+ =dev-ruby/actionmailer-4*
+ =dev-ruby/actionpack-4*
+ >=dev-ruby/sqlite3-1.3
+ )"
+
+all_ruby_prepare() {
+ # Avoid rake test since it will run with the wrong ruby interpreter.
+ rm test/rake_test.rb || die
+}