has_many_polymorphs 2.2 → 2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. data/CHANGELOG +0 -9
  2. data/README +6 -52
  3. data/TODO +1 -0
  4. data/generators/tagging/tagging_generator.rb +1 -14
  5. data/generators/tagging/templates/tag_test.rb +3 -8
  6. data/generators/tagging/templates/tagging.rb +2 -2
  7. data/generators/tagging/templates/tagging_extensions.rb +13 -106
  8. data/generators/tagging/templates/tagging_test.rb +14 -41
  9. data/generators/tagging/templates/taggings.yml +3 -5
  10. data/generators/tagging/templates/tags.yml +2 -2
  11. data/has_many_polymorphs.gemspec +36 -29
  12. data/lib/has_many_polymorphs.rb +5 -6
  13. data/lib/has_many_polymorphs/association.rb +8 -9
  14. data/lib/has_many_polymorphs/autoload.rb +16 -52
  15. data/lib/has_many_polymorphs/base.rb +3 -13
  16. data/lib/has_many_polymorphs/class_methods.rb +102 -181
  17. data/lib/has_many_polymorphs/debugging_tools.rb +0 -2
  18. data/lib/has_many_polymorphs/dependencies.rb +36 -0
  19. data/lib/has_many_polymorphs/rake_task_redefine_task.rb +1 -9
  20. data/lib/has_many_polymorphs/reflection.rb +6 -7
  21. data/lib/has_many_polymorphs/support_methods.rb +4 -10
  22. data/test/fixtures/{fish.yml → aquatic/fish.yml} +0 -0
  23. data/test/fixtures/{little_whale_pupils.yml → aquatic/little_whale_pupils.yml} +0 -0
  24. data/test/fixtures/{whales.yml → aquatic/whales.yml} +0 -0
  25. data/test/models/aquatic/fish.rb +1 -2
  26. data/test/models/aquatic/whale.rb +0 -2
  27. data/test/models/eaters_foodstuff.rb +3 -1
  28. data/test/models/petfood.rb +1 -2
  29. data/test/schema.rb +0 -15
  30. data/test/test_helper.rb +18 -39
  31. data/test/unit/{has_many_polymorphs_test.rb → polymorph_test.rb} +109 -181
  32. metadata +92 -265
  33. data.tar.gz.sig +0 -1
  34. data/Manifest +0 -173
  35. data/Rakefile +0 -28
  36. data/examples/hmph.rb +0 -69
  37. data/lib/has_many_polymorphs/configuration.rb +0 -19
  38. data/test/fixtures/people.yml +0 -7
  39. data/test/generator/tagging_generator_test.rb +0 -42
  40. data/test/integration/app/README +0 -182
  41. data/test/integration/app/Rakefile +0 -19
  42. data/test/integration/app/app/controllers/application.rb +0 -7
  43. data/test/integration/app/app/controllers/bones_controller.rb +0 -5
  44. data/test/integration/app/app/helpers/addresses_helper.rb +0 -2
  45. data/test/integration/app/app/helpers/application_helper.rb +0 -3
  46. data/test/integration/app/app/helpers/bones_helper.rb +0 -2
  47. data/test/integration/app/app/helpers/sellers_helper.rb +0 -28
  48. data/test/integration/app/app/helpers/states_helper.rb +0 -2
  49. data/test/integration/app/app/helpers/users_helper.rb +0 -2
  50. data/test/integration/app/app/models/bone.rb +0 -2
  51. data/test/integration/app/app/models/double_sti_parent.rb +0 -2
  52. data/test/integration/app/app/models/double_sti_parent_relationship.rb +0 -2
  53. data/test/integration/app/app/models/organic_substance.rb +0 -2
  54. data/test/integration/app/app/models/single_sti_parent.rb +0 -4
  55. data/test/integration/app/app/models/single_sti_parent_relationship.rb +0 -4
  56. data/test/integration/app/app/models/stick.rb +0 -2
  57. data/test/integration/app/app/models/stone.rb +0 -2
  58. data/test/integration/app/app/views/addresses/edit.html.erb +0 -12
  59. data/test/integration/app/app/views/addresses/index.html.erb +0 -18
  60. data/test/integration/app/app/views/addresses/new.html.erb +0 -11
  61. data/test/integration/app/app/views/addresses/show.html.erb +0 -3
  62. data/test/integration/app/app/views/bones/index.rhtml +0 -5
  63. data/test/integration/app/app/views/layouts/addresses.html.erb +0 -17
  64. data/test/integration/app/app/views/layouts/sellers.html.erb +0 -17
  65. data/test/integration/app/app/views/layouts/states.html.erb +0 -17
  66. data/test/integration/app/app/views/layouts/users.html.erb +0 -17
  67. data/test/integration/app/app/views/sellers/edit.html.erb +0 -12
  68. data/test/integration/app/app/views/sellers/index.html.erb +0 -20
  69. data/test/integration/app/app/views/sellers/new.html.erb +0 -11
  70. data/test/integration/app/app/views/sellers/show.html.erb +0 -3
  71. data/test/integration/app/app/views/states/edit.html.erb +0 -12
  72. data/test/integration/app/app/views/states/index.html.erb +0 -19
  73. data/test/integration/app/app/views/states/new.html.erb +0 -11
  74. data/test/integration/app/app/views/states/show.html.erb +0 -3
  75. data/test/integration/app/app/views/users/edit.html.erb +0 -12
  76. data/test/integration/app/app/views/users/index.html.erb +0 -22
  77. data/test/integration/app/app/views/users/new.html.erb +0 -11
  78. data/test/integration/app/app/views/users/show.html.erb +0 -3
  79. data/test/integration/app/config/boot.rb +0 -110
  80. data/test/integration/app/config/database.yml +0 -17
  81. data/test/integration/app/config/environment.rb +0 -19
  82. data/test/integration/app/config/environment.rb.canonical +0 -19
  83. data/test/integration/app/config/environments/development.rb +0 -9
  84. data/test/integration/app/config/environments/production.rb +0 -18
  85. data/test/integration/app/config/environments/test.rb +0 -19
  86. data/test/integration/app/config/locomotive.yml +0 -6
  87. data/test/integration/app/config/routes.rb +0 -33
  88. data/test/integration/app/config/ultrasphinx/default.base +0 -56
  89. data/test/integration/app/config/ultrasphinx/development.conf.canonical +0 -155
  90. data/test/integration/app/db/migrate/001_create_sticks.rb +0 -11
  91. data/test/integration/app/db/migrate/002_create_stones.rb +0 -11
  92. data/test/integration/app/db/migrate/003_create_organic_substances.rb +0 -11
  93. data/test/integration/app/db/migrate/004_create_bones.rb +0 -8
  94. data/test/integration/app/db/migrate/005_create_single_sti_parents.rb +0 -11
  95. data/test/integration/app/db/migrate/006_create_double_sti_parents.rb +0 -11
  96. data/test/integration/app/db/migrate/007_create_single_sti_parent_relationships.rb +0 -13
  97. data/test/integration/app/db/migrate/008_create_double_sti_parent_relationships.rb +0 -14
  98. data/test/integration/app/db/migrate/009_create_library_model.rb +0 -11
  99. data/test/integration/app/doc/README_FOR_APP +0 -2
  100. data/test/integration/app/generators/commenting_generator_test.rb +0 -83
  101. data/test/integration/app/lib/library_model.rb +0 -2
  102. data/test/integration/app/public/404.html +0 -30
  103. data/test/integration/app/public/500.html +0 -30
  104. data/test/integration/app/public/dispatch.cgi +0 -10
  105. data/test/integration/app/public/dispatch.fcgi +0 -24
  106. data/test/integration/app/public/dispatch.rb +0 -10
  107. data/test/integration/app/public/favicon.ico +0 -0
  108. data/test/integration/app/public/images/rails.png +0 -0
  109. data/test/integration/app/public/index.html +0 -277
  110. data/test/integration/app/public/javascripts/application.js +0 -2
  111. data/test/integration/app/public/javascripts/controls.js +0 -833
  112. data/test/integration/app/public/javascripts/dragdrop.js +0 -942
  113. data/test/integration/app/public/javascripts/effects.js +0 -1088
  114. data/test/integration/app/public/javascripts/prototype.js +0 -2515
  115. data/test/integration/app/public/robots.txt +0 -1
  116. data/test/integration/app/public/stylesheets/scaffold.css +0 -74
  117. data/test/integration/app/script/about +0 -3
  118. data/test/integration/app/script/breakpointer +0 -3
  119. data/test/integration/app/script/console +0 -3
  120. data/test/integration/app/script/destroy +0 -3
  121. data/test/integration/app/script/generate +0 -3
  122. data/test/integration/app/script/performance/benchmarker +0 -3
  123. data/test/integration/app/script/performance/profiler +0 -3
  124. data/test/integration/app/script/plugin +0 -3
  125. data/test/integration/app/script/process/inspector +0 -3
  126. data/test/integration/app/script/process/reaper +0 -3
  127. data/test/integration/app/script/process/spawner +0 -3
  128. data/test/integration/app/script/runner +0 -3
  129. data/test/integration/app/script/server +0 -3
  130. data/test/integration/app/test/fixtures/double_sti_parent_relationships.yml +0 -7
  131. data/test/integration/app/test/fixtures/double_sti_parents.yml +0 -7
  132. data/test/integration/app/test/fixtures/organic_substances.yml +0 -5
  133. data/test/integration/app/test/fixtures/single_sti_parent_relationships.yml +0 -7
  134. data/test/integration/app/test/fixtures/single_sti_parents.yml +0 -7
  135. data/test/integration/app/test/fixtures/sticks.yml +0 -7
  136. data/test/integration/app/test/fixtures/stones.yml +0 -7
  137. data/test/integration/app/test/functional/addresses_controller_test.rb +0 -57
  138. data/test/integration/app/test/functional/bones_controller_test.rb +0 -8
  139. data/test/integration/app/test/functional/sellers_controller_test.rb +0 -57
  140. data/test/integration/app/test/functional/states_controller_test.rb +0 -57
  141. data/test/integration/app/test/functional/users_controller_test.rb +0 -57
  142. data/test/integration/app/test/test_helper.rb +0 -8
  143. data/test/integration/app/test/unit/bone_test.rb +0 -8
  144. data/test/integration/app/test/unit/double_sti_parent_relationship_test.rb +0 -8
  145. data/test/integration/app/test/unit/double_sti_parent_test.rb +0 -8
  146. data/test/integration/app/test/unit/organic_substance_test.rb +0 -8
  147. data/test/integration/app/test/unit/single_sti_parent_relationship_test.rb +0 -8
  148. data/test/integration/app/test/unit/single_sti_parent_test.rb +0 -8
  149. data/test/integration/app/test/unit/stick_test.rb +0 -8
  150. data/test/integration/app/test/unit/stone_test.rb +0 -8
  151. data/test/integration/server_test.rb +0 -43
  152. data/test/models/parentship.rb +0 -4
  153. data/test/models/person.rb +0 -9
  154. data/test/patches/symlinked_plugins_1.2.6.diff +0 -46
  155. data/test/setup.rb +0 -14
  156. metadata.gz.sig +0 -0
