has_many_polymorphs 2.2 → 2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +0 -9
- data/README +6 -52
- data/TODO +1 -0
- data/generators/tagging/tagging_generator.rb +1 -14
- data/generators/tagging/templates/tag_test.rb +3 -8
- data/generators/tagging/templates/tagging.rb +2 -2
- data/generators/tagging/templates/tagging_extensions.rb +13 -106
- data/generators/tagging/templates/tagging_test.rb +14 -41
- data/generators/tagging/templates/taggings.yml +3 -5
- data/generators/tagging/templates/tags.yml +2 -2
- data/has_many_polymorphs.gemspec +36 -29
- data/lib/has_many_polymorphs.rb +5 -6
- data/lib/has_many_polymorphs/association.rb +8 -9
- data/lib/has_many_polymorphs/autoload.rb +16 -52
- data/lib/has_many_polymorphs/base.rb +3 -13
- data/lib/has_many_polymorphs/class_methods.rb +102 -181
- data/lib/has_many_polymorphs/debugging_tools.rb +0 -2
- data/lib/has_many_polymorphs/dependencies.rb +36 -0
- data/lib/has_many_polymorphs/rake_task_redefine_task.rb +1 -9
- data/lib/has_many_polymorphs/reflection.rb +6 -7
- data/lib/has_many_polymorphs/support_methods.rb +4 -10
- data/test/fixtures/{fish.yml → aquatic/fish.yml} +0 -0
- data/test/fixtures/{little_whale_pupils.yml → aquatic/little_whale_pupils.yml} +0 -0
- data/test/fixtures/{whales.yml → aquatic/whales.yml} +0 -0
- data/test/models/aquatic/fish.rb +1 -2
- data/test/models/aquatic/whale.rb +0 -2
- data/test/models/eaters_foodstuff.rb +3 -1
- data/test/models/petfood.rb +1 -2
- data/test/schema.rb +0 -15
- data/test/test_helper.rb +18 -39
- data/test/unit/{has_many_polymorphs_test.rb → polymorph_test.rb} +109 -181
- metadata +92 -265
- data.tar.gz.sig +0 -1
- data/Manifest +0 -173
- data/Rakefile +0 -28
- data/examples/hmph.rb +0 -69
- data/lib/has_many_polymorphs/configuration.rb +0 -19
- data/test/fixtures/people.yml +0 -7
- data/test/generator/tagging_generator_test.rb +0 -42
- data/test/integration/app/README +0 -182
- data/test/integration/app/Rakefile +0 -19
- data/test/integration/app/app/controllers/application.rb +0 -7
- data/test/integration/app/app/controllers/bones_controller.rb +0 -5
- data/test/integration/app/app/helpers/addresses_helper.rb +0 -2
- data/test/integration/app/app/helpers/application_helper.rb +0 -3
- data/test/integration/app/app/helpers/bones_helper.rb +0 -2
- data/test/integration/app/app/helpers/sellers_helper.rb +0 -28
- data/test/integration/app/app/helpers/states_helper.rb +0 -2
- data/test/integration/app/app/helpers/users_helper.rb +0 -2
- data/test/integration/app/app/models/bone.rb +0 -2
- data/test/integration/app/app/models/double_sti_parent.rb +0 -2
- data/test/integration/app/app/models/double_sti_parent_relationship.rb +0 -2
- data/test/integration/app/app/models/organic_substance.rb +0 -2
- data/test/integration/app/app/models/single_sti_parent.rb +0 -4
- data/test/integration/app/app/models/single_sti_parent_relationship.rb +0 -4
- data/test/integration/app/app/models/stick.rb +0 -2
- data/test/integration/app/app/models/stone.rb +0 -2
- data/test/integration/app/app/views/addresses/edit.html.erb +0 -12
- data/test/integration/app/app/views/addresses/index.html.erb +0 -18
- data/test/integration/app/app/views/addresses/new.html.erb +0 -11
- data/test/integration/app/app/views/addresses/show.html.erb +0 -3
- data/test/integration/app/app/views/bones/index.rhtml +0 -5
- data/test/integration/app/app/views/layouts/addresses.html.erb +0 -17
- data/test/integration/app/app/views/layouts/sellers.html.erb +0 -17
- data/test/integration/app/app/views/layouts/states.html.erb +0 -17
- data/test/integration/app/app/views/layouts/users.html.erb +0 -17
- data/test/integration/app/app/views/sellers/edit.html.erb +0 -12
- data/test/integration/app/app/views/sellers/index.html.erb +0 -20
- data/test/integration/app/app/views/sellers/new.html.erb +0 -11
- data/test/integration/app/app/views/sellers/show.html.erb +0 -3
- data/test/integration/app/app/views/states/edit.html.erb +0 -12
- data/test/integration/app/app/views/states/index.html.erb +0 -19
- data/test/integration/app/app/views/states/new.html.erb +0 -11
- data/test/integration/app/app/views/states/show.html.erb +0 -3
- data/test/integration/app/app/views/users/edit.html.erb +0 -12
- data/test/integration/app/app/views/users/index.html.erb +0 -22
- data/test/integration/app/app/views/users/new.html.erb +0 -11
- data/test/integration/app/app/views/users/show.html.erb +0 -3
- data/test/integration/app/config/boot.rb +0 -110
- data/test/integration/app/config/database.yml +0 -17
- data/test/integration/app/config/environment.rb +0 -19
- data/test/integration/app/config/environment.rb.canonical +0 -19
- data/test/integration/app/config/environments/development.rb +0 -9
- data/test/integration/app/config/environments/production.rb +0 -18
- data/test/integration/app/config/environments/test.rb +0 -19
- data/test/integration/app/config/locomotive.yml +0 -6
- data/test/integration/app/config/routes.rb +0 -33
- data/test/integration/app/config/ultrasphinx/default.base +0 -56
- data/test/integration/app/config/ultrasphinx/development.conf.canonical +0 -155
- data/test/integration/app/db/migrate/001_create_sticks.rb +0 -11
- data/test/integration/app/db/migrate/002_create_stones.rb +0 -11
- data/test/integration/app/db/migrate/003_create_organic_substances.rb +0 -11
- data/test/integration/app/db/migrate/004_create_bones.rb +0 -8
- data/test/integration/app/db/migrate/005_create_single_sti_parents.rb +0 -11
- data/test/integration/app/db/migrate/006_create_double_sti_parents.rb +0 -11
- data/test/integration/app/db/migrate/007_create_single_sti_parent_relationships.rb +0 -13
- data/test/integration/app/db/migrate/008_create_double_sti_parent_relationships.rb +0 -14
- data/test/integration/app/db/migrate/009_create_library_model.rb +0 -11
- data/test/integration/app/doc/README_FOR_APP +0 -2
- data/test/integration/app/generators/commenting_generator_test.rb +0 -83
- data/test/integration/app/lib/library_model.rb +0 -2
- data/test/integration/app/public/404.html +0 -30
- data/test/integration/app/public/500.html +0 -30
- data/test/integration/app/public/dispatch.cgi +0 -10
- data/test/integration/app/public/dispatch.fcgi +0 -24
- data/test/integration/app/public/dispatch.rb +0 -10
- data/test/integration/app/public/favicon.ico +0 -0
- data/test/integration/app/public/images/rails.png +0 -0
- data/test/integration/app/public/index.html +0 -277
- data/test/integration/app/public/javascripts/application.js +0 -2
- data/test/integration/app/public/javascripts/controls.js +0 -833
- data/test/integration/app/public/javascripts/dragdrop.js +0 -942
- data/test/integration/app/public/javascripts/effects.js +0 -1088
- data/test/integration/app/public/javascripts/prototype.js +0 -2515
- data/test/integration/app/public/robots.txt +0 -1
- data/test/integration/app/public/stylesheets/scaffold.css +0 -74
- data/test/integration/app/script/about +0 -3
- data/test/integration/app/script/breakpointer +0 -3
- data/test/integration/app/script/console +0 -3
- data/test/integration/app/script/destroy +0 -3
- data/test/integration/app/script/generate +0 -3
- data/test/integration/app/script/performance/benchmarker +0 -3
- data/test/integration/app/script/performance/profiler +0 -3
- data/test/integration/app/script/plugin +0 -3
- data/test/integration/app/script/process/inspector +0 -3
- data/test/integration/app/script/process/reaper +0 -3
- data/test/integration/app/script/process/spawner +0 -3
- data/test/integration/app/script/runner +0 -3
- data/test/integration/app/script/server +0 -3
- data/test/integration/app/test/fixtures/double_sti_parent_relationships.yml +0 -7
- data/test/integration/app/test/fixtures/double_sti_parents.yml +0 -7
- data/test/integration/app/test/fixtures/organic_substances.yml +0 -5
- data/test/integration/app/test/fixtures/single_sti_parent_relationships.yml +0 -7
- data/test/integration/app/test/fixtures/single_sti_parents.yml +0 -7
- data/test/integration/app/test/fixtures/sticks.yml +0 -7
- data/test/integration/app/test/fixtures/stones.yml +0 -7
- data/test/integration/app/test/functional/addresses_controller_test.rb +0 -57
- data/test/integration/app/test/functional/bones_controller_test.rb +0 -8
- data/test/integration/app/test/functional/sellers_controller_test.rb +0 -57
- data/test/integration/app/test/functional/states_controller_test.rb +0 -57
- data/test/integration/app/test/functional/users_controller_test.rb +0 -57
- data/test/integration/app/test/test_helper.rb +0 -8
- data/test/integration/app/test/unit/bone_test.rb +0 -8
- data/test/integration/app/test/unit/double_sti_parent_relationship_test.rb +0 -8
- data/test/integration/app/test/unit/double_sti_parent_test.rb +0 -8
- data/test/integration/app/test/unit/organic_substance_test.rb +0 -8
- data/test/integration/app/test/unit/single_sti_parent_relationship_test.rb +0 -8
- data/test/integration/app/test/unit/single_sti_parent_test.rb +0 -8
- data/test/integration/app/test/unit/stick_test.rb +0 -8
- data/test/integration/app/test/unit/stone_test.rb +0 -8
- data/test/integration/server_test.rb +0 -43
- data/test/models/parentship.rb +0 -4
- data/test/models/person.rb +0 -9
- data/test/patches/symlinked_plugins_1.2.6.diff +0 -46
- data/test/setup.rb +0 -14
- metadata.gz.sig +0 -0
@@ -1,43 +0,0 @@
|
|
1
|
-
|
2
|
-
require "#{File.dirname(__FILE__)}/../test_helper"
|
3
|
-
require 'open-uri'
|
4
|
-
|
5
|
-
# Start the server
|
6
|
-
|
7
|
-
class ServerTest < ActiveSupport::TestCase
|
8
|
-
|
9
|
-
PORT = 43040
|
10
|
-
URL = "http://localhost:#{PORT}/"
|
11
|
-
|
12
|
-
def setup
|
13
|
-
@pid = Process.fork do
|
14
|
-
Dir.chdir RAILS_ROOT do
|
15
|
-
# print "S"
|
16
|
-
exec("script/server -p #{PORT} &> #{LOG}")
|
17
|
-
end
|
18
|
-
end
|
19
|
-
sleep(5)
|
20
|
-
end
|
21
|
-
|
22
|
-
def teardown
|
23
|
-
# Process.kill(9, @pid) doesn't work because Mongrel has double-forked itself away
|
24
|
-
`ps awx | grep #{PORT} | grep -v grep | awk '{print $1}'`.split("\n").each do |pid|
|
25
|
-
system("kill -9 #{pid}")
|
26
|
-
# print "K"
|
27
|
-
end
|
28
|
-
sleep(2)
|
29
|
-
@pid = nil
|
30
|
-
end
|
31
|
-
|
32
|
-
def test_association_reloading
|
33
|
-
assert_match(/Bones: index/, open(URL + 'bones').read)
|
34
|
-
assert_match(/Bones: index/, open(URL + 'bones').read)
|
35
|
-
assert_match(/Bones: index/, open(URL + 'bones').read)
|
36
|
-
assert_match(/Bones: index/, open(URL + 'bones').read)
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_verify_autoload_gets_invoked_in_console
|
40
|
-
# XXX Probably can use script/runner to test this
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
data/test/models/parentship.rb
DELETED
data/test/models/person.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
Index: /trunk/railties/lib/rails_generator/lookup.rb
|
2
|
-
===================================================================
|
3
|
-
--- /trunk/railties/lib/rails_generator/lookup.rb (revision 4310)
|
4
|
-
+++ /trunk/railties/lib/rails_generator/lookup.rb (revision 6101)
|
5
|
-
@@ -101,5 +101,5 @@
|
6
|
-
sources << PathSource.new(:lib, "#{::RAILS_ROOT}/lib/generators")
|
7
|
-
sources << PathSource.new(:vendor, "#{::RAILS_ROOT}/vendor/generators")
|
8
|
-
- sources << PathSource.new(:plugins, "#{::RAILS_ROOT}/vendor/plugins/**/generators")
|
9
|
-
+ sources << PathSource.new(:plugins, "#{::RAILS_ROOT}/vendor/plugins/*/**/generators")
|
10
|
-
end
|
11
|
-
sources << PathSource.new(:user, "#{Dir.user_home}/.rails/generators")
|
12
|
-
Index: /trunk/railties/lib/tasks/rails.rb
|
13
|
-
===================================================================
|
14
|
-
--- /trunk/railties/lib/tasks/rails.rb (revision 5469)
|
15
|
-
+++ /trunk/railties/lib/tasks/rails.rb (revision 6101)
|
16
|
-
@@ -6,3 +6,3 @@
|
17
|
-
# Load any custom rakefile extensions
|
18
|
-
Dir["#{RAILS_ROOT}/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
|
19
|
-
-Dir["#{RAILS_ROOT}/vendor/plugins/**/tasks/**/*.rake"].sort.each { |ext| load ext }
|
20
|
-
+Dir["#{RAILS_ROOT}/vendor/plugins/*/**/tasks/**/*.rake"].sort.each { |ext| load ext }
|
21
|
-
Index: /trunk/railties/lib/tasks/testing.rake
|
22
|
-
===================================================================
|
23
|
-
--- /trunk/railties/lib/tasks/testing.rake (revision 5263)
|
24
|
-
+++ /trunk/railties/lib/tasks/testing.rake (revision 6101)
|
25
|
-
@@ -109,9 +109,9 @@
|
26
|
-
t.pattern = "vendor/plugins/#{ENV['PLUGIN']}/test/**/*_test.rb"
|
27
|
-
else
|
28
|
-
- t.pattern = 'vendor/plugins/**/test/**/*_test.rb'
|
29
|
-
+ t.pattern = 'vendor/plugins/*/**/test/**/*_test.rb'
|
30
|
-
end
|
31
|
-
|
32
|
-
t.verbose = true
|
33
|
-
end
|
34
|
-
- Rake::Task['test:plugins'].comment = "Run the plugin tests in vendor/plugins/**/test (or specify with PLUGIN=name)"
|
35
|
-
+ Rake::Task['test:plugins'].comment = "Run the plugin tests in vendor/plugins/*/**/test (or specify with PLUGIN=name)"
|
36
|
-
end
|
37
|
-
Index: /trunk/railties/CHANGELOG
|
38
|
-
===================================================================
|
39
|
-
--- /trunk/railties/CHANGELOG (revision 6069)
|
40
|
-
+++ /trunk/railties/CHANGELOG (revision 6101)
|
41
|
-
@@ -1,3 +1,5 @@
|
42
|
-
*SVN*
|
43
|
-
+
|
44
|
-
+* Plugins may be symlinked in vendor/plugins. #4245 [brandon, progrium@gmail.com]
|
45
|
-
|
46
|
-
* Resource generator depends on the model generator rather than duplicating it. #7269 [bscofield]
|
data/test/setup.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
|
2
|
-
# Setup integration system for the integration suite
|
3
|
-
|
4
|
-
Dir.chdir "#{File.dirname(__FILE__)}/integration/app/" do
|
5
|
-
Dir.chdir "vendor/plugins" do
|
6
|
-
system("rm has_many_polymorphs; ln -s ../../../../../ has_many_polymorphs")
|
7
|
-
end
|
8
|
-
|
9
|
-
system "rake db:drop --trace RAILS_GEM_VERSION=2.2.2 "
|
10
|
-
system "rake db:create --trace RAILS_GEM_VERSION=2.2.2 "
|
11
|
-
system "rake db:migrate --trace"
|
12
|
-
system "rake db:fixtures:load --trace"
|
13
|
-
end
|
14
|
-
|
metadata.gz.sig
DELETED
Binary file
|