Commit Graph

37 Commits

Author SHA1 Message Date
Jean-Philippe Lang 1be15816dd Adds test helpers for test repositories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3720 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-05-01 08:32:21 +00:00
Jean-Philippe Lang 533590c29c Fixed: Double-dash results in strikethrough text (#5122).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3605 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-20 12:54:23 +00:00
Jean-Philippe Lang c312b8b058 More detailed failures message.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3570 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-12 15:22:05 +00:00
Jean-Philippe Lang 4d19007fd1 Fixes a test failure.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3569 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-12 15:19:49 +00:00
Jean-Philippe Lang 7adf05810a Refactors textile formatting tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3568 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-12 15:17:53 +00:00
Jean-Philippe Lang 054ff0db8e Fixed: inline code with less-then/greater-than produces @lt; and @gt; (#1416).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3567 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-12 15:12:23 +00:00
Jean-Philippe Lang 24b4c5f48d Fixed: text formatting breaks when using parenthesis inside bold tags (#1334).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3563 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-12 13:43:11 +00:00
Jean-Philippe Lang 4e5078ebb0 Fixed: some textile modifiers combinations don't work, eg. bold inside underline (#5045).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3561 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-11 19:55:31 +00:00
Jean-Philippe Lang fe066e793d Moves scm adapters unit tests to a dedicated folder.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3551 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-06 20:35:38 +00:00
Eric Davis 28e9bc5d82 Fix an IndexError if all the :last menu items are deleted from a menu. #4718
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3447 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-18 05:01:39 +00:00
Jean-Philippe Lang 0fcc436f22 Fixed: Deselecting textile text formatting causes interning empty string errors (#4867).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3446 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-17 20:47:50 +00:00
Eric Davis 87e83c7285 Fixed the view_hook_helper test, it was reading all of the log files into
memory and would throw a NoMemoryError (2GB+ used).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3211 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-12-21 02:24:56 +00:00
Jean-Philippe Lang b5b6a5e971 Speeds up very slow tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3197 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-12-19 20:06:32 +00:00
Eric Davis 39b44b1cb9 Adds a Plugin API to allow one plugin to depend on another.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3175 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-12-16 02:07:46 +00:00
Eric Davis b75e038255 Updated menus from JPL's feedback.
* Updated Mapper#push documentation
* Renamed :parent_menu to :parent
* Renamed the external API for :child_menus to :children.  Internally it needs
  to stay :child_menus because Tree::TreeNode already defines a children
  method for another purpose

  #4250

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3092 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-25 05:36:56 +00:00
Eric Davis b0999e3764 Add support for unattached menus (generated dynamically)
A MenuItem can define a :child_menus option with a Proc.  When the menus
are rendered, the Proc will be run and the resulting MenuItems will be
added to the page as child menus

  #4250

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3091 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-25 05:36:50 +00:00
Eric Davis 1f06cf8899 Converted Menus to a Tree structure to allow submenus.
* Bundle the rubytree gem
* Patched RubyTree's TreeNode to add some additional methods.
* Converted the menu rendering to walk the Tree of MenuItems to render
  each item
* Added a menu option for :parent_menu to make this menu a child of the parent
* Added a bunch of tests
* Made MenuItem a subclass of Tree::TreeNode in order to use it's methods
  directly
* Changed the exceptions in MenuItem#new to be ArgumentErrors instead of the
  generic RuntimeError

  #4250

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3090 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-25 05:36:44 +00:00
Jean-Philippe Lang 9b0acce9c9 Fixed: error raised when rendering text that contains an email address with textile disabled (#4268).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3088 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-24 22:02:14 +00:00
Jean-Philippe Lang d82738ad00 Add test for i18n number_to_human_size (#4208).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3034 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-12 22:00:29 +00:00
Jean-Philippe Lang 4b83a0d848 Fixes diff parser for when lines starting with multiple dashes are removed (#4186).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3028 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-11 13:25:53 +00:00
Eric Davis 7b0cb6aba8 Upgraded to Rails 2.3.4 (#3597)
* Ran the Rails upgrade
* Upgraded to Rails Engines 2.3.2
* Added a plugin to let Engines override application views.
* Converted tests to use the new classes:
** ActionController::TestCase for functional
** ActiveSupport::TestCase for units
* Converted ActiveRecord::Error message to a string.
* ActiveRecord grouping returns an ordered hash which doesn't have #sort!
* Updated the I18n storage_units format.
* Added some default initializers from a fresh rails app
* Changed the order of check_box_tags and hidden_field_tags.  The hidden tag
  needs to appear first in Rails 2.3, otherwise it will override any value in
  the check_box_tag.
* Removed the custom handler for when the cookie store is tampered with.
  Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not
  load the data from it when it's been tampered with (e.g. no user login).
* Fixed mail layouts, 2.3 has problems with implicit multipart emails that
  use layouts.  Also removed some custom Redmine mailer code.
* Fixed a bug that occurred in tests where the "required" span tag would be
  added to the :field_status translation.  This resulted in an email string of:

    <li>Status<span class="required"> *</span><span class="required"> *</span>

  Instead of:

    <li>Status: New</li>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-09-13 17:14:35 +00:00
Jean-Philippe Lang 43200e2122 Adds mime type specific css classes to the SCM browser.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2672 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-04-19 08:25:25 +00:00
Jean-Philippe Lang 94cc23f103 Adds missing time format in locales (#2831).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2523 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-02-25 09:41:58 +00:00
Eric Davis 4baf32b166 Fixing Plugin and Mailer default_url_options.
Both the plugin hooks and Mailer were setting default_url_options incorrectly
and causing ActionContoller::UrlWritter to cache the settings on the module
(mattr_accessor) causing several url generators to fail in either the plugin
hooks or the Mailer.

* Replaced Mailer's use of the default_url_options accessor with the proper class method
* Replaced Hook's use of the default_url_options accessor with the proper class method on the ViewListener class
* Added a test to reproduce the bugs in the Mailer when a hook is registered (thanks Chaoqun Zou)

  #2542

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2522 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-02-25 07:25:01 +00:00
Jean-Philippe Lang fe28193e4e Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2493 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-02-21 11:04:50 +00:00
Eric Davis 9a986ac0a5 Refactored the mess known as Hook default_url_options in favor of the simpler
:only_path as suggested by splatteal on GitHub.

  #2542

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2491 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-02-21 00:23:28 +00:00
Eric Davis 00b568c194 Implementing the missing tests now that HookTest has a cleaner setup.
Controller and Views are now tested through the Redmine::Hook::Helper module.

  #2542

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2490 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-02-21 00:23:22 +00:00
Eric Davis b6c4b21b47 Refactored the HookTest methods to use Redmine::Hook::Helper instead
of the Redmine::Hook class directly.  Redmine::Hook::Helper is the
public API so it should be one that is tested.

  #2542

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2489 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-02-21 00:23:16 +00:00
Eric Davis 5b7a5c39a7 Added request and controller objects to the hooks by default.
The request and controller objects are now added to all hook contexts by
default.  This will also make url_for work better in hooks by setting up
the default_url_options :host, :port, and :protocol.

Finally a new helper method @render_or@ has been added to ViewListener.  This
will let a hook easily render a partial without a full method definition.

Thanks to Thomas Löber for the original patch.  #2542

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2429 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-02-10 03:12:40 +00:00
Eric Davis 765f7abc60 Converted routing and urls to follow the Rails REST convention.
Patch supplied by commits from Gerrit Kaiser on Github.  Existing routes will
still work (backwards compatible) but any new urls will be generated using the
new routing rules.

Changes listed below:

* made the URLs for some project tabs and project settings follow the new rails RESTful conventions of /collection/:id/subcollection/:sub_id
* prettier URL for project roadmap
* more nice project URLs
* use GET for filtering form
* prettified URLs used on issues tab
* custom route for activity atom feeds
* prettier repository urls
* fixed broken route definition
* fixed failing tests for issuecontroller that were hardcoding the url string
* more RESTful routes for boards and messages
* RESTful routes for wiki pages
* RESTful routes for documents
* moved old routes that are retained for compatibility to the bottom and grouped them together
* added RESTful URIs for issues
* RESTfulness for the news section
* fixed route order
* changed hardcoded URLs in tests
* fixed badly written tests
* fixed forgotten parameter in routes
* changed hardcoded URLS to new scheme
* changed project add url to the standard POST to collection
* create new issue by POSTing to collection
* changed hardcoded URLs in integrations tests
* made project add form work again
* restful routes for project deletion
* prettier routes for project (un)archival
* made routes table more readable
* fixed note quoting
* user routing
* fixed bug
* always sort by GET
* Fixed: cross-project issue list should not show issues of projects for which the issue tracking module was disabled.
* prettified URLs used on issues tab
* urls for time log
* fixed reply routing
* eliminate revision query paremeter for diff and entry actions
* fixed test failures with hard-coded urls
* ensure ajax links always use get
* refactored ajax link generation into separate method

  #1901


git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2317 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-01-26 01:47:51 +00:00
Jean-Philippe Lang fec86a9ce1 Adds a setting to limit the number of diff lines that should be displayed (default to 1500).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2112 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-12-07 15:21:40 +00:00
Jean-Philippe Lang 06266c8fec Extends child_pages macro to display child pages based on page parameter (#1975).
It can also be called from anywhere now (not only from wiki pages).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2053 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-11-22 11:44:07 +00:00
Jean-Philippe Lang 9882217847 Adds Plugin#requires_redmine method so that plugin compatibility can be checked against current Redmine version (#2162).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2042 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-11-16 20:00:20 +00:00
Jean-Philippe Lang 5362a85f2b Adds url and author_url plugin attributes (#2162).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2041 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-11-16 17:12:02 +00:00
Jean-Philippe Lang f9ce4ff559 Adds a few Plugin tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2040 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-11-16 16:08:25 +00:00
Jean-Philippe Lang 394fc9c109 Fixed: cross-project issue list should not show issues of projects for which the issue tracking module was disabled.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1907 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-09-25 18:51:03 +00:00
Jean-Philippe Lang f7acdd1afd Merged hooks branch @ r1785 into trunk.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1786 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-09-05 10:31:06 +00:00