@@ -1,2 +0,0 @@
1
- class DoubleStiParentRelationship < ActiveRecord::Base
2
- end
@@ -1,2 +0,0 @@
1
- class OrganicSubstance < ActiveRecord::Base
2
- end
@@ -1,4 +0,0 @@
1
-
2
- class SingleStiParent < ActiveRecord::Base
3
- has_many_polymorphs :the_bones, :from => [:bones], :through => :single_sti_parent_relationship
4
- end
@@ -1,4 +0,0 @@
1
- class SingleStiParentRelationship < ActiveRecord::Base
2
- belongs_to :single_sti_parent
3
- belongs_to :the_bone, :polymorphic => true
4
- end
@@ -1,2 +0,0 @@
1
- class Stick < ActiveRecord::Base
2
- end
@@ -1,2 +0,0 @@
1
- class Stone < ActiveRecord::Base
2
- end
@@ -1,12 +0,0 @@
1
- <h1>Editing address</h1>
2
-
3
- <%= error_messages_for :address %>
4
-
5
- <% form_for(@address) do |f| %>
6
- <p>
7
- <%= f.submit "Update" %>
8
- </p>
9
- <% end %>
10
-
11
- <%= link_to 'Show', @address %> |
12
- <%= link_to 'Back', addresses_path %>
@@ -1,18 +0,0 @@
1
- <h1>Listing addresses</h1>
2
-
3
- <table>
4
- <tr>
5
- </tr>
6
-
7
- <% for address in @addresses %>
8
- <tr>
9
- <td><%= link_to 'Show', address %></td>
10
- <td><%= link_to 'Edit', edit_address_path(address) %></td>
11
- <td><%= link_to 'Destroy', address, :confirm => 'Are you sure?', :method => :delete %></td>
12
- </tr>
13
- <% end %>
14
- </table>
15
-
16
- <br />
17
-
18
- <%= link_to 'New address', new_address_path %>
@@ -1,11 +0,0 @@
1
- <h1>New address</h1>
2
-
3
- <%= error_messages_for :address %>
4
-
5
- <% form_for(@address) do |f| %>
6
- <p>
7
- <%= f.submit "Create" %>
8
- </p>
9
- <% end %>
10
-
11
- <%= link_to 'Back', addresses_path %>
@@ -1,3 +0,0 @@
1
-
2
- <%= link_to 'Edit', edit_address_path(@address) %> |
3
- <%= link_to 'Back', addresses_path %>
@@ -1,5 +0,0 @@
1
-
2
- <p>Bones: index</p>
3
- <% @bones.each do |bone| %>
4
- <p>ID: <%= bone.id %></p>
5
- <% end %>
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
- <title>Addresses: <%= controller.action_name %></title>
8
- <%= stylesheet_link_tag 'scaffold' %>
9
- </head>
10
- <body>
11
-
12
- <p style="color: green"><%= flash[:notice] %></p>
13
-
14
- <%= yield %>
15
-
16
- </body>
17
- </html>
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
- <title>Sellers: <%= controller.action_name %></title>
8
- <%= stylesheet_link_tag 'scaffold' %>
9
- </head>
10
- <body>
11
-
12
- <p style="color: green"><%= flash[:notice] %></p>
13
-
14
- <%= yield %>
15
-
16
- </body>
17
- </html>
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
- <title>States: <%= controller.action_name %></title>
8
- <%= stylesheet_link_tag 'scaffold' %>
9
- </head>
10
- <body>
11
-
12
- <p style="color: green"><%= flash[:notice] %></p>
13
-
14
- <%= yield %>
15
-
16
- </body>
17
- </html>
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
- <title>Users: <%= controller.action_name %></title>
8
- <%= stylesheet_link_tag 'scaffold' %>
9
- </head>
10
- <body>
11
-
12
- <p style="color: green"><%= flash[:notice] %></p>
13
-
14
- <%= yield %>
15
-
16
- </body>
17
- </html>
@@ -1,12 +0,0 @@
1
- <h1>Editing seller</h1>
2
-
3
- <%= error_messages_for :seller %>
4
-
5
- <% form_for(@seller) do |f| %>
6
- <p>
7
- <%= f.submit "Update" %>
8
- </p>
9
- <% end %>
10
-
11
- <%= link_to 'Show', @seller %> |
12
- <%= link_to 'Back', sellers_path %>
@@ -1,20 +0,0 @@
1
- <h1>Listing sellers</h1>
2
-
3
- <table>
4
- <tr>
5
- </tr>
6
-
7
- <% for seller in @sellers %>
8
- <tr>
9
- <td><%= h(seller.company_name) %></td>
10
- <td><%= h(display_address(seller)) %></td>
11
- <td><%= link_to 'Show', seller %></td>
12
- <td><%= link_to 'Edit', edit_seller_path(seller) %></td>
13
- <td><%= link_to 'Destroy', seller, :confirm => 'Are you sure?', :method => :delete %></td>
14
- </tr>
15
- <% end %>
16
- </table>
17
-
18
- <br />
19
-
20
- <%= link_to 'New seller', new_seller_path %>
@@ -1,11 +0,0 @@
1
- <h1>New seller</h1>
2
-
3
- <%= error_messages_for :seller %>
4
-
5
- <% form_for(@seller) do |f| %>
6
- <p>
7
- <%= f.submit "Create" %>
8
- </p>
9
- <% end %>
10
-
11
- <%= link_to 'Back', sellers_path %>
@@ -1,3 +0,0 @@
1
-
2
- <%= link_to 'Edit', edit_seller_path(@seller) %> |
3
- <%= link_to 'Back', sellers_path %>
@@ -1,12 +0,0 @@
1
- <h1>Editing state</h1>
2
-
3
- <%= error_messages_for :state %>
4
-
5
- <% form_for(@state) do |f| %>
6
- <p>
7
- <%= f.submit "Update" %>
8
- </p>
9
- <% end %>
10
-
11
- <%= link_to 'Show', @state %> |
12
- <%= link_to 'Back', states_path %>
@@ -1,19 +0,0 @@
1
- <h1>Listing states</h1>
2
-
3
- <table>
4
- <tr>
5
- </tr>
6
-
7
- <% for state in @states %>
8
- <tr>
9
- <td><%= state.name %></td>
10
- <td><%= link_to 'Show', state %></td>
11
- <td><%= link_to 'Edit', edit_state_path(state) %></td>
12
- <td><%= link_to 'Destroy', state, :confirm => 'Are you sure?', :method => :delete %></td>
13
- </tr>
14
- <% end %>
15
- </table>
16
-
17
- <br />
18
-
19
- <%= link_to 'New state', new_state_path %>
@@ -1,11 +0,0 @@
1
- <h1>New state</h1>
2
-
3
- <%= error_messages_for :state %>
4
-
5
- <% form_for(@state) do |f| %>
6
- <p>
7
- <%= f.submit "Create" %>
8
- </p>
9
- <% end %>
10
-
11
- <%= link_to 'Back', states_path %>
@@ -1,3 +0,0 @@
1
-
2
- <%= link_to 'Edit', edit_state_path(@state) %> |
3
- <%= link_to 'Back', states_path %>
@@ -1,12 +0,0 @@
1
- <h1>Editing user</h1>
2
-
3
- <%= error_messages_for :user %>
4
-
5
- <% form_for(@user) do |f| %>
6
- <p>
7
- <%= f.submit "Update" %>
8
- </p>
9
- <% end %>
10
-
11
- <%= link_to 'Show', @user %> |
12
- <%= link_to 'Back', users_path %>
@@ -1,22 +0,0 @@
1
- <h1>Listing users</h1>
2
-
3
- <table>
4
- <tr>
5
- </tr>
6
-
7
- <% for user in @users %>
8
- <tr>
9
- <td><%= h(user.login) %></td>
10
- <td><%= h(user.address.line_1) %></td>
11
- <td><%= h(user.address.city) %></td>
12
- <td><%= h(user.address.state.name) %></td>
13
- <td><%= link_to 'Show', user %></td>
14
- <td><%= link_to 'Edit', edit_user_path(user) %></td>
15
- <td><%= link_to 'Destroy', user, :confirm => 'Are you sure?', :method => :delete %></td>
16
- </tr>
17
- <% end %>
18
- </table>
19
-
20
- <br />
21
-
22
- <%= link_to 'New user', new_user_path %>
@@ -1,11 +0,0 @@
1
- <h1>New user</h1>
2
-
3
- <%= error_messages_for :user %>
4
-
5
- <% form_for(@user) do |f| %>
6
- <p>
7
- <%= f.submit "Create" %>
8
- </p>
9
- <% end %>
10
-
11
- <%= link_to 'Back', users_path %>
@@ -1,3 +0,0 @@
1
-
2
- <%= link_to 'Edit', edit_user_path(@user) %> |
3
- <%= link_to 'Back', users_path %>
@@ -1,110 +0,0 @@
1
- # Don't change this file!
2
- # Configure your app in config/environment.rb and config/environments/*.rb
3
-
4
- RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
5
-
6
- module Rails
7
- class << self
8
- def boot!
9
- unless booted?
10
- preinitialize
11
- pick_boot.run
12
- end
13
- end
14
-
15
- def booted?
16
- defined? Rails::Initializer
17
- end
18
-
19
- def pick_boot
20
- (vendor_rails? ? VendorBoot : GemBoot).new
21
- end
22
-
23
- def vendor_rails?
24
- File.exist?("#{RAILS_ROOT}/vendor/rails")
25
- end
26
-
27
- def preinitialize
28
- load(preinitializer_path) if File.exists?(preinitializer_path)
29
- end
30
-
31
- def preinitializer_path
32
- "#{RAILS_ROOT}/config/preinitializer.rb"
33
- end
34
- end
35
-
36
- class Boot
37
- def run
38
- load_initializer
39
- Rails::Initializer.run(:set_load_path)
40
- end
41
- end
42
-
43
- class VendorBoot < Boot
44
- def load_initializer
45
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
46
- end
47
- end
48
-
49
- class GemBoot < Boot
50
- def load_initializer
51
- self.class.load_rubygems
52
- load_rails_gem
53
- require 'initializer'
54
- end
55
-
56
- def load_rails_gem
57
- if version = self.class.gem_version
58
- STDERR.puts "Boot.rb loading version #{version}"
59
- gem 'rails', version
60
- else
61
- STDERR.puts "Boot.rb loading latest available version"
62
- gem 'rails'
63
- end
64
- rescue Gem::LoadError => load_error
65
- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
66
- exit 1
67
- end
68
-
69
- class << self
70
- def rubygems_version
71
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
72
- end
73
-
74
- def gem_version
75
- if defined? RAILS_GEM_VERSION
76
- RAILS_GEM_VERSION
77
- elsif ENV.include?('RAILS_GEM_VERSION')
78
- ENV['RAILS_GEM_VERSION']
79
- else
80
- parse_gem_version(read_environment_rb)
81
- end
82
- end
83
-
84
- def load_rubygems
85
- require 'rubygems'
86
-
87
- unless rubygems_version >= '0.9.4'
88
- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
89
- exit 1
90
- end
91
-
92
- rescue LoadError
93
- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
94
- exit 1
95
- end
96
-
97
- def parse_gem_version(text)
98
- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*'([!~<>=]*\s*[\d.]+)'/
99
- end
100
-
101
- private
102
- def read_environment_rb
103
- File.read("#{RAILS_ROOT}/config/environment.rb")
104
- end
105
- end
106
- end
107
- end
108
-
109
- # All that for this:
110
- Rails.boot!
@@ -1,17 +0,0 @@
1
-
2
- defaults: &defaults
3
- adapter: <%= ENV['DB'] || 'mysql' %>
4
- host: localhost
5
- database: hmp_development
6
- username: root
7
- password:
8
-
9
- development:
10
- <<: *defaults
11
-
12
- test:
13
- <<: *defaults
14
-
15
- production:
16
- <<: *defaults
17
-