parlement 0.14 → 0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +41 -1
- data/MEMORY +66 -5
- data/README +10 -5
- data/Rakefile +15 -23
- data/app/controllers/account_controller.rb +48 -43
- data/app/controllers/{application.rb → application_controller.rb} +15 -12
- data/app/controllers/elt_controller.rb +77 -32
- data/app/controllers/subscriber_controller.rb +11 -10
- data/app/helpers/application_helper.rb +14 -1
- data/app/helpers/elt_helper.rb +9 -7
- data/app/models/elt.rb +25 -24
- data/app/models/mail.rb +44 -47
- data/app/models/person_notify.rb +2 -2
- data/app/models/user.rb +128 -2
- data/app/models/user_notify.rb +15 -15
- data/app/views/account/_login.rhtml +39 -39
- data/app/views/account/_show.rhtml +22 -30
- data/app/views/account/signup.rhtml +2 -2
- data/app/views/elt/_choice.rhtml +6 -6
- data/app/views/elt/_elt.rhtml +27 -32
- data/app/views/elt/choices.rhtml +16 -18
- data/app/views/elt/list/_byDate.rhtml +14 -14
- data/app/views/elt/list/_byVote.rhtml +15 -15
- data/app/views/elt/list/_children.rhtml +48 -40
- data/app/views/elt/list/_subscribers.rhtml +1 -1
- data/app/views/elt/new.rhtml +22 -21
- data/app/views/elt/rss.rxml +4 -11
- data/app/views/elt/show.rhtml +65 -61
- data/app/views/elt/vote_rss.rxml +4 -11
- data/app/views/layouts/top.rhtml +39 -50
- data/app/views/person/_listElts.rhtml +1 -1
- data/app/views/person/show.rhtml +1 -1
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/change_password.rhtml +0 -0
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/delete.rhtml +0 -0
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/forgot_password.rhtml +0 -0
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/pending_delete.rhtml +0 -0
- data/{vendor/plugins/login_engine/app → app}/views/user_notify/signup.rhtml +0 -0
- data/config/boot.rb +97 -32
- data/config/environment.rb +37 -35
- data/config/environments/development.rb +2 -3
- data/config/environments/production.rb +3 -0
- data/config/initializers/string_ruby_1.8.rb +10 -0
- data/config/routes.rb +17 -22
- data/db/schema.rb +102 -74
- data/lib/tasks/rspec.rake +167 -0
- data/public/404.html +25 -7
- data/public/500.html +26 -7
- data/public/dispatch.cgi +0 -0
- data/public/dispatch.fcgi +0 -0
- data/public/dispatch.rb +0 -0
- data/public/images/live_tree_branch_collapsed_icon.gif +0 -0
- data/public/images/live_tree_branch_expanded_icon.gif +0 -0
- data/public/images/live_tree_leaf_icon.gif +0 -0
- data/public/javascripts/application.js +258 -0
- data/public/javascripts/controls.js +544 -414
- data/public/javascripts/dragdrop.js +229 -198
- data/public/javascripts/effects.js +499 -459
- data/public/javascripts/prototype.js +2926 -1121
- data/public/javascripts/shadedborder.js +68 -50
- data/public/stylesheets/default.css +34 -34
- data/public/stylesheets/live_tree.css +0 -0
- data/public/stylesheets/scaffold.css +6 -6
- data/script/about +0 -0
- data/script/autospec +6 -0
- data/script/benchmarker +0 -0
- data/script/breakpointer +0 -0
- data/script/console +0 -0
- data/script/dbconsole +3 -0
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/plugin +0 -0
- data/script/profiler +0 -0
- data/script/runner +0 -0
- data/script/server +0 -0
- data/script/spec +10 -0
- data/script/spec_server +9 -0
- data/test/unit/attachment_test.rb +4 -4
- data/test/unit/choice_test.rb +1 -1
- data/test/unit/elt_test.rb +9 -9
- data/test/unit/mail_notify_test.rb +2 -2
- data/test/unit/mail_test.rb +18 -11
- data/test/unit/person_notify_test.rb +1 -1
- data/test/unit/person_test.rb +1 -1
- data/test/unit/subscriber_test.rb +1 -1
- data/test/unit/user_test.rb +81 -0
- data/test/unit/visit_test.rb +6 -6
- data/vendor/plugins/activerecord_foreign_key_extensions/init.rb +2 -0
- data/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb +182 -0
- data/vendor/plugins/activerecord_text_id_extensions/init.rb +2 -0
- data/vendor/plugins/activerecord_text_id_extensions/lib/active_record_extensions.rb +24 -0
- data/vendor/plugins/acts_as_nested_set/README +15 -0
- data/vendor/plugins/acts_as_nested_set/init.rb +1 -0
- data/vendor/plugins/acts_as_nested_set/lib/active_record/acts/nested_set.rb +210 -0
- data/vendor/plugins/acts_as_nested_set/test/nested_set_test.rb +269 -0
- data/vendor/plugins/acts_as_tree/README +26 -0
- data/vendor/plugins/acts_as_tree/Rakefile +22 -0
- data/vendor/plugins/acts_as_tree/init.rb +1 -0
- data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
- data/vendor/plugins/{output_compression/CHANGELOG → acts_as_tree/test/abstract_unit.rb} +0 -0
- data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
- data/vendor/plugins/acts_as_tree/test/database.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
- data/vendor/plugins/classic_pagination/CHANGELOG +152 -0
- data/vendor/plugins/classic_pagination/README +18 -0
- data/vendor/plugins/{output_compression/rakefile → classic_pagination/Rakefile} +22 -22
- data/vendor/plugins/classic_pagination/init.rb +33 -0
- data/vendor/plugins/classic_pagination/install.rb +1 -0
- data/vendor/plugins/classic_pagination/lib/pagination.rb +405 -0
- data/vendor/plugins/classic_pagination/lib/pagination_helper.rb +135 -0
- data/vendor/plugins/classic_pagination/test/fixtures/companies.yml +24 -0
- data/vendor/plugins/classic_pagination/test/fixtures/company.rb +9 -0
- data/vendor/plugins/classic_pagination/test/fixtures/developer.rb +7 -0
- data/vendor/plugins/classic_pagination/test/fixtures/developers.yml +21 -0
- data/vendor/plugins/classic_pagination/test/fixtures/developers_projects.yml +13 -0
- data/vendor/plugins/classic_pagination/test/fixtures/project.rb +3 -0
- data/vendor/plugins/classic_pagination/test/fixtures/projects.yml +7 -0
- data/vendor/plugins/classic_pagination/test/fixtures/replies.yml +13 -0
- data/vendor/plugins/classic_pagination/test/fixtures/reply.rb +5 -0
- data/vendor/plugins/classic_pagination/test/fixtures/schema.sql +42 -0
- data/vendor/plugins/classic_pagination/test/fixtures/topic.rb +3 -0
- data/vendor/plugins/classic_pagination/test/fixtures/topics.yml +22 -0
- data/vendor/plugins/classic_pagination/test/helper.rb +117 -0
- data/vendor/plugins/classic_pagination/test/pagination_helper_test.rb +38 -0
- data/vendor/plugins/classic_pagination/test/pagination_test.rb +177 -0
- data/vendor/plugins/file_column/lib/file_column.rb +1 -1
- data/vendor/plugins/file_column/test/file_column_test.rb +0 -0
- metadata +151 -197
- data/app/helpers/live_tree.rb +0 -238
- data/app/views/elt/_form.rhtml +0 -31
- data/app/views/elt/show_tree.rhtml +0 -8
- data/config/environments/user_environment.rb +0 -1
- data/db/ROOT/Titemagli.txt +0 -3
- data/db/ROOT/titemagli.txt +0 -9
- data/public/javascripts/behaviour.js +0 -254
- data/public/javascripts/ie7-load.htc +0 -1
- data/public/javascripts/ie7.js +0 -6
- data/public/javascripts/live_tree.js +0 -749
- data/public/javascripts/mybehaviour.js +0 -225
- data/public/javascripts/scriptaculous.js +0 -47
- data/public/javascripts/slider.js +0 -283
- data/public/stylesheets/blue.css +0 -471
- data/vendor/plugins/engines/CHANGELOG +0 -241
- data/vendor/plugins/engines/MIT-LICENSE +0 -21
- data/vendor/plugins/engines/README +0 -64
- data/vendor/plugins/engines/Rakefile +0 -32
- data/vendor/plugins/engines/UPGRADING +0 -93
- data/vendor/plugins/engines/about.yml +0 -7
- data/vendor/plugins/engines/generators/plugin_migration/USAGE +0 -45
- data/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb +0 -79
- data/vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.erb +0 -13
- data/vendor/plugins/engines/init.rb +0 -40
- data/vendor/plugins/engines/install.rb +0 -32
- data/vendor/plugins/engines/lib/engines.rb +0 -323
- data/vendor/plugins/engines/lib/engines/deprecated_config_support.rb +0 -135
- data/vendor/plugins/engines/lib/engines/plugin.rb +0 -214
- data/vendor/plugins/engines/lib/engines/plugin_list.rb +0 -31
- data/vendor/plugins/engines/lib/engines/plugin_migrator.rb +0 -60
- data/vendor/plugins/engines/lib/engines/rails_extensions.rb +0 -6
- data/vendor/plugins/engines/lib/engines/rails_extensions/active_record.rb +0 -19
- data/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb +0 -143
- data/vendor/plugins/engines/lib/engines/rails_extensions/migrations.rb +0 -155
- data/vendor/plugins/engines/lib/engines/rails_extensions/public_asset_helpers.rb +0 -116
- data/vendor/plugins/engines/lib/engines/rails_extensions/rails.rb +0 -20
- data/vendor/plugins/engines/lib/engines/rails_extensions/rails_initializer.rb +0 -86
- data/vendor/plugins/engines/lib/engines/rails_extensions/routing.rb +0 -77
- data/vendor/plugins/engines/lib/engines/rails_extensions/templates.rb +0 -140
- data/vendor/plugins/engines/lib/engines/testing.rb +0 -87
- data/vendor/plugins/engines/tasks/engines.rake +0 -149
- data/vendor/plugins/login_engine/CHANGELOG +0 -22
- data/vendor/plugins/login_engine/README +0 -344
- data/vendor/plugins/login_engine/app/controllers/user_controller.rb +0 -262
- data/vendor/plugins/login_engine/app/helpers/user_helper.rb +0 -88
- data/vendor/plugins/login_engine/app/models/user.rb +0 -7
- data/vendor/plugins/login_engine/app/models/user_notify.rb +0 -75
- data/vendor/plugins/login_engine/app/views/user/_edit.rhtml +0 -11
- data/vendor/plugins/login_engine/app/views/user/_password.rhtml +0 -9
- data/vendor/plugins/login_engine/app/views/user/change_password.rhtml +0 -17
- data/vendor/plugins/login_engine/app/views/user/edit.rhtml +0 -23
- data/vendor/plugins/login_engine/app/views/user/forgot_password.rhtml +0 -18
- data/vendor/plugins/login_engine/app/views/user/home.rhtml +0 -7
- data/vendor/plugins/login_engine/app/views/user/login.rhtml +0 -17
- data/vendor/plugins/login_engine/app/views/user/logout.rhtml +0 -8
- data/vendor/plugins/login_engine/app/views/user/signup.rhtml +0 -17
- data/vendor/plugins/login_engine/db/migrate/001_initial_schema.rb +0 -25
- data/vendor/plugins/login_engine/init_engine.rb +0 -11
- data/vendor/plugins/login_engine/install.rb +0 -4
- data/vendor/plugins/login_engine/lib/login_engine.rb +0 -62
- data/vendor/plugins/login_engine/lib/login_engine/authenticated_system.rb +0 -113
- data/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb +0 -155
- data/vendor/plugins/login_engine/public/stylesheets/login_engine.css +0 -81
- data/vendor/plugins/login_engine/test/fixtures/users.yml +0 -41
- data/vendor/plugins/login_engine/test/functional/user_controller_test.rb +0 -536
- data/vendor/plugins/login_engine/test/mocks/mail.rb +0 -14
- data/vendor/plugins/login_engine/test/mocks/time.rb +0 -19
- data/vendor/plugins/login_engine/test/test_helper.rb +0 -11
- data/vendor/plugins/login_engine/test/unit/user_test.rb +0 -114
- data/vendor/plugins/output_compression/MIT-LICENSE +0 -20
- data/vendor/plugins/output_compression/README +0 -4
- data/vendor/plugins/output_compression/init.rb +0 -1
- data/vendor/plugins/output_compression/lib/output_compression.rb +0 -84
- data/vendor/plugins/output_compression/test/output_test.rb +0 -11
- data/vendor/plugins/output_compression/test/test_controller.rb +0 -3
- data/vendor/plugins/output_compression/test/test_helper.rb +0 -14
@@ -1,241 +0,0 @@
|
|
1
|
-
= 1.2.0 - MASSIVE INTERNAL REFACTORING
|
2
|
-
|
3
|
-
|
4
|
-
* !!!Support for Rails < 1.2 has been dropped!!!; if you are using Rails =< 1.1.6, please use Engines 1.1.6, available from http://svn.rails-engines.org/engines/tags/rel_1.1.6
|
5
|
-
|
6
|
-
* Engines are dead! Long live plugins! There is now no meaningful notion of an engine - all plugins can take advantage of the more powerful features that the engines plugin provides by including app directories, etc.
|
7
|
-
|
8
|
-
* Init_engine.rb is no longer used; please use the plugin-standard init.rb instead.
|
9
|
-
|
10
|
-
* Engines.start is no longer required; please use the config.plugins array provided by Rails instead
|
11
|
-
|
12
|
-
* To get the most benefit from Engines, set config.plugins to ["engines", "*"] to load the engines plugin first, and then all other plugins in their normal order after.
|
13
|
-
|
14
|
-
* Access all loaded plugins via the new Rails.plugins array, and by name using Rails.plugins[:plugin_name].
|
15
|
-
|
16
|
-
* Access plugin metadata loaded automatically from about.yml: Rails.plugins[:name].about. Plugin#version is provided directly, for easy access.
|
17
|
-
|
18
|
-
* Module.config is has been removed - use mattr_accessor instead, and initialize your default values via the init.rb mechanism.
|
19
|
-
|
20
|
-
* Public asset helpers have been rewritten; instead of engine_stylesheet, now use stylesheet_link_tag :name, :plugin => "plugin_name"
|
21
|
-
|
22
|
-
* Plugin migrations have been reworked to integrate into the main migration stream. Please run script/generate plugin_migration to create plugin migrations in your main application.
|
23
|
-
|
24
|
-
* The fixture method for loading fixtures against any class has been removed; instead, engines will now provide a mechanism for loading fixtures from all plugins, by mirroring fixtures into a common location.
|
25
|
-
|
26
|
-
* All references to engines have been removed; For example, any rake tasks which applied to engines now apply to all plugins. The default Rails rake tasks for plugins are overridden where necessary.
|
27
|
-
|
28
|
-
* Layouts can now be shared via plugins - inspiration gratefully taken from PluginAWeek's plugin_routing :)
|
29
|
-
|
30
|
-
* Actual routing from plugins is now possible, by including routes.rb in your plugin directory and using the from_plugin method in config/routes.rb (Ticket #182)
|
31
|
-
|
32
|
-
* Controllers are no longer loaded twice if they're not present in the normal app/ directory (Ticket #177)
|
33
|
-
|
34
|
-
* The preferred location for javascripts/stylesheets/etc is now 'assets' rather than 'public'
|
35
|
-
|
36
|
-
* Ensure that plugins started before routing have their controllers appropriately added to config.controller_paths (Ticket #258)
|
37
|
-
|
38
|
-
* Removed Engines.version - it's not longer relevant, now we're loading version information from about.yml files.
|
39
|
-
|
40
|
-
* Added a huge amount of documentation to all new modules.
|
41
|
-
|
42
|
-
* Added new warning message if installation of engines 1.2.x is attempted in a Rails 1.1.x application
|
43
|
-
|
44
|
-
* Added details of the removal of the config method to UPGRADING
|
45
|
-
|
46
|
-
* Removed the plugins:info rake task in favour of adding information to script/about via the Rails::Info module (Ticket #261)
|
47
|
-
|
48
|
-
* Improved handling of testing and documentation tasks for plugins
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
= 1.1.4
|
53
|
-
|
54
|
-
* Fixed creation of multipart emails (Ticket #190)
|
55
|
-
|
56
|
-
* Added a temporary fix to the code-mixing issue. In your engine's test/test_helper.rb, please add the following lines:
|
57
|
-
|
58
|
-
# Ensure that the code mixing and view loading from the application is disabled
|
59
|
-
Engines.disable_app_views_loading = true
|
60
|
-
Engines.disable_app_code_mixing = true
|
61
|
-
|
62
|
-
which will prevent code mixing for controllers and helpers, and loading views from the application. One thing to remember is to load any controllers/helpers using 'require_or_load' in your tests, to ensure that the engine behaviour is respected (Ticket #135)
|
63
|
-
|
64
|
-
* Added tasks to easily test engines individually (Ticket #120)
|
65
|
-
|
66
|
-
* Fixture extensions will now fail with an exception if the corresponding class cannot be loaded (Ticket #138)
|
67
|
-
|
68
|
-
* Patch for new routing/controller loading in Rails 1.1.6. The routing code is now replaced with the contents of config.controller_paths, along with controller paths from any started engines (Ticket #196)
|
69
|
-
|
70
|
-
* Rails' Configuration instance is now stored, and available from all engines and plugins.
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
= 1.1.3
|
75
|
-
|
76
|
-
* Fixed README to show 'models' rather than 'model' class (Ticket #167)
|
77
|
-
* Fixed dependency loading to work with Rails 1.1.4 (Ticket #180)
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
= 1.1.2
|
82
|
-
|
83
|
-
* Added better fix to version checking (Ticket #130, jdell@gbdev.com).
|
84
|
-
|
85
|
-
* Fixed generated init_engine.rb so that VERSION module doesn't cause probems (Ticket #131, japgolly@gmail.com)
|
86
|
-
|
87
|
-
* Fixed error with Rails 1.0 when trying to ignore the engine_schema_info table (Ticket #132, snowblink@gmail.com)
|
88
|
-
|
89
|
-
* Re-added old style rake tasks (Ticket #133)
|
90
|
-
|
91
|
-
* No longer adding all subdirectories of <engine>/app or <engine>/lib, as this can cause issues when files are grouped in modules (Ticket #149, kasatani@gmail.com)
|
92
|
-
|
93
|
-
* Fixed engine precidence ordering for Rails 1.1 (Ticket #146)
|
94
|
-
|
95
|
-
* Added new Engines.each method to assist in processing the engines in the desired order (Ticket #146)
|
96
|
-
|
97
|
-
* Fixed annoying error message at appears when starting the console in development mode (Ticket #134)
|
98
|
-
|
99
|
-
* Engines is now super-careful about loading the correct version of Rails from vendor (Ticket #154)
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
= 1.1.1
|
104
|
-
|
105
|
-
* Fixed migration rake task failing when given a specific version (Ticket #115)
|
106
|
-
|
107
|
-
* Added new rake task "test:engines" which will test engines (and other plugins) but ensure that the test database is cloned from development beforehand (Ticket #125)
|
108
|
-
|
109
|
-
* Fixed issue where 'engine_schema_info' table was included in schema dumps (Ticket #87)
|
110
|
-
|
111
|
-
* Fixed multi-part emails (Ticket #121)
|
112
|
-
|
113
|
-
* Added an 'install.rb' file to new engines created by the bundled generator, which installs the engines plugin automatically if it doesn't already exist (Ticket #122)
|
114
|
-
|
115
|
-
* Added a default VERSION module to generated engines (Ticket #123)
|
116
|
-
|
117
|
-
* Refactored copying of engine's public files to a method of an Engine instance. You can now call Engines.get(:engine_name).copy_public_files (Ticket #108)
|
118
|
-
|
119
|
-
* Changed engine generator templates from .rb files to .erb files (Ticket #106)
|
120
|
-
|
121
|
-
* Fixed the test_helper.erb file to use the correct testing extensions and not load any schema - the schema will be cloned automatically via rake test:engines
|
122
|
-
|
123
|
-
* Fixed problem when running with Rails 1.1.1 where version wasn't determined correctly (Ticket #129)
|
124
|
-
|
125
|
-
* Fixed bug preventing engines from loading when both Rails 1.1.0 and 1.1.1 gems are installed and in use.
|
126
|
-
|
127
|
-
* Updated version (d'oh!)
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
= 1.1.0
|
132
|
-
|
133
|
-
* Improved regexp matching for Rails 1.0 engines with peculiar paths
|
134
|
-
|
135
|
-
* Engine instance objects can be accessed via Engines[:name], an alias for Engines.get(:name) (Ticket #99)
|
136
|
-
|
137
|
-
* init_engine.rb is now processed as the final step in the Engine.start process, so it can access files within the lib directory, which is now in the $LOAD_PATH at that point. (Ticket #99)
|
138
|
-
|
139
|
-
* Clarified MIT license (Ticket #98)
|
140
|
-
|
141
|
-
* Updated Rake tasks to integrate smoothly with Rails 1.1 namespaces
|
142
|
-
|
143
|
-
* Changed the version to "1.1.0 (svn)"
|
144
|
-
|
145
|
-
* Added more information about using the plugin with Edge Rails to the README
|
146
|
-
|
147
|
-
* moved extensions into lib/engines/ directory to enable use of Engines module in extension code.
|
148
|
-
|
149
|
-
* Added conditional require_or_load method which attempts to detect the current Rails version. To use the Edge Rails version of the loading mechanism, add the line:
|
150
|
-
|
151
|
-
* Engines.config :edge, true
|
152
|
-
|
153
|
-
* to your environment.rb file.
|
154
|
-
|
155
|
-
* Merged changes from /branches/edge and /branches/rb_1.0 into /trunk
|
156
|
-
|
157
|
-
* engine_schema_info now respects the prefix/suffixes set for ActiveRecord::Base (Ticket #67)
|
158
|
-
|
159
|
-
* added ActiveRecord::Base.wrapped_table_name(name) method to assist in determining the correct table name
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
= 1.0.6
|
164
|
-
|
165
|
-
* Added ability to determine version information for engines: rake engine_info
|
166
|
-
|
167
|
-
* Added a custom logger for the Engines module, to stop pollution of the Rails logs.
|
168
|
-
|
169
|
-
* Added some more tests (in particular, see rails_engines/applications/engines_test).
|
170
|
-
|
171
|
-
* Another attempt at solving Ticket #53 - controllers and helpers should now be loadable from modules, and if a full path (including RAILS_ROOT/ENGINES_ROOT) is given, it should be safely stripped from the require filename such that corresponding files can be located in any active engines. In other words, controller/helper overloading should now completely work, even if the controllers/helpers are in modules.
|
172
|
-
|
173
|
-
* Added (finally) patch from Ticket #22 - ActionMailer helpers should now load
|
174
|
-
|
175
|
-
* Removed support for Engines.start :engine, :engine_name => 'whatever'. It was pointless.
|
176
|
-
|
177
|
-
* Fixed engine name referencing; engine_stylesheet/engine_javascript can now happily use shorthand engine names (i.e. :test == :test_engine) (Ticket #45)
|
178
|
-
|
179
|
-
* Fixed minor documentation error ('Engine.start' ==> 'Engines.start') (Ticket #57)
|
180
|
-
|
181
|
-
* Fixed double inclusion of RAILS_ROOT in engine_migrate rake task (Ticket #61)
|
182
|
-
|
183
|
-
* Added ability to force config values even if given as a hash (Ticket #62)
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
= 1.0.5
|
188
|
-
|
189
|
-
* Fixed bug stopping fixtures from loading with PostgreSQL
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
= 1.0.4
|
194
|
-
|
195
|
-
* Another attempt at loading controllers within modules (Ticket #56)
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
= 1.0.3
|
200
|
-
|
201
|
-
* Fixed serious dependency bug stopping controllers being loaded (Ticket #56)
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
= 1.0.2
|
206
|
-
|
207
|
-
* Fixed bug with overloading controllers in modules from /app directory
|
208
|
-
|
209
|
-
* Fixed exception thrown when public files couldn't be created; exception is now logged (Ticket #52)
|
210
|
-
|
211
|
-
* Fixed problem with generated test_helper.rb file via File.expand_path (Ticket #50)
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
= 1.0.1
|
216
|
-
|
217
|
-
* Added engine generator for creation of new engines
|
218
|
-
|
219
|
-
* Fixed 'Engine' typo in README
|
220
|
-
|
221
|
-
* Fixed bug in fixtures extensions
|
222
|
-
|
223
|
-
* Fixed /lib path management bug
|
224
|
-
|
225
|
-
* Added method to determine public directory location from Engine object
|
226
|
-
|
227
|
-
* Fixed bug in the error message in get_engine_dir()
|
228
|
-
|
229
|
-
* Added proper component loading
|
230
|
-
|
231
|
-
* Added preliminary tests for the config() methods module
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
= pre-v170
|
236
|
-
|
237
|
-
* Fixed copyright notices to point to DHH, rather than me.
|
238
|
-
|
239
|
-
* Moved extension require statements into lib/engines.rb, so the will be loaded if another module/file calls require 'engines
|
240
|
-
|
241
|
-
* Added a CHANGELOG file (this file)
|
@@ -1,21 +0,0 @@
|
|
1
|
-
Copyright (c) 2007 James Adam
|
2
|
-
|
3
|
-
The MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
@@ -1,64 +0,0 @@
|
|
1
|
-
The engines plugin enhances Rails' own plugin framework, making it simple to share controllers, helpers, models, public assets, routes and migrations in plugins.
|
2
|
-
|
3
|
-
For more information, see http://rails-engines.org
|
4
|
-
|
5
|
-
= Using the plugin
|
6
|
-
|
7
|
-
With engines 1.2, no extra configuration in environment.rb is required. Having the plugin installed will automatically enable sharing of code within <tt>plugin/app/</tt> directories. Developers should be aware that the <tt>config.plugins</tt> parameter can be used to control plugin load order, if this is important for your application.
|
8
|
-
|
9
|
-
=== config.plugins
|
10
|
-
|
11
|
-
With Rails 1.2, the <tt>config.plugins</tt> list can be used to specify the order in which plugins are loaded. It's recommended (although not required) that you load the engines plugin first, and any other plugins later. The engines plugin enhances Rails' processing of <tt>config.plugins</tt> for occasions where you only care about the order of a small selection of your application's plugins. For instance, if you want to load +engines+ first, and anything else afterwards, then
|
12
|
-
|
13
|
-
config.plugins = ["engines", "*"]
|
14
|
-
|
15
|
-
will ensure that engines is loaded first, and everything else (in whatever order Rails chooses) afterwards.
|
16
|
-
|
17
|
-
== Better plugins
|
18
|
-
|
19
|
-
In addition to the regular set of plugin-supported files (lib, init.rb, tasks, generators, tests), plugins can carry the following when the engines plugin is also installed.
|
20
|
-
|
21
|
-
|
22
|
-
=== Controllers, Helpers, and Views
|
23
|
-
|
24
|
-
Include these files in an <tt>app</tt> directory just like you would in a normal Rails application. If you need to override a method, view or partial, create the corresponding file in your main <tt>app</tt> directory and it will be used instead.
|
25
|
-
|
26
|
-
* Controllers & Helpers: See Engines::RailsExtensions::Dependencies for more information.
|
27
|
-
* Views: See Engines::RailsExtensions::Templates for more information.
|
28
|
-
|
29
|
-
=== Models
|
30
|
-
|
31
|
-
Model code can similarly be placed in an <tt>app/models/</tt> directory. Unfortunately, it's not possible to automatically override methods within a model; if your application needs to change the way a model behaves, consider creating a subclass, or replacing the model entirely within your application's <tt>app/models/</tt> directory. See Engines::RailsExtensions::Dependencies for more information.
|
32
|
-
|
33
|
-
IMPORTANT NOTE: when you load code from within plugins, it is typically not handled well by Rails in terms of unloading and reloading changes. Look here for more information - http://rails-engines.org/development/common-issues-when-overloading-code-from-plugins/
|
34
|
-
|
35
|
-
=== Routes
|
36
|
-
|
37
|
-
Include your route declarations in a <tt>routes.rb</tt> file at the root of your plugins, e.g.:
|
38
|
-
|
39
|
-
connect "/my/url", :controller => "some_controller"
|
40
|
-
my_named_route "do_stuff", :controller => "blah", :action => "stuff"
|
41
|
-
# etc.
|
42
|
-
|
43
|
-
You can then load these files into your application by declaring their inclusion in the application's <tt>config/routes.rb</tt>:
|
44
|
-
|
45
|
-
map.from_plugin :plugin_name
|
46
|
-
|
47
|
-
See Engines::RailsExtensions::Routing for more information.
|
48
|
-
|
49
|
-
=== Migrations
|
50
|
-
|
51
|
-
Migrations record the changes in your database as your application evolves. With engines 1.2, migrations from plugins can also join in this evolution as first-class entities. To add migrations to a plugin, include a <tt>db/migrate/</tt> folder and add migrations there as normal. These migrations can then be integrated into the main flow of database evolution by running the plugin_migration generator:
|
52
|
-
|
53
|
-
script/generate plugin_migration
|
54
|
-
|
55
|
-
This will produce a migration in your application. Running this migration (via <tt>rake db:migrate</tt>, as normal) will migrate the database according to the latest migrations in each plugin. See Engines::RailsExtensions::Migrations for more information.
|
56
|
-
|
57
|
-
|
58
|
-
=== More powerful Rake tasks
|
59
|
-
|
60
|
-
The engines plugin enhances and adds to the suite of default rake tasks for working with plugins. The <tt>doc:plugins</tt> task now includes controllers, helpers and models under <tt>app</tt>, and anything other code found under the plugin's <tt>code_paths</tt> attribute. New testing tasks have been added to run unit, functional and integration tests from plugins, whilst making it easier to load fixtures from plugins. See Engines::Testing for more details about testing, and run
|
61
|
-
|
62
|
-
rake -T
|
63
|
-
|
64
|
-
to see the set of rake tasks available.
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rake/rdoctask'
|
3
|
-
require 'tmpdir'
|
4
|
-
|
5
|
-
task :default => :doc
|
6
|
-
|
7
|
-
desc 'Generate documentation for the engines plugin.'
|
8
|
-
Rake::RDocTask.new(:doc) do |doc|
|
9
|
-
doc.rdoc_dir = 'doc'
|
10
|
-
doc.title = 'Engines'
|
11
|
-
doc.main = "README"
|
12
|
-
doc.rdoc_files.include("README", "UPGRADING", "CHANGELOG", "MIT-LICENSE")
|
13
|
-
doc.rdoc_files.include('lib/**/*.rb')
|
14
|
-
doc.options << '--line-numbers' << '--inline-source'
|
15
|
-
end
|
16
|
-
|
17
|
-
desc 'Run the engine plugin tests within their test harness'
|
18
|
-
task :cruise do
|
19
|
-
# checkout the project into a temporary directory
|
20
|
-
version = "rails_1.2"
|
21
|
-
test_dir = "#{Dir.tmpdir}/engines_plugin_#{version}_test"
|
22
|
-
puts "Checking out test harness for #{version} into #{test_dir}"
|
23
|
-
`svn co http://svn.rails-engines.org/test/engines/#{version} #{test_dir}`
|
24
|
-
|
25
|
-
# run all the tests in this project
|
26
|
-
Dir.chdir(test_dir)
|
27
|
-
load 'Rakefile'
|
28
|
-
puts "Running all tests in test harness"
|
29
|
-
['db:migrate', 'test', 'test:plugins'].each do |t|
|
30
|
-
Rake::Task[t].invoke
|
31
|
-
end
|
32
|
-
end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
= Upgrading from Engines 1.1.x to Engines 1.2.x
|
2
|
-
|
3
|
-
|
4
|
-
The 1.2 release of the engines plugin represents a significant rewrite of the internals. Now less intrusive into the core frameworks, it's even simpler for plugin developers to make more flexible plugins than Rails typically allows.
|
5
|
-
|
6
|
-
However, as a consequence of change, you may need to make some adjustments to your application to get the most benefit. These are outlined below:
|
7
|
-
|
8
|
-
|
9
|
-
== In your application
|
10
|
-
|
11
|
-
The following changes will affect code in applications which use the engines plugin
|
12
|
-
|
13
|
-
=== Change the engine_schema table to plugin_schema
|
14
|
-
|
15
|
-
Because the engines plugin now works universally for any Rails plugin, the table used to store migration information has been renamed appropriately. We can also play nicely with other plugin_migration implementations by supporting this convention.
|
16
|
-
|
17
|
-
|
18
|
-
=== Rename RAILS_ROOT/public/engine_files to RAILS_ROOT/public/plugin_assets
|
19
|
-
|
20
|
-
Similarly, any plugin can now share stylesheets, images and so on via an assets folder, so the destination within the main public directory has been renamed to reflect this. You can simply delete the RAILS_ROOT/public/engine_files directory; the new one will be generated the next time your application starts.
|
21
|
-
|
22
|
-
|
23
|
-
=== The engine_image, engine_stylesheet and engine_javascript helpers have been replaced with enhanced versions of the normal Rails asset helpers
|
24
|
-
|
25
|
-
Now, it's simple to include an image from any plugin, by adding a plugin key to the helper's options hash:
|
26
|
-
|
27
|
-
image_tag "image.png", :plugin => "my_plugin"
|
28
|
-
|
29
|
-
A similar convention exists for stylesheets and javascript files. Additionally, the old behaviour of automatically including assets which match the "engine"'s name has been dropped - only the files you explicitly request are included.
|
30
|
-
|
31
|
-
|
32
|
-
=== Engines.start is replaced with config.plugins
|
33
|
-
|
34
|
-
Rails' native configuration object now includes an array for specifying which plugins are loaded, and in what order. The engines plugin enhances this feature with a "*" wildcard, so that you can load any order-sensitive plugins, and then the rest in any order.
|
35
|
-
|
36
|
-
config.plugins = ["engines", "some_plugin", "another_plugin", "*"]
|
37
|
-
|
38
|
-
It's worth noting that the engines plugin no longer needs to be specifically loaded first, so most people can happily ignore the config.plugins array without any problems.
|
39
|
-
|
40
|
-
|
41
|
-
=== The "config" method for "engine"-style configuration is no longer loaded by default.
|
42
|
-
|
43
|
-
See below.
|
44
|
-
|
45
|
-
|
46
|
-
=== Any "engines" type rake tasks are now "plugin" tasks.
|
47
|
-
|
48
|
-
The following rake tasks are now provided by the engines plugin for operating on your application's plugins (whenever a task can operate on a single plugin, this can be controlled by specifying PLUGIN=<name> on the commandline):
|
49
|
-
|
50
|
-
db:fixtures:plugins:load # load fixtures from plugins.
|
51
|
-
|
52
|
-
test:plugins:units # Run tests from within <plugins>/test/units
|
53
|
-
test:plugins:functional # Run tests from within <plugins>/test/functional
|
54
|
-
test:plugins:integration # Run tests from within <plugins>/test/integration
|
55
|
-
test:plugins # Run all tests from within <plugins>/test/*
|
56
|
-
|
57
|
-
doc:plugins # Run full rdoc against all source files within all plugins
|
58
|
-
doc:plugins:<plugin> # Run full rdoc against all source files within the given plugin
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
== In your "engine"-style plugins
|
63
|
-
|
64
|
-
If you have developed or are using plugins that leverage engines enhancements, you need to be aware of the following changes in engines 1.2.
|
65
|
-
|
66
|
-
=== init_engine.rb is no longer required
|
67
|
-
|
68
|
-
Please now create init.rb files, just as you'd find in "normal" plugins. Remember - there's no such thing as "an engine" anymore.
|
69
|
-
|
70
|
-
|
71
|
-
=== The "fixture" method for loading tests from arbitrary files
|
72
|
-
|
73
|
-
Supporting this was just too difficult, and it seems like the combination of Rails' own lack of enhancements regarding this feature, along with the mind-shift against static fixtures, meant that it simply was too much work to continue to support.
|
74
|
-
|
75
|
-
The only reason this mechanism originally existed was to support plugins which couldn't predict the names of the tables that models might be stored in. This is now a discouraged behaviour.
|
76
|
-
|
77
|
-
|
78
|
-
=== Engines.current.version has changed its behaviour slightly.
|
79
|
-
|
80
|
-
The engines plugin used to provide a simple way to store version information about plugins. This has now been superceded by including that information in an about.yml file, which any plugin can use.
|
81
|
-
|
82
|
-
|
83
|
-
=== The "config" method is not included, by default.
|
84
|
-
|
85
|
-
Where previously developers could use the "config" method to define configuration, this is now deprecated in favour of using mattr_accessor directly in the Module. However, if you still *need* to use the config method, it is included but must be explicitly required, probably near the top of environment.rb:
|
86
|
-
|
87
|
-
require File.join(RAILS_ROOT, "vendor", "plugins", "engines",
|
88
|
-
"lib", "engines", "deprecated_config_support")
|
89
|
-
|
90
|
-
|
91
|
-
=== Public assets should now be stored in a subdirectory of your plugin called "assets", rather than "public".
|
92
|
-
|
93
|
-
This clarifies the nature of this directory; it is not made public itself, but rather is a container for files which should be made accessible from the web.
|