From 16fdf5fe66d2c8d52f2aa4977c84389d6ca5c631 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 16 Jan 2011 14:40:38 +0000 Subject: [PATCH 01/48] Fixed: "Notifiy for only project I select" is randomly displayed (#7294). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4727 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/user.rb | 2 +- test/unit/user_test.rb | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 7d0014c8..5fb5de89 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -265,7 +265,7 @@ class User < Principal # Note that @user.membership.size would fail since AR ignores # :include association option when doing a count if memberships.length < 1 - MAIL_NOTIFICATION_OPTIONS.delete_if {|option| option.first == 'selected'} + MAIL_NOTIFICATION_OPTIONS.reject {|option| option.first == 'selected'} else MAIL_NOTIFICATION_OPTIONS end diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 5f1e41a6..75836685 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -1,5 +1,5 @@ -# redMine - project management software -# Copyright (C) 2006 Jean-Philippe Lang +# Redmine - project management software +# Copyright (C) 2006-2011 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -303,6 +303,13 @@ class UserTest < ActiveSupport::TestCase assert_nil @dlopper.roles_for_project(Project.find(2)).detect {|role| role.member?} end + def test_valid_notification_options + # without memberships + assert_equal 5, User.find(7).valid_notification_options.size + # with memberships + assert_equal 6, User.find(2).valid_notification_options.size + end + def test_mail_notification_all @jsmith.mail_notification = 'all' @jsmith.notified_project_ids = [] From 8933482c37aa971af92ad6757f6af75c48db5ead Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 16 Jan 2011 15:36:42 +0000 Subject: [PATCH 02/48] Do not show "for only project I select" notification option on application settings form (#7294). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4730 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/user.rb | 8 ++++++-- app/views/settings/_notifications.rhtml | 2 +- test/unit/user_test.rb | 6 ++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 5fb5de89..5187df96 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -260,11 +260,15 @@ class User < Principal notified_projects_ids end - # Only users that belong to more than 1 project can select projects for which they are notified def valid_notification_options + self.class.valid_notification_options(self) + end + + # Only users that belong to more than 1 project can select projects for which they are notified + def self.valid_notification_options(user=nil) # Note that @user.membership.size would fail since AR ignores # :include association option when doing a count - if memberships.length < 1 + if user.nil? || user.memberships.length < 1 MAIL_NOTIFICATION_OPTIONS.reject {|option| option.first == 'selected'} else MAIL_NOTIFICATION_OPTIONS diff --git a/app/views/settings/_notifications.rhtml b/app/views/settings/_notifications.rhtml index 4cc81c93..26c11ad9 100644 --- a/app/views/settings/_notifications.rhtml +++ b/app/views/settings/_notifications.rhtml @@ -8,7 +8,7 @@

<%= setting_check_box :plain_text_mail %>

-

<%= setting_select(:default_notification_option, User::MAIL_NOTIFICATION_OPTIONS.collect {|o| [l(o.last), o.first.to_s]}) %>

+

<%= setting_select(:default_notification_option, User.valid_notification_options.collect {|o| [l(o.last), o.first.to_s]}) %>

diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 75836685..22f48ae5 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -310,6 +310,12 @@ class UserTest < ActiveSupport::TestCase assert_equal 6, User.find(2).valid_notification_options.size end + def test_valid_notification_options_class_method + assert_equal 5, User.valid_notification_options.size + assert_equal 5, User.valid_notification_options(User.find(7)).size + assert_equal 6, User.valid_notification_options(User.find(2)).size + end + def test_mail_notification_all @jsmith.mail_notification = 'all' @jsmith.notified_project_ids = [] From a489c662192204cff14b3fc89d9421a19c887eeb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 16 Jan 2011 16:36:58 +0000 Subject: [PATCH 03/48] Load csshover.htc for IE6 only as later versions support hover on non-link elements. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4731 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/layouts/base.rhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 9a80f24b..b59f1e28 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -11,7 +11,7 @@ <%= javascript_include_tag :defaults %> <%= heads_for_theme %> <%= heads_for_wiki_formatter %> - Message #{message_id} processed and deleted from the server" + logger.debug "--> Message #{message_id} processed and deleted from the server" if logger && logger.debug? else if delete_unprocessed msg.delete - puts "--> Message #{message_id} NOT processed and deleted from the server" + logger.debug "--> Message #{message_id} NOT processed and deleted from the server" if logger && logger.debug? else - puts "--> Message #{message_id} NOT processed and left on the server" + logger.debug "--> Message #{message_id} NOT processed and left on the server" if logger && logger.debug? end end end end end end + + private + + def logger + RAILS_DEFAULT_LOGGER + end end end end From e5c8513ddaa2c49df6ecd9dc7a9c8aa7e92418a9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 22 Jan 2011 12:35:05 +0000 Subject: [PATCH 09/48] Fixes french translation of "Connection" (#7348). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4738 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 1c4af7ff..b795344c 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -166,7 +166,7 @@ fr: notice_successful_create: Création effectuée avec succès. notice_successful_update: Mise à jour effectuée avec succès. notice_successful_delete: Suppression effectuée avec succès. - notice_successful_connection: Connection réussie. + notice_successful_connection: Connexion réussie. notice_file_not_found: "La page à laquelle vous souhaitez accéder n'existe pas ou a été supprimée." notice_locking_conflict: Les données ont été mises à jour par un autre utilisateur. Mise à jour impossible. notice_not_authorized: "Vous n'êtes pas autorisés à accéder à cette page." From b80b789cc640023ef45757a5c40ca19a08070915 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 22 Jan 2011 13:18:01 +0000 Subject: [PATCH 10/48] Coderay upgraded to 0.9.7 (#5344). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4739 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/environment.rb | 1 + vendor/gems/coderay-0.9.7/.specification | 155 ++ vendor/gems/coderay-0.9.7/FOLDERS | 53 + .../coderay-0.9.7}/LICENSE | 0 vendor/gems/coderay-0.9.7/Rakefile | 35 + vendor/gems/coderay-0.9.7/bin/coderay | 86 + .../gems/coderay-0.9.7/bin/coderay_stylesheet | 4 + .../coderay-0.9.7}/lib/README | 3 +- .../coderay-0.9.7}/lib/coderay.rb | 2 +- .../coderay-0.9.7}/lib/coderay/duo.rb | 0 .../coderay-0.9.7}/lib/coderay/encoder.rb | 0 .../lib/coderay/encoders/_map.rb | 0 .../lib/coderay/encoders/comment_filter.rb | 0 .../lib/coderay/encoders/count.rb | 0 .../lib/coderay/encoders/debug.rb | 0 .../lib/coderay/encoders/div.rb | 0 .../lib/coderay/encoders/filter.rb | 0 .../lib/coderay/encoders/html.rb | 10 +- .../lib/coderay/encoders/html/css.rb | 0 .../lib/coderay/encoders/html/numerization.rb | 4 +- .../lib/coderay/encoders/html/output.rb | 0 .../lib/coderay/encoders/json.rb | 0 .../lib/coderay/encoders/lines_of_code.rb | 0 .../lib/coderay/encoders/null.rb | 0 .../lib/coderay/encoders/page.rb | 0 .../lib/coderay/encoders/span.rb | 0 .../lib/coderay/encoders/statistic.rb | 0 .../lib/coderay/encoders/term.rb | 0 .../lib/coderay/encoders/text.rb | 0 .../coderay/encoders/token_class_filter.rb | 0 .../lib/coderay/encoders/xml.rb | 0 .../lib/coderay/encoders/yaml.rb | 0 .../lib/coderay/for_redcloth.rb | 0 .../lib/coderay/helpers/file_type.rb | 0 .../lib/coderay/helpers/gzip_simple.rb | 0 .../lib/coderay/helpers/plugin.rb | 0 .../lib/coderay/helpers/word_list.rb | 0 .../coderay-0.9.7}/lib/coderay/scanner.rb | 26 +- .../lib/coderay/scanners/_map.rb | 0 .../coderay-0.9.7}/lib/coderay/scanners/c.rb | 0 .../lib/coderay/scanners/cpp.rb | 0 .../lib/coderay/scanners/css.rb | 5 +- .../lib/coderay/scanners/debug.rb | 0 .../lib/coderay/scanners/delphi.rb | 0 .../lib/coderay/scanners/diff.rb | 17 +- .../lib/coderay/scanners/groovy.rb | 0 .../lib/coderay/scanners/html.rb | 2 +- .../lib/coderay/scanners/java.rb | 2 +- .../coderay/scanners/java/builtin_types.rb | 0 .../lib/coderay/scanners/java_script-0.9.6.rb | 224 ++ .../lib/coderay/scanners/java_script.rb | 6 +- .../lib/coderay/scanners/json.rb | 8 +- .../lib/coderay/scanners/nitro_xhtml.rb | 0 .../lib/coderay/scanners/php.rb | 6 + .../lib/coderay/scanners/plaintext.rb | 0 .../lib/coderay/scanners/python.rb | 0 .../lib/coderay/scanners/rhtml.rb | 8 +- .../lib/coderay/scanners/ruby.rb | 73 +- .../lib/coderay/scanners/ruby/patterns.rb | 22 +- .../lib/coderay/scanners/scheme.rb | 0 .../lib/coderay/scanners/sql.rb | 2 +- .../lib/coderay/scanners/xml.rb | 0 .../lib/coderay/scanners/yaml.rb | 0 .../coderay-0.9.7}/lib/coderay/style.rb | 0 .../coderay-0.9.7}/lib/coderay/styles/_map.rb | 0 .../lib/coderay/styles/cycnus.rb | 1 + .../lib/coderay/styles/murphy.rb | 2 + .../lib/coderay/token_classes.rb | 0 .../coderay-0.9.7}/lib/coderay/tokens.rb | 32 +- .../coderay-0.9.7/test/functional/basic.rb | 122 + .../coderay-0.9.7/test/functional/basic.rbc | 2022 ++++++++++++++ .../test/functional/for_redcloth.rb | 77 + .../test/functional/for_redcloth.rbc | 1708 ++++++++++++ .../test/functional/load_plugin_scanner.rb | 11 + .../test/functional/load_plugin_scanner.rbc | 317 +++ .../coderay-0.9.7/test/functional/suite.rb | 12 + .../coderay-0.9.7/test/functional/suite.rbc | 322 +++ .../coderay-0.9.7/test/functional/vhdl.rb | 126 + .../coderay-0.9.7/test/functional/vhdl.rbc | 2334 +++++++++++++++++ .../test/functional/word_list.rb | 79 + .../test/functional/word_list.rbc | 1763 +++++++++++++ 81 files changed, 9602 insertions(+), 80 deletions(-) create mode 100644 vendor/gems/coderay-0.9.7/.specification create mode 100644 vendor/gems/coderay-0.9.7/FOLDERS rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/LICENSE (100%) create mode 100644 vendor/gems/coderay-0.9.7/Rakefile create mode 100644 vendor/gems/coderay-0.9.7/bin/coderay create mode 100644 vendor/gems/coderay-0.9.7/bin/coderay_stylesheet rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/README (98%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay.rb (99%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/duo.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoder.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/_map.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/comment_filter.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/count.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/debug.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/div.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/filter.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/html.rb (97%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/html/css.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/html/numerization.rb (98%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/html/output.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/json.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/lines_of_code.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/null.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/page.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/span.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/statistic.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/term.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/text.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/token_class_filter.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/xml.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/encoders/yaml.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/for_redcloth.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/helpers/file_type.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/helpers/gzip_simple.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/helpers/plugin.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/helpers/word_list.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanner.rb (90%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/_map.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/c.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/cpp.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/css.rb (97%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/debug.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/delphi.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/diff.rb (85%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/groovy.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/html.rb (99%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/java.rb (99%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/java/builtin_types.rb (100%) create mode 100644 vendor/gems/coderay-0.9.7/lib/coderay/scanners/java_script-0.9.6.rb rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/java_script.rb (97%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/json.rb (92%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/nitro_xhtml.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/php.rb (98%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/plaintext.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/python.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/rhtml.rb (88%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/ruby.rb (81%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/ruby/patterns.rb (90%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/scheme.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/sql.rb (99%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/xml.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/scanners/yaml.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/style.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/styles/_map.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/styles/cycnus.rb (98%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/styles/murphy.rb (96%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/token_classes.rb (100%) rename vendor/{plugins/coderay-0.9.2 => gems/coderay-0.9.7}/lib/coderay/tokens.rb (92%) create mode 100644 vendor/gems/coderay-0.9.7/test/functional/basic.rb create mode 100644 vendor/gems/coderay-0.9.7/test/functional/basic.rbc create mode 100644 vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rb create mode 100644 vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rbc create mode 100644 vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rb create mode 100644 vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rbc create mode 100644 vendor/gems/coderay-0.9.7/test/functional/suite.rb create mode 100644 vendor/gems/coderay-0.9.7/test/functional/suite.rbc create mode 100644 vendor/gems/coderay-0.9.7/test/functional/vhdl.rb create mode 100644 vendor/gems/coderay-0.9.7/test/functional/vhdl.rbc create mode 100644 vendor/gems/coderay-0.9.7/test/functional/word_list.rb create mode 100644 vendor/gems/coderay-0.9.7/test/functional/word_list.rbc diff --git a/config/environment.rb b/config/environment.rb index f89695f4..6ca13d38 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -51,6 +51,7 @@ Rails::Initializer.run do |config| config.action_mailer.perform_deliveries = false config.gem 'rubytree', :lib => 'tree' + config.gem 'coderay', :version => '~>0.9.7' # Load any local configuration that is kept out of source control # (e.g. gems, patches). diff --git a/vendor/gems/coderay-0.9.7/.specification b/vendor/gems/coderay-0.9.7/.specification new file mode 100644 index 00000000..03cf3ec2 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/.specification @@ -0,0 +1,155 @@ +--- !ruby/object:Gem::Specification +name: coderay +version: !ruby/object:Gem::Version + hash: 53 + prerelease: false + segments: + - 0 + - 9 + - 7 + version: 0.9.7 +platform: ruby +authors: +- murphy +autorequire: +bindir: bin +cert_chain: [] + +date: 2011-01-15 00:00:00 +01:00 +default_executable: +dependencies: [] + +description: | + Fast and easy syntax highlighting for selected languages, written in Ruby. + Comes with RedCloth integration and LOC counter. + +email: murphy@rubychan.de +executables: +- coderay +- coderay_stylesheet +extensions: [] + +extra_rdoc_files: +- lib/README +- FOLDERS +files: +- ./lib/coderay/duo.rb +- ./lib/coderay/encoder.rb +- ./lib/coderay/encoders/_map.rb +- ./lib/coderay/encoders/comment_filter.rb +- ./lib/coderay/encoders/count.rb +- ./lib/coderay/encoders/debug.rb +- ./lib/coderay/encoders/div.rb +- ./lib/coderay/encoders/filter.rb +- ./lib/coderay/encoders/html/css.rb +- ./lib/coderay/encoders/html/numerization.rb +- ./lib/coderay/encoders/html/output.rb +- ./lib/coderay/encoders/html.rb +- ./lib/coderay/encoders/json.rb +- ./lib/coderay/encoders/lines_of_code.rb +- ./lib/coderay/encoders/null.rb +- ./lib/coderay/encoders/page.rb +- ./lib/coderay/encoders/span.rb +- ./lib/coderay/encoders/statistic.rb +- ./lib/coderay/encoders/term.rb +- ./lib/coderay/encoders/text.rb +- ./lib/coderay/encoders/token_class_filter.rb +- ./lib/coderay/encoders/xml.rb +- ./lib/coderay/encoders/yaml.rb +- ./lib/coderay/for_redcloth.rb +- ./lib/coderay/helpers/file_type.rb +- ./lib/coderay/helpers/gzip_simple.rb +- ./lib/coderay/helpers/plugin.rb +- ./lib/coderay/helpers/word_list.rb +- ./lib/coderay/scanner.rb +- ./lib/coderay/scanners/_map.rb +- ./lib/coderay/scanners/c.rb +- ./lib/coderay/scanners/cpp.rb +- ./lib/coderay/scanners/css.rb +- ./lib/coderay/scanners/debug.rb +- ./lib/coderay/scanners/delphi.rb +- ./lib/coderay/scanners/diff.rb +- ./lib/coderay/scanners/groovy.rb +- ./lib/coderay/scanners/html.rb +- ./lib/coderay/scanners/java/builtin_types.rb +- ./lib/coderay/scanners/java.rb +- ./lib/coderay/scanners/java_script-0.9.6.rb +- ./lib/coderay/scanners/java_script.rb +- ./lib/coderay/scanners/json.rb +- ./lib/coderay/scanners/nitro_xhtml.rb +- ./lib/coderay/scanners/php.rb +- ./lib/coderay/scanners/plaintext.rb +- ./lib/coderay/scanners/python.rb +- ./lib/coderay/scanners/rhtml.rb +- ./lib/coderay/scanners/ruby/patterns.rb +- ./lib/coderay/scanners/ruby.rb +- ./lib/coderay/scanners/scheme.rb +- ./lib/coderay/scanners/sql.rb +- ./lib/coderay/scanners/xml.rb +- ./lib/coderay/scanners/yaml.rb +- ./lib/coderay/style.rb +- ./lib/coderay/styles/_map.rb +- ./lib/coderay/styles/cycnus.rb +- ./lib/coderay/styles/murphy.rb +- ./lib/coderay/token_classes.rb +- ./lib/coderay/tokens.rb +- ./lib/coderay.rb +- ./Rakefile +- ./test/functional/basic.rb +- ./test/functional/basic.rbc +- ./test/functional/for_redcloth.rb +- ./test/functional/for_redcloth.rbc +- ./test/functional/load_plugin_scanner.rb +- ./test/functional/load_plugin_scanner.rbc +- ./test/functional/suite.rb +- ./test/functional/suite.rbc +- ./test/functional/vhdl.rb +- ./test/functional/vhdl.rbc +- ./test/functional/word_list.rb +- ./test/functional/word_list.rbc +- ./lib/README +- ./LICENSE +- lib/README +- FOLDERS +- bin/coderay +- bin/coderay_stylesheet +has_rdoc: true +homepage: http://coderay.rubychan.de +licenses: [] + +post_install_message: +rdoc_options: +- -SNw2 +- -mlib/README +- -t CodeRay Documentation +require_paths: +- lib +required_ruby_version: !ruby/object:Gem::Requirement + none: false + requirements: + - - ">=" + - !ruby/object:Gem::Version + hash: 51 + segments: + - 1 + - 8 + - 2 + version: 1.8.2 +required_rubygems_version: !ruby/object:Gem::Requirement + none: false + requirements: + - - ">=" + - !ruby/object:Gem::Version + hash: 3 + segments: + - 0 + version: "0" +requirements: [] + +rubyforge_project: coderay +rubygems_version: 1.3.7 +signing_key: +specification_version: 3 +summary: Fast syntax highlighting for selected languages. +test_files: +- ./test/functional/suite.rb diff --git a/vendor/gems/coderay-0.9.7/FOLDERS b/vendor/gems/coderay-0.9.7/FOLDERS new file mode 100644 index 00000000..654df137 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/FOLDERS @@ -0,0 +1,53 @@ += CodeRay - Trunk folder structure + +== bench - Benchmarking system + +All benchmarking stuff goes here. + +Test inputs are stored in files named example.. +Test outputs go to bench/test.. + +Run bench/bench.rb to get a usage description. + +Run rake bench to perform an example benchmark. + + +== bin - Scripts + +Executional files for CodeRay. + + +== demo - Demos and functional tests + +Demonstrational scripts to show of CodeRay's features. + +Run them as functional tests with rake test:demos. + + +== etc - Lots of stuff + +Some addidtional files for CodeRay, mainly graphics and Vim scripts. + + +== gem_server - Gem output folder + +For rake gem. + + +== lib - CodeRay library code + +This is the base directory for the CodeRay library. + + +== rake_helpers - Rake helper libraries + +Some files to enhance Rake, including the Autumnal Rdoc template and some scripts. + + +== test - Tests + +Tests for the scanners. + +Each language has its own subfolder and sub-suite. + +Run with rake test. diff --git a/vendor/plugins/coderay-0.9.2/LICENSE b/vendor/gems/coderay-0.9.7/LICENSE similarity index 100% rename from vendor/plugins/coderay-0.9.2/LICENSE rename to vendor/gems/coderay-0.9.7/LICENSE diff --git a/vendor/gems/coderay-0.9.7/Rakefile b/vendor/gems/coderay-0.9.7/Rakefile new file mode 100644 index 00000000..05d0144d --- /dev/null +++ b/vendor/gems/coderay-0.9.7/Rakefile @@ -0,0 +1,35 @@ +require 'rake/rdoctask' + +ROOT = '.' +LIB_ROOT = File.join ROOT, 'lib' +EXTRA_RDOC_FILES = %w(lib/README FOLDERS) + +task :default => :test + +if File.directory? 'rake_tasks' + + # load rake tasks from subfolder + for task_file in Dir['rake_tasks/*.rake'].sort + load task_file + end + +else + + # fallback tasks when rake_tasks folder is not present + desc 'Run CodeRay tests (basic)' + task :test do + ruby './test/functional/suite.rb' + ruby './test/functional/for_redcloth.rb' + end + + desc 'Generate documentation for CodeRay' + Rake::RDocTask.new :doc do |rd| + rd.title = 'CodeRay Documentation' + rd.main = 'lib/README' + rd.rdoc_files.add Dir['lib'] + rd.rdoc_files.add 'lib/README' + rd.rdoc_files.add 'FOLDERS' + rd.rdoc_dir = 'doc' + end + +end \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.7/bin/coderay b/vendor/gems/coderay-0.9.7/bin/coderay new file mode 100644 index 00000000..62101a83 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/bin/coderay @@ -0,0 +1,86 @@ +#!/usr/bin/env ruby +# CodeRay Executable +# +# Version: 0.2 +# Author: murphy + +require 'coderay' + +if ARGV.empty? + $stderr.puts <<-USAGE +CodeRay #{CodeRay::VERSION} (http://coderay.rubychan.de) + +Usage: + coderay file [-] + coderay - [-] [< file] [> output] + +Defaults: + lang: based on file extension + format: ANSI colorized output for terminal, HTML page for files + +Examples: + coderay foo.rb # colorized output to terminal, based on file extension + coderay foo.rb -loc # print LOC count, based on file extension and format + coderay foo.rb > foo.html # HTML page output to file, based on extension + coderay -ruby < foo.rb # colorized output to terminal, based on lang + coderay -ruby -loc < foo.rb # print LOC count, based on lang + coderay -ruby -page foo.rb # HTML page output to terminal, based on lang and format + coderay -ruby -page foo.rb > foo.html # HTML page output to file, based on lang and format + USAGE +end + +first, second = ARGV + +def read + file = ARGV.grep(/^(?!-)/).last + if file + if File.exist?(file) + File.read file + else + $stderr.puts "No such file: #{file}" + end + else + $stdin.read + end +end + +if first + if first[/-(\w+)/] == first + lang = $1 + input = read + tokens = :scan + else + file = first + unless File.exist? file + $stderr.puts "No such file: #{file}" + exit 2 + end + tokens = CodeRay.scan_file file + end +else + $stderr.puts 'No lang/file given.' + exit 1 +end + +if second + if second[/-(\w+)/] == second + format = $1.to_sym + else + raise 'invalid format (must be -xxx)' + end +else + if $stdout.tty? + format = :term + else + $stderr.puts 'No format given; setting to default (HTML Page).' + format = :page + end +end + +if tokens == :scan + output = CodeRay::Duo[lang => format].highlight input +else + output = tokens.encode format +end +out = $stdout +out.puts output diff --git a/vendor/gems/coderay-0.9.7/bin/coderay_stylesheet b/vendor/gems/coderay-0.9.7/bin/coderay_stylesheet new file mode 100644 index 00000000..0e193952 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/bin/coderay_stylesheet @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require 'coderay' + +puts CodeRay::Encoders[:html]::CSS.new.stylesheet diff --git a/vendor/plugins/coderay-0.9.2/lib/README b/vendor/gems/coderay-0.9.7/lib/README similarity index 98% rename from vendor/plugins/coderay-0.9.2/lib/README rename to vendor/gems/coderay-0.9.7/lib/README index 564a9c0f..c440f30c 100644 --- a/vendor/plugins/coderay-0.9.2/lib/README +++ b/vendor/gems/coderay-0.9.7/lib/README @@ -18,7 +18,7 @@ And with line numbers. * is what everybody should have on their website * solves all your problems and makes the girls run after you -Version: 0.9.2 +Version: 0.9.7 Author:: murphy (Kornelius Kalnbach) Contact:: murphy rubychan de Website:: coderay.rubychan.de[http://coderay.rubychan.de] @@ -94,6 +94,7 @@ Please report errors in this documentation to . * Rob Aldred for the terminal encoder * Trans for pointing out $DEBUG dependencies * Flameeyes for finding that Term::ANSIColor was obsolete +* Etienne Massip for reporting a serious bug in JavaScript scanner * matz and all Ruby gods and gurus * The inventors of: the computer, the internet, the true color display, HTML & CSS, VIM, Ruby, pizza, microwaves, guitars, scouting, programming, anime, diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay.rb b/vendor/gems/coderay-0.9.7/lib/coderay.rb similarity index 99% rename from vendor/plugins/coderay-0.9.2/lib/coderay.rb rename to vendor/gems/coderay-0.9.7/lib/coderay.rb index d8f3fd53..3e2d10b7 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay.rb @@ -134,7 +134,7 @@ module CodeRay # Minor: feature milestone # Teeny: development state, 0 for pre-release # Revision: Subversion Revision number (generated on rake gem:make) - VERSION = '0.9.2' + VERSION = '0.9.7' require 'coderay/tokens' require 'coderay/token_classes' diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/duo.rb b/vendor/gems/coderay-0.9.7/lib/coderay/duo.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/duo.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/duo.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoder.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoder.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoder.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoder.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/_map.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/_map.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/_map.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/_map.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/comment_filter.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/comment_filter.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/comment_filter.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/comment_filter.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/count.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/count.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/count.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/count.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/debug.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/debug.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/debug.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/debug.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/div.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/div.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/div.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/div.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/filter.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/filter.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/filter.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/filter.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/html.rb similarity index 97% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/html.rb index 73d2c49c..f280c7d3 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/html.rb @@ -276,9 +276,13 @@ module Encoders when :begin_line @opened[0] = type if style = @css_style[@opened] - @out << style.sub('') + end else - @out << '
' + @out << '' end @opened << type when :end_line @@ -289,7 +293,7 @@ module Encoders raise 'Malformed token stream: Trying to close a line (%p) \ that is not open. Open are: %p.' % [type, @opened[1..-1]] end - @out << '
' + @out << '' @opened.pop end diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html/css.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/html/css.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html/css.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/html/css.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html/numerization.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/html/numerization.rb similarity index 98% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html/numerization.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/html/numerization.rb index 7058edd8..17e8ddb0 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html/numerization.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/html/numerization.rb @@ -80,8 +80,8 @@ module Encoders line_numbers.gsub!(/\n/) { "\n" } line_numbers_table_tpl = TABLE.apply('LINE_NUMBERS', line_numbers) - gsub!(/<\/div>\n/) { '' } - gsub!(/\n/) { "\n" } + gsub!("\n", '') + gsub!("\n", "\n") wrap_in! line_numbers_table_tpl @wrapped_in = :div diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html/output.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/html/output.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/html/output.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/html/output.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/json.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/json.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/json.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/json.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/lines_of_code.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/lines_of_code.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/lines_of_code.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/lines_of_code.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/null.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/null.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/null.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/null.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/page.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/page.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/page.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/page.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/span.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/span.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/span.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/span.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/statistic.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/statistic.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/statistic.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/statistic.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/term.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/term.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/term.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/term.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/text.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/text.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/text.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/text.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/token_class_filter.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/token_class_filter.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/token_class_filter.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/token_class_filter.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/xml.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/xml.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/xml.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/xml.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/encoders/yaml.rb b/vendor/gems/coderay-0.9.7/lib/coderay/encoders/yaml.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/encoders/yaml.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/encoders/yaml.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/for_redcloth.rb b/vendor/gems/coderay-0.9.7/lib/coderay/for_redcloth.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/for_redcloth.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/for_redcloth.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/helpers/file_type.rb b/vendor/gems/coderay-0.9.7/lib/coderay/helpers/file_type.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/helpers/file_type.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/helpers/file_type.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/helpers/gzip_simple.rb b/vendor/gems/coderay-0.9.7/lib/coderay/helpers/gzip_simple.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/helpers/gzip_simple.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/helpers/gzip_simple.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/helpers/plugin.rb b/vendor/gems/coderay-0.9.7/lib/coderay/helpers/plugin.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/helpers/plugin.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/helpers/plugin.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/helpers/word_list.rb b/vendor/gems/coderay-0.9.7/lib/coderay/helpers/word_list.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/helpers/word_list.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/helpers/word_list.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanner.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanner.rb similarity index 90% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanner.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanner.rb index 5460d4e3..b12c865f 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanner.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanner.rb @@ -68,15 +68,16 @@ module CodeRay def normify code code = code.to_s - if code.respond_to? :force_encoding - debug, $DEBUG = $DEBUG, false - begin - code.force_encoding 'utf-8' - code[/\z/] # raises an ArgumentError when code contains a non-UTF-8 char - rescue ArgumentError - code.force_encoding 'binary' - ensure - $DEBUG = debug + if code.respond_to?(:encoding) && (code.encoding.name != 'UTF-8' || !code.valid_encoding?) + code = code.dup + original_encoding = code.encoding + code.force_encoding 'Windows-1252' + unless code.valid_encoding? + code.force_encoding original_encoding + if code.encoding.name == 'UTF-8' + code.encode! 'UTF-16BE', :invalid => :replace, :undef => :replace, :replace => '?' + end + code.encode! 'UTF-8', :invalid => :replace, :undef => :replace, :replace => '?' end end code.to_unix @@ -147,7 +148,12 @@ module CodeRay def string= code code = Scanner.normify(code) - super code + if defined?(RUBY_DESCRIPTION) && RUBY_DESCRIPTION['rubinius 1.0.1'] + reset_state + @string = code + else + super code + end reset_instance end diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/_map.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/_map.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/_map.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/_map.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/c.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/c.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/c.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/c.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/cpp.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/cpp.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/cpp.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/cpp.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/css.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/css.rb similarity index 97% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/css.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/css.rb index 5f461453..08ecbb18 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/css.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/css.rb @@ -14,12 +14,11 @@ module Scanners ] module RE - NonASCII = /[\x80-\xFF]/ Hex = /[0-9a-fA-F]/ Unicode = /\\#{Hex}{1,6}(?:\r\n|\s)?/ # differs from standard because it allows uppercase hex too Escape = /#{Unicode}|\\[^\r\n\f0-9a-fA-F]/ - NMChar = /[-_a-zA-Z0-9]|#{NonASCII}|#{Escape}/ - NMStart = /[_a-zA-Z]|#{NonASCII}|#{Escape}/ + NMChar = /[-_a-zA-Z0-9]|#{Escape}/ + NMStart = /[_a-zA-Z]|#{Escape}/ NL = /\r\n|\r|\n|\f/ String1 = /"(?:[^\n\r\f\\"]|\\#{NL}|#{Escape})*"?/ # FIXME: buggy regexp String2 = /'(?:[^\n\r\f\\']|\\#{NL}|#{Escape})*'?/ # FIXME: buggy regexp diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/debug.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/debug.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/debug.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/debug.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/delphi.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/delphi.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/delphi.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/delphi.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/diff.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/diff.rb similarity index 85% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/diff.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/diff.rb index 0a3b6b34..353b9669 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/diff.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/diff.rb @@ -47,11 +47,16 @@ module Scanners tokens << [match, :change] next unless match = scan(/.+/) kind = :plain - elsif scan(/(@@)((?>[^@\n]*))(@@)/) - tokens << [:begin_line, line_kind = :change] - tokens << [self[1], :change] - tokens << [self[2], :plain] - tokens << [self[3], :change] + elsif match = scan(/@@(?>[^@\n]*)@@/) + if check(/\n|$/) + tokens << [:begin_line, line_kind = :change] + else + tokens << [:open, :change] + end + tokens << [match[0,2], :change] + tokens << [match[2...-2], :plain] + tokens << [match[-2,2], :change] + tokens << [:close, :change] unless line_kind next unless match = scan(/.+/) kind = :plain elsif match = scan(/\+/) @@ -67,7 +72,7 @@ module Scanners elsif scan(/ .*/) kind = :comment elsif scan(/.+/) - tokens << [:begin_line, line_kind = :head] + tokens << [:begin_line, line_kind = :comment] kind = :plain else raise_inspect 'else case rached' diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/groovy.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/groovy.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/groovy.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/groovy.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/html.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/html.rb similarity index 99% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/html.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/html.rb index 5cb11042..009a461d 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/html.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/html.rb @@ -91,7 +91,7 @@ module Scanners end when :attribute - if scan(/#{TAG_END}/) + if scan(/#{TAG_END}/o) kind = :tag state = :initial elsif scan(/#{ATTR_NAME}/o) diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/java.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/java.rb similarity index 99% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/java.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/java.rb index 0d218fbe..caf36199 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/java.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/java.rb @@ -138,7 +138,7 @@ module Scanners elsif scan(/\\./m) kind = :content elsif scan(/ \\ | $ /x) - tokens << [:close, :delimiter] + tokens << [:close, state] kind = :error state = :initial else diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/java/builtin_types.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/java/builtin_types.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/java/builtin_types.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/java/builtin_types.rb diff --git a/vendor/gems/coderay-0.9.7/lib/coderay/scanners/java_script-0.9.6.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/java_script-0.9.6.rb new file mode 100644 index 00000000..cb49b7af --- /dev/null +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/java_script-0.9.6.rb @@ -0,0 +1,224 @@ +module CodeRay +module Scanners + + class JavaScript < Scanner + + include Streamable + + register_for :java_script + file_extension 'js' + + # The actual JavaScript keywords. + KEYWORDS = %w[ + break case catch continue default delete do else + finally for function if in instanceof new + return switch throw try typeof var void while with + ] + PREDEFINED_CONSTANTS = %w[ + false null true undefined + ] + + MAGIC_VARIABLES = %w[ this arguments ] # arguments was introduced in JavaScript 1.4 + + KEYWORDS_EXPECTING_VALUE = WordList.new.add %w[ + case delete in instanceof new return throw typeof with + ] + + # Reserved for future use. + RESERVED_WORDS = %w[ + abstract boolean byte char class debugger double enum export extends + final float goto implements import int interface long native package + private protected public short static super synchronized throws transient + volatile + ] + + IDENT_KIND = WordList.new(:ident). + add(RESERVED_WORDS, :reserved). + add(PREDEFINED_CONSTANTS, :pre_constant). + add(MAGIC_VARIABLES, :local_variable). + add(KEYWORDS, :keyword) + + ESCAPE = / [bfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x + UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x + REGEXP_ESCAPE = / [bBdDsSwW] /x + STRING_CONTENT_PATTERN = { + "'" => /[^\\']+/, + '"' => /[^\\"]+/, + '/' => /[^\\\/]+/, + } + KEY_CHECK_PATTERN = { + "'" => / [^\\']* (?: \\.? [^\\']* )* '? \s* : /x, + '"' => / [^\\"]* (?: \\.? [^\\"]* )* "? \s* : /x, + } + + def scan_tokens tokens, options + + state = :initial + string_delimiter = nil + value_expected = true + key_expected = false + function_expected = false + + until eos? + + kind = nil + match = nil + + case state + + when :initial + + if match = scan(/ \s+ | \\\n /x) + value_expected = true if !value_expected && match.index(?\n) + tokens << [match, :space] + next + + elsif scan(%r! // [^\n\\]* (?: \\. [^\n\\]* )* | /\* (?: .*? \*/ | .* ) !mx) + value_expected = true + kind = :comment + + elsif check(/\.?\d/) + key_expected = value_expected = false + if scan(/0[xX][0-9A-Fa-f]+/) + kind = :hex + elsif scan(/(?>0[0-7]+)(?![89.eEfF])/) + kind = :oct + elsif scan(/\d+[fF]|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/) + kind = :float + elsif scan(/\d+/) + kind = :integer + end + + elsif value_expected && match = scan(/<([[:alpha:]]\w*) (?: [^\/>]*\/> | .*?<\/\1>)/xim) + # FIXME: scan over nested tags + xml_scanner.tokenize match + value_expected = false + next + + elsif match = scan(/ [-+*=<>?:;,!&^|(\[{~%]+ | \.(?!\d) /x) + value_expected = true + last_operator = match[-1] + key_expected = (last_operator == ?{) || (last_operator == ?,) + function_expected = false + kind = :operator + + elsif scan(/ [)\]}]+ /x) + function_expected = key_expected = value_expected = false + kind = :operator + + elsif match = scan(/ [$a-zA-Z_][A-Za-z_0-9$]* /x) + kind = IDENT_KIND[match] + value_expected = (kind == :keyword) && KEYWORDS_EXPECTING_VALUE[match] + # TODO: labels + if kind == :ident + if match.index(?$) # $ allowed inside an identifier + kind = :predefined + elsif function_expected + kind = :function + elsif check(/\s*[=:]\s*function\b/) + kind = :function + elsif key_expected && check(/\s*:/) + kind = :key + end + end + function_expected = (kind == :keyword) && (match == 'function') + key_expected = false + + elsif match = scan(/["']/) + if key_expected && check(KEY_CHECK_PATTERN[match]) + state = :key + else + state = :string + end + tokens << [:open, state] + string_delimiter = match + kind = :delimiter + + elsif value_expected && (match = scan(/\/(?=\S)/)) + tokens << [:open, :regexp] + state = :regexp + string_delimiter = '/' + kind = :delimiter + + elsif scan(/ \/ /x) + value_expected = true + key_expected = false + kind = :operator + + else + getch + kind = :error + + end + + when :string, :regexp, :key + if scan(STRING_CONTENT_PATTERN[string_delimiter]) + kind = :content + elsif match = scan(/["'\/]/) + tokens << [match, :delimiter] + if state == :regexp + modifiers = scan(/[gim]+/) + tokens << [modifiers, :modifier] if modifiers && !modifiers.empty? + end + tokens << [:close, state] + string_delimiter = nil + key_expected = value_expected = false + state = :initial + next + elsif state != :regexp && (match = scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox)) + if string_delimiter == "'" && !(match == "\\\\" || match == "\\'") + kind = :content + else + kind = :char + end + elsif state == :regexp && scan(/ \\ (?: #{ESCAPE} | #{REGEXP_ESCAPE} | #{UNICODE_ESCAPE} ) /mox) + kind = :char + elsif scan(/\\./m) + kind = :content + elsif scan(/ \\ | $ /x) + tokens << [:close, state] + kind = :error + key_expected = value_expected = false + state = :initial + else + raise_inspect "else case \" reached; %p not handled." % peek(1), tokens + end + + else + raise_inspect 'Unknown state', tokens + + end + + match ||= matched + if $CODERAY_DEBUG and not kind + raise_inspect 'Error token %p in line %d' % + [[match, kind], line], tokens + end + raise_inspect 'Empty token', tokens unless match + + tokens << [match, kind] + + end + + if [:string, :regexp].include? state + tokens << [:close, state] + end + + tokens + end + + protected + + def reset_instance + super + @xml_scanner.reset if defined? @xml_scanner + end + + def xml_scanner + @xml_scanner ||= CodeRay.scanner :xml, :tokens => @tokens, :keep_tokens => true, :keep_state => false + end + + end + +end +end diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/java_script.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/java_script.rb similarity index 97% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/java_script.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/java_script.rb index e2f9a582..1f26348b 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/java_script.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/java_script.rb @@ -47,8 +47,8 @@ module Scanners '/' => /[^\\\/]+/, } KEY_CHECK_PATTERN = { - "'" => / [^\\']* (?: \\.? [^\\']* )* '? \s* : /x, - '"' => / [^\\"]* (?: \\.? [^\\"]* )* "? \s* : /x, + "'" => / (?> [^\\']* (?: \\. [^\\']* )* ) ' \s* : /mx, + '"' => / (?> [^\\"]* (?: \\. [^\\"]* )* ) " \s* : /mx, } def scan_tokens tokens, options @@ -215,7 +215,7 @@ module Scanners end def xml_scanner - @xml_scanner ||= CodeRay.scanner :xml, :tokens => @tokens, :keep_tokens => true, :keep_state => true + @xml_scanner ||= CodeRay.scanner :xml, :tokens => @tokens, :keep_tokens => true, :keep_state => false end end diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/json.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/json.rb similarity index 92% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/json.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/json.rb index 33dd30f6..abe24fb0 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/json.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/json.rb @@ -13,9 +13,6 @@ module Scanners :error, :integer, :operator, :value, ] - CONSTANTS = %w( true false null ) - IDENT_KIND = WordList.new(:key).add(CONSTANTS, :value) - ESCAPE = / [bfnrt\\"\/] /x UNICODE_ESCAPE = / u[a-fA-F0-9]{4} /x @@ -23,7 +20,6 @@ module Scanners state = :initial stack = [] - string_delimiter = nil key_expected = false until eos? @@ -47,7 +43,7 @@ module Scanners when '}', ']' then stack.pop # no error recovery, but works for valid JSON end elsif match = scan(/ true | false | null /x) - kind = IDENT_KIND[match] + kind = :value elsif match = scan(/-?(?:0|[1-9]\d*)/) kind = :integer if scan(/\.\d+(?:[eE][-+]?\d+)?|[eE][-+]?\d+/) @@ -76,7 +72,7 @@ module Scanners elsif scan(/\\./m) kind = :content elsif scan(/ \\ | $ /x) - tokens << [:close, :delimiter] + tokens << [:close, state] kind = :error state = :initial else diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/nitro_xhtml.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/nitro_xhtml.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/nitro_xhtml.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/nitro_xhtml.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/php.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/php.rb similarity index 98% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/php.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/php.rb index cc3e7bc9..cb93264f 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/php.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/php.rb @@ -225,6 +225,12 @@ module Scanners end def scan_tokens tokens, options + if string.respond_to?(:encoding) + unless string.encoding == Encoding::ASCII_8BIT + self.string = string.encode Encoding::ASCII_8BIT, + :invalid => :replace, :undef => :replace, :replace => '?' + end + end if check(RE::PHP_START) || # starts with ?\z/] tokens << [:open, :inline] tokens << [start_tag, :inline_delimiter] code = match[start_tag.size .. -1 - end_tag.size] - @ruby_scanner.tokenize code + if start_tag == '<%#' + tokens << [code, :comment] + else + @ruby_scanner.tokenize code + end tokens << [end_tag, :inline_delimiter] unless end_tag.empty? tokens << [:close, :inline] diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/ruby.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/ruby.rb similarity index 81% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/ruby.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/ruby.rb index 8512678c..3cadc64d 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/ruby.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/ruby.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 module CodeRay module Scanners @@ -28,6 +29,16 @@ module Scanners private def scan_tokens tokens, options + if string.respond_to?(:encoding) + unless string.encoding == Encoding::UTF_8 + self.string = string.encode Encoding::UTF_8, + :invalid => :replace, :undef => :replace, :replace => '?' + end + unicode = false + else + unicode = exist?(/[^\x00-\x7f]/) + end + last_token_dot = false value_expected = true heredocs = nil @@ -35,7 +46,7 @@ module Scanners state = :initial depth = nil inline_block_stack = [] - unicode = string.respond_to?(:encoding) && string.encoding.name == 'UTF-8' + patterns = Patterns # avoid constant lookup @@ -170,19 +181,28 @@ module Scanners if last_token_dot kind = if match[/^[A-Z]/] and not match?(/\(/) then :constant else :ident end else - kind = patterns::IDENT_KIND[match] - if kind == :ident and match[/^[A-Z]/] and not match[/[!?]$/] and not match?(/\(/) - kind = :constant - elsif kind == :reserved - state = patterns::DEF_NEW_STATE[match] - value_expected = :set if patterns::KEYWORDS_EXPECTING_VALUE[match] + if value_expected != :expect_colon && scan(/:(?= )/) + tokens << [match, :key] + match = ':' + kind = :operator + else + kind = patterns::IDENT_KIND[match] + if kind == :ident + if match[/\A[A-Z]/] and not match[/[!?]$/] and not match?(/\(/) + kind = :constant + end + elsif kind == :reserved + state = patterns::DEF_NEW_STATE[match] + value_expected = :set if patterns::KEYWORDS_EXPECTING_VALUE[match] + end end end value_expected = :set if check(/#{patterns::VALUE_FOLLOWS}/o) elsif last_token_dot and match = scan(/#{patterns::METHOD_NAME_OPERATOR}|\(/o) kind = :ident - value_expected = :set if check(/#{patterns::VALUE_FOLLOWS}/o) + value_expected = :set if check(unicode ? /#{patterns::VALUE_FOLLOWS}/uo : + /#{patterns::VALUE_FOLLOWS}/o) # OPERATORS # elsif not last_token_dot and match = scan(/ \.\.\.? | (?:\.|::)() | [,\(\)\[\]\{\}] | ==?=? /x) @@ -212,7 +232,8 @@ module Scanners kind = :delimiter state = patterns::StringState.new :string, match == '"', match # important for streaming - elsif match = scan(/#{patterns::INSTANCE_VARIABLE}/o) + elsif match = scan(unicode ? /#{patterns::INSTANCE_VARIABLE}/uo : + /#{patterns::INSTANCE_VARIABLE}/o) kind = :instance_variable elsif value_expected and match = scan(/\//) @@ -225,7 +246,8 @@ module Scanners elsif match = value_expected ? scan(/[-+]?#{patterns::NUMERIC}/o) : scan(/#{patterns::NUMERIC}/o) kind = self[1] ? :float : :integer - elsif match = scan(/#{patterns::SYMBOL}/o) + elsif match = scan(unicode ? /#{patterns::SYMBOL}/uo : + /#{patterns::SYMBOL}/o) case delim = match[1] when ?', ?" tokens << [:open, :symbol] @@ -237,11 +259,12 @@ module Scanners kind = :symbol end - elsif match = scan(/ [-+!~^]=? | [*|&]{1,2}=? | >>? /x) + elsif match = scan(/ -[>=]? | [+!~^]=? | [*|&]{1,2}=? | >>? /x) value_expected = :set kind = :operator - elsif value_expected and match = scan(/#{patterns::HEREDOC_OPEN}/o) + elsif value_expected and match = scan(unicode ? /#{patterns::HEREDOC_OPEN}/uo : + /#{patterns::HEREDOC_OPEN}/o) indented = self[1] == '-' quote = self[3] delim = self[quote ? 4 : 2] @@ -261,7 +284,8 @@ module Scanners state = patterns::StringState.new kind, interpreted, self[2] kind = :delimiter - elsif value_expected and match = scan(/#{patterns::CHARACTER}/o) + elsif value_expected and match = scan(unicode ? /#{patterns::CHARACTER}/uo : + /#{patterns::CHARACTER}/o) kind = :integer elsif match = scan(/ [\/%]=? | <(?:<|=>?)? | [?:;] /x) @@ -277,14 +301,16 @@ module Scanners state = patterns::StringState.new :shell, true, match end - elsif match = scan(/#{patterns::GLOBAL_VARIABLE}/o) + elsif match = scan(unicode ? /#{patterns::GLOBAL_VARIABLE}/uo : + /#{patterns::GLOBAL_VARIABLE}/o) kind = :global_variable - elsif match = scan(/#{patterns::CLASS_VARIABLE}/o) + elsif match = scan(unicode ? /#{patterns::CLASS_VARIABLE}/uo : + /#{patterns::CLASS_VARIABLE}/o) kind = :class_variable else - if !unicode + if !unicode && !string.respond_to?(:encoding) # check for unicode debug, $DEBUG = $DEBUG, false begin @@ -300,7 +326,7 @@ module Scanners next if unicode end kind = :error - match = getch + match = scan(unicode ? /./mu : /./m) end @@ -322,7 +348,8 @@ module Scanners kind = :operator else state = :initial - if match = scan(/ (?:#{patterns::IDENT}::)* #{patterns::IDENT} /ox) + if match = scan(unicode ? /(?:#{patterns::IDENT}::)*#{patterns::IDENT}/uo : + /(?:#{patterns::IDENT}::)*#{patterns::IDENT}/o) kind = :class else next @@ -331,9 +358,11 @@ module Scanners elsif state == :undef_expected state = :undef_comma_expected - if match = scan(/#{patterns::METHOD_NAME_EX}/o) + if match = scan(unicode ? /#{patterns::METHOD_NAME_EX}/uo : + /#{patterns::METHOD_NAME_EX}/o) kind = :method - elsif match = scan(/#{patterns::SYMBOL}/o) + elsif match = scan(unicode ? /#{patterns::SYMBOL}/uo : + /#{patterns::SYMBOL}/o) case delim = match[1] when ?', ?" tokens << [:open, :symbol] @@ -375,7 +404,9 @@ module Scanners # }}} unless kind == :error - value_expected = value_expected == :set + if value_expected = value_expected == :set + value_expected = :expect_colon if match == '?' || match == 'when' + end last_token_dot = last_token_dot == :set end diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/ruby/patterns.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/ruby/patterns.rb similarity index 90% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/ruby/patterns.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/ruby/patterns.rb index 576bedae..ba3ac8a4 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/ruby/patterns.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/ruby/patterns.rb @@ -16,7 +16,7 @@ module Scanners DEF_KEYWORDS = %w[ def ] UNDEF_KEYWORDS = %w[ undef ] ALIAS_KEYWORDS = %w[ alias ] - MODULE_KEYWORDS = %w[class module] + MODULE_KEYWORDS = %w[ class module ] DEF_NEW_STATE = WordList.new(:initial). add(DEF_KEYWORDS, :def_expected). add(UNDEF_KEYWORDS, :undef_expected). @@ -25,14 +25,26 @@ module Scanners PREDEFINED_CONSTANTS = %w[ nil true false self - DATA ARGV ARGF __FILE__ __LINE__ + DATA ARGV ARGF + __FILE__ __LINE__ __ENCODING__ ] IDENT_KIND = WordList.new(:ident). add(RESERVED_WORDS, :reserved). add(PREDEFINED_CONSTANTS, :pre_constant) - IDENT = 'ä'[/[[:alpha:]]/] == 'ä' ? /[[:alpha:]_][[:alnum:]_]*/ : /[^\W\d]\w*/ + if /\w/u === '∑' + # MRI 1.8.6, 1.8.7 + IDENT = /[^\W\d]\w*/ + else + if //.respond_to? :encoding + # MRI 1.9.1, 1.9.2 + IDENT = Regexp.new '[\p{L}\p{M}\p{Pc}\p{Sm}&&[^\x00-\x40\x5b-\x5e\x60\x7b-\x7f]][\p{L}\p{M}\p{N}\p{Pc}\p{Sm}&&[^\x00-\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\x7f]]*' + else + # JRuby, Rubinius + IDENT = /[^\x00-\x40\x5b-\x5e\x60\x7b-\x7f][^\x00-\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\x7f]*/ + end + end METHOD_NAME = / #{IDENT} [?!]? /ox METHOD_NAME_OPERATOR = / @@ -109,10 +121,12 @@ module Scanners # NOTE: This is not completely correct, but # nobody needs heredoc delimiters ending with \n. + # Also, delimiters starting with numbers are allowed. + # but they are more often than not a false positive. HEREDOC_OPEN = / << (-)? # $1 = float (?: - ( [A-Za-z_0-9]+ ) # $2 = delim + ( #{IDENT} ) # $2 = delim | ( ["'`\/] ) # $3 = quote, type ( [^\n]*? ) \3 # $4 = delim diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/scheme.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/scheme.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/scheme.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/scheme.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/sql.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/sql.rb similarity index 99% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/sql.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/sql.rb index 2b21c79d..89075816 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/sql.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/sql.rb @@ -56,7 +56,7 @@ module CodeRay module Scanners if scan(/ \s+ | \\\n /x) kind = :space - elsif scan(/^(?:--\s?|#).*/) + elsif scan(/(?:--\s?|#).*/) kind = :comment elsif scan(%r! /\* (?: .*? \*/ | .* ) !mx) diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/xml.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/xml.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/xml.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/xml.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/scanners/yaml.rb b/vendor/gems/coderay-0.9.7/lib/coderay/scanners/yaml.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/scanners/yaml.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/scanners/yaml.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/style.rb b/vendor/gems/coderay-0.9.7/lib/coderay/style.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/style.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/style.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/styles/_map.rb b/vendor/gems/coderay-0.9.7/lib/coderay/styles/_map.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/styles/_map.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/styles/_map.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/styles/cycnus.rb b/vendor/gems/coderay-0.9.7/lib/coderay/styles/cycnus.rb similarity index 98% rename from vendor/plugins/coderay-0.9.2/lib/coderay/styles/cycnus.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/styles/cycnus.rb index d2a43530..da4f6269 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/styles/cycnus.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/styles/cycnus.rb @@ -33,6 +33,7 @@ table.CodeRay td { padding: 2px 4px; vertical-align: top } } .CodeRay .line_numbers tt { font-weight: bold } .CodeRay .line_numbers .highlighted { color: red } +.CodeRay .line { display: block; float: left; width: 100%; } .CodeRay .no { padding: 0px 4px } .CodeRay .code { width: 100% } diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/styles/murphy.rb b/vendor/gems/coderay-0.9.7/lib/coderay/styles/murphy.rb similarity index 96% rename from vendor/plugins/coderay-0.9.2/lib/coderay/styles/murphy.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/styles/murphy.rb index 211ab6b0..8345942f 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/styles/murphy.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/styles/murphy.rb @@ -32,6 +32,8 @@ table.CodeRay td { padding: 2px 4px; vertical-align: top; } text-align: right; } .CodeRay .line_numbers tt { font-weight: bold; } +.CodeRay .line_numbers .highlighted { color: red } +.CodeRay .line { display: block; float: left; width: 100%; } .CodeRay .no { padding: 0px 4px; } .CodeRay .code { width: 100%; } diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/token_classes.rb b/vendor/gems/coderay-0.9.7/lib/coderay/token_classes.rb similarity index 100% rename from vendor/plugins/coderay-0.9.2/lib/coderay/token_classes.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/token_classes.rb diff --git a/vendor/plugins/coderay-0.9.2/lib/coderay/tokens.rb b/vendor/gems/coderay-0.9.7/lib/coderay/tokens.rb similarity index 92% rename from vendor/plugins/coderay-0.9.2/lib/coderay/tokens.rb rename to vendor/gems/coderay-0.9.7/lib/coderay/tokens.rb index b01a4ddb..6ac5f440 100644 --- a/vendor/plugins/coderay-0.9.2/lib/coderay/tokens.rb +++ b/vendor/gems/coderay-0.9.7/lib/coderay/tokens.rb @@ -7,29 +7,30 @@ module CodeRay # # A token is not a special object, just a two-element Array # consisting of + # * the _token_ _text_ (the original source of the token in a String) or + # a _token_ _action_ (:open, :close, :begin_line, :end_line) # * the _token_ _kind_ (a Symbol representing the type of the token) - # * the _token_ _text_ (the original source of the token in a String) # # A token looks like this: # - # [:comment, '# It looks like this'] - # [:float, '3.1415926'] - # [:error, '$^'] + # ['# It looks like this', :comment] + # ['3.1415926', :float] + # ['$^', :error] # - # Some scanners also yield some kind of sub-tokens, represented by special - # token texts, namely :open and :close . + # Some scanners also yield sub-tokens, represented by special + # token actions, namely :open and :close. # # The Ruby scanner, for example, splits "a string" into: # # [ # [:open, :string], - # [:delimiter, '"'], - # [:content, 'a string'], - # [:delimiter, '"'], + # ['"', :delimiter], + # ['a string', :content], + # ['"', :delimiter], # [:close, :string] # ] # - # Tokens is also the interface between Scanners and Encoders: + # Tokens is the interface between Scanners and Encoders: # The input is split and saved into a Tokens object. The Encoder # then builds the output from this object. # @@ -43,6 +44,9 @@ module CodeRay # Tokens gives you the power to handle pre-scanned code very easily: # You can convert it to a webpage, a YAML file, or dump it into a gzip'ed string # that you put in your DB. + # + # It also allows you to generate tokens directly (without using a scanner), + # to load them from a file, and still use any Encoder that CodeRay provides. # # Tokens' subclass TokenStream allows streaming to save memory. class Tokens < Array @@ -239,9 +243,7 @@ module CodeRay size end - # The total size of the tokens. - # Should be equal to the input size before - # scanning. + # Return all text tokens joined into a single string. def text map { |t, k| t if t.is_a? ::String }.join end @@ -301,11 +303,11 @@ module CodeRay # # require 'coderay' # - # token_stream = CodeRay::TokenStream.new do |kind, text| + # token_stream = CodeRay::TokenStream.new do |text, kind| # puts 'kind: %s, text size: %d.' % [kind, text.size] # end # - # token_stream << [:regexp, '/\d+/'] + # token_stream << ['/\d+/', :regexp] # #-> kind: rexpexp, text size: 5. # def initialize &block diff --git a/vendor/gems/coderay-0.9.7/test/functional/basic.rb b/vendor/gems/coderay-0.9.7/test/functional/basic.rb new file mode 100644 index 00000000..8ecd3d35 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/basic.rb @@ -0,0 +1,122 @@ +require 'test/unit' +require 'coderay' + +class BasicTest < Test::Unit::TestCase + + def test_version + assert_nothing_raised do + assert_match(/\A\d\.\d\.\d\z/, CodeRay::VERSION) + end + end + + RUBY_TEST_CODE = 'puts "Hello, World!"' + + RUBY_TEST_TOKENS = [ + ['puts', :ident], + [' ', :space], + [:open, :string], + ['"', :delimiter], + ['Hello, World!', :content], + ['"', :delimiter], + [:close, :string] + ] + def test_simple_scan + assert_nothing_raised do + assert_equal RUBY_TEST_TOKENS, CodeRay.scan(RUBY_TEST_CODE, :ruby).to_ary + end + end + + RUBY_TEST_HTML = 'puts "' + + 'Hello, World!"' + def test_simple_highlight + assert_nothing_raised do + assert_equal RUBY_TEST_HTML, CodeRay.scan(RUBY_TEST_CODE, :ruby).html + end + end + + def test_duo + assert_equal(RUBY_TEST_CODE, + CodeRay::Duo[:plain, :plain].highlight(RUBY_TEST_CODE)) + assert_equal(RUBY_TEST_CODE, + CodeRay::Duo[:plain => :plain].highlight(RUBY_TEST_CODE)) + end + + def test_duo_stream + assert_equal(RUBY_TEST_CODE, + CodeRay::Duo[:plain, :plain].highlight(RUBY_TEST_CODE, :stream => true)) + end + + def test_comment_filter + assert_equal <<-EXPECTED, CodeRay.scan(<<-INPUT, :ruby).comment_filter.text +#!/usr/bin/env ruby + +code + +more code + EXPECTED +#!/usr/bin/env ruby +=begin +A multi-line comment. +=end +code +# A single-line comment. +more code # and another comment, in-line. + INPUT + end + + def test_lines_of_code + assert_equal 2, CodeRay.scan(<<-INPUT, :ruby).lines_of_code +#!/usr/bin/env ruby +=begin +A multi-line comment. +=end +code +# A single-line comment. +more code # and another comment, in-line. + INPUT + rHTML = <<-RHTML + + + + + + <%= controller.controller_name.titleize %>: <%= controller.action_name %> + <%= stylesheet_link_tag 'scaffold' %> + + + +

<%= flash[:notice] %>

+ +
+ <%= yield %> +
+ + + + RHTML + assert_equal 0, CodeRay.scan(rHTML, :html).lines_of_code + assert_equal 0, CodeRay.scan(rHTML, :php).lines_of_code + assert_equal 0, CodeRay.scan(rHTML, :yaml).lines_of_code + assert_equal 4, CodeRay.scan(rHTML, :rhtml).lines_of_code + end + + def test_rubygems_not_loaded + assert_equal nil, defined? Gem + end if ENV['check_rubygems'] && RUBY_VERSION < '1.9' + + def test_list_of_encoders + assert_kind_of(Array, CodeRay::Encoders.list) + assert CodeRay::Encoders.list.include?('count') + end + + def test_list_of_scanners + assert_kind_of(Array, CodeRay::Scanners.list) + assert CodeRay::Scanners.list.include?('plaintext') + end + + def test_scan_a_frozen_string + CodeRay.scan RUBY_VERSION, :ruby + end + +end diff --git a/vendor/gems/coderay-0.9.7/test/functional/basic.rbc b/vendor/gems/coderay-0.9.7/test/functional/basic.rbc new file mode 100644 index 00000000..1e114cf7 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/basic.rbc @@ -0,0 +1,2022 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +53 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +47 +49 +1 +1 +15 +99 +7 +3 +45 +4 +5 +43 +6 +43 +7 +65 +49 +8 +3 +13 +99 +12 +7 +9 +12 +7 +10 +12 +65 +12 +49 +11 +4 +15 +49 +9 +0 +15 +2 +11 +I +6 +I +0 +I +0 +I +0 +n +p +12 +s +9 +test/unit +x +7 +require +s +7 +coderay +x +9 +BasicTest +x +4 +Test +n +x +4 +Unit +x +8 +TestCase +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +9 +BasicTest +i +263 +5 +66 +99 +7 +0 +7 +1 +65 +67 +49 +2 +0 +49 +3 +4 +15 +65 +7 +4 +7 +5 +64 +49 +6 +2 +15 +65 +7 +7 +7 +8 +64 +7 +9 +35 +2 +7 +10 +64 +7 +11 +35 +2 +7 +12 +7 +13 +35 +2 +7 +14 +64 +7 +15 +35 +2 +7 +16 +64 +7 +17 +35 +2 +7 +14 +64 +7 +15 +35 +2 +7 +18 +7 +13 +35 +2 +35 +7 +49 +6 +2 +15 +99 +7 +19 +7 +20 +65 +67 +49 +2 +0 +49 +3 +4 +15 +65 +7 +21 +7 +22 +64 +7 +23 +64 +81 +24 +49 +6 +2 +15 +99 +7 +25 +7 +26 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +27 +7 +28 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +29 +7 +30 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +31 +7 +32 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +33 +7 +34 +65 +67 +49 +2 +0 +49 +3 +4 +15 +45 +35 +36 +7 +37 +64 +49 +38 +1 +13 +9 +202 +15 +45 +39 +40 +7 +41 +64 +84 +42 +9 +219 +99 +7 +43 +7 +44 +65 +67 +49 +2 +0 +49 +3 +4 +8 +220 +1 +15 +99 +7 +45 +7 +46 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +47 +7 +48 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +49 +7 +50 +65 +67 +49 +2 +0 +49 +3 +4 +11 +I +a +I +0 +I +0 +I +0 +n +p +51 +x +12 +test_version +M +1 +n +n +x +12 +test_version +i +8 +5 +56 +0 +47 +50 +1 +0 +11 +I +2 +I +0 +I +0 +I +0 +n +p +2 +M +1 +p +2 +x +9 +for_block +t +n +x +12 +test_version +i +29 +5 +7 +0 +13 +70 +9 +19 +15 +44 +43 +1 +7 +2 +78 +49 +3 +2 +6 +0 +45 +4 +5 +43 +6 +47 +49 +7 +2 +11 +I +5 +I +0 +I +0 +I +0 +I +-2 +p +8 +n +x +6 +Regexp +s +14 +\A\d\.\d\.\d\z +x +3 +new +x +7 +CodeRay +n +x +7 +VERSION +x +12 +assert_match +p +5 +I +0 +I +7 +I +0 +I +8 +I +1d +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +assert_nothing_raised +p +5 +I +0 +I +6 +I +0 +I +7 +I +8 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +17 +method_visibility +x +15 +add_defn_method +x +14 +RUBY_TEST_CODE +s +20 +puts "Hello, World!" +x +9 +const_set +x +16 +RUBY_TEST_TOKENS +s +4 +puts +x +5 +ident +s +1 + +x +5 +space +x +4 +open +x +6 +string +s +1 +" +x +9 +delimiter +s +13 +Hello, World! +x +7 +content +x +5 +close +x +16 +test_simple_scan +M +1 +n +n +x +16 +test_simple_scan +i +8 +5 +56 +0 +47 +50 +1 +0 +11 +I +2 +I +0 +I +0 +I +0 +n +p +2 +M +1 +p +2 +x +9 +for_block +t +n +x +16 +test_simple_scan +i +23 +5 +45 +0 +1 +45 +2 +3 +45 +4 +5 +7 +6 +49 +7 +2 +49 +8 +0 +47 +49 +9 +2 +11 +I +6 +I +0 +I +0 +I +0 +I +-2 +p +10 +x +16 +RUBY_TEST_TOKENS +n +x +7 +CodeRay +n +x +14 +RUBY_TEST_CODE +n +x +4 +ruby +x +4 +scan +x +6 +to_ary +x +12 +assert_equal +p +5 +I +0 +I +18 +I +0 +I +19 +I +17 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +assert_nothing_raised +p +5 +I +0 +I +17 +I +0 +I +18 +I +8 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +14 +RUBY_TEST_HTML +s +51 +puts " +s +73 +Hello, World!" +x +1 ++ +x +21 +test_simple_highlight +M +1 +n +n +x +21 +test_simple_highlight +i +8 +5 +56 +0 +47 +50 +1 +0 +11 +I +2 +I +0 +I +0 +I +0 +n +p +2 +M +1 +p +2 +x +9 +for_block +t +n +x +21 +test_simple_highlight +i +23 +5 +45 +0 +1 +45 +2 +3 +45 +4 +5 +7 +6 +49 +7 +2 +49 +8 +0 +47 +49 +9 +2 +11 +I +6 +I +0 +I +0 +I +0 +I +-2 +p +10 +x +14 +RUBY_TEST_HTML +n +x +7 +CodeRay +n +x +14 +RUBY_TEST_CODE +n +x +4 +ruby +x +4 +scan +x +4 +html +x +12 +assert_equal +p +5 +I +0 +I +20 +I +0 +I +21 +I +17 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +assert_nothing_raised +p +5 +I +0 +I +1f +I +0 +I +20 +I +8 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +8 +test_duo +M +1 +n +n +x +8 +test_duo +i +66 +5 +45 +0 +1 +45 +2 +3 +43 +4 +7 +5 +7 +5 +49 +6 +2 +45 +0 +7 +49 +8 +1 +47 +49 +9 +2 +15 +5 +45 +0 +10 +45 +2 +11 +43 +4 +44 +43 +12 +79 +49 +13 +1 +13 +7 +5 +7 +5 +49 +14 +2 +15 +49 +6 +1 +45 +0 +15 +49 +8 +1 +47 +49 +9 +2 +11 +I +7 +I +0 +I +0 +I +0 +n +p +16 +x +14 +RUBY_TEST_CODE +n +x +7 +CodeRay +n +x +3 +Duo +x +5 +plain +x +2 +[] +n +x +9 +highlight +x +12 +assert_equal +n +n +x +4 +Hash +x +16 +new_from_literal +x +3 +[]= +n +p +15 +I +0 +I +25 +I +0 +I +26 +I +4 +I +27 +I +16 +I +26 +I +1b +I +28 +I +1f +I +29 +I +3d +I +28 +I +42 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +15 +test_duo_stream +M +1 +n +n +x +15 +test_duo_stream +i +42 +5 +45 +0 +1 +45 +2 +3 +43 +4 +7 +5 +7 +5 +49 +6 +2 +45 +0 +7 +44 +43 +8 +79 +49 +9 +1 +13 +7 +10 +2 +49 +11 +2 +15 +49 +12 +2 +47 +49 +13 +2 +11 +I +8 +I +0 +I +0 +I +0 +n +p +14 +x +14 +RUBY_TEST_CODE +n +x +7 +CodeRay +n +x +3 +Duo +x +5 +plain +x +2 +[] +n +x +4 +Hash +x +16 +new_from_literal +x +6 +stream +x +3 +[]= +x +9 +highlight +x +12 +assert_equal +p +9 +I +0 +I +2c +I +0 +I +2d +I +4 +I +2e +I +25 +I +2d +I +2a +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +19 +test_comment_filter +M +1 +n +n +x +19 +test_comment_filter +i +26 +5 +7 +0 +64 +45 +1 +2 +7 +3 +64 +7 +4 +49 +5 +2 +49 +6 +0 +49 +7 +0 +47 +49 +8 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +9 +s +39 +#!/usr/bin/env ruby + +code + +more code + +x +7 +CodeRay +n +s +127 +#!/usr/bin/env ruby +=begin +A multi-line comment. +=end +code +# A single-line comment. +more code # and another comment, in-line. + +x +4 +ruby +x +4 +scan +x +14 +comment_filter +x +4 +text +x +12 +assert_equal +p +5 +I +0 +I +31 +I +0 +I +32 +I +1a +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +18 +test_lines_of_code +M +1 +n +n +x +18 +test_lines_of_code +i +108 +5 +80 +45 +0 +1 +7 +2 +64 +7 +3 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +15 +7 +7 +64 +19 +0 +15 +5 +78 +45 +0 +8 +20 +0 +7 +9 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +15 +5 +78 +45 +0 +10 +20 +0 +7 +11 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +15 +5 +78 +45 +0 +12 +20 +0 +7 +13 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +15 +5 +4 +4 +45 +0 +14 +20 +0 +7 +15 +49 +4 +2 +49 +5 +0 +47 +49 +6 +2 +11 +I +6 +I +1 +I +0 +I +0 +n +p +16 +x +7 +CodeRay +n +s +127 +#!/usr/bin/env ruby +=begin +A multi-line comment. +=end +code +# A single-line comment. +more code # and another comment, in-line. + +x +4 +ruby +x +4 +scan +x +13 +lines_of_code +x +12 +assert_equal +s +514 + + + + + + <%= controller.controller_name.titleize %>: <%= controller.action_name %> + <%= stylesheet_link_tag 'scaffold' %> + + + +

<%= flash[:notice] %>

+ +
+ <%= yield %> +
+ + + + +n +x +4 +html +n +x +3 +php +n +x +4 +yaml +n +x +5 +rhtml +p +15 +I +0 +I +43 +I +0 +I +44 +I +15 +I +4d +I +1b +I +62 +I +2f +I +63 +I +43 +I +64 +I +57 +I +65 +I +6c +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +1 +x +5 +rHTML +x +3 +ENV +n +s +14 +check_rubygems +x +2 +[] +x +12 +RUBY_VERSION +n +s +3 +1.9 +x +1 +< +x +24 +test_rubygems_not_loaded +M +1 +n +n +x +24 +test_rubygems_not_loaded +i +34 +5 +1 +26 +93 +0 +15 +29 +17 +0 +7 +0 +98 +1 +1 +30 +8 +23 +25 +92 +0 +27 +8 +28 +15 +7 +2 +8 +29 +1 +47 +49 +3 +2 +11 +I +4 +I +0 +I +0 +I +0 +n +p +4 +x +3 +Gem +x +16 +vm_const_defined +s +8 +constant +x +12 +assert_equal +p +5 +I +0 +I +68 +I +0 +I +69 +I +22 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +test_list_of_encoders +M +1 +n +n +x +21 +test_list_of_encoders +i +37 +5 +45 +0 +1 +45 +2 +3 +43 +4 +49 +5 +0 +47 +49 +6 +2 +15 +5 +45 +2 +7 +43 +4 +49 +5 +0 +7 +8 +64 +49 +9 +1 +47 +49 +10 +1 +11 +I +3 +I +0 +I +0 +I +0 +n +p +11 +x +5 +Array +n +x +7 +CodeRay +n +x +8 +Encoders +x +4 +list +x +14 +assert_kind_of +n +s +5 +count +x +8 +include? +x +6 +assert +p +7 +I +0 +I +6c +I +0 +I +6d +I +11 +I +6e +I +25 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +21 +test_list_of_scanners +M +1 +n +n +x +21 +test_list_of_scanners +i +37 +5 +45 +0 +1 +45 +2 +3 +43 +4 +49 +5 +0 +47 +49 +6 +2 +15 +5 +45 +2 +7 +43 +4 +49 +5 +0 +7 +8 +64 +49 +9 +1 +47 +49 +10 +1 +11 +I +3 +I +0 +I +0 +I +0 +n +p +11 +x +5 +Array +n +x +7 +CodeRay +n +x +8 +Scanners +x +4 +list +x +14 +assert_kind_of +n +s +9 +plaintext +x +8 +include? +x +6 +assert +p +7 +I +0 +I +71 +I +0 +I +72 +I +11 +I +73 +I +25 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +25 +test_scan_a_frozen_string +M +1 +n +n +x +25 +test_scan_a_frozen_string +i +12 +45 +0 +1 +45 +2 +3 +7 +4 +49 +5 +2 +11 +I +3 +I +0 +I +0 +I +0 +n +p +6 +x +7 +CodeRay +n +x +12 +RUBY_VERSION +n +x +4 +ruby +x +4 +scan +p +5 +I +0 +I +76 +I +0 +I +77 +I +c +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +p +51 +I +2 +I +6 +I +10 +I +c +I +1a +I +e +I +1d +I +f +I +24 +I +10 +I +2b +I +11 +I +31 +I +12 +I +38 +I +13 +I +3f +I +14 +I +46 +I +15 +I +52 +I +17 +I +60 +I +1d +I +63 +I +1d +I +66 +I +1e +I +6f +I +1f +I +7d +I +25 +I +8b +I +2c +I +99 +I +31 +I +a7 +I +43 +I +b5 +I +6a +I +cc +I +68 +I +db +I +6a +I +dd +I +6c +I +eb +I +71 +I +f9 +I +76 +I +107 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 +x +13 +attach_method +p +7 +I +0 +I +1 +I +9 +I +2 +I +12 +I +4 +I +35 +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/basic.rb +p +0 diff --git a/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rb b/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rb new file mode 100644 index 00000000..efd05782 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rb @@ -0,0 +1,77 @@ +require 'test/unit' +$:.unshift 'lib' +require 'coderay' + +begin + require 'rubygems' unless defined? Gem + gem 'RedCloth', '>= 4.0.3' rescue nil + require 'redcloth' +rescue LoadError + warn 'RedCloth not found - skipping for_redcloth tests.' +end + +class BasicTest < Test::Unit::TestCase + + def test_for_redcloth + require 'coderay/for_redcloth' + assert_equal "

puts "Hello, World!"

", + RedCloth.new('@[ruby]puts "Hello, World!"@').to_html + assert_equal <<-BLOCKCODE.chomp, +
+
puts "Hello, World!"
+
+ BLOCKCODE + RedCloth.new('bc[ruby]. puts "Hello, World!"').to_html + end + + def test_for_redcloth_no_lang + require 'coderay/for_redcloth' + assert_equal "

puts \"Hello, World!\"

", + RedCloth.new('@puts "Hello, World!"@').to_html + assert_equal <<-BLOCKCODE.chomp, +
puts \"Hello, World!\"
+ BLOCKCODE + RedCloth.new('bc. puts "Hello, World!"').to_html + end + + def test_for_redcloth_style + require 'coderay/for_redcloth' + assert_equal <<-BLOCKCODE.chomp, +
puts \"Hello, World!\"
+ BLOCKCODE + RedCloth.new('bc{color: red}. puts "Hello, World!"').to_html + end + + def test_for_redcloth_escapes + require 'coderay/for_redcloth' + assert_equal '

>

', + RedCloth.new('@[ruby]>@').to_html + assert_equal <<-BLOCKCODE.chomp, +
+
&
+
+ BLOCKCODE + RedCloth.new('bc[ruby]. &').to_html + end + + def test_for_redcloth_escapes2 + require 'coderay/for_redcloth' + assert_equal "

#include <test.h>

", + RedCloth.new('@[c]#include @').to_html + end + + # See http://jgarber.lighthouseapp.com/projects/13054/tickets/124-code-markup-does-not-allow-brackets. + def test_for_redcloth_false_positive + require 'coderay/for_redcloth' + assert_equal '

[project]_dff.skjd

', + RedCloth.new('@[project]_dff.skjd@').to_html + # false positive, but expected behavior / known issue + assert_equal "

_dff.skjd

", + RedCloth.new('@[ruby]_dff.skjd@').to_html + assert_equal <<-BLOCKCODE.chomp, +
[project]_dff.skjd
+ BLOCKCODE + RedCloth.new('bc. [project]_dff.skjd').to_html + end + +end if defined? RedCloth \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rbc b/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rbc new file mode 100644 index 00000000..09a7fc84 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/for_redcloth.rbc @@ -0,0 +1,1708 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +249 +5 +7 +0 +64 +47 +49 +1 +1 +15 +99 +43 +2 +7 +3 +49 +4 +1 +7 +5 +64 +49 +6 +1 +15 +5 +7 +7 +64 +47 +49 +1 +1 +15 +26 +93 +0 +15 +29 +144 +0 +26 +93 +1 +15 +29 +55 +0 +7 +8 +98 +9 +1 +30 +8 +61 +25 +92 +1 +27 +8 +66 +15 +7 +10 +8 +67 +1 +9 +72 +1 +8 +80 +5 +7 +11 +64 +47 +49 +1 +1 +15 +26 +93 +2 +15 +29 +102 +0 +5 +7 +12 +64 +7 +13 +64 +47 +49 +14 +2 +30 +8 +129 +26 +93 +3 +15 +24 +13 +45 +15 +16 +12 +49 +17 +1 +10 +119 +8 +124 +15 +1 +25 +8 +129 +15 +92 +3 +27 +34 +92 +2 +27 +15 +5 +7 +18 +64 +47 +49 +1 +1 +30 +8 +178 +26 +93 +4 +15 +24 +13 +45 +19 +20 +12 +49 +17 +1 +10 +161 +8 +173 +15 +5 +7 +21 +64 +47 +49 +22 +1 +25 +8 +178 +15 +92 +4 +27 +34 +92 +0 +27 +15 +26 +93 +5 +15 +29 +197 +0 +7 +23 +98 +9 +1 +30 +8 +203 +25 +92 +5 +27 +8 +208 +15 +7 +10 +8 +209 +1 +9 +245 +99 +7 +24 +45 +25 +26 +43 +27 +43 +28 +65 +49 +29 +3 +13 +99 +12 +7 +30 +12 +7 +31 +12 +65 +12 +49 +32 +4 +15 +49 +30 +0 +8 +246 +1 +15 +2 +11 +I +c +I +0 +I +0 +I +0 +n +p +33 +s +9 +test/unit +x +7 +require +x +7 +Globals +x +2 +$: +x +2 +[] +s +3 +lib +x +2 +<< +s +7 +coderay +x +3 +Gem +x +16 +vm_const_defined +s +8 +constant +s +8 +rubygems +s +8 +RedCloth +s +8 +>= 4.0.3 +x +3 +gem +x +13 +StandardError +n +x +3 +=== +s +8 +redcloth +x +9 +LoadError +n +s +49 +RedCloth not found - skipping for_redcloth tests. +x +4 +warn +x +8 +RedCloth +x +9 +BasicTest +x +4 +Test +n +x +4 +Unit +x +8 +TestCase +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +9 +BasicTest +i +86 +5 +66 +99 +7 +0 +7 +1 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +4 +7 +5 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +6 +7 +7 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +8 +7 +9 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +10 +7 +11 +65 +67 +49 +2 +0 +49 +3 +4 +15 +99 +7 +12 +7 +13 +65 +67 +49 +2 +0 +49 +3 +4 +11 +I +5 +I +0 +I +0 +I +0 +n +p +14 +x +17 +test_for_redcloth +M +1 +n +n +x +17 +test_for_redcloth +i +96 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +11 +64 +49 +12 +0 +45 +3 +13 +13 +71 +5 +47 +9 +82 +47 +49 +6 +0 +13 +7 +14 +64 +47 +49 +8 +1 +15 +8 +88 +7 +14 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +15 +s +20 +coderay/for_redcloth +x +7 +require +s +221 +

puts "Hello, World!"

+x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +28 +@[ruby]puts "Hello, World!"@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +s +252 +
+
puts "Hello, World!"
+
+ +x +5 +chomp +n +s +30 +bc[ruby]. puts "Hello, World!" +p +17 +I +0 +I +f +I +0 +I +10 +I +9 +I +11 +I +d +I +12 +I +2e +I +11 +I +33 +I +13 +I +3a +I +18 +I +5b +I +13 +I +60 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +17 +method_visibility +x +15 +add_defn_method +x +25 +test_for_redcloth_no_lang +M +1 +n +n +x +25 +test_for_redcloth_no_lang +i +96 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +11 +64 +49 +12 +0 +45 +3 +13 +13 +71 +5 +47 +9 +82 +47 +49 +6 +0 +13 +7 +14 +64 +47 +49 +8 +1 +15 +8 +88 +7 +14 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +15 +s +20 +coderay/for_redcloth +x +7 +require +s +40 +

puts "Hello, World!"

+x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +22 +@puts "Hello, World!"@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +s +45 +
puts "Hello, World!"
+ +x +5 +chomp +n +s +24 +bc. puts "Hello, World!" +p +17 +I +0 +I +1b +I +0 +I +1c +I +9 +I +1d +I +d +I +1e +I +2e +I +1d +I +33 +I +1f +I +3a +I +22 +I +5b +I +1f +I +60 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +23 +test_for_redcloth_style +M +1 +n +n +x +23 +test_for_redcloth_style +i +54 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +49 +3 +0 +45 +4 +5 +13 +71 +6 +47 +9 +40 +47 +49 +7 +0 +13 +7 +8 +64 +47 +49 +9 +1 +15 +8 +46 +7 +8 +64 +49 +6 +1 +49 +10 +0 +47 +49 +11 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +12 +s +20 +coderay/for_redcloth +x +7 +require +s +85 +
puts "Hello, World!"
+ +x +5 +chomp +x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +36 +bc{color: red}. puts "Hello, World!" +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +p +11 +I +0 +I +25 +I +0 +I +26 +I +9 +I +27 +I +10 +I +2a +I +31 +I +27 +I +36 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +25 +test_for_redcloth_escapes +M +1 +n +n +x +25 +test_for_redcloth_escapes +i +96 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +11 +64 +49 +12 +0 +45 +3 +13 +13 +71 +5 +47 +9 +82 +47 +49 +6 +0 +13 +7 +14 +64 +47 +49 +8 +1 +15 +8 +88 +7 +14 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +15 +s +20 +coderay/for_redcloth +x +7 +require +s +52 +

>

+x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +9 +@[ruby]>@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +s +84 +
+
&
+
+ +x +5 +chomp +n +s +11 +bc[ruby]. & +p +17 +I +0 +I +2d +I +0 +I +2e +I +9 +I +2f +I +d +I +30 +I +2e +I +2f +I +33 +I +31 +I +3a +I +36 +I +5b +I +31 +I +60 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +26 +test_for_redcloth_escapes2 +M +1 +n +n +x +26 +test_for_redcloth_escapes2 +i +51 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +11 +s +20 +coderay/for_redcloth +x +7 +require +s +149 +

#include <test.h>

+x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +22 +@[c]#include @ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +p +11 +I +0 +I +39 +I +0 +I +3a +I +9 +I +3b +I +d +I +3c +I +2e +I +3b +I +33 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +32 +test_for_redcloth_false_positive +M +1 +n +n +x +32 +test_for_redcloth_false_positive +i +138 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +45 +3 +4 +13 +71 +5 +47 +9 +37 +47 +49 +6 +0 +13 +7 +7 +64 +47 +49 +8 +1 +15 +8 +43 +7 +7 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +11 +64 +45 +3 +12 +13 +71 +5 +47 +9 +79 +47 +49 +6 +0 +13 +7 +13 +64 +47 +49 +8 +1 +15 +8 +85 +7 +13 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +15 +5 +7 +14 +64 +49 +15 +0 +45 +3 +16 +13 +71 +5 +47 +9 +124 +47 +49 +6 +0 +13 +7 +17 +64 +47 +49 +8 +1 +15 +8 +130 +7 +17 +64 +49 +5 +1 +49 +9 +0 +47 +49 +10 +2 +11 +I +5 +I +0 +I +0 +I +0 +n +p +18 +s +20 +coderay/for_redcloth +x +7 +require +s +38 +

[project]_dff.skjd

+x +8 +RedCloth +n +x +3 +new +x +8 +allocate +s +20 +@[project]_dff.skjd@ +x +10 +initialize +x +7 +to_html +x +12 +assert_equal +s +57 +

_dff.skjd

+n +s +17 +@[ruby]_dff.skjd@ +s +43 +
[project]_dff.skjd
+ +x +5 +chomp +n +s +22 +bc. [project]_dff.skjd +p +23 +I +0 +I +40 +I +0 +I +41 +I +9 +I +42 +I +d +I +43 +I +2e +I +42 +I +33 +I +45 +I +37 +I +46 +I +58 +I +45 +I +5d +I +47 +I +64 +I +4a +I +85 +I +47 +I +8a +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +p +13 +I +2 +I +f +I +10 +I +1b +I +1e +I +25 +I +2c +I +2d +I +3a +I +39 +I +48 +I +40 +I +56 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 +x +13 +attach_method +p +23 +I +0 +I +1 +I +9 +I +2 +I +18 +I +3 +I +21 +I +6 +I +51 +I +7 +I +85 +I +8 +I +95 +I +9 +I +a2 +I +a +I +b6 +I +4d +I +d3 +I +d +I +f5 +I +4d +I +f9 +x +62 +/Users/murphy/ruby/coderay-0.9/test/functional/for_redcloth.rb +p +0 diff --git a/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rb b/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rb new file mode 100644 index 00000000..25bbc93a --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rb @@ -0,0 +1,11 @@ +require 'test/unit' +require 'coderay' + +class PluginScannerTest < Test::Unit::TestCase + + def test_load + require File.join(File.dirname(__FILE__), 'vhdl') + assert_equal 'VHDL', CodeRay.scanner(:vhdl).class.name + end + +end diff --git a/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rbc b/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rbc new file mode 100644 index 00000000..ef61d340 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/load_plugin_scanner.rbc @@ -0,0 +1,317 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +53 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +47 +49 +1 +1 +15 +99 +7 +3 +45 +4 +5 +43 +6 +43 +7 +65 +49 +8 +3 +13 +99 +12 +7 +9 +12 +7 +10 +12 +65 +12 +49 +11 +4 +15 +49 +9 +0 +15 +2 +11 +I +6 +I +0 +I +0 +I +0 +n +p +12 +s +9 +test/unit +x +7 +require +s +7 +coderay +x +17 +PluginScannerTest +x +4 +Test +n +x +4 +Unit +x +8 +TestCase +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +17 +PluginScannerTest +i +16 +5 +66 +99 +7 +0 +7 +1 +65 +67 +49 +2 +0 +49 +3 +4 +11 +I +5 +I +0 +I +0 +I +0 +n +p +4 +x +9 +test_load +M +1 +n +n +x +9 +test_load +i +48 +5 +45 +0 +1 +45 +0 +2 +65 +49 +3 +0 +49 +4 +1 +7 +5 +64 +49 +6 +2 +47 +49 +7 +1 +15 +5 +7 +8 +64 +45 +9 +10 +7 +11 +49 +12 +1 +49 +13 +0 +49 +14 +0 +47 +49 +15 +2 +11 +I +4 +I +0 +I +0 +I +0 +n +p +16 +x +4 +File +n +n +x +11 +active_path +x +7 +dirname +s +4 +vhdl +x +4 +join +x +7 +require +s +4 +VHDL +x +7 +CodeRay +n +x +4 +vhdl +x +7 +scanner +x +5 +class +x +4 +name +x +12 +assert_equal +p +7 +I +0 +I +6 +I +0 +I +7 +I +19 +I +8 +I +30 +x +69 +/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb +p +0 +x +17 +method_visibility +x +15 +add_defn_method +p +3 +I +2 +I +6 +I +10 +x +69 +/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb +p +0 +x +13 +attach_method +p +7 +I +0 +I +1 +I +9 +I +2 +I +12 +I +4 +I +35 +x +69 +/Users/murphy/ruby/coderay-0.9/test/functional/load_plugin_scanner.rb +p +0 diff --git a/vendor/gems/coderay-0.9.7/test/functional/suite.rb b/vendor/gems/coderay-0.9.7/test/functional/suite.rb new file mode 100644 index 00000000..97dd330d --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/suite.rb @@ -0,0 +1,12 @@ +require 'test/unit' + +MYDIR = File.dirname(__FILE__) + +$:.unshift 'lib' +require 'coderay' +puts "Running basic CodeRay #{CodeRay::VERSION} tests..." + +suite = %w(basic load_plugin_scanner word_list) +for test_case in suite + load File.join(MYDIR, test_case + '.rb') +end diff --git a/vendor/gems/coderay-0.9.7/test/functional/suite.rbc b/vendor/gems/coderay-0.9.7/test/functional/suite.rbc new file mode 100644 index 00000000..977354ae --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/suite.rbc @@ -0,0 +1,322 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +95 +5 +7 +0 +64 +47 +49 +1 +1 +15 +65 +7 +2 +45 +3 +4 +65 +49 +5 +0 +49 +6 +1 +49 +7 +2 +15 +99 +43 +8 +7 +9 +49 +10 +1 +7 +11 +64 +49 +12 +1 +15 +5 +7 +13 +64 +47 +49 +1 +1 +15 +5 +7 +14 +45 +15 +16 +43 +17 +47 +49 +18 +0 +7 +19 +63 +3 +47 +49 +20 +1 +15 +7 +21 +64 +7 +22 +64 +7 +23 +64 +35 +3 +19 +0 +15 +20 +0 +56 +24 +50 +25 +0 +15 +2 +11 +I +6 +I +2 +I +0 +I +0 +n +p +26 +s +9 +test/unit +x +7 +require +x +5 +MYDIR +x +4 +File +n +x +11 +active_path +x +7 +dirname +x +9 +const_set +x +7 +Globals +x +2 +$: +x +2 +[] +s +3 +lib +x +2 +<< +s +7 +coderay +s +22 +Running basic CodeRay +x +7 +CodeRay +n +x +7 +VERSION +x +4 +to_s +s +9 + tests... +x +4 +puts +s +5 +basic +s +19 +load_plugin_scanner +s +9 +word_list +M +1 +p +2 +x +9 +for_block +t +n +x +9 +__block__ +i +28 +57 +22 +1 +1 +15 +5 +45 +0 +1 +45 +2 +3 +21 +1 +1 +7 +4 +64 +81 +5 +49 +6 +2 +47 +49 +7 +1 +11 +I +6 +I +0 +I +1 +I +1 +n +p +8 +x +4 +File +n +x +5 +MYDIR +n +s +3 +.rb +x +1 ++ +x +4 +join +x +4 +load +p +5 +I +0 +I +a +I +5 +I +b +I +1c +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/suite.rb +p +0 +x +4 +each +p +15 +I +0 +I +1 +I +9 +I +3 +I +1a +I +5 +I +29 +I +6 +I +32 +I +7 +I +47 +I +9 +I +55 +I +a +I +5f +x +55 +/Users/murphy/ruby/coderay-0.9/test/functional/suite.rb +p +2 +x +5 +suite +x +9 +test_case diff --git a/vendor/gems/coderay-0.9.7/test/functional/vhdl.rb b/vendor/gems/coderay-0.9.7/test/functional/vhdl.rb new file mode 100644 index 00000000..c7e38243 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/vhdl.rb @@ -0,0 +1,126 @@ +class VHDL < CodeRay::Scanners::Scanner + + register_for :vhdl + + RESERVED_WORDS = [ + 'access','after','alias','all','assert','architecture','begin', + 'block','body','buffer','bus','case','component','configuration','constant', + 'disconnect','downto','else','elsif','end','entity','exit','file','for', + 'function','generate','generic','group','guarded','if','impure','in', + 'inertial','inout','is','label','library','linkage','literal','loop', + 'map','new','next','null','of','on','open','others','out','package', + 'port','postponed','procedure','process','pure','range','record','register', + 'reject','report','return','select','severity','signal','shared','subtype', + 'then','to','transport','type','unaffected','units','until','use','variable', + 'wait','when','while','with','note','warning','error','failure','and', + 'or','xor','not','nor', + 'array' + ] + + PREDEFINED_TYPES = [ + 'bit','bit_vector','character','boolean','integer','real','time','string', + 'severity_level','positive','natural','signed','unsigned','line','text', + 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state', + 'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength', + 'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector' + ] + + PREDEFINED_CONSTANTS = [ + + ] + + IDENT_KIND = CodeRay::CaseIgnoringWordList.new(:ident). + add(RESERVED_WORDS, :reserved). + add(PREDEFINED_TYPES, :pre_type). + add(PREDEFINED_CONSTANTS, :pre_constant) + + ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x + UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x + + def scan_tokens tokens, options + + state = :initial + + until eos? + + kind = nil + match = nil + + case state + + when :initial + + if scan(/ \s+ | \\\n /x) + kind = :space + + elsif scan(/-- .*/x) + kind = :comment + + elsif scan(/ [-+*\/=<>?:;,!&^|()\[\]{}~%]+ | \.(?!\d) /x) + kind = :operator + + elsif match = scan(/ [A-Za-z_][A-Za-z_0-9]* /x) + kind = IDENT_KIND[match.downcase] + + elsif match = scan(/[a-z]?"/i) + tokens << [:open, :string] + state = :string + kind = :delimiter + + elsif scan(/ L?' (?: [^\'\n\\] | \\ #{ESCAPE} )? '? /ox) + kind = :char + + elsif scan(/(?:\d+)(?![.eEfF])/) + kind = :integer + + elsif scan(/\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]?/) + kind = :float + + else + getch + kind = :error + + end + + when :string + if scan(/[^\\\n"]+/) + kind = :content + elsif scan(/"/) + tokens << ['"', :delimiter] + tokens << [:close, :string] + state = :initial + next + elsif scan(/ \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) /mox) + kind = :char + elsif scan(/ \\ | $ /x) + tokens << [:close, :string] + kind = :error + state = :initial + else + raise_inspect "else case \" reached; %p not handled." % peek(1), tokens + end + + else + raise_inspect 'Unknown state', tokens + + end + + match ||= matched + if $DEBUG and not kind + raise_inspect 'Error token %p in line %d' % + [[match, kind], line], tokens + end + raise_inspect 'Empty token', tokens unless match + + tokens << [match, kind] + + end + + if state == :string + tokens << [:close, :string] + end + + tokens + end + +end diff --git a/vendor/gems/coderay-0.9.7/test/functional/vhdl.rbc b/vendor/gems/coderay-0.9.7/test/functional/vhdl.rbc new file mode 100644 index 00000000..80d01bf6 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/vhdl.rbc @@ -0,0 +1,2334 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +35 +99 +7 +0 +45 +1 +2 +43 +3 +43 +4 +65 +49 +5 +3 +13 +99 +12 +7 +6 +12 +7 +7 +12 +65 +12 +49 +8 +4 +15 +49 +6 +0 +15 +2 +11 +I +6 +I +0 +I +0 +I +0 +n +p +9 +x +4 +VHDL +x +7 +CodeRay +n +x +8 +Scanners +x +7 +Scanner +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +4 +VHDL +i +519 +5 +66 +5 +7 +0 +47 +49 +1 +1 +15 +65 +7 +2 +7 +3 +64 +7 +4 +64 +7 +5 +64 +7 +6 +64 +7 +7 +64 +7 +8 +64 +7 +9 +64 +7 +10 +64 +7 +11 +64 +7 +12 +64 +7 +13 +64 +7 +14 +64 +7 +15 +64 +7 +16 +64 +7 +17 +64 +7 +18 +64 +7 +19 +64 +7 +20 +64 +7 +21 +64 +7 +22 +64 +7 +23 +64 +7 +24 +64 +7 +25 +64 +7 +26 +64 +7 +27 +64 +7 +28 +64 +7 +29 +64 +7 +30 +64 +7 +31 +64 +7 +32 +64 +7 +33 +64 +7 +34 +64 +7 +35 +64 +7 +36 +64 +7 +37 +64 +7 +38 +64 +7 +39 +64 +7 +40 +64 +7 +41 +64 +7 +42 +64 +7 +43 +64 +7 +44 +64 +7 +45 +64 +7 +46 +64 +7 +47 +64 +7 +48 +64 +7 +49 +64 +7 +50 +64 +7 +51 +64 +7 +52 +64 +7 +53 +64 +7 +54 +64 +7 +55 +64 +7 +56 +64 +7 +57 +64 +7 +58 +64 +7 +59 +64 +7 +60 +64 +7 +61 +64 +7 +62 +64 +7 +63 +64 +7 +64 +64 +7 +65 +64 +7 +66 +64 +7 +67 +64 +7 +68 +64 +7 +69 +64 +7 +70 +64 +7 +71 +64 +7 +72 +64 +7 +73 +64 +7 +74 +64 +7 +75 +64 +7 +76 +64 +7 +77 +64 +7 +78 +64 +7 +79 +64 +7 +80 +64 +7 +81 +64 +7 +82 +64 +7 +83 +64 +7 +84 +64 +7 +85 +64 +7 +86 +64 +7 +87 +64 +7 +88 +64 +7 +89 +64 +7 +90 +64 +7 +91 +64 +35 +89 +49 +92 +2 +15 +65 +7 +93 +7 +94 +64 +7 +95 +64 +7 +96 +64 +7 +97 +64 +7 +98 +64 +7 +99 +64 +7 +100 +64 +7 +101 +64 +7 +102 +64 +7 +103 +64 +7 +104 +64 +7 +105 +64 +7 +106 +64 +7 +107 +64 +7 +108 +64 +7 +109 +64 +7 +110 +64 +7 +111 +64 +7 +112 +64 +7 +113 +64 +7 +114 +64 +7 +115 +64 +7 +116 +64 +7 +117 +64 +7 +118 +64 +7 +119 +64 +7 +120 +64 +7 +121 +64 +7 +122 +64 +7 +123 +64 +35 +30 +49 +92 +2 +15 +65 +7 +124 +35 +0 +49 +92 +2 +15 +65 +7 +125 +45 +126 +127 +43 +128 +13 +71 +129 +47 +9 +422 +47 +49 +130 +0 +13 +7 +131 +47 +49 +132 +1 +15 +8 +427 +7 +131 +49 +129 +1 +45 +2 +133 +7 +134 +49 +135 +2 +45 +93 +136 +7 +137 +49 +135 +2 +45 +124 +138 +7 +139 +49 +135 +2 +49 +92 +2 +15 +65 +7 +140 +7 +141 +13 +70 +9 +476 +15 +44 +43 +142 +7 +143 +80 +49 +129 +2 +6 +141 +49 +92 +2 +15 +65 +7 +144 +7 +145 +13 +70 +9 +501 +15 +44 +43 +142 +7 +146 +80 +49 +129 +2 +6 +145 +49 +92 +2 +15 +99 +7 +147 +7 +148 +65 +67 +49 +149 +0 +49 +150 +4 +11 +I +5b +I +0 +I +0 +I +0 +n +p +151 +x +4 +vhdl +x +12 +register_for +x +14 +RESERVED_WORDS +s +6 +access +s +5 +after +s +5 +alias +s +3 +all +s +6 +assert +s +12 +architecture +s +5 +begin +s +5 +block +s +4 +body +s +6 +buffer +s +3 +bus +s +4 +case +s +9 +component +s +13 +configuration +s +8 +constant +s +10 +disconnect +s +6 +downto +s +4 +else +s +5 +elsif +s +3 +end +s +6 +entity +s +4 +exit +s +4 +file +s +3 +for +s +8 +function +s +8 +generate +s +7 +generic +s +5 +group +s +7 +guarded +s +2 +if +s +6 +impure +s +2 +in +s +8 +inertial +s +5 +inout +s +2 +is +s +5 +label +s +7 +library +s +7 +linkage +s +7 +literal +s +4 +loop +s +3 +map +s +3 +new +s +4 +next +s +4 +null +s +2 +of +s +2 +on +s +4 +open +s +6 +others +s +3 +out +s +7 +package +s +4 +port +s +9 +postponed +s +9 +procedure +s +7 +process +s +4 +pure +s +5 +range +s +6 +record +s +8 +register +s +6 +reject +s +6 +report +s +6 +return +s +6 +select +s +8 +severity +s +6 +signal +s +6 +shared +s +7 +subtype +s +4 +then +s +2 +to +s +9 +transport +s +4 +type +s +10 +unaffected +s +5 +units +s +5 +until +s +3 +use +s +8 +variable +s +4 +wait +s +4 +when +s +5 +while +s +4 +with +s +4 +note +s +7 +warning +s +5 +error +s +7 +failure +s +3 +and +s +2 +or +s +3 +xor +s +3 +not +s +3 +nor +s +5 +array +x +9 +const_set +x +16 +PREDEFINED_TYPES +s +3 +bit +s +10 +bit_vector +s +9 +character +s +7 +boolean +s +7 +integer +s +4 +real +s +4 +time +s +6 +string +s +14 +severity_level +s +8 +positive +s +7 +natural +s +6 +signed +s +8 +unsigned +s +4 +line +s +4 +text +s +9 +std_logic +s +16 +std_logic_vector +s +10 +std_ulogic +s +17 +std_ulogic_vector +s +10 +qsim_state +s +17 +qsim_state_vector +s +12 +qsim_12state +s +19 +qsim_12state_vector +s +13 +qsim_strength +s +7 +mux_bit +s +10 +mux_vector +s +7 +reg_bit +s +10 +reg_vector +s +7 +wor_bit +s +10 +wor_vector +x +20 +PREDEFINED_CONSTANTS +x +10 +IDENT_KIND +x +7 +CodeRay +n +x +20 +CaseIgnoringWordList +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +n +x +8 +reserved +x +3 +add +n +x +8 +pre_type +n +x +12 +pre_constant +x +6 +ESCAPE +n +x +6 +Regexp +s +49 + [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} +x +14 +UNICODE_ESCAPE +n +s +35 + u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} +x +11 +scan_tokens +M +1 +n +n +x +11 +scan_tokens +i +688 +7 +0 +19 +2 +15 +5 +47 +49 +1 +0 +10 +660 +1 +19 +3 +15 +1 +19 +4 +15 +20 +2 +13 +7 +0 +12 +49 +2 +1 +9 +331 +15 +5 +7 +3 +13 +70 +9 +51 +15 +44 +43 +4 +7 +5 +80 +49 +6 +2 +6 +3 +47 +49 +7 +1 +9 +63 +7 +8 +19 +3 +8 +329 +5 +7 +9 +13 +70 +9 +82 +15 +44 +43 +4 +7 +10 +80 +49 +6 +2 +6 +9 +47 +49 +7 +1 +9 +94 +7 +11 +19 +3 +8 +329 +5 +7 +12 +13 +70 +9 +113 +15 +44 +43 +4 +7 +13 +80 +49 +6 +2 +6 +12 +47 +49 +7 +1 +9 +125 +7 +14 +19 +3 +8 +329 +5 +7 +15 +13 +70 +9 +144 +15 +44 +43 +4 +7 +16 +80 +49 +6 +2 +6 +15 +47 +49 +7 +1 +19 +4 +9 +167 +45 +17 +18 +20 +4 +49 +19 +0 +49 +20 +1 +19 +3 +8 +329 +5 +7 +21 +13 +70 +9 +186 +15 +44 +43 +4 +7 +22 +79 +49 +6 +2 +6 +21 +47 +49 +7 +1 +19 +4 +9 +217 +20 +0 +7 +23 +7 +24 +35 +2 +49 +25 +1 +15 +7 +24 +19 +2 +15 +7 +26 +19 +3 +8 +329 +5 +7 +27 +13 +70 +9 +247 +15 +44 +43 +4 +7 +28 +45 +29 +30 +47 +49 +31 +0 +7 +32 +63 +3 +80 +49 +6 +2 +6 +27 +47 +49 +7 +1 +9 +259 +7 +33 +19 +3 +8 +329 +5 +7 +34 +13 +70 +9 +278 +15 +44 +43 +4 +7 +35 +78 +49 +6 +2 +6 +34 +47 +49 +7 +1 +9 +290 +7 +36 +19 +3 +8 +329 +5 +7 +37 +13 +70 +9 +309 +15 +44 +43 +4 +7 +38 +78 +49 +6 +2 +6 +37 +47 +49 +7 +1 +9 +321 +7 +39 +19 +3 +8 +329 +5 +48 +40 +15 +7 +41 +19 +3 +8 +564 +13 +7 +24 +12 +49 +2 +1 +9 +553 +15 +5 +7 +42 +13 +70 +9 +360 +15 +44 +43 +4 +7 +43 +78 +49 +6 +2 +6 +42 +47 +49 +7 +1 +9 +372 +7 +44 +19 +3 +8 +551 +5 +7 +45 +13 +70 +9 +391 +15 +44 +43 +4 +7 +46 +78 +49 +6 +2 +6 +45 +47 +49 +7 +1 +9 +432 +20 +0 +7 +46 +64 +7 +26 +35 +2 +49 +25 +1 +15 +20 +0 +7 +47 +7 +24 +35 +2 +49 +25 +1 +15 +7 +0 +19 +2 +15 +1 +8 +656 +8 +551 +5 +7 +48 +13 +70 +9 +472 +15 +44 +43 +4 +7 +49 +45 +29 +50 +47 +49 +31 +0 +7 +51 +45 +52 +53 +47 +49 +31 +0 +7 +54 +63 +5 +4 +6 +49 +6 +2 +6 +48 +47 +49 +7 +1 +9 +484 +7 +33 +19 +3 +8 +551 +5 +7 +55 +13 +70 +9 +503 +15 +44 +43 +4 +7 +56 +80 +49 +6 +2 +6 +55 +47 +49 +7 +1 +9 +532 +20 +0 +7 +47 +7 +24 +35 +2 +49 +25 +1 +15 +7 +41 +19 +3 +15 +7 +0 +19 +2 +8 +551 +5 +7 +57 +64 +5 +79 +47 +49 +58 +1 +49 +59 +1 +20 +0 +47 +49 +60 +2 +8 +564 +15 +5 +7 +61 +64 +20 +0 +47 +49 +60 +2 +15 +20 +4 +13 +10 +576 +15 +5 +48 +62 +19 +4 +15 +99 +43 +63 +7 +64 +49 +20 +1 +13 +9 +597 +15 +20 +3 +10 +596 +2 +8 +597 +3 +9 +625 +5 +7 +65 +64 +20 +4 +20 +3 +35 +2 +5 +48 +66 +35 +2 +49 +59 +1 +20 +0 +47 +49 +60 +2 +8 +626 +1 +15 +20 +4 +9 +634 +1 +8 +644 +5 +7 +67 +64 +20 +0 +47 +49 +60 +2 +15 +20 +0 +20 +4 +20 +3 +35 +2 +49 +25 +1 +15 +68 +8 +5 +1 +15 +20 +2 +7 +24 +83 +68 +9 +683 +20 +0 +7 +47 +7 +24 +35 +2 +49 +25 +1 +8 +684 +1 +15 +20 +0 +11 +I +c +I +5 +I +2 +I +2 +n +p +69 +x +7 +initial +x +4 +eos? +x +3 +=== +n +x +6 +Regexp +s +12 + \s+ | \\\n +x +3 +new +x +4 +scan +x +5 +space +n +s +5 +-- .* +x +7 +comment +n +s +42 + [-+*\/=<>?:;,!&^|()\[\]{}~%]+ | \.(?!\d) +x +8 +operator +n +s +24 + [A-Za-z_][A-Za-z_0-9]* +x +10 +IDENT_KIND +n +x +8 +downcase +x +2 +[] +n +s +7 +[a-z]?" +x +4 +open +x +6 +string +x +2 +<< +x +9 +delimiter +n +s +24 + L?' (?: [^\'\n\\] | \\ +x +6 +ESCAPE +n +x +4 +to_s +s +7 + )? '? +x +4 +char +n +s +18 +(?:\d+)(?![.eEfF]) +x +7 +integer +n +s +59 +\d[fF]?|\d*\.\d+(?:[eE][+-]?\d+)?[fF]?|\d+[eE][+-]?\d+[fF]? +x +5 +float +x +5 +getch +x +5 +error +n +s +9 +[^\\\n"]+ +x +7 +content +n +s +1 +" +x +5 +close +n +s +8 + \\ (?: +n +s +3 + | +x +14 +UNICODE_ESCAPE +n +s +3 + ) +n +s +8 + \\ | $ +s +36 +else case " reached; %p not handled. +x +4 +peek +x +1 +% +x +13 +raise_inspect +s +13 +Unknown state +x +7 +matched +x +7 +Globals +x +6 +$DEBUG +s +25 +Error token %p in line %d +x +4 +line +s +11 +Empty token +x +2 +== +p +111 +I +0 +I +28 +I +0 +I +2a +I +5 +I +2c +I +c +I +2e +I +10 +I +2f +I +14 +I +31 +I +17 +I +33 +I +20 +I +35 +I +39 +I +36 +I +3f +I +38 +I +58 +I +39 +I +5e +I +3b +I +77 +I +3c +I +7d +I +3e +I +98 +I +3f +I +a7 +I +41 +I +c2 +I +42 +I +ce +I +43 +I +d3 +I +44 +I +d9 +I +46 +I +fd +I +47 +I +103 +I +49 +I +11c +I +4a +I +122 +I +4c +I +13b +I +4d +I +141 +I +50 +I +145 +I +51 +I +14c +I +55 +I +155 +I +56 +I +16e +I +57 +I +174 +I +58 +I +18d +I +59 +I +19a +I +5a +I +1a6 +I +5b +I +1ab +I +5c +I +1b0 +I +5d +I +1de +I +5e +I +1e4 +I +5f +I +1fd +I +60 +I +209 +I +61 +I +20e +I +62 +I +214 +I +64 +I +22a +I +68 +I +235 +I +6c +I +241 +I +6d +I +257 +I +6f +I +258 +I +6e +I +25b +I +6f +I +271 +I +6d +I +273 +I +71 +I +285 +I +73 +I +296 +I +77 +I +29e +I +78 +I +2ab +I +77 +I +2ad +I +7b +I +2b0 +x +54 +/Users/murphy/ruby/coderay-0.9/test/functional/vhdl.rb +p +5 +x +6 +tokens +x +7 +options +x +5 +state +x +4 +kind +x +5 +match +x +17 +method_visibility +x +15 +add_defn_method +p +65 +I +2 +I +3 +I +a +I +5 +I +d +I +6 +I +22 +I +7 +I +3a +I +8 +I +55 +I +9 +I +6d +I +a +I +85 +I +b +I +a3 +I +c +I +bb +I +d +I +d3 +I +e +I +ee +I +f +I +109 +I +10 +I +115 +I +11 +I +11e +I +14 +I +121 +I +15 +I +139 +I +16 +I +14e +I +17 +I +15d +I +18 +I +169 +I +19 +I +181 +I +1c +I +184 +I +1e +I +18a +I +20 +I +1ab +I +21 +I +1b0 +I +20 +I +1b3 +I +22 +I +1b8 +I +20 +I +1bb +I +23 +I +1c0 +I +20 +I +1c7 +I +25 +I +1e0 +I +26 +I +1f9 +I +28 +I +207 +x +54 +/Users/murphy/ruby/coderay-0.9/test/functional/vhdl.rb +p +0 +x +13 +attach_method +p +3 +I +0 +I +1 +I +23 +x +54 +/Users/murphy/ruby/coderay-0.9/test/functional/vhdl.rb +p +0 diff --git a/vendor/gems/coderay-0.9.7/test/functional/word_list.rb b/vendor/gems/coderay-0.9.7/test/functional/word_list.rb new file mode 100644 index 00000000..84d6e9e7 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/word_list.rb @@ -0,0 +1,79 @@ +require 'test/unit' +require 'coderay' + +class WordListTest < Test::Unit::TestCase + + include CodeRay + + # define word arrays + RESERVED_WORDS = %w[ + asm break case continue default do else + ... + ] + + PREDEFINED_TYPES = %w[ + int long short char void + ... + ] + + PREDEFINED_CONSTANTS = %w[ + EOF NULL ... + ] + + # make a WordList + IDENT_KIND = WordList.new(:ident). + add(RESERVED_WORDS, :reserved). + add(PREDEFINED_TYPES, :pre_type). + add(PREDEFINED_CONSTANTS, :pre_constant) + + def test_word_list_example + assert_equal :pre_type, IDENT_KIND['void'] + # assert_equal :pre_constant, IDENT_KIND['...'] # not specified + end + + def test_word_list + list = WordList.new(:ident).add(['foobar'], :reserved) + assert_equal :reserved, list['foobar'] + assert_equal :ident, list['FooBar'] + end + + def test_word_list_cached + list = WordList.new(:ident, true).add(['foobar'], :reserved) + assert_equal :reserved, list['foobar'] + assert_equal :ident, list['FooBar'] + end + + def test_case_ignoring_word_list + list = CaseIgnoringWordList.new(:ident).add(['foobar'], :reserved) + assert_equal :ident, list['foo'] + assert_equal :reserved, list['foobar'] + assert_equal :reserved, list['FooBar'] + + list = CaseIgnoringWordList.new(:ident).add(['FooBar'], :reserved) + assert_equal :ident, list['foo'] + assert_equal :reserved, list['foobar'] + assert_equal :reserved, list['FooBar'] + end + + def test_case_ignoring_word_list_cached + list = CaseIgnoringWordList.new(:ident, true).add(['foobar'], :reserved) + assert_equal :ident, list['foo'] + assert_equal :reserved, list['foobar'] + assert_equal :reserved, list['FooBar'] + + list = CaseIgnoringWordList.new(:ident, true).add(['FooBar'], :reserved) + assert_equal :ident, list['foo'] + assert_equal :reserved, list['foobar'] + assert_equal :reserved, list['FooBar'] + end + + def test_dup + list = WordList.new(:ident).add(['foobar'], :reserved) + assert_equal :reserved, list['foobar'] + list2 = list.dup + list2.add(%w[foobar], :keyword) + assert_equal :keyword, list2['foobar'] + assert_equal :reserved, list['foobar'] + end + +end \ No newline at end of file diff --git a/vendor/gems/coderay-0.9.7/test/functional/word_list.rbc b/vendor/gems/coderay-0.9.7/test/functional/word_list.rbc new file mode 100644 index 00000000..37bcdd28 --- /dev/null +++ b/vendor/gems/coderay-0.9.7/test/functional/word_list.rbc @@ -0,0 +1,1763 @@ +!RBIX +0 +x +M +1 +n +n +x +10 +__script__ +i +53 +5 +7 +0 +64 +47 +49 +1 +1 +15 +5 +7 +2 +64 +47 +49 +1 +1 +15 +99 +7 +3 +45 +4 +5 +43 +6 +43 +7 +65 +49 +8 +3 +13 +99 +12 +7 +9 +12 +7 +10 +12 +65 +12 +49 +11 +4 +15 +49 +9 +0 +15 +2 +11 +I +6 +I +0 +I +0 +I +0 +n +p +12 +s +9 +test/unit +x +7 +require +s +7 +coderay +x +12 +WordListTest +x +4 +Test +n +x +4 +Unit +x +8 +TestCase +x +10 +open_class +x +14 +__class_init__ +M +1 +n +n +x +12 +WordListTest +i +232 +5 +66 +5 +45 +0 +1 +47 +49 +2 +1 +15 +65 +7 +3 +7 +4 +64 +7 +5 +64 +7 +6 +64 +7 +7 +64 +7 +8 +64 +7 +9 +64 +7 +10 +64 +7 +11 +64 +35 +8 +49 +12 +2 +15 +65 +7 +13 +7 +14 +64 +7 +15 +64 +7 +16 +64 +7 +17 +64 +7 +18 +64 +7 +11 +64 +35 +6 +49 +12 +2 +15 +65 +7 +19 +7 +20 +64 +7 +21 +64 +7 +11 +64 +35 +3 +49 +12 +2 +15 +65 +7 +22 +45 +23 +24 +13 +71 +25 +47 +9 +115 +47 +49 +26 +0 +13 +7 +27 +47 +49 +28 +1 +15 +8 +120 +7 +27 +49 +25 +1 +45 +3 +29 +7 +30 +49 +31 +2 +45 +13 +32 +7 +33 +49 +31 +2 +45 +19 +34 +7 +35 +49 +31 +2 +49 +12 +2 +15 +99 +7 +36 +7 +37 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +40 +7 +41 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +42 +7 +43 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +44 +7 +45 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +46 +7 +47 +65 +67 +49 +38 +0 +49 +39 +4 +15 +99 +7 +48 +7 +49 +65 +67 +49 +38 +0 +49 +39 +4 +11 +I +a +I +0 +I +0 +I +0 +n +p +50 +x +7 +CodeRay +n +x +7 +include +x +14 +RESERVED_WORDS +s +3 +asm +s +5 +break +s +4 +case +s +8 +continue +s +7 +default +s +2 +do +s +4 +else +s +3 +... +x +9 +const_set +x +16 +PREDEFINED_TYPES +s +3 +int +s +4 +long +s +5 +short +s +4 +char +s +4 +void +x +20 +PREDEFINED_CONSTANTS +s +3 +EOF +s +4 +NULL +x +10 +IDENT_KIND +x +8 +WordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +n +x +8 +reserved +x +3 +add +n +x +8 +pre_type +n +x +12 +pre_constant +x +22 +test_word_list_example +M +1 +n +n +x +22 +test_word_list_example +i +17 +5 +7 +0 +45 +1 +2 +7 +3 +64 +49 +4 +1 +47 +49 +5 +2 +11 +I +4 +I +0 +I +0 +I +0 +n +p +6 +x +8 +pre_type +x +10 +IDENT_KIND +n +s +4 +void +x +2 +[] +x +12 +assert_equal +p +5 +I +0 +I +1d +I +0 +I +1e +I +11 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +0 +x +17 +method_visibility +x +15 +add_defn_method +x +14 +test_word_list +M +1 +n +n +x +14 +test_word_list +i +73 +45 +0 +1 +13 +71 +2 +47 +9 +23 +47 +49 +3 +0 +13 +7 +4 +47 +49 +5 +1 +15 +8 +28 +7 +4 +49 +2 +1 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +15 +5 +7 +4 +20 +0 +7 +11 +64 +49 +9 +1 +47 +49 +10 +2 +11 +I +5 +I +1 +I +0 +I +0 +n +p +12 +x +8 +WordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +x +2 +[] +x +12 +assert_equal +s +6 +FooBar +p +9 +I +0 +I +22 +I +0 +I +23 +I +29 +I +24 +I +39 +I +25 +I +49 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +1 +x +4 +list +x +21 +test_word_list_cached +M +1 +n +n +x +21 +test_word_list_cached +i +75 +45 +0 +1 +13 +71 +2 +47 +9 +24 +47 +49 +3 +0 +13 +7 +4 +2 +47 +49 +5 +2 +15 +8 +30 +7 +4 +2 +49 +2 +2 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +15 +5 +7 +4 +20 +0 +7 +11 +64 +49 +9 +1 +47 +49 +10 +2 +11 +I +5 +I +1 +I +0 +I +0 +n +p +12 +x +8 +WordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +x +2 +[] +x +12 +assert_equal +s +6 +FooBar +p +9 +I +0 +I +28 +I +0 +I +29 +I +2b +I +2a +I +3b +I +2b +I +4b +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +1 +x +4 +list +x +28 +test_case_ignoring_word_list +M +1 +n +n +x +28 +test_case_ignoring_word_list +i +178 +45 +0 +1 +13 +71 +2 +47 +9 +23 +47 +49 +3 +0 +13 +7 +4 +47 +49 +5 +1 +15 +8 +28 +7 +4 +49 +2 +1 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +4 +20 +0 +7 +9 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +12 +64 +49 +10 +1 +47 +49 +11 +2 +15 +45 +0 +13 +13 +71 +2 +47 +9 +112 +47 +49 +3 +0 +13 +7 +4 +47 +49 +5 +1 +15 +8 +117 +7 +4 +49 +2 +1 +7 +12 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +4 +20 +0 +7 +9 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +12 +64 +49 +10 +1 +47 +49 +11 +2 +11 +I +5 +I +1 +I +0 +I +0 +n +p +14 +x +20 +CaseIgnoringWordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +s +3 +foo +x +2 +[] +x +12 +assert_equal +s +6 +FooBar +n +p +19 +I +0 +I +2e +I +0 +I +2f +I +29 +I +30 +I +39 +I +31 +I +49 +I +32 +I +59 +I +34 +I +82 +I +35 +I +92 +I +36 +I +a2 +I +37 +I +b2 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +1 +x +4 +list +x +35 +test_case_ignoring_word_list_cached +M +1 +n +n +x +35 +test_case_ignoring_word_list_cached +i +182 +45 +0 +1 +13 +71 +2 +47 +9 +24 +47 +49 +3 +0 +13 +7 +4 +2 +47 +49 +5 +2 +15 +8 +30 +7 +4 +2 +49 +2 +2 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +4 +20 +0 +7 +9 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +12 +64 +49 +10 +1 +47 +49 +11 +2 +15 +45 +0 +13 +13 +71 +2 +47 +9 +115 +47 +49 +3 +0 +13 +7 +4 +2 +47 +49 +5 +2 +15 +8 +121 +7 +4 +2 +49 +2 +2 +7 +12 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +4 +20 +0 +7 +9 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +10 +1 +47 +49 +11 +2 +15 +5 +7 +7 +20 +0 +7 +12 +64 +49 +10 +1 +47 +49 +11 +2 +11 +I +5 +I +1 +I +0 +I +0 +n +p +14 +x +20 +CaseIgnoringWordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +s +3 +foo +x +2 +[] +x +12 +assert_equal +s +6 +FooBar +n +p +19 +I +0 +I +3a +I +0 +I +3b +I +2b +I +3c +I +3b +I +3d +I +4b +I +3e +I +5b +I +40 +I +86 +I +41 +I +96 +I +42 +I +a6 +I +43 +I +b6 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +1 +x +4 +list +x +8 +test_dup +M +1 +n +n +x +8 +test_dup +i +110 +45 +0 +1 +13 +71 +2 +47 +9 +23 +47 +49 +3 +0 +13 +7 +4 +47 +49 +5 +1 +15 +8 +28 +7 +4 +49 +2 +1 +7 +6 +64 +35 +1 +7 +7 +49 +8 +2 +19 +0 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +15 +20 +0 +49 +11 +0 +19 +1 +15 +20 +1 +7 +6 +64 +35 +1 +7 +12 +49 +8 +2 +15 +5 +7 +12 +20 +1 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +15 +5 +7 +7 +20 +0 +7 +6 +64 +49 +9 +1 +47 +49 +10 +2 +11 +I +6 +I +2 +I +0 +I +0 +n +p +13 +x +8 +WordList +n +x +3 +new +x +8 +allocate +x +5 +ident +x +10 +initialize +s +6 +foobar +x +8 +reserved +x +3 +add +x +2 +[] +x +12 +assert_equal +x +3 +dup +x +7 +keyword +p +15 +I +0 +I +46 +I +0 +I +47 +I +29 +I +48 +I +39 +I +49 +I +41 +I +4a +I +4e +I +4b +I +5e +I +4c +I +6e +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +2 +x +4 +list +x +5 +list2 +p +45 +I +2 +I +6 +I +b +I +9 +I +e +I +a +I +23 +I +b +I +2c +I +e +I +2f +I +f +I +3e +I +10 +I +47 +I +13 +I +4a +I +14 +I +59 +I +18 +I +78 +I +19 +I +7d +I +18 +I +80 +I +1a +I +85 +I +18 +I +88 +I +1b +I +8d +I +18 +I +94 +I +1d +I +a2 +I +22 +I +b0 +I +28 +I +be +I +2e +I +cc +I +3a +I +da +I +46 +I +e8 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +0 +x +13 +attach_method +p +7 +I +0 +I +1 +I +9 +I +2 +I +12 +I +4 +I +35 +x +59 +/Users/murphy/ruby/coderay-0.9/test/functional/word_list.rb +p +0 From cc10d1a0d8e6665768593376095659b41ac5d517 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 22 Jan 2011 13:21:24 +0000 Subject: [PATCH 11/48] Removed extraneous hidden_field on wiki history (#7379). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4740 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/wiki/history.rhtml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/wiki/history.rhtml b/app/views/wiki/history.rhtml index 23d45099..392c3b9f 100644 --- a/app/views/wiki/history.rhtml +++ b/app/views/wiki/history.rhtml @@ -3,7 +3,6 @@

<%= l(:label_history) %>

<% form_tag({:action => "diff"}, :method => :get) do %> - <%= hidden_field_tag('project_id', h(@project.to_param)) %> From c2a530f8c8c1ac811d493908d549be8dc8baecc4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 22 Jan 2011 13:28:20 +0000 Subject: [PATCH 12/48] Moves relations fetching from views to the controller and skip invalid relations (#7385). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4741 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 1 + app/views/issues/_relations.rhtml | 4 ++-- app/views/issues/show.api.rsb | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 3d1dbe9f..051f8910 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -108,6 +108,7 @@ class IssuesController < ApplicationController @journals.reverse! if User.current.wants_comments_in_reverse_order? @changesets = @issue.changesets.visible.all @changesets.reverse! if User.current.wants_comments_in_reverse_order? + @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? } @allowed_statuses = @issue.new_statuses_allowed_to(User.current) @edit_allowed = User.current.allowed_to?(:edit_issues, @project) @priorities = IssuePriority.all diff --git a/app/views/issues/_relations.rhtml b/app/views/issues/_relations.rhtml index 5b27fa6a..f8535b82 100644 --- a/app/views/issues/_relations.rhtml +++ b/app/views/issues/_relations.rhtml @@ -6,9 +6,9 @@

<%=l(:label_related_issues)%>

-<% if @issue.relations.any? %> +<% if @relations.present? %>
#
-<% @issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation| %> +<% @relations.each do |relation| %>
<%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %> <%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %> diff --git a/app/views/issues/show.api.rsb b/app/views/issues/show.api.rsb index a6461ff8..170aeb37 100644 --- a/app/views/issues/show.api.rsb +++ b/app/views/issues/show.api.rsb @@ -26,10 +26,10 @@ api.issue do render_api_issue_children(@issue, api) if include_in_api_response?('children') api.array :relations do - @issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation| + @relations.each do |relation| api.relation(:id => relation.id, :issue_id => relation.other_issue(@issue).id, :relation_type => relation.relation_type_for(@issue), :delay => relation.delay) end - end if include_in_api_response?('relations') + end if include_in_api_response?('relations') && @relations.present? api.array :changesets do @issue.changesets.each do |changeset| From 5ff1f6fdfa651c5daf915332257e2dc306638cd7 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 22 Jan 2011 15:37:59 +0000 Subject: [PATCH 13/48] scm: darcs: add unit lib test. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4742 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../scm/adapters/darcs_adapter_test.rb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb diff --git a/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb new file mode 100644 index 00000000..ddcea89b --- /dev/null +++ b/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb @@ -0,0 +1,25 @@ +require File.expand_path('../../../../../../test_helper', __FILE__) +begin + require 'mocha' + + class DarcsAdapterTest < ActiveSupport::TestCase + + REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/darcs_repository' + + if File.directory?(REPOSITORY_PATH) + def setup + @adapter = Redmine::Scm::Adapters::DarcsAdapter.new(REPOSITORY_PATH) + end + + else + puts "Darcs test repository NOT FOUND. Skipping unit tests !!!" + def test_fake; assert true end + end + end + +rescue LoadError + class DarcsMochaFake < ActiveSupport::TestCase + def test_fake; assert(false, "Requires mocha to run those tests") end + end +end + From 668b0c0e50613586a49b54b8e37541260da03b31 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 22 Jan 2011 15:38:23 +0000 Subject: [PATCH 14/48] scm: darcs: change io.gets to io.read and add darcs version unit (#4494, #5404). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4743 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/darcs_adapter.rb | 16 +++++++--------- .../redmine/scm/adapters/darcs_adapter_test.rb | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb index ecc69a4e..381f609c 100644 --- a/lib/redmine/scm/adapters/darcs_adapter.rb +++ b/lib/redmine/scm/adapters/darcs_adapter.rb @@ -31,16 +31,14 @@ module Redmine end def darcs_binary_version - cmd = "#{DARCS_BIN} --version" - version = nil - shellout(cmd) do |io| - # Read darcs version in first returned line - if m = io.gets.match(%r{((\d+\.)+\d+)}) - version = m[0].scan(%r{\d+}).collect(&:to_i) - end + darcsversion = darcs_binary_version_from_command_line + if m = darcsversion.match(%r{\A(.*?)((\d+\.)+\d+)}) + m[2].scan(%r{\d+}).collect(&:to_i) end - return nil if $? && $?.exitstatus != 0 - version + end + + def darcs_binary_version_from_command_line + shellout("#{DARCS_BIN} --version") { |io| io.read }.to_s end end diff --git a/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb index ddcea89b..820ffdb9 100644 --- a/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb @@ -11,6 +11,21 @@ begin @adapter = Redmine::Scm::Adapters::DarcsAdapter.new(REPOSITORY_PATH) end + def test_darcsversion + to_test = { "1.0.9 (release)\n" => [1,0,9] , + "2.2.0 (release)\n" => [2,2,0] } + to_test.each do |s, v| + test_darcsversion_for(s, v) + end + end + + private + + def test_darcsversion_for(darcsversion, version) + @adapter.class.expects(:darcs_binary_version_from_command_line).returns(darcsversion) + assert_equal version, @adapter.class.darcs_binary_version + end + else puts "Darcs test repository NOT FOUND. Skipping unit tests !!!" def test_fake; assert true end From d6594fde27839dac7c94cc6621eb49049d167a21 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 22 Jan 2011 15:38:47 +0000 Subject: [PATCH 15/48] scm: darcs: switch '.' or @url at entries() in darcs version (#4899). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4744 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/darcs_adapter.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb index 381f609c..1b78f77a 100644 --- a/lib/redmine/scm/adapters/darcs_adapter.rb +++ b/lib/redmine/scm/adapters/darcs_adapter.rb @@ -62,7 +62,9 @@ module Redmine # or nil if the given path doesn't exist in the repository def entries(path=nil, identifier=nil) path_prefix = (path.blank? ? '' : "#{path}/") - path = '.' if path.blank? + if path.blank? + path = ( self.class.client_version_above?([2, 2, 0]) ? @url : '.' ) + end entries = Entries.new cmd = "#{DARCS_BIN} annotate --repodir #{shell_quote @url} --xml-output" cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier From 75cc7a81305e62b901ffd74e72a8cf6363db7080 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 23 Jan 2011 04:17:03 +0000 Subject: [PATCH 16/48] scm: darcs: add compatible test of Darcs 2.3 and 2.4 (#7415). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4748 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../lib/redmine/scm/adapters/darcs_adapter_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb index 820ffdb9..993b42ca 100644 --- a/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb @@ -19,6 +19,19 @@ begin end end + def test_revisions + id1 = '20080308225258-98289-761f654d669045eabee90b91b53a21ce5593cadf.gz' + revs = @adapter.revisions('', nil, nil, {:with_path => true}) + assert_equal 6, revs.size + assert_equal id1, revs[5].scmid + paths = revs[5].paths + assert_equal 5, paths.size + assert_equal 'A', paths[0][:action] + assert_equal '/README', paths[0][:path] + assert_equal 'A', paths[1][:action] + assert_equal '/images', paths[1][:path] + end + private def test_darcsversion_for(darcsversion, version) From 908e9f9c285ce982dd96b4c9b1cf02b1a397d17d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 23 Jan 2011 04:17:26 +0000 Subject: [PATCH 17/48] scm: darcs: fix Darcs adapter recognizes new files as modified files above Darcs 2.4 (#7415). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4749 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/darcs_adapter.rb | 31 ++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb index 1b78f77a..69805a36 100644 --- a/lib/redmine/scm/adapters/darcs_adapter.rb +++ b/lib/redmine/scm/adapters/darcs_adapter.rb @@ -167,9 +167,38 @@ module Redmine }) }) end + + def get_paths_for_patch(hash) + paths = get_paths_for_patch_raw(hash) + if self.class.client_version_above?([2, 4]) + orig_paths = paths + paths = [] + add_paths = [] + add_paths_name = [] + mod_paths = [] + other_paths = [] + orig_paths.each do |path| + if path[:action] == 'A' + add_paths << path + add_paths_name << path[:path] + elsif path[:action] == 'M' + mod_paths << path + else + other_paths << path + end + end + add_paths_name.each do |add_path| + mod_paths.delete_if { |m| m[:path] == add_path } + end + paths.concat add_paths + paths.concat mod_paths + paths.concat other_paths + end + paths + end # Retrieve changed paths for a single patch - def get_paths_for_patch(hash) + def get_paths_for_patch_raw(hash) cmd = "#{DARCS_BIN} annotate --repodir #{shell_quote @url} --summary --xml-output" cmd << " --match #{shell_quote("hash #{hash}")} " paths = [] From 9a13b39e261da8100c64ae49460162504b3343e8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Jan 2011 10:22:00 +0000 Subject: [PATCH 18/48] Adds an application configuration file: config/configuration.yml (#7408). Email delivery settings that were stored in config/email.yml should be moved to this new configuration file. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4752 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mailer.rb | 2 +- config/configuration.yml.example | 98 +++++++++++++++++++++ config/email.yml.example | 87 ------------------ config/environment.rb | 2 +- config/initializers/40-email.rb | 17 ---- config/locales/bg.yml | 2 +- config/locales/bs.yml | 2 +- config/locales/ca.yml | 2 +- config/locales/cs.yml | 2 +- config/locales/da.yml | 2 +- config/locales/de.yml | 2 +- config/locales/el.yml | 2 +- config/locales/en-GB.yml | 2 +- config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- config/locales/eu.yml | 2 +- config/locales/fi.yml | 2 +- config/locales/fr.yml | 2 +- config/locales/gl.yml | 2 +- config/locales/he.yml | 2 +- config/locales/hr.yml | 2 +- config/locales/hu.yml | 2 +- config/locales/id.yml | 2 +- config/locales/it.yml | 2 +- config/locales/ja.yml | 2 +- config/locales/ko.yml | 2 +- config/locales/lt.yml | 2 +- config/locales/lv.yml | 2 +- config/locales/mk.yml | 2 +- config/locales/mn.yml | 2 +- config/locales/nl.yml | 2 +- config/locales/no.yml | 2 +- config/locales/pl.yml | 2 +- config/locales/pt-BR.yml | 2 +- config/locales/pt.yml | 2 +- config/locales/ro.yml | 2 +- config/locales/ru.yml | 2 +- config/locales/sk.yml | 2 +- config/locales/sl.yml | 2 +- config/locales/sr-YU.yml | 2 +- config/locales/sr.yml | 2 +- config/locales/sv.yml | 2 +- config/locales/th.yml | 2 +- config/locales/tr.yml | 2 +- config/locales/uk.yml | 2 +- config/locales/vi.yml | 2 +- config/locales/zh-TW.yml | 2 +- config/locales/zh.yml | 2 +- doc/INSTALL | 4 +- doc/UPGRADING | 6 +- lib/redmine/configuration.rb | 97 ++++++++++++++++++++ test/fixtures/configuration/default.yml | 8 ++ test/fixtures/configuration/empty.yml | 7 ++ test/fixtures/configuration/no_default.yml | 8 ++ test/fixtures/configuration/overrides.yml | 9 ++ test/unit/lib/redmine/configuration_test.rb | 52 +++++++++++ 56 files changed, 330 insertions(+), 153 deletions(-) create mode 100644 config/configuration.yml.example delete mode 100644 config/email.yml.example delete mode 100644 config/initializers/40-email.rb create mode 100644 lib/redmine/configuration.rb create mode 100644 test/fixtures/configuration/default.yml create mode 100644 test/fixtures/configuration/empty.yml create mode 100644 test/fixtures/configuration/no_default.yml create mode 100644 test/fixtures/configuration/overrides.yml create mode 100644 test/unit/lib/redmine/configuration_test.rb diff --git a/app/models/mailer.rb b/app/models/mailer.rb index e88e740a..2d18a2c7 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -296,7 +296,7 @@ class Mailer < ActionMailer::Base if raise_errors raise e elsif mylogger - mylogger.error "The following error occured while sending email notification: \"#{e.message}\". Check your configuration in config/email.yml." + mylogger.error "The following error occured while sending email notification: \"#{e.message}\". Check your configuration in config/configuration.yml." end ensure self.class.raise_delivery_errors = raise_errors diff --git a/config/configuration.yml.example b/config/configuration.yml.example new file mode 100644 index 00000000..4baaeff5 --- /dev/null +++ b/config/configuration.yml.example @@ -0,0 +1,98 @@ +# = Redmine configuration file +# +# Each environment has it's own configuration options. If you are only +# running in production, only the production block needs to be configured. +# Environment specific configuration options override the default ones. +# +# Note that this file needs to be a valid YAML file. +# +# == Outgoing email settings (email_delivery setting) +# +# === Common configurations +# +# ==== Sendmail command +# +# production: +# email_delivery: +# delivery_method: :sendmail +# +# ==== Simple SMTP server at localhost +# +# production: +# email_delivery: +# delivery_method: :smtp +# smtp_settings: +# address: "localhost" +# port: 25 +# +# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com +# +# production: +# email_delivery: +# delivery_method: :smtp +# smtp_settings: +# address: "example.com" +# port: 25 +# authentication: :login +# domain: 'foo.com' +# user_name: 'myaccount' +# password: 'password' +# +# ==== SMTP server at example.com using PLAIN authentication +# +# production: +# email_delivery: +# delivery_method: :smtp +# smtp_settings: +# address: "example.com" +# port: 25 +# authentication: :plain +# domain: 'example.com' +# user_name: 'myaccount' +# password: 'password' +# +# ==== SMTP server at using TLS (GMail) +# +# This requires some additional configuration. See the article at: +# http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/ +# +# production: +# email_delivery: +# delivery_method: :smtp +# smtp_settings: +# tls: true +# address: "smtp.gmail.com" +# port: 587 +# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps +# authentication: :plain +# user_name: "your_email@gmail.com" +# password: "your_password" +# +# +# === More configuration options +# +# See the "Configuration options" at the following website for a list of the +# full options allowed: +# +# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer + + +# default configuration options for all environments +default: + email_delivery: + delivery_method: :smtp + smtp_settings: + address: smtp.example.net + port: 25 + domain: example.net + authentication: :login + user_name: "redmine@example.net" + password: "redmine" + +# specific configuration options for production environment +# that overrides the default ones +production: + +# specific configuration options for development environment +# that overrides the default ones +development: diff --git a/config/email.yml.example b/config/email.yml.example deleted file mode 100644 index 884a5f29..00000000 --- a/config/email.yml.example +++ /dev/null @@ -1,87 +0,0 @@ -# = Outgoing email settings -# -# Each environment has it's own configuration options. If you are only -# running in production, only the production block needs to be configured. -# -# == Common configurations -# -# === Sendmail command -# -# production: -# delivery_method: :sendmail -# -# === Simple SMTP server at localhost -# -# production: -# delivery_method: :smtp -# smtp_settings: -# address: "localhost" -# port: 25 -# -# === SMTP server at example.com using LOGIN authentication and checking HELO for foo.com -# -# production: -# delivery_method: :smtp -# smtp_settings: -# address: "example.com" -# port: 25 -# authentication: :login -# domain: 'foo.com' -# user_name: 'myaccount' -# password: 'password' -# -# === SMTP server at example.com using PLAIN authentication -# -# production: -# delivery_method: :smtp -# smtp_settings: -# address: "example.com" -# port: 25 -# authentication: :plain -# domain: 'example.com' -# user_name: 'myaccount' -# password: 'password' -# -# === SMTP server at using TLS (GMail) -# -# This requires some additional configuration. See the article at: -# http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/ -# -# production: -# delivery_method: :smtp -# smtp_settings: -# tls: true -# address: "smtp.gmail.com" -# port: 587 -# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps -# authentication: :plain -# user_name: "your_email@gmail.com" -# password: "your_password" -# -# -# == More configuration options -# -# See the "Configuration options" at the following website for a list of the -# full options allowed: -# -# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer - -production: - delivery_method: :smtp - smtp_settings: - address: smtp.example.net - port: 25 - domain: example.net - authentication: :login - user_name: "redmine@example.net" - password: "redmine" - -development: - delivery_method: :smtp - smtp_settings: - address: 127.0.0.1 - port: 25 - domain: example.net - authentication: :login - user_name: "redmine@example.net" - password: "redmine" diff --git a/config/environment.rb b/config/environment.rb index 6ca13d38..19966557 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -46,7 +46,7 @@ Rails::Initializer.run do |config| # config.active_record.schema_format = :ruby # Deliveries are disabled by default. Do NOT modify this section. - # Define your email configuration in email.yml instead. + # Define your email configuration in configuration.yml instead. # It will automatically turn deliveries on config.action_mailer.perform_deliveries = false diff --git a/config/initializers/40-email.rb b/config/initializers/40-email.rb deleted file mode 100644 index 5b388ec5..00000000 --- a/config/initializers/40-email.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Loads action_mailer settings from email.yml -# and turns deliveries on if configuration file is found - -filename = File.join(File.dirname(__FILE__), '..', 'email.yml') -if File.file?(filename) - mailconfig = YAML::load_file(filename) - - if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env) - # Enable deliveries - ActionMailer::Base.perform_deliveries = true - - mailconfig[Rails.env].each do |k, v| - v.symbolize_keys! if v.respond_to?(:symbolize_keys!) - ActionMailer::Base.send("#{k}=", v) - end - end -end diff --git a/config/locales/bg.yml b/config/locales/bg.yml index c719a1c1..fb97cd41 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -722,7 +722,7 @@ bg: label_generate_key: Генериране на ключ setting_mail_handler_api_enabled: Разрешаване на WS за входящи e-mail-и setting_mail_handler_api_key: API ключ - text_email_delivery_not_configured: "Изпращането на e-mail-и не е конфигурирано и известията не са разрешени.\nКонфигурирайте вашия SMTP сървър в config/email.yml и рестартирайте Redmine, за да ги разрешите." + text_email_delivery_not_configured: "Изпращането на e-mail-и не е конфигурирано и известията не са разрешени.\nКонфигурирайте вашия SMTP сървър в config/configuration.yml и рестартирайте Redmine, за да ги разрешите." field_parent_title: Родителска страница label_issue_watchers: Наблюдатели setting_commit_logs_encoding: Кодова таблица на съобщенията при поверяване diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 44bfb1c2..3b200615 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -787,7 +787,7 @@ bs: text_user_wrote: "%{value} je napisao/la:" text_enumeration_destroy_question: "Za %{count} objekata je dodjeljenja ova vrijednost." text_enumeration_category_reassign_to: 'Ponovo im dodjeli ovu vrijednost:' - text_email_delivery_not_configured: "Email dostava nije konfiguraisana, notifikacija je onemogućena.\nKonfiguriši SMTP server u config/email.yml i restartuj aplikaciju nakon toga." + text_email_delivery_not_configured: "Email dostava nije konfiguraisana, notifikacija je onemogućena.\nKonfiguriši SMTP server u config/configuration.yml i restartuj aplikaciju nakon toga." text_repository_usernames_mapping: "Odaberi ili ispravi redmine korisnika mapiranog za svako korisničko ima nađeno u logu repozitorija.\nKorisnici sa istim imenom u redmineu i u repozitoruju se automatski mapiraju." text_diff_truncated: '... Ovaj prikaz razlike je odsječen pošto premašuje maksimalnu veličinu za prikaz' text_custom_field_possible_values_info: 'Jedna linija za svaku vrijednost' diff --git a/config/locales/ca.yml b/config/locales/ca.yml index b4c5b529..c497f675 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -880,7 +880,7 @@ ca: text_user_wrote: "%{value} va escriure:" text_enumeration_destroy_question: "%{count} objectes estan assignats a aquest valor." text_enumeration_category_reassign_to: "Torna a assignar-los a aquest valor:" - text_email_delivery_not_configured: "El lliurament per correu electrònic no està configurat i les notificacions estan inhabilitades.\nConfigureu el servidor SMTP a config/email.yml i reinicieu l'aplicació per habilitar-lo." + text_email_delivery_not_configured: "El lliurament per correu electrònic no està configurat i les notificacions estan inhabilitades.\nConfigureu el servidor SMTP a config/configuration.yml i reinicieu l'aplicació per habilitar-lo." text_repository_usernames_mapping: "Seleccioneu l'assignació entre els usuaris del Redmine i cada nom d'usuari trobat al dipòsit.\nEls usuaris amb el mateix nom d'usuari o correu del Redmine i del dipòsit s'assignaran automàticament." text_diff_truncated: "... Aquestes diferències s'han trucat perquè excedeixen la mida màxima que es pot mostrar." text_custom_field_possible_values_info: "Una línia per a cada valor" diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 1146f90f..ecefa78e 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -729,7 +729,7 @@ cs: label_generate_key: Generovat klíč setting_mail_handler_api_enabled: Povolit WS pro příchozí e-maily setting_mail_handler_api_key: API klíč - text_email_delivery_not_configured: "Doručování e-mailů není nastaveno a odesílání notifikací je zakázáno.\nNastavte Váš SMTP server v souboru config/email.yml a restartujte aplikaci." + text_email_delivery_not_configured: "Doručování e-mailů není nastaveno a odesílání notifikací je zakázáno.\nNastavte Váš SMTP server v souboru config/configuration.yml a restartujte aplikaci." field_parent_title: Rodičovská stránka label_issue_watchers: Sledování setting_commit_logs_encoding: Kódování zpráv při commitu diff --git a/config/locales/da.yml b/config/locales/da.yml index d066d33d..b976499f 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -753,7 +753,7 @@ da: setting_sequential_project_identifiers: Generér sekventielle projekt-identifikatorer setting_plain_text_mail: Emails som almindelig tekst (ingen HTML) field_parent_title: Siden over - text_email_delivery_not_configured: "Email-afsendelse er ikke indstillet og notifikationer er defor slået fra.\nKonfigurér din SMTP server i config/email.yml og genstart applikationen for at aktivere email-afsendelse." + text_email_delivery_not_configured: "Email-afsendelse er ikke indstillet og notifikationer er defor slået fra.\nKonfigurér din SMTP server i config/configuration.yml og genstart applikationen for at aktivere email-afsendelse." permission_protect_wiki_pages: Beskyt wiki sider permission_manage_documents: Administrér dokumenter permission_add_issue_watchers: Tilføj overvågere diff --git a/config/locales/de.yml b/config/locales/de.yml index 161b62d0..e88caa41 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -898,7 +898,7 @@ de: text_user_wrote: "%{value} schrieb:" text_enumeration_destroy_question: "%{count} Objekt(e) sind diesem Wert zugeordnet." text_enumeration_category_reassign_to: 'Die Objekte stattdessen diesem Wert zuordnen:' - text_email_delivery_not_configured: "Der SMTP-Server ist nicht konfiguriert und Mailbenachrichtigungen sind ausgeschaltet.\nNehmen Sie die Einstellungen für Ihren SMTP-Server in config/email.yml vor und starten Sie die Applikation neu." + text_email_delivery_not_configured: "Der SMTP-Server ist nicht konfiguriert und Mailbenachrichtigungen sind ausgeschaltet.\nNehmen Sie die Einstellungen für Ihren SMTP-Server in config/configuration.yml vor und starten Sie die Applikation neu." text_repository_usernames_mapping: "Bitte legen Sie die Zuordnung der Redmine-Benutzer zu den Benutzernamen der Commit-Log-Meldungen des Projektarchivs fest.\nBenutzer mit identischen Redmine- und Projektarchiv-Benutzernamen oder -E-Mail-Adressen werden automatisch zugeordnet." text_diff_truncated: '... Dieser Diff wurde abgeschnitten, weil er die maximale Anzahl anzuzeigender Zeilen überschreitet.' text_custom_field_possible_values_info: 'Eine Zeile pro Wert' diff --git a/config/locales/el.yml b/config/locales/el.yml index a95903b1..5fbfc2d7 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -798,7 +798,7 @@ el: text_user_wrote: "%{value} έγραψε:" text_enumeration_destroy_question: "%{count} αντικείμενα έχουν τεθεί σε αυτή την τιμή." text_enumeration_category_reassign_to: 'Επανεκχώρηση τους στην παρούσα αξία:' - text_email_delivery_not_configured: "Δεν έχουν γίνει ρυθμίσεις παράδοσης email, και οι ειδοποιήσεις είναι απενεργοποιημένες.\nΔηλώστε τον εξυπηρετητή SMTP στο config/email.yml και κάντε επανακκίνηση την εφαρμογή για να τις ρυθμίσεις." + text_email_delivery_not_configured: "Δεν έχουν γίνει ρυθμίσεις παράδοσης email, και οι ειδοποιήσεις είναι απενεργοποιημένες.\nΔηλώστε τον εξυπηρετητή SMTP στο config/configuration.yml και κάντε επανακκίνηση την εφαρμογή για να τις ρυθμίσεις." text_repository_usernames_mapping: "Επιλέξτε ή ενημερώστε τον χρήστη Redmine που αντιστοιχεί σε κάθε όνομα χρήστη στο ιστορικό του αποθετηρίου.\nΧρήστες με το ίδιο όνομα χρήστη ή email στο Redmine και στο αποθετηρίο αντιστοιχίζονται αυτόματα." text_diff_truncated: '... Αυτό το diff εχεί κοπεί επειδή υπερβαίνει το μέγιστο μέγεθος που μπορεί να προβληθεί.' text_custom_field_possible_values_info: 'Μία γραμμή για κάθε τιμή' diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index b92e7883..4a34dd28 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -864,7 +864,7 @@ en-GB: text_user_wrote: "%{value} wrote:" text_enumeration_destroy_question: "%{count} objects are assigned to this value." text_enumeration_category_reassign_to: 'Reassign them to this value:' - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." + text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped." text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' text_custom_field_possible_values_info: 'One line for each value' diff --git a/config/locales/en.yml b/config/locales/en.yml index 727ad656..d32a2bdb 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -897,7 +897,7 @@ en: text_user_wrote: "%{value} wrote:" text_enumeration_destroy_question: "%{count} objects are assigned to this value." text_enumeration_category_reassign_to: 'Reassign them to this value:' - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." + text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped." text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' text_custom_field_possible_values_info: 'One line for each value' diff --git a/config/locales/es.yml b/config/locales/es.yml index ac4fc311..7b712e11 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -795,7 +795,7 @@ es: text_destroy_time_entries: Borrar las horas text_destroy_time_entries_question: Existen %{hours} horas asignadas a la petición que quiere borrar. ¿Qué quiere hacer? text_diff_truncated: '... Diferencia truncada por exceder el máximo tamaño visualizable.' - text_email_delivery_not_configured: "Las notificaciones están desactivadas porque el servidor de correo no está configurado.\nConfigure el servidor de SMTP en config/email.yml y reinicie la aplicación para activar los cambios." + text_email_delivery_not_configured: "Las notificaciones están desactivadas porque el servidor de correo no está configurado.\nConfigure el servidor de SMTP en config/configuration.yml y reinicie la aplicación para activar los cambios." text_enumeration_category_reassign_to: 'Reasignar al siguiente valor:' text_enumeration_destroy_question: "%{count} objetos con este valor asignado." text_file_repository_writable: Se puede escribir en el repositorio diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 8c6a29f3..63366474 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -859,7 +859,7 @@ eu: text_user_wrote: "%{value}-(e)k idatzi zuen:" text_enumeration_destroy_question: "%{count} objetu balio honetara esleituta daude." text_enumeration_category_reassign_to: 'Beste balio honetara esleitu:' - text_email_delivery_not_configured: "Eposta bidalketa ez dago konfiguratuta eta jakinarazpenak ezgaituta daude.\nKonfiguratu zure SMTP zerbitzaria config/email.yml-n eta aplikazioa berrabiarazi hauek gaitzeko." + text_email_delivery_not_configured: "Eposta bidalketa ez dago konfiguratuta eta jakinarazpenak ezgaituta daude.\nKonfiguratu zure SMTP zerbitzaria config/configuration.yml-n eta aplikazioa berrabiarazi hauek gaitzeko." text_repository_usernames_mapping: "Hautatu edo eguneratu Redmineko erabiltzailea biltegiko egunkarietan topatzen diren erabiltzaile izenekin erlazionatzeko.\nRedmine-n eta biltegian erabiltzaile izen edo eposta berdina duten erabiltzaileak automatikoki erlazionatzen dira." text_diff_truncated: '... Diff hau moztua izan da erakus daitekeen tamaina maximoa gainditu duelako.' text_custom_field_possible_values_info: 'Lerro bat balio bakoitzeko' diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 99b6d0a6..7b9abfa7 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -750,7 +750,7 @@ fi: label_generate_key: Luo avain setting_mail_handler_api_enabled: Ota käyttöön WS saapuville sähköposteille setting_mail_handler_api_key: API avain - text_email_delivery_not_configured: "Sähköpostin jakelu ei ole määritelty ja sähköpostimuistutukset eivät ole käytössä.\nKonfiguroi sähköpostipalvelinasetukset (SMTP) config/email.yml tiedostosta ja uudelleenkäynnistä sovellus jotta asetukset astuvat voimaan." + text_email_delivery_not_configured: "Sähköpostin jakelu ei ole määritelty ja sähköpostimuistutukset eivät ole käytössä.\nKonfiguroi sähköpostipalvelinasetukset (SMTP) config/configuration.yml tiedostosta ja uudelleenkäynnistä sovellus jotta asetukset astuvat voimaan." field_parent_title: Aloitussivu label_issue_watchers: Tapahtuman seuraajat button_quote: Vastaa diff --git a/config/locales/fr.yml b/config/locales/fr.yml index b795344c..59810770 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -880,7 +880,7 @@ fr: text_user_wrote: "%{value} a écrit :" text_enumeration_destroy_question: "Cette valeur est affectée à %{count} objets." text_enumeration_category_reassign_to: 'Réaffecter les objets à cette valeur:' - text_email_delivery_not_configured: "L'envoi de mail n'est pas configuré, les notifications sont désactivées.\nConfigurez votre serveur SMTP dans config/email.yml et redémarrez l'application pour les activer." + text_email_delivery_not_configured: "L'envoi de mail n'est pas configuré, les notifications sont désactivées.\nConfigurez votre serveur SMTP dans config/configuration.yml et redémarrez l'application pour les activer." text_repository_usernames_mapping: "Vous pouvez sélectionner ou modifier l'utilisateur Redmine associé à chaque nom d'utilisateur figurant dans l'historique du dépôt.\nLes utilisateurs avec le même identifiant ou la même adresse mail seront automatiquement associés." text_diff_truncated: '... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.' text_custom_field_possible_values_info: 'Une ligne par valeur' diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 1c03a25e..bb9ed28f 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -772,7 +772,7 @@ gl: text_destroy_time_entries: Borrar as horas text_destroy_time_entries_question: Existen %{hours} horas asignadas á petición que quere borrar. ¿Que quere facer ? text_diff_truncated: '... Diferencia truncada por exceder o máximo tamaño visualizable.' - text_email_delivery_not_configured: "O envío de correos non está configurado, e as notificacións desactiváronse. \n Configure o servidor de SMTP en config/email.yml e reinicie a aplicación para activar os cambios." + text_email_delivery_not_configured: "O envío de correos non está configurado, e as notificacións desactiváronse. \n Configure o servidor de SMTP en config/configuration.yml e reinicie a aplicación para activar os cambios." text_enumeration_category_reassign_to: 'Reasignar ó seguinte valor:' text_enumeration_destroy_question: "%{count} obxectos con este valor asignado." text_file_repository_writable: Pódese escribir no repositorio diff --git a/config/locales/he.yml b/config/locales/he.yml index bd405a21..d8a4abe0 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -889,7 +889,7 @@ he: text_user_wrote: "%{value} כתב:" text_enumeration_destroy_question: "%{count} אוביקטים מוצבים לערך זה." text_enumeration_category_reassign_to: 'הצב מחדש לערך הזה:' - text_email_delivery_not_configured: 'לא נקבעה תצורה לשליחת דואר, וההתראות כבויות.\nקבע את תצורת שרת ה־SMTP בקובץ /etc/redmine/<instance>/email.yml והתחל את האפליקציה מחדש ע"מ לאפשר אותם.' + text_email_delivery_not_configured: 'לא נקבעה תצורה לשליחת דואר, וההתראות כבויות.\nקבע את תצורת שרת ה־SMTP בקובץ /etc/redmine/<instance>/configuration.yml והתחל את האפליקציה מחדש ע"מ לאפשר אותם.' text_repository_usernames_mapping: "בחר או עדכן את משתמש Redmine הממופה לכל שם משתמש ביומן המאגר.\nמשתמשים בעלי שם או כתובת דואר זהה ב־Redmine ובמאגר ממופים באופן אוטומטי." text_diff_truncated: '... השינויים עוברים את מספר השורות המירבי לתצוגה, ולכן הם קוצצו.' text_custom_field_possible_values_info: שורה אחת לכל ערך diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 49a71318..98664e10 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -854,7 +854,7 @@ hr: text_user_wrote: "%{value} je napisao/la:" text_enumeration_destroy_question: "%{count} objekata je pridruženo toj vrijednosti." text_enumeration_category_reassign_to: 'Premjesti ih ovoj vrijednosti:' - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." + text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped." text_diff_truncated: '... Ovaj diff je odrezan zato što prelazi maksimalnu veličinu koja može biti prikazana.' text_custom_field_possible_values_info: 'One line for each value' diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 1f775de2..2eff3d24 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -748,7 +748,7 @@ label_generate_key: Kulcs generálása setting_mail_handler_api_enabled: Web Service engedélyezése a beérkezett levelekhez setting_mail_handler_api_key: API kulcs - text_email_delivery_not_configured: "Az E-mail küldés nincs konfigurálva, és az értesítések ki vannak kapcsolva.\nÁllítsd be az SMTP szervert a config/email.yml fájlban és indítsd újra az alkalmazást, hogy érvénybe lépjen." + text_email_delivery_not_configured: "Az E-mail küldés nincs konfigurálva, és az értesítések ki vannak kapcsolva.\nÁllítsd be az SMTP szervert a config/configuration.yml fájlban és indítsd újra az alkalmazást, hogy érvénybe lépjen." field_parent_title: Szülő oldal label_issue_watchers: Megfigyelők setting_commit_logs_encoding: Commit üzenetek kódlapja diff --git a/config/locales/id.yml b/config/locales/id.yml index 4278d7c1..bcd4f60a 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -833,7 +833,7 @@ id: text_user_wrote: "%{value} menulis:" text_enumeration_destroy_question: "%{count} obyek ditugaskan untuk nilai ini." text_enumeration_category_reassign_to: 'Tugaskan kembali untuk nilai ini:' - text_email_delivery_not_configured: "Pengiriman email belum dikonfigurasi, notifikasi tidak diaktifkan.\nAnda harus mengkonfigur SMTP server anda pada config/email.yml dan restart kembali aplikasi untuk mengaktifkan." + text_email_delivery_not_configured: "Pengiriman email belum dikonfigurasi, notifikasi tidak diaktifkan.\nAnda harus mengkonfigur SMTP server anda pada config/configuration.yml dan restart kembali aplikasi untuk mengaktifkan." text_repository_usernames_mapping: "Pilih atau perbarui pengguna Redmine yang terpetakan ke setiap nama pengguna yang ditemukan di log repositori.\nPengguna dengan nama pengguna dan repositori atau email yang sama secara otomasit akan dipetakan." text_diff_truncated: '... Perbedaan terpotong karena melebihi batas maksimum yang bisa ditampilkan.' text_custom_field_possible_values_info: 'Satu baris untuk setiap nilai' diff --git a/config/locales/it.yml b/config/locales/it.yml index a867ba0b..b9f95865 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -730,7 +730,7 @@ it: label_generate_key: Genera una chiave setting_mail_handler_api_enabled: Abilita WS per le email in arrivo setting_mail_handler_api_key: Chiave API - text_email_delivery_not_configured: "La consegna via email non è configurata e le notifiche sono disabilitate.\nConfigura il tuo server SMTP in config/email.yml e riavvia l'applicazione per abilitarle." + text_email_delivery_not_configured: "La consegna via email non è configurata e le notifiche sono disabilitate.\nConfigura il tuo server SMTP in config/configuration.yml e riavvia l'applicazione per abilitarle." field_parent_title: Pagina principale label_issue_watchers: Osservatori setting_commit_logs_encoding: Codifica dei messaggi di commit diff --git a/config/locales/ja.yml b/config/locales/ja.yml index c858fd54..49c0480b 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -919,7 +919,7 @@ ja: text_user_wrote: "%{value} は書きました:" text_enumeration_destroy_question: "%{count}個のオブジェクトがこの値に割り当てられています。" text_enumeration_category_reassign_to: '次の値に割り当て直す:' - text_email_delivery_not_configured: "メールを送信するために必要な設定が行われていないため、メール通知は利用できません。\nconfig/email.ymlでSMTPサーバの設定を行い、アプリケーションを再起動してください。" + text_email_delivery_not_configured: "メールを送信するために必要な設定が行われていないため、メール通知は利用できません。\nconfig/configuration.ymlでSMTPサーバの設定を行い、アプリケーションを再起動してください。" text_repository_usernames_mapping: "リポジトリのログから検出されたユーザー名をどのRedmineユーザーに関連づけるのか選択してください。\nログ上のユーザー名またはメールアドレスがRedmineのユーザーと一致する場合は自動的に関連づけられます。" text_diff_truncated: '... 差分の行数が表示可能な上限を超えました。超過分は表示しません。' text_custom_field_possible_values_info: '選択肢の値は1行に1個ずつ記述してください。' diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 21a46f68..00254a28 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -843,7 +843,7 @@ ko: text_user_wrote: "%{value}의 덧글:" text_enumeration_category_reassign_to: '새로운 값을 설정:' text_enumeration_destroy_question: "%{count} 개의 일감이 이 값을 사용하고 있습니다." - text_email_delivery_not_configured: "이메일 전달이 설정되지 않았습니다. 그래서 알림이 비활성화되었습니다.\n SMTP서버를 config/email.yml에서 설정하고 어플리케이션을 다시 시작하십시오. 그러면 동작합니다." + text_email_delivery_not_configured: "이메일 전달이 설정되지 않았습니다. 그래서 알림이 비활성화되었습니다.\n SMTP서버를 config/configuration.yml에서 설정하고 어플리케이션을 다시 시작하십시오. 그러면 동작합니다." text_repository_usernames_mapping: "저장소 로그에서 발견된 각 사용자에 레드마인 사용자를 업데이트할때 선택합니다.\n레드마인과 저장소의 이름이나 이메일이 같은 사용자가 자동으로 연결됩니다." text_diff_truncated: '... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.' text_custom_field_possible_values_info: '각 값 당 한 줄' diff --git a/config/locales/lt.yml b/config/locales/lt.yml index a3d9e65b..9193737a 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -885,7 +885,7 @@ lt: text_user_wrote: "%{value} parašė:" text_enumeration_destroy_question: "%{count} objektai priskirti šiai reikšmei." text_enumeration_category_reassign_to: 'Priskirti juos šiai reikšmei:' - text_email_delivery_not_configured: "El.pašto siuntimas nesukonfigūruotas, ir perspėjimai neaktyvus.\nSukonfigūruokite savo SMTP serverį byloje config/email.yml ir perleiskite programą norėdami pritaikyti pakeitimus." + text_email_delivery_not_configured: "El.pašto siuntimas nesukonfigūruotas, ir perspėjimai neaktyvus.\nSukonfigūruokite savo SMTP serverį byloje config/configuration.yml ir perleiskite programą norėdami pritaikyti pakeitimus." text_repository_usernames_mapping: "Parinkite ar atnaujinkite Redmine vartotojo vardą kiekvienam saugyklos vardui, kuris paminėtas saugyklos log'e.\nVartotojai, turintys tą patį Redmine ir saugyklos vardą ar el.paštą automatiškai surišti." text_diff_truncated: "... Šis diff'as nukarpytas, nes jis viršijo maksimalų rodomą eilučių skaičių." text_custom_field_possible_values_info: 'Po vieną eilutę kiekvienai reikšmei' diff --git a/config/locales/lv.yml b/config/locales/lv.yml index c22d3aa0..657a4c90 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -854,7 +854,7 @@ lv: text_user_wrote: "%{value} rakstīja:" text_enumeration_destroy_question: "%{count} objekti ir piešķirti šai vērtībai." text_enumeration_category_reassign_to: 'Piešķirt tos šai vērtībai:' - text_email_delivery_not_configured: "E-pastu nosūtīšana nav konfigurēta, un ziņojumi ir izslēgti.\nKonfigurējiet savu SMTP serveri datnē config/email.yml un pārstartējiet lietotni." + text_email_delivery_not_configured: "E-pastu nosūtīšana nav konfigurēta, un ziņojumi ir izslēgti.\nKonfigurējiet savu SMTP serveri datnē config/configuration.yml un pārstartējiet lietotni." text_repository_usernames_mapping: "Izvēlieties vai atjaunojiet Redmine lietotāju, saistītu ar katru lietotājvārdu, kas atrodams repozitorija žurnālā.\nLietotāji ar to pašu Redmine un repozitorija lietotājvārdu būs saistīti automātiski." text_diff_truncated: '... Šis diff tika nošķelts, jo tas pārsniedz maksimālo izmēru, ko var parādīt.' text_custom_field_possible_values_info: 'Katra vērtības savā rindā' diff --git a/config/locales/mk.yml b/config/locales/mk.yml index c637ed32..c19fecd5 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -877,7 +877,7 @@ mk: text_user_wrote: "%{value} напиша:" text_enumeration_destroy_question: "%{count} objects are assigned to this value." text_enumeration_category_reassign_to: 'Reassign them to this value:' - text_email_delivery_not_configured: "Доставата по е-пошта не е конфигурирана, и известувањата се оневозможени.\nКонфигурирајте го Вашиот SMTP сервер во config/email.yml и рестартирајте ја апликацијата." + text_email_delivery_not_configured: "Доставата по е-пошта не е конфигурирана, и известувањата се оневозможени.\nКонфигурирајте го Вашиот SMTP сервер во config/configuration.yml и рестартирајте ја апликацијата." text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped." text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' text_custom_field_possible_values_info: 'One line for each value' diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 3215be39..b69b881a 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -859,7 +859,7 @@ mn: text_user_wrote: "%{value} бичихдээ:" text_enumeration_destroy_question: "Энэ утгад %{count} обьект оноогдсон байна." text_enumeration_category_reassign_to: 'Тэдгээрийг энэ утгад дахин оноо:' - text_email_delivery_not_configured: "Имэйлийн тохиргоог хараахан тохируулаагүй байна, тиймээс имэйл мэдэгдэл явуулах боломжгүй байна.\nSMTP сервэрээ config/email.yml файл дотор тохируулаад төслийн менежерээ дахиад эхлүүлээрэй." + text_email_delivery_not_configured: "Имэйлийн тохиргоог хараахан тохируулаагүй байна, тиймээс имэйл мэдэгдэл явуулах боломжгүй байна.\nSMTP сервэрээ config/configuration.yml файл дотор тохируулаад төслийн менежерээ дахиад эхлүүлээрэй." text_repository_usernames_mapping: "Репозиторийн логд байгаа бүх хэрэглэгчийн нэрүүдэд харгалзсан Төслийн Менежер системд бүртгэлтэй хэрэглэгчдийг Сонгох юмуу шинэчилнэ үү.\nТөслийн менежер болон репозиторид байгаа ижилхэн нэр юмуу имэйлтэй хэрэглэгчид харилцан харгалзна." text_diff_truncated: '... Файлын ялгаврын хэмжээ үзүүлэхэд дэндүү урт байгаа учраас төгсгөлөөс нь хасч үзүүлэв.' text_custom_field_possible_values_info: 'One line for each value' diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 1a5e9df0..cb5e9a8a 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -742,7 +742,7 @@ nl: text_destroy_time_entries: Verwijder gerapporteerde uren text_destroy_time_entries_question: "%{hours} uren werden gerapporteerd op de issue(s) die u wilde verwijderen. Wat wil u doen?" text_diff_truncated: '... Deze diff werd afgekort omdat het de maximale weer te geven karakters overschreed.' - text_email_delivery_not_configured: "E-mailbezorging is niet geconfigureerd. Notificaties zijn uitgeschakeld.\nConfigureer uw SMTP server in config/email.yml en herstart de applicatie om dit te activeren." + text_email_delivery_not_configured: "E-mailbezorging is niet geconfigureerd. Notificaties zijn uitgeschakeld.\nConfigureer uw SMTP server in config/configuration.yml en herstart de applicatie om dit te activeren." text_enumeration_category_reassign_to: 'Wijs de volgende waarde toe:' text_enumeration_destroy_question: "%{count} objecten zijn toegewezen aan deze waarde." text_file_repository_writable: Bestandsrepository beschrijfbaar diff --git a/config/locales/no.yml b/config/locales/no.yml index 4a8de9b2..1ecca33b 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -716,7 +716,7 @@ label_generate_key: Generer en nøkkel setting_mail_handler_api_enabled: Skru på WS for innkommende e-post setting_mail_handler_api_key: API-nøkkel - text_email_delivery_not_configured: "Levering av e-post er ikke satt opp, og varsler er skrudd av.\nStill inn din SMTP-tjener i config/email.yml og start programmet på nytt for å skru det på." + text_email_delivery_not_configured: "Levering av e-post er ikke satt opp, og varsler er skrudd av.\nStill inn din SMTP-tjener i config/configuration.yml og start programmet på nytt for å skru det på." field_parent_title: Foreldreside label_issue_watchers: Overvåkere setting_commit_logs_encoding: Tegnkoding for innsendingsmeldinger diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 8fcf722d..219f5acc 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -771,7 +771,7 @@ pl: text_default_administrator_account_changed: Zmieniono domyślne hasło administratora text_destroy_time_entries: Usuń wpisy dziennika text_destroy_time_entries_question: Przepracowano %{hours} godzin przy zagadnieniu, które chcesz usunąć. Co chcesz zrobić? - text_email_delivery_not_configured: "Dostarczanie poczty elektronicznej nie zostało skonfigurowane, więc powiadamianie jest nieaktywne.\nSkonfiguruj serwer SMTP w config/email.yml a następnie zrestartuj aplikację i uaktywnij to." + text_email_delivery_not_configured: "Dostarczanie poczty elektronicznej nie zostało skonfigurowane, więc powiadamianie jest nieaktywne.\nSkonfiguruj serwer SMTP w config/configuration.yml a następnie zrestartuj aplikację i uaktywnij to." text_enumeration_category_reassign_to: 'Zmień przypisanie na tą wartość:' text_enumeration_destroy_question: "%{count} obiektów jest przypisana do tej wartości." text_file_repository_writable: Zapisywalne repozytorium plików diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 53a41470..51a5c265 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -728,7 +728,7 @@ pt-BR: text_user_wrote: "%{value} escreveu:" text_enumeration_destroy_question: "%{count} objetos estão atribuídos a este valor." text_enumeration_category_reassign_to: 'Reatribuí-los ao valor:' - text_email_delivery_not_configured: "O envio de e-mail não está configurado, e as notificações estão inativas.\nConfigure seu servidor SMTP no arquivo config/email.yml e reinicie a aplicação para ativá-las." + text_email_delivery_not_configured: "O envio de e-mail não está configurado, e as notificações estão inativas.\nConfigure seu servidor SMTP no arquivo config/configuration.yml e reinicie a aplicação para ativá-las." default_role_manager: Gerente default_role_developer: Desenvolvedor diff --git a/config/locales/pt.yml b/config/locales/pt.yml index ed0730a6..58066e4a 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -715,7 +715,7 @@ pt: text_user_wrote: "%{value} escreveu:" text_enumeration_destroy_question: "%{count} objectos estão atribuídos a este valor." text_enumeration_category_reassign_to: 'Re-atribuí-los para este valor:' - text_email_delivery_not_configured: "Entrega por e-mail não está configurada, e as notificação estão desactivadas.\nConfigure o seu servidor de SMTP em config/email.yml e reinicie a aplicação para activar estas funcionalidades." + text_email_delivery_not_configured: "Entrega por e-mail não está configurada, e as notificação estão desactivadas.\nConfigure o seu servidor de SMTP em config/configuration.yml e reinicie a aplicação para activar estas funcionalidades." default_role_manager: Gestor default_role_developer: Programador diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 76534238..05868362 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -774,7 +774,7 @@ ro: text_user_wrote: "%{value} a scris:" text_enumeration_destroy_question: "Această valoare are %{count} obiecte." text_enumeration_category_reassign_to: 'Atribuie la această valoare:' - text_email_delivery_not_configured: "Trimiterea de emailuri nu este configurată și ca urmare, notificările sunt dezactivate.\nConfigurați serverul SMTP în config/email.yml și reporniți aplicația pentru a le activa." + text_email_delivery_not_configured: "Trimiterea de emailuri nu este configurată și ca urmare, notificările sunt dezactivate.\nConfigurați serverul SMTP în config/configuration.yml și reporniți aplicația pentru a le activa." text_repository_usernames_mapping: "Selectați sau modificați contul Redmine echivalent contului din istoricul depozitului.\nUtilizatorii cu un cont (sau e-mail) identic în Redmine și depozit sunt echivalate automat." text_diff_truncated: '... Comparația a fost trunchiată pentru ca depășește lungimea maximă de text care poate fi afișat.' text_custom_field_possible_values_info: 'O linie pentru fiecare valoare' diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 3064ce10..a33a8c8f 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -913,7 +913,7 @@ ru: text_destroy_time_entries_question: Вы собираетесь удалить %{hours} часа(ов), прикрепленных за этой задачей. text_destroy_time_entries: Удалить зарегистрированное время text_diff_truncated: '... Этот diff ограничен, так как превышает максимальный отображаемый размер.' - text_email_delivery_not_configured: "Параметры работы с почтовым сервером не настроены и функция уведомления по email не активна.\nНастроить параметры для Вашего SMTP-сервера Вы можете в файле config/email.yml. Для применения изменений перезапустите приложение." + text_email_delivery_not_configured: "Параметры работы с почтовым сервером не настроены и функция уведомления по email не активна.\nНастроить параметры для Вашего SMTP-сервера Вы можете в файле config/configuration.yml. Для применения изменений перезапустите приложение." text_enumeration_category_reassign_to: 'Назначить им следующее значение:' text_enumeration_destroy_question: "%{count} объект(а,ов) связаны с этим значением." text_file_repository_writable: Хранилище с доступом на запись diff --git a/config/locales/sk.yml b/config/locales/sk.yml index b87a403e..e6848b7d 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -723,7 +723,7 @@ sk: label_generate_key: Vygenerovať kľúč setting_mail_handler_api_enabled: Zapnúť Webovú Službu (WS) pre príchodzie emaily setting_mail_handler_api_key: API kľúč - text_email_delivery_not_configured: "Doručenie emailov nieje nastavené, notifikácie sú vypnuté.\nNastavte váš SMTP server v config/email.yml a reštartnite aplikáciu pre aktiváciu funkcie." + text_email_delivery_not_configured: "Doručenie emailov nieje nastavené, notifikácie sú vypnuté.\nNastavte váš SMTP server v config/configuration.yml a reštartnite aplikáciu pre aktiváciu funkcie." field_parent_title: Nadradená stránka label_issue_watchers: Pozorovatelia setting_commit_logs_encoding: Kódovanie prenášaných správ diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 809bc57e..ab192886 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -761,7 +761,7 @@ sl: text_user_wrote: "%{value} je napisal(a):" text_enumeration_destroy_question: "%{count} objektov je določenih tej vrednosti." text_enumeration_category_reassign_to: 'Ponastavi jih na to vrednost:' - text_email_delivery_not_configured: "E-poštna dostava ni nastavljena in oznanila so onemogočena.\nNastavite vaš SMTP strežnik v config/email.yml in ponovno zaženite aplikacijo da ga omogočite.\n" + text_email_delivery_not_configured: "E-poštna dostava ni nastavljena in oznanila so onemogočena.\nNastavite vaš SMTP strežnik v config/configuration.yml in ponovno zaženite aplikacijo da ga omogočite.\n" text_repository_usernames_mapping: "Izberite ali posodobite Redmine uporabnika dodeljenega vsakemu uporabniškemu imenu najdenemu v zapisniku shrambe.\n Uporabniki z enakim Redmine ali shrambinem uporabniškem imenu ali e-poštnem naslovu so samodejno dodeljeni." text_diff_truncated: '... Ta sprememba je bila odsekana ker presega največjo velikost ki je lahko prikazana.' diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 6270fe38..4cb78ca6 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -874,7 +874,7 @@ sr-YU: text_user_wrote: "%{value} je napisao:" text_enumeration_destroy_question: "%{count} objekat(a) je dodeljeno ovoj vrednosti." text_enumeration_category_reassign_to: 'Dodeli ih ponovo ovoj vrednosti:' - text_email_delivery_not_configured: "Isporuka e-poruka nije konfigurisana i obaveštenja su onemogućena.\nPodesite vaš SMTP server u config/email.yml i pokrenite ponovo aplikaciju za njihovo omogućavanje." + text_email_delivery_not_configured: "Isporuka e-poruka nije konfigurisana i obaveštenja su onemogućena.\nPodesite vaš SMTP server u config/configuration.yml i pokrenite ponovo aplikaciju za njihovo omogućavanje." text_repository_usernames_mapping: "Odaberite ili ažurirajte Redmine korisnike mapiranjem svakog korisničkog imena pronađenog u evidenciji spremišta.\nKorisnici sa istim Redmine imenom i imenom spremišta ili e-adresom su automatski mapirani." text_diff_truncated: '... Ova razlika je isečena jer je dostignuta maksimalna veličina prikaza.' text_custom_field_possible_values_info: 'Jedan red za svaku vrednost' diff --git a/config/locales/sr.yml b/config/locales/sr.yml index ae912d8b..ee066ae9 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -874,7 +874,7 @@ sr: text_user_wrote: "%{value} је написао:" text_enumeration_destroy_question: "%{count} објекат(а) је додељено овој вредности." text_enumeration_category_reassign_to: 'Додели их поново овој вредности:' - text_email_delivery_not_configured: "Испорука е-порука није конфигурисана и обавештења су онемогућена.\nПодесите ваш SMTP сервер у config/email.yml и покрените поново апликацију за њихово омогућавање." + text_email_delivery_not_configured: "Испорука е-порука није конфигурисана и обавештења су онемогућена.\nПодесите ваш SMTP сервер у config/configuration.yml и покрените поново апликацију за њихово омогућавање." text_repository_usernames_mapping: "Одаберите или ажурирајте Redmine кориснике мапирањем сваког корисничког имена пронађеног у евиденцији спремишта.\nКорисници са истим Redmine именом и именом спремишта или е-адресом су аутоматски мапирани." text_diff_truncated: '... Ова разлика је исечена јер је достигнута максимална величина приказа.' text_custom_field_possible_values_info: 'Један ред за сваку вредност' diff --git a/config/locales/sv.yml b/config/locales/sv.yml index ddc743ca..0ba08db5 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -934,7 +934,7 @@ sv: text_user_wrote: "%{value} skrev:" text_enumeration_destroy_question: "%{count} objekt är tilldelade till detta värde." text_enumeration_category_reassign_to: 'Återtilldela till detta värde:' - text_email_delivery_not_configured: "Mailfunktionen har inte konfigurerats, och notifieringar via mail kan därför inte skickas.\nKonfigurera din SMTP-server i config/email.yml och starta om applikationen för att aktivera dem." + text_email_delivery_not_configured: "Mailfunktionen har inte konfigurerats, och notifieringar via mail kan därför inte skickas.\nKonfigurera din SMTP-server i config/configuration.yml och starta om applikationen för att aktivera dem." text_repository_usernames_mapping: "Välj eller uppdatera den Redmine-användare som är mappad till varje användarnamn i versionarkivloggen.\nAnvändare med samma användarnamn eller mailadress i både Redmine och versionsarkivet mappas automatiskt." text_diff_truncated: '... Denna diff har förminskats eftersom den överskrider den maximala storlek som kan visas.' text_custom_field_possible_values_info: 'Ett värde per rad' diff --git a/config/locales/th.yml b/config/locales/th.yml index 860f51db..c0987ef4 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -726,7 +726,7 @@ th: label_generate_key: Generate a key setting_mail_handler_api_enabled: Enable WS for incoming emails setting_mail_handler_api_key: API key - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." + text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." field_parent_title: Parent page label_issue_watchers: Watchers setting_commit_logs_encoding: Commit messages encoding diff --git a/config/locales/tr.yml b/config/locales/tr.yml index a6cf4860..1c475b87 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -741,7 +741,7 @@ tr: label_generate_key: Generate a key setting_sequential_project_identifiers: Generate sequential project identifiers field_parent_title: Parent page - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." + text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." text_enumeration_category_reassign_to: 'Reassign them to this value:' label_issue_watchers: Watchers mail_body_reminder: "%{count} issue(s) that are assigned to you are due in the next %{days} days:" diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 9418c46d..1afb6b2b 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -725,7 +725,7 @@ uk: label_generate_key: Generate a key setting_mail_handler_api_enabled: Enable WS for incoming emails setting_mail_handler_api_key: API key - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." + text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." field_parent_title: Parent page label_issue_watchers: Watchers setting_commit_logs_encoding: Commit messages encoding diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 14c0c440..ee7a5a65 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -760,7 +760,7 @@ vi: text_user_wrote: "%{value} wrote:" text_enumeration_destroy_question: "%{count} objects are assigned to this value." text_enumeration_category_reassign_to: 'Reassign them to this value:' - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them." + text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." default_role_manager: Điều hành default_role_developer: Phát triển diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index ae35acfd..8e8ad37b 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -979,7 +979,7 @@ text_user_wrote: "%{value} 先前提到:" text_enumeration_destroy_question: "目前有 %{count} 個物件使用此列舉值。" text_enumeration_category_reassign_to: '重新設定其列舉值為:' - text_email_delivery_not_configured: "您尚未設定電子郵件傳送方式,因此提醒選項已被停用。\n請在 config/email.yml 中設定 SMTP 之後,重新啟動 Redmine,以啟用電子郵件提醒選項。" + text_email_delivery_not_configured: "您尚未設定電子郵件傳送方式,因此提醒選項已被停用。\n請在 config/configuration.yml 中設定 SMTP 之後,重新啟動 Redmine,以啟用電子郵件提醒選項。" text_repository_usernames_mapping: "選擇或更新 Redmine 使用者與版本庫使用者之對應關係。\n版本庫中之使用者帳號或電子郵件信箱,與 Redmine 設定相同者,將自動產生對應關係。" text_diff_truncated: '... 這份差異已被截短以符合顯示行數之最大值' text_custom_field_possible_values_info: '一列輸入一個值' diff --git a/config/locales/zh.yml b/config/locales/zh.yml index dbfbb137..3cd18ed3 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -869,7 +869,7 @@ zh: text_user_wrote: "%{value} 写到:" text_enumeration_category_reassign_to: '将它们关联到新的枚举值:' text_enumeration_destroy_question: "%{count} 个对象被关联到了这个枚举值。" - text_email_delivery_not_configured: "邮件参数尚未配置,因此邮件通知功能已被禁用。\n请在config/email.yml中配置您的SMTP服务器信息并重新启动以使其生效。" + text_email_delivery_not_configured: "邮件参数尚未配置,因此邮件通知功能已被禁用。\n请在config/configuration.yml中配置您的SMTP服务器信息并重新启动以使其生效。" text_repository_usernames_mapping: "选择或更新与版本库中的用户名对应的Redmine用户。\n版本库中与Redmine中的同名用户将被自动对应。" text_diff_truncated: '... 差别内容超过了可显示的最大行数并已被截断' text_custom_field_possible_values_info: '每项数值一行' diff --git a/doc/INSTALL b/doc/INSTALL index 99f862bb..594e92e7 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -80,8 +80,8 @@ Optional: == SMTP server Configuration -Copy config/email.yml.example to config/email.yml and edit this file -to adjust your SMTP settings. +Copy config/configuration.yml.example to config/configuration.yml and +edit this file to adjust your SMTP settings. Do not forget to restart the application after any change to this file. Please do not enter your SMTP settings in environment.rb. diff --git a/doc/UPGRADING b/doc/UPGRADING index 87f169c9..b3463205 100644 --- a/doc/UPGRADING +++ b/doc/UPGRADING @@ -10,8 +10,10 @@ http://www.redmine.org/ 1. Uncompress the program archive in a new directory 2. Copy your database settings (RAILS_ROOT/config/database.yml) - and SMTP settings (RAILS_ROOT/config/email.yml) into the new - config directory + and your configuration file (RAILS_ROOT/config/configuration.yml) + into the new config directory + Note: before Redmine 1.2, SMTP configuration was stored in + config/email.yml. It should now be stored in config/configuration.yml. 3. Copy the RAILS_ROOT/files directory content into your new installation This directory contains all the attached files. diff --git a/lib/redmine/configuration.rb b/lib/redmine/configuration.rb new file mode 100644 index 00000000..1d2443a9 --- /dev/null +++ b/lib/redmine/configuration.rb @@ -0,0 +1,97 @@ +# Redmine - project management software +# Copyright (C) 2006-2011 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +module Redmine + module Configuration + + # Configuration default values + @defaults = { + 'email_delivery' => nil + } + + @config = nil + + class << self + # Loads the Redmine configuration file + # Valid options: + # * :file: the configuration file to load (default: config/configuration.yml) + # * :env: the environment to load the configuration for (default: Rails.env) + def load(options={}) + filename = options[:file] || File.join(Rails.root, 'config', 'configuration.yml') + env = options[:env] || Rails.env + + @config = @defaults.dup + + load_deprecated_email_configuration(env) + if File.file?(filename) + @config.merge!(load_from_yaml(filename, env)) + end + + # Compatibility mode for those who copy email.yml over configuration.yml + %w(delivery_method smtp_settings sendmail_settings).each do |key| + if value = @config.delete(key) + @config['email_delivery'] ||= {} + @config['email_delivery'][key] = value + end + end + + if @config['email_delivery'] + ActionMailer::Base.perform_deliveries = true + @config['email_delivery'].each do |k, v| + v.symbolize_keys! if v.respond_to?(:symbolize_keys!) + ActionMailer::Base.send("#{k}=", v) + end + end + + @config + end + + # Returns a configuration setting + def [](name) + load unless @config + @config[name] + end + + private + + def load_from_yaml(filename, env) + yaml = YAML::load_file(filename) + conf = {} + if yaml.is_a?(Hash) + if yaml['default'] + conf.merge!(yaml['default']) + end + if yaml[env] + conf.merge!(yaml[env]) + end + else + $stderr.puts "#{filename} is not a valid Redmine configuration file" + exit 1 + end + conf + end + + def load_deprecated_email_configuration(env) + deprecated_email_conf = File.join(Rails.root, 'config', 'email.yml') + if File.file?(deprecated_email_conf) + warn "Storing outgoing emails configuration in config/email.yml is deprecated. You should now store it in config/configuration.yml using the email_delivery setting." + @config.merge!({'email_delivery' => load_from_yaml(deprecated_email_conf, env)}) + end + end + end + end +end diff --git a/test/fixtures/configuration/default.yml b/test/fixtures/configuration/default.yml new file mode 100644 index 00000000..89a60f13 --- /dev/null +++ b/test/fixtures/configuration/default.yml @@ -0,0 +1,8 @@ +default: + somesetting: foo + +production: + +development: + +test: diff --git a/test/fixtures/configuration/empty.yml b/test/fixtures/configuration/empty.yml new file mode 100644 index 00000000..f280431c --- /dev/null +++ b/test/fixtures/configuration/empty.yml @@ -0,0 +1,7 @@ +default: + +production: + +development: + +test: diff --git a/test/fixtures/configuration/no_default.yml b/test/fixtures/configuration/no_default.yml new file mode 100644 index 00000000..161224a4 --- /dev/null +++ b/test/fixtures/configuration/no_default.yml @@ -0,0 +1,8 @@ +default: + +production: + +development: + +test: + somesetting: foo diff --git a/test/fixtures/configuration/overrides.yml b/test/fixtures/configuration/overrides.yml new file mode 100644 index 00000000..d9be392b --- /dev/null +++ b/test/fixtures/configuration/overrides.yml @@ -0,0 +1,9 @@ +default: + somesetting: foo + +production: + +development: + +test: + somesetting: bar diff --git a/test/unit/lib/redmine/configuration_test.rb b/test/unit/lib/redmine/configuration_test.rb new file mode 100644 index 00000000..239f2d3d --- /dev/null +++ b/test/unit/lib/redmine/configuration_test.rb @@ -0,0 +1,52 @@ +# Redmine - project management software +# Copyright (C) 2006-2011 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +require File.expand_path('../../../../test_helper', __FILE__) + +class Redmine::ConfigurationTest < ActiveSupport::TestCase + def setup + @conf = Redmine::Configuration + end + + def test_empty + assert_kind_of Hash, load_conf('empty.yml', 'test') + end + + def test_default + assert_kind_of Hash, load_conf('default.yml', 'test') + assert_equal 'foo', @conf['somesetting'] + end + + def test_no_default + assert_kind_of Hash, load_conf('no_default.yml', 'test') + assert_equal 'foo', @conf['somesetting'] + end + + def test_overrides + assert_kind_of Hash, load_conf('overrides.yml', 'test') + assert_equal 'bar', @conf['somesetting'] + end + + private + + def load_conf(file, env) + @conf.load( + :file => File.join(Rails.root, 'test', 'fixtures', 'configuration', file), + :env => env + ) + end +end From 2ea7a78da384834f039722dfb17d72d491f48df0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Jan 2011 10:25:48 +0000 Subject: [PATCH 19/48] Ignores db/*.sqlite3. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4753 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/database.yml.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.yml.example b/config/database.yml.example index 1fe2ee82..d4db0580 100644 --- a/config/database.yml.example +++ b/config/database.yml.example @@ -36,4 +36,4 @@ test_pgsql: test_sqlite3: adapter: sqlite3 - database: db/test.db + database: db/test.sqlite3 From b88143ca3fc72049c0d873190cda535ef596ac8c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Jan 2011 10:41:43 +0000 Subject: [PATCH 20/48] Makes the folder for attachments storage configurable in config/configuration.yml (#1236). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4755 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/attachment.rb | 2 +- config/configuration.yml.example | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 99e461dc..93a1534e 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -43,7 +43,7 @@ class Attachment < ActiveRecord::Base "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"} cattr_accessor :storage_path - @@storage_path = "#{RAILS_ROOT}/files" + @@storage_path = Redmine::Configuration['attachments_storage_path'] || "#{RAILS_ROOT}/files" def validate if self.filesize > Setting.attachment_max_size.to_i.kilobytes diff --git a/config/configuration.yml.example b/config/configuration.yml.example index 4baaeff5..673c25ae 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -79,6 +79,7 @@ # default configuration options for all environments default: + # Outgoing emails configuration (see examples above) email_delivery: delivery_method: :smtp smtp_settings: @@ -89,6 +90,15 @@ default: user_name: "redmine@example.net" password: "redmine" + # Absolute path to the directory where attachments are stored. + # The default is the 'files' directory in your Redmine instance. + # Your Redmine instance needs to have write permission on this + # directory. + # Examples: + # attachments_storage_path: /var/redmine/files + # attachments_storage_path: D:/redmine/files + attachments_storage_path: + # specific configuration options for production environment # that overrides the default ones production: From 4adf3abf83d2ac006b45798e4ac8a3a914678ee0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Jan 2011 11:20:46 +0000 Subject: [PATCH 21/48] Makes the autologin cookie configurable (#1763). The cookie attributes (name, path, secure) can now be set in config/configuration.yml. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4756 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/account_controller.rb | 15 +++++++++++++-- config/configuration.yml.example | 8 ++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 5fa56b16..52b15a17 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -203,12 +203,23 @@ class AccountController < ApplicationController self.logged_user = user # generate a key and set cookie if autologin if params[:autologin] && Setting.autologin? - token = Token.create(:user => user, :action => 'autologin') - cookies[:autologin] = { :value => token.value, :expires => 1.year.from_now } + set_autologin_cookie(user) end call_hook(:controller_account_success_authentication_after, {:user => user }) redirect_back_or_default :controller => 'my', :action => 'page' end + + def set_autologin_cookie(user) + token = Token.create(:user => user, :action => 'autologin') + cookie_name = Redmine::Configuration['autologin_cookie_name'] || 'autologin' + cookie_options = { + :value => token.value, + :expires => 1.year.from_now, + :path => (Redmine::Configuration['autologin_cookie_path'] || '/'), + :secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false) + } + cookies[cookie_name] = cookie_options + end # Onthefly creation failed, display the registration form to fill/fix attributes def onthefly_creation_failed(user, auth_source_options = { }) diff --git a/config/configuration.yml.example b/config/configuration.yml.example index 673c25ae..5756907d 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -99,6 +99,14 @@ default: # attachments_storage_path: D:/redmine/files attachments_storage_path: + # Configuration of the autologin cookie. + # autologin_cookie_name: the name of the cookie (default: autologin) + # autologin_cookie_path: the cookie path (default: /) + # autologin_cookie_secure: true sets the cookie secure flag (default: false) + autologin_cookie_name: + autologin_cookie_path: + autologin_cookie_secure: + # specific configuration options for production environment # that overrides the default ones production: From ef32606c43e16393efcb9094a967e4754f91517a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Jan 2011 11:40:07 +0000 Subject: [PATCH 22/48] Set the httponly flag on the autologin cookie. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4757 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/account_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 52b15a17..0c645e55 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -216,7 +216,8 @@ class AccountController < ApplicationController :value => token.value, :expires => 1.year.from_now, :path => (Redmine::Configuration['autologin_cookie_path'] || '/'), - :secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false) + :secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false), + :httponly => true } cookies[cookie_name] = cookie_options end From 47f3f5ae68daf7f98e0f66de399a11e7b61ba896 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Jan 2011 16:12:38 +0000 Subject: [PATCH 23/48] Adds support for cross project Redmine links (#7409). See public/help/wiki_syntax_detailed.html for the syntax. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4758 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 23 +++++++++++----- public/help/wiki_syntax_detailed.html | 11 ++++++-- test/unit/helpers/application_helper_test.rb | 29 ++++++++++++++++++++ 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f04e5491..d5a65891 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -588,16 +588,25 @@ module ApplicationHelper # source:some/file#L120 -> Link to line 120 of the file # source:some/file@52#L120 -> Link to line 120 of the file's revision 52 # export:some/file -> Force the download of the file - # Forum messages: + # Forum messages: # message#1218 -> Link to message with id 1218 + # + # Links can refer other objects from other projects, using project identifier: + # identifier:r52 + # identifier:document:"Some document" + # identifier:version:1.0.0 + # identifier:source:some/file def parse_redmine_links(text, project, obj, attr, only_path, options) - text.gsub!(%r{([\s\(,\-\[\>]|^)(!)?(attachment|document|version|commit|source|export|message|project)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]]\W)|,|\s|\]|<|$)}) do |m| - leading, esc, prefix, sep, identifier = $1, $2, $3, $5 || $7, $6 || $8 + text.gsub!(%r{([\s\(,\-\[\>]|^)(!)?(([a-z0-9\-]+):)?(attachment|document|version|commit|source|export|message|project)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]]\W)|,|\s|\]|<|$)}) do |m| + leading, esc, project_prefix, project_identifier, prefix, sep, identifier = $1, $2, $3, $4, $5, $7 || $9, $8 || $10 link = nil + if project_identifier + project = Project.visible.find_by_identifier(project_identifier) + end if esc.nil? if prefix.nil? && sep == 'r' if project && (changeset = project.changesets.find_by_revision(identifier)) - link = link_to("r#{identifier}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision}, + link = link_to("#{project_prefix}r#{identifier}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision}, :class => 'changeset', :title => truncate_single_line(changeset.comments, :length => 100)) end @@ -651,7 +660,7 @@ module ApplicationHelper end when 'commit' if project && (changeset = project.changesets.find(:first, :conditions => ["scmid LIKE ?", "#{name}%"])) - link = link_to h("#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier}, + link = link_to h("#{project_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier}, :class => 'changeset', :title => truncate_single_line(changeset.comments, :length => 100) end @@ -659,7 +668,7 @@ module ApplicationHelper if project && project.repository name =~ %r{^[/\\]*(.*?)(@([0-9a-f]+))?(#(L\d+))?$} path, rev, anchor = $1, $3, $5 - link = link_to h("#{prefix}:#{name}"), {:controller => 'repositories', :action => 'entry', :id => project, + link = link_to h("#{project_prefix}#{prefix}:#{name}"), {:controller => 'repositories', :action => 'entry', :id => project, :path => to_path_param(path), :rev => rev, :anchor => anchor, @@ -679,7 +688,7 @@ module ApplicationHelper end end end - leading + (link || "#{prefix}#{sep}#{identifier}") + leading + (link || "#{project_prefix}#{prefix}#{sep}#{identifier}") end end diff --git a/public/help/wiki_syntax_detailed.html b/public/help/wiki_syntax_detailed.html index a1af336a..0c9cea34 100644 --- a/public/help/wiki_syntax_detailed.html +++ b/public/help/wiki_syntax_detailed.html @@ -46,7 +46,9 @@
  • Link to an issue: #124 (displays #124, link is striked-through if the issue is closed)
  • Link to a changeset: r758 (displays r758)
  • -
  • Link to a changeset with a non-numeric hash: commit:c6f4d0fd (displays c6f4d0fd). Added in r1236.
  • +
  • Link to a changeset with a non-numeric hash: commit:c6f4d0fd (displays c6f4d0fd).
  • +
  • Link to a changeset of another project: sandbox:r758 (displays sanbox:r758)
  • +
  • Link to a changeset with a non-numeric hash: sandbox:c6f4d0fd (displays sandbox:c6f4d0fd).

Wiki links:

@@ -74,7 +76,7 @@
  • document#17 (link to document with id 17)
  • document:Greetings (link to the document with title "Greetings")
  • document:"Some document" (double quotes can be used when document title contains spaces)
  • -
  • document:some_project:"Some document" (link to a document with title "Some document" in other project "some_project") +
  • sandbox:document:"Some document" (link to a document with title "Some document" in other project "sandbox")
  • @@ -84,6 +86,7 @@
  • version#3 (link to version with id 3)
  • version:1.0.0 (link to version named "1.0.0")
  • version:"1.0 beta 2"
  • +
  • sandbox:version:1.0.0 (link to version "1.0.0" in the project "sandbox")
  • @@ -103,7 +106,9 @@
  • source:some/file#L120 (link to line 120 of the file)
  • source:some/file@52#L120 (link to line 120 of the file's revision 52)
  • source:"some file@52#L120" (use double quotes when the URL contains spaces
  • -
  • export:some/file (force the download of the file)
  • +
  • export:some/file (force the download of the file)
  • +
  • sandbox:source:some/file (link to the file located at /some/file in the repository of the project "sandbox")
  • +
  • sandbox:export:some/file (force the download of the file)
  • diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index c8235ada..9232b1b8 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -224,6 +224,35 @@ RAW @project = Project.find(1) to_test.each { |text, result| assert_equal "

    #{result}

    ", textilizable(text), "#{text} failed" } end + + def test_cross_project_redmine_links + source_link = link_to('ecookbook:source:/some/file', {:controller => 'repositories', :action => 'entry', :id => 'ecookbook', :path => ['some', 'file']}, + :class => 'source') + + changeset_link = link_to('ecookbook:r2', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 2}, + :class => 'changeset', :title => 'This commit fixes #1, #2 and references #1 & #3') + + to_test = { + # documents + 'document:"Test document"' => 'document:"Test document"', + 'ecookbook:document:"Test document"' => 'Test document', + 'invalid:document:"Test document"' => 'invalid:document:"Test document"', + # versions + 'version:"1.0"' => 'version:"1.0"', + 'ecookbook:version:"1.0"' => '1.0', + 'invalid:version:"1.0"' => 'invalid:version:"1.0"', + # changeset + 'r2' => 'r2', + 'ecookbook:r2' => changeset_link, + 'invalid:r2' => 'invalid:r2', + # source + 'source:/some/file' => 'source:/some/file', + 'ecookbook:source:/some/file' => source_link, + 'invalid:source:/some/file' => 'invalid:source:/some/file', + } + @project = Project.find(3) + to_test.each { |text, result| assert_equal "

    #{result}

    ", textilizable(text), "#{text} failed" } + end def test_redmine_links_git_commit changeset_link = link_to('abcd', From bedf99d9df1cad53bc42447684066da2e916724e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Jan 2011 16:47:59 +0000 Subject: [PATCH 24/48] Adds visible scope to redmine links queries. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4759 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 17 +++++++++-------- app/models/document.rb | 3 +++ app/models/message.rb | 3 +++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d5a65891..8e973d18 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -605,7 +605,8 @@ module ApplicationHelper end if esc.nil? if prefix.nil? && sep == 'r' - if project && (changeset = project.changesets.find_by_revision(identifier)) + # project.changesets.visible raises an SQL error because of a double join on repositories + if project && project.repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(project.repository.id, identifier)) link = link_to("#{project_prefix}r#{identifier}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision}, :class => 'changeset', :title => truncate_single_line(changeset.comments, :length => 100)) @@ -620,17 +621,17 @@ module ApplicationHelper :title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})") end when 'document' - if document = Document.find_by_id(oid, :include => [:project], :conditions => Project.visible_by(User.current)) + if document = Document.visible.find_by_id(oid) link = link_to h(document.title), {:only_path => only_path, :controller => 'documents', :action => 'show', :id => document}, :class => 'document' end when 'version' - if version = Version.find_by_id(oid, :include => [:project], :conditions => Project.visible_by(User.current)) + if version = Version.visible.find_by_id(oid) link = link_to h(version.name), {:only_path => only_path, :controller => 'versions', :action => 'show', :id => version}, :class => 'version' end when 'message' - if message = Message.find_by_id(oid, :include => [:parent, {:board => :project}], :conditions => Project.visible_by(User.current)) + if message = Message.visible.find_by_id(oid, :include => :parent) link = link_to h(truncate(message.subject, :length => 60)), {:only_path => only_path, :controller => 'messages', :action => 'show', @@ -649,23 +650,23 @@ module ApplicationHelper name = identifier.gsub(%r{^"(.*)"$}, "\\1") case prefix when 'document' - if project && document = project.documents.find_by_title(name) + if project && document = project.documents.visible.find_by_title(name) link = link_to h(document.title), {:only_path => only_path, :controller => 'documents', :action => 'show', :id => document}, :class => 'document' end when 'version' - if project && version = project.versions.find_by_name(name) + if project && version = project.versions.visible.find_by_name(name) link = link_to h(version.name), {:only_path => only_path, :controller => 'versions', :action => 'show', :id => version}, :class => 'version' end when 'commit' - if project && (changeset = project.changesets.find(:first, :conditions => ["scmid LIKE ?", "#{name}%"])) + if project && project.repository && (changeset = Changeset.visible.find(:first, :conditions => ["repository_id = ? AND scmid LIKE ?", project.repository.id, "#{name}%"])) link = link_to h("#{project_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier}, :class => 'changeset', :title => truncate_single_line(changeset.comments, :length => 100) end when 'source', 'export' - if project && project.repository + if project && project.repository && User.current.allowed_to?(:browse_repository, project) name =~ %r{^[/\\]*(.*?)(@([0-9a-f]+))?(#(L\d+))?$} path, rev, anchor = $1, $3, $5 link = link_to h("#{project_prefix}#{prefix}:#{name}"), {:controller => 'repositories', :action => 'entry', :id => project, diff --git a/app/models/document.rb b/app/models/document.rb index 3aae3985..21232a2d 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -29,6 +29,9 @@ class Document < ActiveRecord::Base validates_presence_of :project, :title, :category validates_length_of :title, :maximum => 60 + named_scope :visible, lambda {|*args| { :include => :project, + :conditions => Project.allowed_to_condition(args.first || User.current, :view_documents) } } + def visible?(user=User.current) !user.nil? && user.allowed_to?(:view_documents, project) end diff --git a/app/models/message.rb b/app/models/message.rb index 3744c239..77c9ff55 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -42,6 +42,9 @@ class Message < ActiveRecord::Base after_create :add_author_as_watcher + named_scope :visible, lambda {|*args| { :include => {:board => :project}, + :conditions => Project.allowed_to_condition(args.first || User.current, :view_messages) } } + def visible?(user=User.current) !user.nil? && user.allowed_to?(:view_messages, project) end From 8957b56b872061ca4bb09864d1834f4376378aca Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Jan 2011 17:02:10 +0000 Subject: [PATCH 25/48] Moves link_to_message to ApplicationHelper to make it available to redmine links. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4760 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 22 +++++++++++++------- app/helpers/messages_helper.rb | 10 --------- test/unit/helpers/application_helper_test.rb | 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8e973d18..c6d88487 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -109,6 +109,20 @@ module ApplicationHelper link_to(text, {:controller => 'repositories', :action => 'revision', :id => project, :rev => rev}, :title => l(:label_revision_id, format_revision(revision))) end + + # Generates a link to a message + def link_to_message(message, options={}, html_options = nil) + link_to( + h(truncate(message.subject, :length => 60)), + { :controller => 'messages', :action => 'show', + :board_id => message.board_id, + :id => message.root, + :r => (message.parent_id && message.id), + :anchor => (message.parent_id ? "message-#{message.id}" : nil) + }.merge(options), + html_options + ) + end # Generates a link to a project if active # Examples: @@ -632,13 +646,7 @@ module ApplicationHelper end when 'message' if message = Message.visible.find_by_id(oid, :include => :parent) - link = link_to h(truncate(message.subject, :length => 60)), {:only_path => only_path, - :controller => 'messages', - :action => 'show', - :board_id => message.board, - :id => message.root, - :anchor => (message.parent ? "message-#{message.id}" : nil)}, - :class => 'message' + link = link_to_message(message, {:only_path => only_path}, :class => 'message') end when 'project' if p = Project.visible.find_by_id(oid) diff --git a/app/helpers/messages_helper.rb b/app/helpers/messages_helper.rb index ed58ad79..ce118b4f 100644 --- a/app/helpers/messages_helper.rb +++ b/app/helpers/messages_helper.rb @@ -16,14 +16,4 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module MessagesHelper - - def link_to_message(message) - return '' unless message - link_to h(truncate(message.subject, :length => 60)), :controller => 'messages', - :action => 'show', - :board_id => message.board_id, - :id => message.root, - :r => (message.parent_id && message.id), - :anchor => (message.parent_id ? "message-#{message.id}" : nil) - end end diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 9232b1b8..69eaf745 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -200,7 +200,7 @@ RAW 'export:/some/file' => link_to('export:/some/file', source_url.merge(:format => 'raw'), :class => 'source download'), # message 'message#4' => link_to('Post 2', message_url, :class => 'message'), - 'message#5' => link_to('RE: post 2', message_url.merge(:anchor => 'message-5'), :class => 'message'), + 'message#5' => link_to('RE: post 2', message_url.merge(:anchor => 'message-5', :r => 5), :class => 'message'), # project 'project#3' => link_to('eCookbook Subproject 1', project_url, :class => 'project'), 'project:subproject1' => link_to('eCookbook Subproject 1', project_url, :class => 'project'), From 710edf6c798410d5691a43e93247790c640a9be6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 24 Jan 2011 17:28:59 +0000 Subject: [PATCH 26/48] Fixed: no email sent with 'Notifiy for any event on the selected projects only' (#7421). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4761 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/user.rb | 7 ++++++- test/unit/user_test.rb | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 5187df96..d7b1bfb6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -422,7 +422,12 @@ class User < Principal when 'all' true when 'selected' - # Handled by the Project + # user receives notifications for created/assigned issues on unselected projects + if object.is_a?(Issue) && (object.author == self || object.assigned_to == self) + true + else + false + end when 'none' false when 'only_my_events' diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 22f48ae5..9bb1ae62 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -468,6 +468,7 @@ class UserTest < ActiveSupport::TestCase should "be false for a user with :only_my_events and isn't an author, creator, or assignee" do @user = User.generate_with_protected!(:mail_notification => 'only_my_events') + Member.create!(:user => @user, :project => @project, :role_ids => [1]) assert ! @user.notify_about?(@issue) end @@ -500,6 +501,22 @@ class UserTest < ActiveSupport::TestCase @assignee.update_attribute(:mail_notification, 'only_owner') assert ! @assignee.notify_about?(@issue) end + + should "be true for a user with :selected and is the author" do + @author.update_attribute(:mail_notification, 'selected') + assert @author.notify_about?(@issue) + end + + should "be true for a user with :selected and is the assignee" do + @assignee.update_attribute(:mail_notification, 'selected') + assert @assignee.notify_about?(@issue) + end + + should "be false for a user with :selected and is not the author or assignee" do + @user = User.generate_with_protected!(:mail_notification => 'selected') + Member.create!(:user => @user, :project => @project, :role_ids => [1]) + assert ! @user.notify_about?(@issue) + end end context "other events" do From e6bf7ea34b188478158e9a1c8c6f945c28b540fe Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 27 Jan 2011 21:38:47 +0000 Subject: [PATCH 27/48] Fixed: Relations are not displayed after adding/removing an issue relation (#7463). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4764 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issue_relations_controller.rb | 6 +++- .../issue_relations_controller_test.rb | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/app/controllers/issue_relations_controller.rb b/app/controllers/issue_relations_controller.rb index 7462adca..b095df37 100644 --- a/app/controllers/issue_relations_controller.rb +++ b/app/controllers/issue_relations_controller.rb @@ -28,6 +28,7 @@ class IssueRelationsController < ApplicationController respond_to do |format| format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue } format.js do + @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? } render :update do |page| page.replace_html "relations", :partial => 'issues/relations' if @relation.errors.empty? @@ -47,7 +48,10 @@ class IssueRelationsController < ApplicationController end respond_to do |format| format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue } - format.js { render(:update) {|page| page.replace_html "relations", :partial => 'issues/relations'} } + format.js { + @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? } + render(:update) {|page| page.replace_html "relations", :partial => 'issues/relations'} + } end end diff --git a/test/functional/issue_relations_controller_test.rb b/test/functional/issue_relations_controller_test.rb index 6c50b707..ff3bb8d0 100644 --- a/test/functional/issue_relations_controller_test.rb +++ b/test/functional/issue_relations_controller_test.rb @@ -33,6 +33,19 @@ class IssueRelationsControllerTest < ActionController::TestCase end end + def test_new_xhr + assert_difference 'IssueRelation.count' do + @request.session[:user_id] = 3 + xhr :post, :new, + :issue_id => 3, + :relation => {:issue_to_id => '1', :relation_type => 'relates', :delay => ''} + assert_select_rjs 'relations' do + assert_select 'table', 1 + assert_select 'tr', 2 # relations + end + end + end + def test_new_should_accept_id_with_hash assert_difference 'IssueRelation.count' do @request.session[:user_id] = 3 @@ -68,4 +81,20 @@ class IssueRelationsControllerTest < ActionController::TestCase post :destroy, :id => '2', :issue_id => '3' end end + + def test_destroy_xhr + IssueRelation.create!(:relation_type => IssueRelation::TYPE_RELATES) do |r| + r.issue_from_id = 3 + r.issue_to_id = 1 + end + + assert_difference 'IssueRelation.count', -1 do + @request.session[:user_id] = 3 + xhr :post, :destroy, :id => '2', :issue_id => '3' + assert_select_rjs 'relations' do + assert_select 'table', 1 + assert_select 'tr', 1 # relation left + end + end + end end From a8473368ee209f720bbaf7b84714a615b2be7db1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 28 Jan 2011 19:45:09 +0000 Subject: [PATCH 28/48] Prevent error when Mantis version.date_order is nil (#7476). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4765 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/tasks/migrate_from_mantis.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/migrate_from_mantis.rake b/lib/tasks/migrate_from_mantis.rake index cd82872c..c45ce68e 100644 --- a/lib/tasks/migrate_from_mantis.rake +++ b/lib/tasks/migrate_from_mantis.rake @@ -287,7 +287,7 @@ task :migrate_from_mantis => :environment do project.versions.each do |version| v = Version.new :name => encode(version.version), :description => encode(version.description), - :effective_date => version.date_order.to_date + :effective_date => (version.date_order ? version.date_order.to_date : nil) v.project = p v.save versions_map[version.id] = v.id From 99431d79b40244ada3fc1ea030f065fff6c081b8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 30 Jan 2011 06:31:28 +0000 Subject: [PATCH 29/48] Moves .htaccess to htaccess.fcgi.example (#7256). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4775 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/{.htaccess => htaccess.fcgi.example} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename public/{.htaccess => htaccess.fcgi.example} (100%) diff --git a/public/.htaccess b/public/htaccess.fcgi.example similarity index 100% rename from public/.htaccess rename to public/htaccess.fcgi.example From df02ce005d25657e5b6d12e322686dcef27f088a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 30 Jan 2011 06:37:01 +0000 Subject: [PATCH 30/48] Translations updates. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4777 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/bg.yml | 682 +++++++++++++++++++++--------------------- config/locales/cs.yml | 2 +- config/locales/sv.yml | 46 +-- 3 files changed, 367 insertions(+), 363 deletions(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index fb97cd41..b51904ff 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1,11 +1,12 @@ bg: + # Text direction: Left-to-Right (ltr) or Right-to-Left (rtl) direction: ltr date: formats: # Use the strftime parameters for formats. # When no format has been given, it uses default. # You can provide other formats here if you like! - default: "%Y-%m-%d" + default: "%d-%m-%Y" short: "%b %d" long: "%B %d, %Y" @@ -65,12 +66,13 @@ bg: other: "почти %{count} години" number: + # Default format for numbers format: separator: "." delimiter: "" precision: 3 - human: - format: + human: + format: precision: 1 delimiter: "" storage_units: @@ -83,7 +85,8 @@ bg: mb: "MB" gb: "GB" tb: "TB" - + + # Used in array.to_sentence. support: array: @@ -94,8 +97,8 @@ bg: errors: template: header: - one: "1 error prohibited this %{model} from being saved" - other: "%{count} errors prohibited this %{model} from being saved" + one: "1 грешка попречи този %{model} да бъде записан" + other: "%{count} грешки попречиха този %{model} да бъде записан" messages: inclusion: "не съществува в списъка" exclusion: "е запазено" @@ -120,6 +123,7 @@ bg: greater_than_start_date: "трябва да е след началната дата" not_same_project: "не е от същия проект" circular_dependency: "Тази релация ще доведе до безкрайна зависимост" + cant_link_an_issue_with_a_descendant: "Една задача не може да бъде свързвана към своя подзадача" actionview_instancetag_blank_option: Изберете @@ -150,24 +154,61 @@ bg: notice_file_not_found: Несъществуваща или преместена страница. notice_locking_conflict: Друг потребител променя тези данни в момента. notice_not_authorized: Нямате право на достъп до тази страница. + notice_not_authorized_archived_project: Проектът, който се опитвате да видите е архивиран. notice_email_sent: "Изпратен e-mail на %{value}" notice_email_error: "Грешка при изпращане на e-mail (%{value})" notice_feeds_access_key_reseted: Вашия ключ за RSS достъп беше променен. + notice_api_access_key_reseted: Вашият API ключ за достъп беше изчистен. + notice_failed_to_save_issues: "Неуспешен запис на %{count} задачи от %{total} избрани: %{ids}." + notice_failed_to_save_members: "Невъзможност за запис на член(ове): %{errors}." + notice_no_issue_selected: "Няма избрани задачи." + notice_account_pending: "Профилът Ви е създаден и очаква одобрение от администратор." + notice_default_data_loaded: Примерната информация е заредена успешно. + notice_unable_delete_version: Невъзможност за изтриване на версия + notice_unable_delete_time_entry: Невъзможност за изтриване на запис на time log. + notice_issue_done_ratios_updated: Обновен процент на завършените задачи. + notice_gantt_chart_truncated: Мрежовият график е съкратен, понеже броят на обектите, които могат да бъдат показани е твърде голям (%{max}) + error_can_t_load_default_data: "Грешка при зареждане на примерната информация: %{value}" error_scm_not_found: Несъществуващ обект в хранилището. error_scm_command_failed: "Грешка при опит за комуникация с хранилище: %{value}" + error_scm_annotate: "Обектът не съществува или не може да бъде анотиран." + error_issue_not_found_in_project: 'Задачата не е намерена или не принадлежи на този проект' + error_no_tracker_in_project: Няма асоциирани тракери с този проект. Проверете настройките на проекта. + error_no_default_issue_status: Няма установено подразбиращо се състояние за задачите. Моля проверете вашата конфигурация (Вижте "Администрация -> Състояния на задачи"). + error_can_not_delete_custom_field: Невъзможност за изтриване на потребителско поле + error_can_not_delete_tracker: Този тракер съдържа задачи и не може да бъде изтрит. + error_can_not_remove_role: Тази роля се използва и не може да бъде изтрита. + error_can_not_reopen_issue_on_closed_version: Задача, асоциирана със затворена версия не може да бъде отворена отново + error_can_not_archive_project: Този проект не може да бъде архивиран + error_issue_done_ratios_not_updated: Процентът на завършените задачи не е обновен. + error_workflow_copy_source: Моля изберете source тракер или роля + error_workflow_copy_target: Моля изберете тракер(и) и роля (роли). + error_unable_delete_issue_status: Невъзможност за изтриване на състояние на задача + error_unable_to_connect: Невъзможност за свързване с (%{value}) + warning_attachments_not_saved: "%{count} файла не бяха записани." mail_subject_lost_password: "Вашата парола (%{value})" mail_body_lost_password: 'За да смените паролата си, използвайте следния линк:' mail_subject_register: "Активация на профил (%{value})" mail_body_register: 'За да активирате профила си използвайте следния линк:' + mail_body_account_information_external: "Можете да използвате вашия %{value} профил за вход." + mail_body_account_information: Информацията за профила ви + mail_subject_account_activation_request: "Заявка за активиране на профил в %{value}" + mail_body_account_activation_request: "Има новорегистриран потребител (%{value}), очакващ вашето одобрение:" + mail_subject_reminder: "%{count} задачи с краен срок с следващите %{days} дни" + mail_body_reminder: "%{count} задачи, назначени на вас са с краен срок в следващите %{days} дни:" + mail_subject_wiki_content_added: "Wiki страницата '%{id}' беше добавена" + mail_body_wiki_content_added: Wiki страницата '%{id}' беше добавена от %{author}. + mail_subject_wiki_content_updated: "Wiki страницата '%{id}' не беше обновена" + mail_body_wiki_content_updated: Wiki страницата '%{id}' беше обновена от %{author}. gui_validation_error: 1 грешка gui_validation_error_plural: "%{count} грешки" field_name: Име field_description: Описание - field_summary: Групиран изглед + field_summary: Анотация field_is_required: Задължително field_firstname: Име field_lastname: Фамилия @@ -200,6 +241,7 @@ bg: field_priority: Приоритет field_fixed_version: Планувана версия field_user: Потребител + field_principal: Principal field_role: Роля field_homepage: Начална страница field_is_public: Публичен @@ -225,6 +267,7 @@ bg: field_attr_lastname: Атрибут Фамилия (Lastname) field_attr_mail: Атрибут Email field_onthefly: Динамично създаване на потребител + field_start_date: Начална дата field_done_ratio: % Прогрес field_auth_source: Начин на оторизация field_hide_mail: Скрий e-mail адреса ми @@ -242,7 +285,24 @@ bg: field_assignable: Възможно е възлагане на задачи за тази роля field_redirect_existing_links: Пренасочване на съществуващи линкове field_estimated_hours: Изчислено време + field_column_names: Колони + field_time_entries: Log time + field_time_zone: Часова зона + field_searchable: С възможност за търсене field_default_value: Стойност по подразбиране + field_comments_sorting: Сортиране на коментарите + field_parent_title: Родителска страница + field_editable: Editable + field_watcher: Наблюдател + field_identity_url: OpenID URL + field_content: Съдържание + field_group_by: Групиране на резултатите по + field_sharing: Sharing + field_parent_issue: Родителска задача + field_member_of_group: Член на група + field_assigned_to_role: Assignee's role + field_text: Текстово поле + field_visible: Видим setting_app_title: Заглавие setting_app_subtitle: Описание @@ -253,26 +313,132 @@ bg: setting_attachment_max_size: Максимална големина на прикачен файл setting_issues_export_limit: Максимален брой задачи за експорт setting_mail_from: E-mail адрес за емисии + setting_bcc_recipients: Получатели на скрито копие (bcc) + setting_plain_text_mail: само чист текст (без HTML) setting_host_name: Хост setting_text_formatting: Форматиране на текста setting_wiki_compression: Wiki компресиране на историята setting_feeds_limit: Максимален брой за емисии + setting_default_projects_public: Новите проекти са публични по подразбиране setting_autofetch_changesets: Автоматично обработване на ревизиите setting_sys_api_enabled: Разрешаване на WS за управление setting_commit_ref_keywords: Отбелязващи ключови думи setting_commit_fix_keywords: Приключващи ключови думи setting_autologin: Автоматичен вход setting_date_format: Формат на датата + setting_time_format: Формат на часа setting_cross_project_issue_relations: Релации на задачи между проекти + setting_issue_list_default_columns: Показвани колони по подразбиране + setting_repositories_encodings: Кодови таблици + setting_commit_logs_encoding: Кодова таблица на съобщенията при поверяване + setting_emails_header: Emails header + setting_emails_footer: Подтекст за e-mail + setting_protocol: Протокол + setting_per_page_options: Опции за страниране + setting_user_format: Потребителски формат + setting_activity_days_default: Брой дни показвани на таб Дейност + setting_display_subprojects_issues: Показване на подпроектите в проектите по подразбиране + setting_enabled_scm: Разрешена SCM + setting_mail_handler_body_delimiters: Отрязване на e-mail-ите след един от тези редове + setting_mail_handler_api_enabled: Разрешаване на WS за входящи e-mail-и + setting_mail_handler_api_key: API ключ + setting_sequential_project_identifiers: Генериране на последователни проектни идентификатори + setting_gravatar_enabled: Използване на портребителски икони от Gravatar + setting_gravatar_default: Подразбиращо се изображение от Gravatar + setting_diff_max_lines_displayed: Максимален брой показани diff редове + setting_file_max_size_displayed: Максимален размер на текстовите файлове, показвани inline + setting_repository_log_display_limit: Максимален брой на показванете ревизии в лог файла + setting_openid: Рарешаване на OpenID вход и регистрация + setting_password_min_length: Минимална дължина на парола + setting_new_project_user_role_id: Роля, давана на потребител, създаващ проекти, който не е администратор + setting_default_projects_modules: Активирани модули по подразбиране за нов проект + setting_issue_done_ratio: Изчисление на процента на готови задачи с + setting_issue_done_ratio_issue_field: Използване на поле '% Прогрес' + setting_issue_done_ratio_issue_status: Използване на състоянието на задачите + setting_start_of_week: Първи ден на седмицата + setting_rest_api_enabled: Разрешаване на REST web сървис + setting_cache_formatted_text: Cache formatted text + setting_default_notification_option: Подразбиращ се начин за известяване + setting_commit_logtime_enabled: Разрешаване на отчитането на работното време + setting_commit_logtime_activity_id: Дейност при отчитане на работното време + setting_gantt_items_limit: Максимален брой обекти, които да се показват в мрежов график + permission_add_project: Създаване на проект + permission_add_subprojects: Създаване на подпроекти + permission_edit_project: Редактиране на проект + permission_select_project_modules: Избор на проектни модули + permission_manage_members: Управление на членовете (на екип) + permission_manage_project_activities: Управление на дейностите на проекта + permission_manage_versions: Управление на версиите + permission_manage_categories: Управление на категориите + permission_view_issues: Разглеждане на задачите + permission_add_issues: Добавяне на задачи + permission_edit_issues: Редактиране на задачи + permission_manage_issue_relations: Управление на връзките между задачите + permission_add_issue_notes: Добаване на бележки + permission_edit_issue_notes: Редактиране на бележки + permission_edit_own_issue_notes: Редактиране на собствени бележки + permission_move_issues: Преместване на задачи + permission_delete_issues: Изтриване на задачи + permission_manage_public_queries: Управление на публичните заявки + permission_save_queries: Запис на запитвания (queries) + permission_view_gantt: Разглеждане на мрежов график + permission_view_calendar: Разглеждане на календари + permission_view_issue_watchers: Разглеждане на списък с наблюдатели + permission_add_issue_watchers: Добавяне на наблюдатели + permission_delete_issue_watchers: Изтриване на наблюдатели + permission_log_time: Log spent time + permission_view_time_entries: Разглеждане на изразходваното време + permission_edit_time_entries: Редактиране на time logs + permission_edit_own_time_entries: Редактиране на собствените time logs + permission_manage_news: Управление на новини + permission_comment_news: Коментиране на новини + permission_manage_documents: Управление на документи + permission_view_documents: Разглеждане на документи + permission_manage_files: Управление на файлове + permission_view_files: Разглеждане на файлове + permission_manage_wiki: Управление на wiki + permission_rename_wiki_pages: Преименуване на wiki страници + permission_delete_wiki_pages: Изтриване на wiki страници + permission_view_wiki_pages: Разглеждане на wiki + permission_view_wiki_edits: Разглеждане на wiki история + permission_edit_wiki_pages: Редактиране на wiki страници + permission_delete_wiki_pages_attachments: Изтриване на прикачени файлове към wiki страници + permission_protect_wiki_pages: Заключване на wiki страници + permission_manage_repository: Управление на хранилища + permission_browse_repository: Разглеждане на хранилища + permission_view_changesets: Разглеждане на changesets + permission_commit_access: Поверяване + permission_manage_boards: Управление на boards + permission_view_messages: Разглеждане на съобщения + permission_add_messages: Публикуване на съобщения + permission_edit_messages: Редактиране на съобщения + permission_edit_own_messages: Редактиране на собствени съобщения + permission_delete_messages: Изтриване на съобщения + permission_delete_own_messages: Изтриване на собствени съобщения + permission_export_wiki_pages: Експорт на wiki страници + permission_manage_subtasks: Управление на подзадачите + + project_module_issue_tracking: Тракинг + project_module_time_tracking: Отделяне на време + project_module_news: Новини + project_module_documents: Документи + project_module_files: Файлове + project_module_wiki: Wiki + project_module_repository: Хранилище + project_module_boards: Форуми + project_module_calendar: Календар + project_module_gantt: Мрежов график + label_user: Потребител label_user_plural: Потребители label_user_new: Нов потребител + label_user_anonymous: Анонимен label_project: Проект label_project_new: Нов проект label_project_plural: Проекти label_x_projects: - zero: 0 проекти + zero: 0 проекта one: 1 проект other: "%{count} проекта" label_project_all: Всички проекти @@ -281,9 +447,13 @@ bg: label_issue_new: Нова задача label_issue_plural: Задачи label_issue_view_all: Всички задачи + label_issues_by: "Задачи по %{value}" + label_issue_added: Добавена задача + label_issue_updated: Обновена задача label_document: Документ label_document_new: Нов документ label_document_plural: Документи + label_document_added: Добавен документ label_role: Роля label_role_plural: Роли label_role_new: Нова роля @@ -310,11 +480,13 @@ bg: label_information_plural: Информация label_please_login: Вход label_register: Регистрация + label_login_with_open_id_option: или вход чрез OpenID label_password_lost: Забравена парола label_home: Начало label_my_page: Лична страница label_my_account: Профил label_my_projects: Проекти, в които участвам + label_my_page_block: Блокове в личната страница label_administration: Администрация label_login: Вход label_logout: Изход @@ -324,6 +496,8 @@ bg: label_last_login: Последно свързване label_registered_on: Регистрация label_activity: Дейност + label_overall_activity: Цялостна дейност + label_user_activity: "Активност на %{value}" label_new: Нов label_logged_as: Здравейте, label_environment: Среда @@ -332,10 +506,13 @@ bg: label_auth_source_new: Нов начин на оторизация label_auth_source_plural: Начини на оторизация label_subproject_plural: Подпроекти + label_subproject_new: Нов подпроект + label_and_its_subprojects: "%{value} и неговите подпроекти" label_min_max_length: Минимална - максимална дължина label_list: Списък label_date: Дата label_integer: Целочислен + label_float: Дробно label_boolean: Чекбокс label_string: Текст label_text: Дълъг текст @@ -350,6 +527,7 @@ bg: label_attachment_new: Нов файл label_attachment_delete: Изтриване label_attachment_plural: Файлове + label_file_added: Добавен файл label_report: Справка label_report_plural: Справки label_news: Новини @@ -357,11 +535,13 @@ bg: label_news_plural: Новини label_news_latest: Последни новини label_news_view_all: Виж всички + label_news_added: Добавена новина label_settings: Настройки label_overview: Общ изглед label_version: Версия label_version_new: Нова версия label_version_plural: Версии + label_close_versions: Затваряне на завършените версии label_confirmation: Одобрение label_export_to: Експорт към label_read: Read... @@ -388,6 +568,7 @@ bg: label_new_statuses_allowed: Позволени състояния label_all: всички label_none: никакви + label_nobody: никой label_next: Следващ label_previous: Предишен label_used_by: Използва се от @@ -419,9 +600,19 @@ bg: label_not_equals: не е label_in_less_than: след по-малко от label_in_more_than: след повече от + label_greater_or_equal: ">=" + label_less_or_equal: <= label_in: в следващите label_today: днес + label_all_time: всички + label_yesterday: вчера label_this_week: тази седмица + label_last_week: последната седмица + label_last_n_days: "последните %{count} дни" + label_this_month: текущия месец + label_last_month: последния месец + label_this_year: текущата година + label_date_range: Период label_less_than_ago: преди по-малко от label_more_than_ago: преди повече от label_ago: преди @@ -429,17 +620,25 @@ bg: label_not_contains: не съдържа label_day_plural: дни label_repository: Хранилище + label_repository_plural: Хранилища label_browse: Разглеждане label_modification: "%{count} промяна" label_modification_plural: "%{count} промени" + label_branch: работен вариант + label_tag: Версия label_revision: Ревизия label_revision_plural: Ревизии + label_revision_id: Ревизия %{value} + label_associated_revisions: Асоциирани ревизии label_added: добавено label_modified: променено + label_copied: копирано + label_renamed: преименувано label_deleted: изтрито label_latest_revision: Последна ревизия label_latest_revision_plural: Последни ревизии label_view_revisions: Виж ревизиите + label_view_all_revisions: Разглеждане на всички ревизии label_max_size: Максимална големина label_sort_highest: Премести най-горе label_sort_higher: Премести по-горе @@ -465,6 +664,7 @@ bg: label_changes_details: Подробни промени label_issue_tracking: Тракинг label_spent_time: Отделено време + label_overall_spent_time: Общо употребено време label_f_hour: "%{value} час" label_f_hour_plural: "%{value} часа" label_time_tracking: Отделяне на време @@ -486,6 +686,7 @@ bg: label_relation_delete: Изтриване на релация label_relates_to: свързана със label_duplicates: дублира + label_duplicated_by: дублирана от label_blocks: блокира label_blocked_by: блокирана от label_precedes: предшества @@ -501,10 +702,13 @@ bg: label_board: Форум label_board_new: Нов форум label_board_plural: Форуми + label_board_locked: Заключена + label_board_sticky: Sticky label_topic_plural: Теми label_message_plural: Съобщения label_message_last: Последно съобщение label_message_new: Нова тема + label_message_posted: Добавено съобщение label_reply_plural: Отговори label_send_information: Изпращане на информацията до потребителя label_year: Година @@ -515,12 +719,81 @@ bg: label_language_based: В зависимост от езика label_sort_by: "Сортиране по %{value}" label_send_test_email: Изпращане на тестов e-mail + label_feeds_access_key: RSS access ключ + label_missing_feeds_access_key: Липсващ RSS ключ за достъп label_feeds_access_key_created_on: "%{value} от създаването на RSS ключа" label_module_plural: Модули label_added_time_by: "Публикувана от %{author} преди %{age}" + label_updated_time_by: "Обновена от %{author} преди %{age}" label_updated_time: "Обновена преди %{value}" label_jump_to_a_project: Проект... - + label_file_plural: Файлове + label_changeset_plural: Ревизии + label_default_columns: По подразбиране + label_no_change_option: (Без промяна) + label_bulk_edit_selected_issues: Редактиране на задачи + label_theme: Тема + label_default: По подразбиране + label_search_titles_only: Само в заглавията + label_user_mail_option_all: "За всяко събитие в проектите, в които участвам" + label_user_mail_option_selected: "За всички събития само в избраните проекти..." + label_user_mail_option_none: "Само за наблюдавани или в които участвам (автор или назначени на мен)" + label_user_mail_option_only_my_events: Само за неща, в които съм включен/а + label_user_mail_option_only_assigned: Само за неща, назначени на мен + label_user_mail_option_only_owner: Само за неща, на които аз съм собственик + label_user_mail_no_self_notified: "Не искам известия за извършени от мен промени" + label_registration_activation_by_email: активиране на профила по email + label_registration_manual_activation: ръчно активиране + label_registration_automatic_activation: автоматично активиране + label_display_per_page: "На страница по: %{value}" + label_age: Възраст + label_change_properties: Промяна на настройки + label_general: Основни + label_more: Още + label_scm: SCM (Система за контрол на версиите) + label_plugins: Плъгини + label_ldap_authentication: LDAP оторизация + label_downloads_abbr: D/L + label_optional_description: Незадължително описание + label_add_another_file: Добавяне на друг файл + label_preferences: Предпочитания + label_chronological_order: Хронологичен ред + label_reverse_chronological_order: Обратен хронологичен ред + label_planning: Планиране + label_incoming_emails: Входящи e-mail-и + label_generate_key: Генериране на ключ + label_issue_watchers: Наблюдатели + label_example: Пример + label_display: Display + label_sort: Сортиране + label_ascending: Нарастващ + label_descending: Намаляващ + label_date_from_to: От %{start} до %{end} + label_wiki_content_added: Wiki страница беше добавена + label_wiki_content_updated: Wiki страница беше обновена + label_group: Група + label_group_plural: Групи + label_group_new: Нова група + label_time_entry_plural: Използвано време + label_version_sharing_none: Не споделен + label_version_sharing_descendants: С подпроекти + label_version_sharing_hierarchy: С проектна йерархия + label_version_sharing_tree: С дърво на проектите + label_version_sharing_system: С всички проекти + label_update_issue_done_ratios: Обновяване на процента на завършените задачи + label_copy_source: Източник + label_copy_target: Цел + label_copy_same_as_target: Също като целта + label_display_used_statuses_only: Показване само на състоянията, използвани от този тракер + label_api_access_key: API ключ за достъп + label_missing_api_access_key: Липсващ API ключ + label_api_access_key_created_on: API ключ за достъп е създаден преди %{value} + label_profile: Профил + label_subtask_plural: Подзадачи + label_project_copy_notifications: Изпращане на Send e-mail известия по време на копирането на проекта + label_principal_search: "Търсене на потребител или група:" + label_user_search: "Търсене на потребител:" + button_login: Вход button_submit: Прикачване button_save: Запис @@ -528,8 +801,10 @@ bg: button_uncheck_all: Изчистване на всички button_delete: Изтриване button_create: Създаване + button_create_and_continue: Създаване и продължаване button_test: Тест button_edit: Редакция + button_edit_associated_wikipage: "Редактиране на асоциираната Wiki страница: %{page_title}" button_add: Добавяне button_change: Промяна button_apply: Приложи @@ -540,6 +815,7 @@ bg: button_list: Списък button_view: Преглед button_move: Преместване + button_move_and_follow: Преместване и продължаване button_back: Назад button_cancel: Отказ button_activate: Активация @@ -553,26 +829,49 @@ bg: button_unarchive: Разархивиране button_reset: Генериране наново button_rename: Преименуване + button_change_password: Промяна на парола + button_copy: Копиране + button_copy_and_follow: Копиране и продължаване + button_annotate: Анотация + button_update: Обновяване + button_configure: Конфигуриране + button_quote: Цитат + button_duplicate: Дублиране + button_show: Показване status_active: активен status_registered: регистриран status_locked: заключен + version_status_open: отворена + version_status_locked: заключена + version_status_closed: затворена + + field_active: Активен + text_select_mail_notifications: Изберете събития за изпращане на e-mail. text_regexp_info: пр. ^[A-Z0-9]+$ text_min_max_length_info: 0 - без ограничения text_project_destroy_confirmation: Сигурни ли сте, че искате да изтриете проекта и данните в него? + text_subprojects_destroy_warning: "Неговите подпроекти: %{value} също ще бъдат изтрити." text_workflow_edit: Изберете роля и тракер за да редактирате работния процес text_are_you_sure: Сигурни ли сте? - text_tip_task_begin_day: задача започваща този ден - text_tip_task_end_day: задача завършваща този ден - text_tip_task_begin_end_day: задача започваща и завършваща този ден + text_are_you_sure_with_children: Изтриване на задачата и нейните подзадачи? + text_journal_changed: "%{label} променен от %{old} на %{new}" + text_journal_set_to: "%{label} установен на %{value}" + text_journal_deleted: "%{label} изтрит (%{old})" + text_journal_added: "Добавено %{label} %{value}" + text_tip_issue_begin_day: задача, започваща този ден + text_tip_issue_end_day: задача, завършваща този ден + text_tip_issue_begin_end_day: задача, започваща и завършваща този ден text_project_identifier_info: 'Позволени са малки букви (a-z), цифри и тирета.
    Невъзможна промяна след запис.' text_caracters_maximum: "До %{count} символа." + text_caracters_minimum: "Минимум %{count} символа." text_length_between: "От %{min} до %{max} символа." text_tracker_no_workflow: Няма дефиниран работен процес за този тракер text_unallowed_characters: Непозволени символи text_comma_separated: Позволено е изброяване (с разделител запетая). + text_line_separated: Позволени са много стойности (по едно на ред). text_issues_ref_in_commit_messages: Отбелязване и приключване на задачи от ревизии text_issue_added: "Публикувана е нова задача с номер %{id} (от %{author})." text_issue_updated: "Задача %{id} е обновена (от %{author})." @@ -580,7 +879,36 @@ bg: text_issue_category_destroy_question: "Има задачи (%{count}) обвързани с тази категория. Какво ще изберете?" text_issue_category_destroy_assignments: Премахване на връзките с категорията text_issue_category_reassign_to: Преобвързване с категория - + text_user_mail_option: "За неизбраните проекти, ще получавате известия само за наблюдавани дейности или в които участвате (т.е. автор или назначени на мен)." + text_no_configuration_data: "Все още не са конфигурирани Роли, тракери, състояния на задачи и работен процес.\nСтрого се препоръчва зареждането на примерната информация. Веднъж заредена ще имате възможност да я редактирате." + text_load_default_configuration: Зареждане на примерна информация + text_status_changed_by_changeset: "Приложено с ревизия %{value}." + text_time_logged_by_changeset: Приложено в ревизия %{value}. + text_issues_destroy_confirmation: 'Сигурни ли сте, че искате да изтриете избраните задачи?' + text_select_project_modules: 'Изберете активните модули за този проект:' + text_default_administrator_account_changed: Сменен фабричния администраторски профил + text_file_repository_writable: Възможност за писане в хранилището с файлове + text_plugin_assets_writable: Папката на приставките е разрешена за запис + text_rmagick_available: Наличен RMagick (по избор) + text_destroy_time_entries_question: "%{hours} часа са отделени на задачите, които искате да изтриете. Какво избирате?" + text_destroy_time_entries: Изтриване на отделеното време + text_assign_time_entries_to_project: Прехвърляне на отделеното време към проект + text_reassign_time_entries: 'Прехвърляне на отделеното време към задача:' + text_user_wrote: "%{value} написа:" + text_enumeration_destroy_question: "%{count} обекта са свързани с тази стойност." + text_enumeration_category_reassign_to: 'Пресвържете ги към тази стойност:' + text_email_delivery_not_configured: "Изпращането на e-mail-и не е конфигурирано и известията не са разрешени.\nКонфигурирайте вашия SMTP сървър в config/configuration.yml и рестартирайте Redmine, за да ги разрешите." + text_repository_usernames_mapping: "Изберете или променете потребителите в Redmine, съответстващи на потребителите в дневника на хранилището (repository).\nПотребителите с еднакви имена в Redmine и хранилищата се съвместяват автоматично." + text_diff_truncated: '... Този diff не е пълен, понеже е надхвърля максималния размер, който може да бъде показан.' + text_custom_field_possible_values_info: 'Една стойност на ред' + text_wiki_page_destroy_question: Тази страница има %{descendants} страници деца и descendant(s). Какво желаете да правите? + text_wiki_page_nullify_children: Запазване на тези страници като коренни страници + text_wiki_page_destroy_children: Изтриване на страниците деца и всички техни descendants + text_wiki_page_reassign_children: Преназначаване на страниците деца на тази родителска страница + text_own_membership_delete_confirmation: "Вие сте на път да премахнете някои или всички ваши разрешения и е възможно след това да не можете да редактирате този проект.\nСигурен ли сте, че искате да продължите?" + text_zoom_in: Увеличаване + text_zoom_out: Намаляване + default_role_manager: Мениджър default_role_developer: Разработчик default_role_reporter: Публикуващ @@ -602,333 +930,9 @@ bg: default_priority_immediate: Веднага default_activity_design: Дизайн default_activity_development: Разработка - + enumeration_issue_priorities: Приоритети на задачи enumeration_doc_categories: Категории документи enumeration_activities: Дейности (time tracking) - label_file_plural: Файлове - label_changeset_plural: Ревизии - field_column_names: Колони - label_default_columns: По подразбиране - setting_issue_list_default_columns: Показвани колони по подразбиране - setting_repositories_encodings: Кодови таблици - notice_no_issue_selected: "Няма избрани задачи." - label_bulk_edit_selected_issues: Редактиране на задачи - label_no_change_option: (Без промяна) - notice_failed_to_save_issues: "Неуспешен запис на %{count} задачи от %{total} избрани: %{ids}." - label_theme: Тема - label_default: По подразбиране - label_search_titles_only: Само в заглавията - label_nobody: никой - button_change_password: Промяна на парола - text_user_mail_option: "За неизбраните проекти, ще получавате известия само за наблюдавани дейности или в които участвате (т.е. автор или назначени на мен)." - label_user_mail_option_selected: "За всички събития само в избраните проекти..." - label_user_mail_option_all: "За всяко събитие в проектите, в които участвам" - label_user_mail_option_none: "Само за наблюдавани или в които участвам (автор или назначени на мен)" - setting_emails_footer: Подтекст за e-mail - label_float: Дробно - button_copy: Копиране - mail_body_account_information_external: "Можете да използвате вашия %{value} профил за вход." - mail_body_account_information: Информацията за профила ви - setting_protocol: Протокол - label_user_mail_no_self_notified: "Не искам известия за извършени от мен промени" - setting_time_format: Формат на часа - label_registration_activation_by_email: активиране на профила по email - mail_subject_account_activation_request: "Заявка за активиране на профил в %{value}" - mail_body_account_activation_request: "Има новорегистриран потребител (%{value}), очакващ вашето одобрение:" - label_registration_automatic_activation: автоматично активиране - label_registration_manual_activation: ръчно активиране - notice_account_pending: "Профилът Ви е създаден и очаква одобрение от администратор." - field_time_zone: Часова зона - text_caracters_minimum: "Минимум %{count} символа." - setting_bcc_recipients: Получатели на скрито копие (bcc) - button_annotate: Анотация - label_issues_by: "Задачи по %{value}" - field_searchable: С възможност за търсене - label_display_per_page: "На страница по: %{value}" - setting_per_page_options: Опции за страниране - label_age: Възраст - notice_default_data_loaded: Примерната информацията е успешно заредена. - text_load_default_configuration: Зареждане на примерна информация - text_no_configuration_data: "Все още не са конфигурирани Роли, тракери, състояния на задачи и работен процес.\nСтрого се препоръчва зареждането на примерната информация. Веднъж заредена ще имате възможност да я редактирате." - error_can_t_load_default_data: "Грешка при зареждане на примерната информация: %{value}" - button_update: Обновяване - label_change_properties: Промяна на настройки - label_general: Основни - label_repository_plural: Хранилища - label_associated_revisions: Асоциирани ревизии - setting_user_format: Потребителски формат - text_status_changed_by_changeset: "Приложено с ревизия %{value}." - label_more: Още - text_issues_destroy_confirmation: 'Сигурни ли сте, че искате да изтриете избраните задачи?' - label_scm: SCM (Система за контрол на кода) - text_select_project_modules: 'Изберете активните модули за този проект:' - label_issue_added: Добавена задача - label_issue_updated: Обновена задача - label_document_added: Добавен документ - label_message_posted: Добавено съобщение - label_file_added: Добавен файл - label_news_added: Добавена новина - project_module_boards: Форуми - project_module_issue_tracking: Тракинг - project_module_wiki: Wiki - project_module_files: Файлове - project_module_documents: Документи - project_module_repository: Хранилище - project_module_news: Новини - project_module_time_tracking: Отделяне на време - text_file_repository_writable: Възможност за писане в хранилището с файлове - text_default_administrator_account_changed: Сменен фабричния администраторски профил - text_rmagick_available: Наличен RMagick (по избор) - button_configure: Конфигуриране - label_plugins: Плъгини - label_ldap_authentication: LDAP оторизация - label_downloads_abbr: D/L - label_this_month: текущия месец - label_last_n_days: "последните %{count} дни" - label_all_time: всички - label_this_year: текущата година - label_date_range: Период - label_last_week: последната седмица - label_yesterday: вчера - label_last_month: последния месец - label_add_another_file: Добавяне на друг файл - label_optional_description: Незадължително описание - text_destroy_time_entries_question: "%{hours} часа са отделени на задачите, които искате да изтриете. Какво избирате?" - error_issue_not_found_in_project: 'Задачата не е намерена или не принадлежи на този проект' - text_assign_time_entries_to_project: Прехвърляне на отделеното време към проект - text_destroy_time_entries: Изтриване на отделеното време - text_reassign_time_entries: 'Прехвърляне на отделеното време към задача:' - setting_activity_days_default: Брой дни показвани на таб Дейност - label_chronological_order: Хронологичен ред - field_comments_sorting: Сортиране на коментарите - label_reverse_chronological_order: Обратен хронологичен ред - label_preferences: Предпочитания - setting_display_subprojects_issues: Показване на подпроектите в проектите по подразбиране - label_overall_activity: Цялостна дейност - setting_default_projects_public: Новите проекти са публични по подразбиране - error_scm_annotate: "Обектът не съществува или не може да бъде анотиран." - label_planning: Планиране - text_subprojects_destroy_warning: "Неговите подпроекти: %{value} също ще бъдат изтрити." - label_and_its_subprojects: "%{value} и неговите подпроекти" - mail_body_reminder: "%{count} задачи, назначени на вас са с краен срок в следващите %{days} дни:" - mail_subject_reminder: "%{count} задачи с краен срок с следващите %{days} дни" - text_user_wrote: "%{value} написа:" - label_duplicated_by: дублирана от - setting_enabled_scm: Разрешена SCM - text_enumeration_category_reassign_to: 'Пресвържете ги към тази стойност:' - text_enumeration_destroy_question: "%{count} обекта са свързани с тази стойност." - label_incoming_emails: Входящи e-mail-и - label_generate_key: Генериране на ключ - setting_mail_handler_api_enabled: Разрешаване на WS за входящи e-mail-и - setting_mail_handler_api_key: API ключ - text_email_delivery_not_configured: "Изпращането на e-mail-и не е конфигурирано и известията не са разрешени.\nКонфигурирайте вашия SMTP сървър в config/configuration.yml и рестартирайте Redmine, за да ги разрешите." - field_parent_title: Родителска страница - label_issue_watchers: Наблюдатели - setting_commit_logs_encoding: Кодова таблица на съобщенията при поверяване - button_quote: Цитат - setting_sequential_project_identifiers: Генериране на последователни проектни идентификатори - notice_unable_delete_version: Невъзможност за изтриване на версия - label_renamed: преименувано - label_copied: копирано - setting_plain_text_mail: само чист текст (без HTML) - permission_view_files: Разглеждане на файлове - permission_edit_issues: Редактиране на задачи - permission_edit_own_time_entries: Редактиране на собствените time logs - permission_manage_public_queries: Управление на публичните заявки - permission_add_issues: Добавяне на задачи - permission_log_time: Log spent time - permission_view_changesets: Разглеждане на changesets - permission_view_time_entries: Разглеждане на изразходваното време - permission_manage_versions: Управление на версиите - permission_manage_wiki: Управление на wiki - permission_manage_categories: Управление на категориите задачи - permission_protect_wiki_pages: Заключване на wiki страници - permission_comment_news: Коментиране на новини - permission_delete_messages: Изтриване на съобщения - permission_select_project_modules: Избор на проектни модули - permission_manage_documents: Управление на документи - permission_edit_wiki_pages: Редактиране на wiki страници - permission_add_issue_watchers: Добавяне на наблюдатели - permission_view_gantt: Разглеждане на мрежов график - permission_move_issues: Преместване на задачи - permission_manage_issue_relations: Управление на връзките между задачите - permission_delete_wiki_pages: Изтриване на wiki страници - permission_manage_boards: Управление на boards - permission_delete_wiki_pages_attachments: Изтриване на прикачени файлове - permission_view_wiki_edits: Разглеждане на wiki история - permission_add_messages: Публикуване на съобщения - permission_view_messages: Разглеждане на съобщения - permission_manage_files: Управление на файлове - permission_edit_issue_notes: Редактиране на бележки - permission_manage_news: Управление на новини - permission_view_calendar: Разглеждане на календари - permission_manage_members: Управление на членовете (на екип) - permission_edit_messages: Редактиране на съобщения - permission_delete_issues: Изтриване на задачи - permission_view_issue_watchers: Разглеждане на списък с наблюдатели - permission_manage_repository: Управление на хранилища - permission_commit_access: Поверяване - permission_browse_repository: Разглеждане на хранилища - permission_view_documents: Разглеждане на документи - permission_edit_project: Редактиране на проект - permission_add_issue_notes: Добаване на бележки - permission_save_queries: Запис на запитвания (queries) - permission_view_wiki_pages: Разглеждане на wiki - permission_rename_wiki_pages: Преименуване на wiki страници - permission_edit_time_entries: Редактиране на time logs - permission_edit_own_issue_notes: Редактиране на собствени бележки - setting_gravatar_enabled: Използване на портребителски икони от Gravatar - label_example: Пример - text_repository_usernames_mapping: "Select ou update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped." - permission_edit_own_messages: Редактиране на собствени съобщения - permission_delete_own_messages: Изтриване на собствени съобщения - label_user_activity: "Активност на %{value}" - label_updated_time_by: "Обновена от %{author} преди %{age}" - text_diff_truncated: '... Този diff не е пълен, понеже е надхвърля максималния размер, който може да бъде показан.' - setting_diff_max_lines_displayed: Максимален брой показани diff редове - text_plugin_assets_writable: Папката на приставките е разрешена за запис - warning_attachments_not_saved: "%{count} файла не бяха записани." - button_create_and_continue: Създаване и продължаване - text_custom_field_possible_values_info: 'Една стойност на ред' - label_display: Display - field_editable: Editable - setting_repository_log_display_limit: Максимален брой на показванете ревизии в лог файла - setting_file_max_size_displayed: Максимален размер на текстовите файлове, показвани inline - field_watcher: Наблюдател - setting_openid: Рарешаване на OpenID вход и регистрация - field_identity_url: OpenID URL - label_login_with_open_id_option: или вход чрез OpenID - field_content: Съдържание - label_descending: Намаляващ - label_sort: Сортиране - label_ascending: Нарастващ - label_date_from_to: От %{start} до %{end} - label_greater_or_equal: ">=" - label_less_or_equal: <= - text_wiki_page_destroy_question: Тази страница има %{descendants} страници деца и descendant(s). Какво желаете да правите? - text_wiki_page_reassign_children: Преназначаване на страниците деца на тази родителска страница - text_wiki_page_nullify_children: Запазване на тези страници като коренни страници - text_wiki_page_destroy_children: Изтриване на страниците деца и всички техни descendants - setting_password_min_length: Минимална дължина на парола - field_group_by: Групиране на резултатите по - mail_subject_wiki_content_updated: "Wiki страницата '%{id}' не беше обновена" - label_wiki_content_added: Wiki страница беше добавена - mail_subject_wiki_content_added: "Wiki страницата '%{id}' беше добавена" - mail_body_wiki_content_added: Wiki страницата '%{id}' беше добавена от %{author}. - label_wiki_content_updated: Wiki страница беше обновена - mail_body_wiki_content_updated: Wiki страницата '%{id}' беше обновена от %{author}. - permission_add_project: Създаване на проект - setting_new_project_user_role_id: Роля, давана на потребител, създаващ проекти, който не е администратор - label_view_all_revisions: Разглеждане на всички ревизии - label_tag: Версия - label_branch: работен вариант - error_no_tracker_in_project: Няма асоциирани тракери с този проект. Проверете настройките на проекта. - error_no_default_issue_status: Няма установено подразбиращо се състояние за задачите. Моля проверете вашата конфигурация (Вижте "Администрация -> Състояния на задачи"). - text_journal_changed: "%{label} променен от %{old} на %{new}" - text_journal_set_to: "%{label} установен на %{value}" - text_journal_deleted: "%{label} изтрит (%{old})" - label_group_plural: Групи - label_group: Група - label_group_new: Нова група - label_time_entry_plural: Използвано време - text_journal_added: "Добавено %{label} %{value}" - field_active: Активен enumeration_system_activity: Системна активност - permission_delete_issue_watchers: Изтриване на наблюдатели - version_status_closed: затворена - version_status_locked: заключена - version_status_open: отворена - error_can_not_reopen_issue_on_closed_version: Задача, асоциирана със затворена версия не може да бъде отворена отново - label_user_anonymous: Анонимен - button_move_and_follow: Преместване и продължаване - setting_default_projects_modules: Активирани модули по подразбиране за нов проект - setting_gravatar_default: Подразбиращо се изображение от Gravatar - field_sharing: Sharing - label_version_sharing_hierarchy: С проектна йерархия - label_version_sharing_system: С всички проекти - label_version_sharing_descendants: С подпроекти - label_version_sharing_tree: С дърво на проектите - label_version_sharing_none: Не споделен - error_can_not_archive_project: Този проект не може да бъде архивиран - button_duplicate: Дублиране - button_copy_and_follow: Копиране и продължаване - label_copy_source: Източник - setting_issue_done_ratio: Изчисление на процента на готови задачи с - setting_issue_done_ratio_issue_status: Използване на състоянието на задачите - error_issue_done_ratios_not_updated: Процентът на завършените задачи не е обновен. - error_workflow_copy_target: Моля изберете тракер(и) и роля (роли). - setting_issue_done_ratio_issue_field: Използване на поле '% Прогрес' - label_copy_same_as_target: Също като целта - label_copy_target: Цел - notice_issue_done_ratios_updated: Обновен процент на завършените задачи. - error_workflow_copy_source: Моля изберете source тракер или роля - label_update_issue_done_ratios: Обновяване на процента на завършените задачи - setting_start_of_week: Първи ден на седмицата - permission_view_issues: Разглеждане на задачите - label_display_used_statuses_only: Показване само на състоянията, използвани от този тракер - label_revision_id: Ревизия %{value} - label_api_access_key: API ключ за достъп - label_api_access_key_created_on: API ключ за достъп е създаден преди %{value} - label_feeds_access_key: RSS access ключ - notice_api_access_key_reseted: Вашият API ключ за достъп беше изчистен. - setting_rest_api_enabled: Разрешаване на REST web сървис - label_missing_api_access_key: Липсващ API ключ - label_missing_feeds_access_key: Липсващ RSS ключ за достъп - button_show: Показване - text_line_separated: Позволени са много стойности (по едно на ред). - setting_mail_handler_body_delimiters: Отрязване на e-mail-ите след един от тези редове - permission_add_subprojects: Създаване на подпроекти - label_subproject_new: Нов подпроект - text_own_membership_delete_confirmation: |- - Вие сте на път да премахнете някои или всички ваши разрешения и е възможно след това на да не можете да редатирате този проект. - Сигурен ли сте, че искате да продължите? - label_close_versions: Затваряне на завършените версии - label_board_sticky: Sticky - label_board_locked: Заключена - permission_export_wiki_pages: Експорт на wiki страници - setting_cache_formatted_text: Cache formatted text - permission_manage_project_activities: Управление на дейностите на проекта - error_unable_delete_issue_status: Невъзможност за изтриване на състояние на задача - label_profile: Профил - permission_manage_subtasks: Управление на подзадачите - field_parent_issue: Родителска задача - label_subtask_plural: Подзадачи - label_project_copy_notifications: Изпращане на Send e-mail известия по време на копирането на проекта - error_can_not_delete_custom_field: Невъзможност за изтриване на потребителско поле - error_unable_to_connect: Невъзможност за свързване с (%{value}) - error_can_not_remove_role: Тази роля се използва и не може да бъде изтрита. - error_can_not_delete_tracker: Този тракер съдържа задачи и не може да бъде изтрит. - field_principal: Principal - label_my_page_block: Блокове в личната страница - notice_failed_to_save_members: "Невъзможност за запис на член(ове): %{errors}." - text_zoom_out: Намаляване - text_zoom_in: Увеличаване - notice_unable_delete_time_entry: Невъзможност за изтриване на запис на time log. - label_overall_spent_time: Общо употребено време - field_time_entries: Log time - notice_not_authorized_archived_project: Проектът, който се опитвате да видите е архивиран. - text_tip_issue_end_day: задача, завършваща този ден - field_text: Текстово поле - label_user_mail_option_only_owner: Само за неща, на които аз съм собственик - field_member_of_group: Член на група - project_module_gantt: Мрежов график - text_are_you_sure_with_children: Изтриване на задачата и нейните подзадачи? - text_tip_issue_begin_end_day: задача, започваща и завършваща този ден - setting_default_notification_option: Подразбиращ се начин за известяване - project_module_calendar: Календар - label_user_mail_option_only_my_events: Само за неща, в които съм включен/а - text_tip_issue_begin_day: задача, започваща този ден - label_user_mail_option_only_assigned: Само за неща, назначени на мен - button_edit_associated_wikipage: "Редактиране на асоциираната Wiki страница: %{page_title}" - field_assigned_to_role: Assignee's role - field_start_date: Начална дата - label_principal_search: "Търсене на потребител или група:" - label_user_search: "Търсене на потребител:" - field_visible: Видим - setting_emails_header: Emails header - setting_commit_logtime_activity_id: Дейност при отчитане на работното време - text_time_logged_by_changeset: Приложено в ревизия %{value}. - setting_commit_logtime_enabled: Разрешаване на отчитането на работното време - notice_gantt_chart_truncated: Мрежовият график е съкратен, понеже броят на обектите, които могат да бъдат показани е твърде голям (%{max}) - setting_gantt_items_limit: Максимален брой обекти, които да се показват в мрежов график + diff --git a/config/locales/cs.yml b/config/locales/cs.yml index ecefa78e..24ff90c2 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -546,7 +546,7 @@ cs: label_relation_delete: Odstranit souvislost label_relates_to: související s label_duplicates: duplicity - label_blocks: bloků + label_blocks: blokuje label_blocked_by: zablokován label_precedes: předchází label_follows: následuje diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 0ba08db5..e6094f3b 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -208,6 +208,7 @@ sv: notice_unable_delete_version: Denna version var inte möjlig att ta bort. notice_unable_delete_time_entry: Tidloggning kunde inte tas bort. notice_issue_done_ratios_updated: % klart uppdaterade. + notice_gantt_chart_truncated: "Schemat förminskades eftersom det överskrider det maximala antalet aktiviteter som får visas (%{max})" error_can_t_load_default_data: "Standardkonfiguration gick inte att läsa in: %{value}" error_scm_not_found: "Inlägg och/eller revision finns inte i detta versionsarkiv." @@ -217,7 +218,7 @@ sv: error_no_tracker_in_project: 'Ingen ärendetyp är associerad med projektet. Vänligen kontrollera projektinställningarna.' error_no_default_issue_status: 'Ingen status är definierad som standard för nya ärenden. Vänligen kontrollera din konfiguration (Gå till "Administration -> Ärendestatus").' error_can_not_delete_custom_field: Kan inte ta bort användardefinerat fält - error_can_not_delete_tracker: Det finns ärenden av denna typ och den är därför inte möjlig att ta bort. + error_can_not_delete_tracker: "Det finns ärenden av denna typ och den är därför inte möjlig att ta bort." error_can_not_remove_role: "Denna roll används och den är därför inte möjlig att ta bort." error_can_not_reopen_issue_on_closed_version: 'Ett ärende tilldelat en stängd version kan inte öppnas på nytt' error_can_not_archive_project: Detta projekt kan inte arkiveras @@ -225,7 +226,7 @@ sv: error_workflow_copy_source: 'Vänligen välj källans ärendetyp eller roll' error_workflow_copy_target: 'Vänligen välj ärendetyp(er) och roll(er) för mål' error_unable_delete_issue_status: 'Ärendestatus kunde inte tas bort' - error_unable_to_connect: Kan inte ansluta (%{value}) + error_unable_to_connect: "Kan inte ansluta (%{value})" warning_attachments_not_saved: "%{count} fil(er) kunde inte sparas." @@ -240,9 +241,9 @@ sv: mail_subject_reminder: "%{count} ärende(n) har deadline under de kommande %{days} dagarna" mail_body_reminder: "%{count} ärende(n) som är tilldelat dig har deadline under de %{days} dagarna:" mail_subject_wiki_content_added: "'%{id}' wikisida has lagts till" - mail_body_wiki_content_added: The '%{id}' wikisida has lagts till av %{author}. + mail_body_wiki_content_added: "The '%{id}' wikisida has lagts till av %{author}." mail_subject_wiki_content_updated: "'%{id}' wikisida har uppdaterats" - mail_body_wiki_content_updated: The '%{id}' wikisida har uppdaterats av %{author}. + mail_body_wiki_content_updated: "The '%{id}' wikisida har uppdaterats av %{author}." gui_validation_error: 1 fel gui_validation_error_plural: "%{count} fel" @@ -340,8 +341,8 @@ sv: field_group_by: Gruppera resultat efter field_sharing: Delning field_parent_issue: Förälderaktivitet - field_member_of_group: Tilldelad användares grupp - field_assigned_to_role: Tilldelad användares roll + field_member_of_group: "Tilldelad användares grupp" + field_assigned_to_role: "Tilldelad användares roll" field_text: Textfält field_visible: Synlig @@ -380,7 +381,7 @@ sv: setting_activity_days_default: Dagar som visas på projektaktivitet setting_display_subprojects_issues: Visa ärenden från underprojekt i huvudprojekt setting_enabled_scm: Aktivera SCM - setting_mail_handler_body_delimiters: Trunkera mail efter en av följande rader + setting_mail_handler_body_delimiters: "Trunkera mail efter en av följande rader" setting_mail_handler_api_enabled: Aktivera WS för inkommande mail setting_mail_handler_api_key: API-nyckel setting_sequential_project_identifiers: Generera projektidentifierare sekventiellt @@ -400,6 +401,9 @@ sv: setting_rest_api_enabled: Aktivera REST webbtjänst setting_cache_formatted_text: Cacha formaterad text setting_default_notification_option: Standard notifieringsalternativ + setting_commit_logtime_enabled: Aktivera tidloggning + setting_commit_logtime_activity_id: Aktivitet för loggad tid + setting_gantt_items_limit: Maximalt antal aktiviteter som visas i gantt-schemat permission_add_project: Skapa projekt permission_add_subprojects: Skapa underprojekt @@ -581,7 +585,7 @@ sv: label_version_plural: Versioner label_close_versions: Stäng klara versioner label_confirmation: Bekräftelse - label_export_to: Exportera till + label_export_to: 'Finns även som:' label_read: Läs... label_public_projects: Publika projekt label_open_issues: öppen @@ -666,7 +670,7 @@ sv: label_tag: Tag label_revision: Revision label_revision_plural: Revisioner - label_revision_id: Revision %{value} + label_revision_id: "Revision %{value}" label_associated_revisions: Associerade revisioner label_added: tillagd label_modified: modifierad @@ -775,10 +779,10 @@ sv: label_search_titles_only: Sök endast i titlar label_user_mail_option_all: "För alla händelser i mina projekt" label_user_mail_option_selected: "För alla händelser i markerade projekt..." - label_user_mail_option_none: Inga händelser - label_user_mail_option_only_my_events: Endast för saker jag bevakar eller är inblandad i - label_user_mail_option_only_assigned: Endast för saker jag är tilldelad - label_user_mail_option_only_owner: Endast för saker jag äger + label_user_mail_option_none: "Inga händelser" + label_user_mail_option_only_my_events: "Endast för saker jag bevakar eller är inblandad i" + label_user_mail_option_only_assigned: "Endast för saker jag är tilldelad" + label_user_mail_option_only_owner: "Endast för saker jag äger" label_user_mail_no_self_notified: "Jag vill inte bli underrättad om ändringar som jag har gjort" label_registration_activation_by_email: kontoaktivering med mail label_registration_manual_activation: manuell kontoaktivering @@ -825,7 +829,7 @@ sv: label_display_used_statuses_only: Visa endast status som används av denna ärendetyp label_api_access_key: API-nyckel label_missing_api_access_key: Saknar en API-nyckel - label_api_access_key_created_on: API-nyckel skapad för %{value} sedan + label_api_access_key_created_on: "API-nyckel skapad för %{value} sedan" label_profile: Profil label_subtask_plural: Underaktiviteter label_project_copy_notifications: Skicka mailnotifieringar när projektet kopieras @@ -921,6 +925,7 @@ sv: text_no_configuration_data: "Roller, ärendetyper, ärendestatus och arbetsflöden har inte konfigurerats ännu.\nDet rekommenderas att läsa in standardkonfigurationen. Du kommer att kunna göra ändringar efter att den blivit inläst." text_load_default_configuration: Läs in standardkonfiguration text_status_changed_by_changeset: "Tilldelad i changeset %{value}." + text_time_logged_by_changeset: "Tilldelad i changeset %{value}." text_issues_destroy_confirmation: 'Är du säker på att du vill radera markerade ärende(n) ?' text_select_project_modules: 'Välj vilka moduler som ska vara aktiva för projektet:' text_default_administrator_account_changed: Standardadministratörens konto ändrat @@ -938,10 +943,10 @@ sv: text_repository_usernames_mapping: "Välj eller uppdatera den Redmine-användare som är mappad till varje användarnamn i versionarkivloggen.\nAnvändare med samma användarnamn eller mailadress i både Redmine och versionsarkivet mappas automatiskt." text_diff_truncated: '... Denna diff har förminskats eftersom den överskrider den maximala storlek som kan visas.' text_custom_field_possible_values_info: 'Ett värde per rad' - text_wiki_page_destroy_question: Denna sida har %{descendants} underliggande sidor. Vad vill du göra? - text_wiki_page_nullify_children: Behåll undersidor som rotsidor - text_wiki_page_destroy_children: Ta bort alla underliggande sidor - text_wiki_page_reassign_children: Flytta undersidor till denna föräldersida + text_wiki_page_destroy_question: "Denna sida har %{descendants} underliggande sidor. Vad vill du göra?" + text_wiki_page_nullify_children: "Behåll undersidor som rotsidor" + text_wiki_page_destroy_children: "Ta bort alla underliggande sidor" + text_wiki_page_reassign_children: "Flytta undersidor till denna föräldersida" text_own_membership_delete_confirmation: "Några av, eller alla, dina behörigheter kommer att tas bort och du kanske inte längre kommer kunna göra ändringar i det här projektet.\nVill du verkligen fortsätta?" text_zoom_out: Zooma ut text_zoom_in: Zooma in @@ -972,8 +977,3 @@ sv: enumeration_doc_categories: Dokumentkategorier enumeration_activities: Aktiviteter (tidsuppföljning) enumeration_system_activity: Systemaktivitet - setting_commit_logtime_activity_id: Activity for logged time - text_time_logged_by_changeset: Applied in changeset %{value}. - setting_commit_logtime_enabled: Enable time logging - notice_gantt_chart_truncated: The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max}) - setting_gantt_items_limit: Maximum number of items displayed on the gantt chart From 9ed038785143066ba201733548eed58aaa36f97e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 30 Jan 2011 06:54:00 +0000 Subject: [PATCH 31/48] Removed issue subjects wrapping in gantt (#7280). Contributed by Etienne Massip. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4780 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/gantts/show.html.erb | 2 +- lib/redmine/helpers/gantt.rb | 10 +++++----- public/stylesheets/application.css | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 82036627..05c015be 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -60,7 +60,7 @@ end # Width of the entire chart g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom -@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width) +@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width) g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max t_height = g_height + headers_height diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index b0d72290..d4323f6b 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -263,7 +263,7 @@ module Redmine def subject_for_project(project, options) case options[:format] when :html - subject = "" + subject = "" subject << view.link_to_project(project) subject << '' html_subject(options, subject, :css => "project-name") @@ -301,7 +301,7 @@ module Redmine def subject_for_version(version, options) case options[:format] when :html - subject = "" + subject = "" subject << view.link_to_version(version) subject << '' html_subject(options, subject, :css => "version-name") @@ -345,7 +345,7 @@ module Redmine output = case options[:format] when :html - css_classes = '' + css_classes = 'gantt_subject-text' css_classes << ' issue-overdue' if issue.overdue? css_classes << ' issue-behind-schedule' if issue.behind_schedule? css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to @@ -357,7 +357,7 @@ module Redmine end subject << view.link_to_issue(issue) subject << '' - html_subject(options, subject, :css => "issue-subject") + "\n" + html_subject(options, subject, :css => 'issue-subject') + "\n" when :image image_subject(options, issue.subject) when :pdf @@ -709,7 +709,7 @@ module Redmine end def html_subject(params, subject, options={}) - output = "
    " + output = "
    " output << subject output << "
    " @subjects << output diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 8ec94f3a..9152515c 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -783,6 +783,8 @@ background-image:url('../images/close_hl.png'); } .gantt_subjects { font-size: 0.8em; } +.gantt_subject { position: absolute; line-height: 1.2em; height: 16px; overflow: hidden; text-overflow: ellipsis; } +.gantt_subject-text { float: left; white-space: nowrap; } .task { position: absolute; From 52a2a174e0b86c4ded8e5dc4c17658460eef6901 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 30 Jan 2011 09:09:50 +0000 Subject: [PATCH 32/48] Reverted r4780 that broke gantt tests (#7280). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4782 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/gantts/show.html.erb | 2 +- lib/redmine/helpers/gantt.rb | 10 +++++----- public/stylesheets/application.css | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 05c015be..82036627 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -60,7 +60,7 @@ end # Width of the entire chart g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom -@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width) +@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width) g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max t_height = g_height + headers_height diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index d4323f6b..b0d72290 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -263,7 +263,7 @@ module Redmine def subject_for_project(project, options) case options[:format] when :html - subject = "" + subject = "" subject << view.link_to_project(project) subject << '' html_subject(options, subject, :css => "project-name") @@ -301,7 +301,7 @@ module Redmine def subject_for_version(version, options) case options[:format] when :html - subject = "" + subject = "" subject << view.link_to_version(version) subject << '' html_subject(options, subject, :css => "version-name") @@ -345,7 +345,7 @@ module Redmine output = case options[:format] when :html - css_classes = 'gantt_subject-text' + css_classes = '' css_classes << ' issue-overdue' if issue.overdue? css_classes << ' issue-behind-schedule' if issue.behind_schedule? css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to @@ -357,7 +357,7 @@ module Redmine end subject << view.link_to_issue(issue) subject << '' - html_subject(options, subject, :css => 'issue-subject') + "\n" + html_subject(options, subject, :css => "issue-subject") + "\n" when :image image_subject(options, issue.subject) when :pdf @@ -709,7 +709,7 @@ module Redmine end def html_subject(params, subject, options={}) - output = "
    " + output = "
    " output << subject output << "
    " @subjects << output diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 9152515c..8ec94f3a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -783,8 +783,6 @@ background-image:url('../images/close_hl.png'); } .gantt_subjects { font-size: 0.8em; } -.gantt_subject { position: absolute; line-height: 1.2em; height: 16px; overflow: hidden; text-overflow: ellipsis; } -.gantt_subject-text { float: left; white-space: nowrap; } .task { position: absolute; From e4a180d7be2139555a85fdb8d19c0409388b88c6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 30 Jan 2011 14:37:23 +0000 Subject: [PATCH 33/48] Update for 1.1.1 release. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4784 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- doc/CHANGELOG | 23 +++++++++++++++++++++++ lib/redmine/version.rb | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 8e155ddf..f840f899 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -4,6 +4,29 @@ Redmine - project management software Copyright (C) 2006-2011 Jean-Philippe Lang http://www.redmine.org/ +== 2011-01-30 v1.1.1 + +* Defect #4899: Redmine fails to list files for darcs repository +* Defect #7245: Wiki fails to find pages with cyrillic characters using postgresql +* Defect #7256: redmine/public/.htaccess must be moved for non-fastcgi installs/upgrades +* Defect #7258: Automatic spent time logging does not work properly with SQLite3 +* Defect #7259: Released 1.1.0 uses "devel" label inside admin information +* Defect #7265: "Loading..." icon does not disappear after add project member +* Defect #7266: Test test_due_date_distance_in_words fail due to undefined locale +* Defect #7274: CSV value separator in dutch locale +* Defect #7277: Enabling gravatas causes usernames to overlap first name field in user list +* Defect #7294: "Notifiy for only project I select" is not available anymore in 1.1.0 +* Defect #7307: HTTP 500 error on query for empty revision +* Defect #7313: Label not translated in french in Settings/Email Notification tab +* Defect #7329: with long strings may hang server +* Defect #7337: My page french translation +* Defect #7348: French Translation of "Connection" +* Defect #7385: Error when viewing an issue which was related to a deleted subtask +* Defect #7386: NoMethodError on pdf export +* Defect #7415: Darcs adapter recognizes new files as modified files above Darcs 2.4 +* Defect #7421: no email sent with 'Notifiy for any event on the selected projects only' +* Feature #5344: Update to latest CodeRay 0.9.x + == 2011-01-09 v1.1.0 * Defect #2038: Italics in wiki headers show-up wrong in the toc diff --git a/lib/redmine/version.rb b/lib/redmine/version.rb index 8d786afb..9520d95c 100644 --- a/lib/redmine/version.rb +++ b/lib/redmine/version.rb @@ -4,7 +4,7 @@ module Redmine module VERSION #:nodoc: MAJOR = 1 MINOR = 1 - TINY = 0 + TINY = 1 # Branch values: # * official release: nil From 50df0ba08b2678630bf54fe01b239e560092b596 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 1 Feb 2011 13:48:56 +0000 Subject: [PATCH 34/48] Ignore config/configuration.yml (#7408). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4787 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .gitignore | 1 + .hgignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 853230d7..4100963f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /config/additional_environment.rb +/config/configuration.yml /config/database.yml /config/email.yml /config/initializers/session_store.rb diff --git a/.hgignore b/.hgignore index cded71b3..5f41fda1 100644 --- a/.hgignore +++ b/.hgignore @@ -1,6 +1,7 @@ syntax: glob config/additional_environment.rb +config/configuration.yml config/database.yml config/email.yml config/initializers/session_store.rb From f101bb6e9c21e5586ebfe5413bb9741484d9057c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 2 Feb 2011 04:00:36 +0000 Subject: [PATCH 35/48] scm: cvs: change project id of unit app test from 1 to 3. Project id 1 has Subversion fixtures. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4788 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_cvs_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb index 5174f2c2..530ff901 100644 --- a/test/unit/repository_cvs_test.rb +++ b/test/unit/repository_cvs_test.rb @@ -27,7 +27,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase MODULE_NAME = 'test' def setup - @project = Project.find(1) + @project = Project.find(3) assert @repository = Repository::Cvs.create(:project => @project, :root_url => REPOSITORY_PATH, :url => MODULE_NAME) From 70214da57364e8a4dfb20e9e78c1f544f8fbad53 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 2 Feb 2011 04:00:59 +0000 Subject: [PATCH 36/48] scm: cvs: change project id of functional test from 1 to 3. Project id 1 has Subversion fixtures. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4789 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../repositories_cvs_controller_test.rb | 59 +++++++++++++------ 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb index 58b44ec1..5e2a1dc9 100644 --- a/test/functional/repositories_cvs_controller_test.rb +++ b/test/functional/repositories_cvs_controller_test.rb @@ -29,7 +29,8 @@ class RepositoriesCvsControllerTest < ActionController::TestCase REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin? # CVS module MODULE_NAME = 'test' - + PRJ_ID = 3 + def setup @controller = RepositoriesController.new @request = ActionController::TestRequest.new @@ -37,14 +38,18 @@ class RepositoriesCvsControllerTest < ActionController::TestCase Setting.default_language = 'en' User.current = nil - @project = Project.find(1) - @project.repository = Repository::Cvs.create(:root_url => REPOSITORY_PATH, - :url => MODULE_NAME) + @project = Project.find(PRJ_ID) + @repository = Repository::Cvs.create(:project => Project.find(PRJ_ID), + :root_url => REPOSITORY_PATH, + :url => MODULE_NAME) + assert @repository end if File.directory?(REPOSITORY_PATH) def test_show - get :show, :id => 1 + @repository.fetch_changesets + @repository.reload + get :show, :id => PRJ_ID assert_response :success assert_template 'show' assert_not_nil assigns(:entries) @@ -52,7 +57,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase end def test_browse_root - get :show, :id => 1 + @repository.fetch_changesets + @repository.reload + get :show, :id => PRJ_ID assert_response :success assert_template 'show' assert_not_nil assigns(:entries) @@ -66,7 +73,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase end def test_browse_directory - get :show, :id => 1, :path => ['images'] + @repository.fetch_changesets + @repository.reload + get :show, :id => PRJ_ID, :path => ['images'] assert_response :success assert_template 'show' assert_not_nil assigns(:entries) @@ -78,8 +87,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase end def test_browse_at_given_revision - Project.find(1).repository.fetch_changesets - get :show, :id => 1, :path => ['images'], :rev => 1 + @repository.fetch_changesets + @repository.reload + get :show, :id => PRJ_ID, :path => ['images'], :rev => 1 assert_response :success assert_template 'show' assert_not_nil assigns(:entries) @@ -87,7 +97,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase end def test_entry - get :entry, :id => 1, :path => ['sources', 'watchers_controller.rb'] + @repository.fetch_changesets + @repository.reload + get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'] assert_response :success assert_template 'entry' assert_no_tag :tag => 'td', :attributes => { :class => /line-code/}, @@ -96,8 +108,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase def test_entry_at_given_revision # changesets must be loaded - Project.find(1).repository.fetch_changesets - get :entry, :id => 1, :path => ['sources', 'watchers_controller.rb'], :rev => 2 + @repository.fetch_changesets + @repository.reload + get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'], :rev => 2 assert_response :success assert_template 'entry' # this line was removed in r3 @@ -106,18 +119,24 @@ class RepositoriesCvsControllerTest < ActionController::TestCase end def test_entry_not_found - get :entry, :id => 1, :path => ['sources', 'zzz.c'] + @repository.fetch_changesets + @repository.reload + get :entry, :id => PRJ_ID, :path => ['sources', 'zzz.c'] assert_tag :tag => 'p', :attributes => { :id => /errorExplanation/ }, :content => /The entry or revision was not found in the repository/ end def test_entry_download - get :entry, :id => 1, :path => ['sources', 'watchers_controller.rb'], :format => 'raw' + @repository.fetch_changesets + @repository.reload + get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'], :format => 'raw' assert_response :success end def test_directory_entry - get :entry, :id => 1, :path => ['sources'] + @repository.fetch_changesets + @repository.reload + get :entry, :id => PRJ_ID, :path => ['sources'] assert_response :success assert_template 'show' assert_not_nil assigns(:entry) @@ -125,8 +144,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase end def test_diff - Project.find(1).repository.fetch_changesets - get :diff, :id => 1, :rev => 3, :type => 'inline' + @repository.fetch_changesets + @repository.reload + get :diff, :id => PRJ_ID, :rev => 3, :type => 'inline' assert_response :success assert_template 'diff' assert_tag :tag => 'td', :attributes => { :class => 'line-code diff_out' }, @@ -136,8 +156,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase end def test_annotate - Project.find(1).repository.fetch_changesets - get :annotate, :id => 1, :path => ['sources', 'watchers_controller.rb'] + @repository.fetch_changesets + @repository.reload + get :annotate, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'] assert_response :success assert_template 'annotate' # 1.1 line From 6d649a6f84ecd6eaf9774d412fc9588f19808e87 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 2 Feb 2011 04:01:27 +0000 Subject: [PATCH 37/48] scm: cvs: code clean up. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4790 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/cvs.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index 82082b3d..3f0e9109 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -104,8 +104,8 @@ class Repository::Cvs < Repository scm.revisions('', fetch_since, nil, :with_paths => true) do |revision| # only add the change to the database, if it doen't exists. the cvs log # is not exclusive at all. - unless changes.find_by_path_and_revision(scm.with_leading_slash(revision.paths[0][:path]), revision.paths[0][:revision]) - revision + unless changes.find_by_path_and_revision( + scm.with_leading_slash(revision.paths[0][:path]), revision.paths[0][:revision]) cs = changesets.find(:first, :conditions=>{ :committed_on=>revision.time-time_delta..revision.time+time_delta, :committer=>revision.author, @@ -116,7 +116,6 @@ class Repository::Cvs < Repository unless cs # we use a temporaray revision number here (just for inserting) # later on, we calculate a continous positive number - latest = changesets.find(:first, :order => 'id DESC') cs = Changeset.create(:repository => self, :revision => "_#{tmp_rev_num}", :committer => revision.author, @@ -144,7 +143,9 @@ class Repository::Cvs < Repository end # Renumber new changesets in chronological order - changesets.find(:all, :order => 'committed_on ASC, id ASC', :conditions => "revision LIKE '_%'").each do |changeset| + changesets.find( + :all, :order => 'committed_on ASC, id ASC', :conditions => "revision LIKE '_%'" + ).each do |changeset| changeset.update_attribute :revision, next_revision_number end end # transaction From b7e38791f23de513ad2d2eda7aef3eab704039da Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 2 Feb 2011 10:00:20 +0000 Subject: [PATCH 38/48] scm: cvs: add fetch_changesets at all unit app test methods. Redmine generates pseudo revision number, so all tests need to read database. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4791 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_cvs_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb index 530ff901..5e0f9850 100644 --- a/test/unit/repository_cvs_test.rb +++ b/test/unit/repository_cvs_test.rb @@ -35,6 +35,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase if File.directory?(REPOSITORY_PATH) def test_fetch_changesets_from_scratch + assert_equal 0, @repository.changesets.count @repository.fetch_changesets @repository.reload @@ -44,6 +45,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase end def test_fetch_changesets_incremental + assert_equal 0, @repository.changesets.count @repository.fetch_changesets # Remove the 3 latest changesets @repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 3).each(&:destroy) @@ -55,6 +57,11 @@ class RepositoryCvsTest < ActiveSupport::TestCase end def test_deleted_files_should_not_be_listed + assert_equal 0, @repository.changesets.count + @repository.fetch_changesets + @repository.reload + assert_equal 5, @repository.changesets.count + entries = @repository.entries('sources') assert entries.detect {|e| e.name == 'watchers_controller.rb'} assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'} From 95247950513ee4c9e31aa7d142adb5d0920f8f11 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 2 Feb 2011 10:01:22 +0000 Subject: [PATCH 39/48] scm: mercurial: add unit lib test for the previous changeset isn't the parent (#7253, #7518). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4792 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../redmine/scm/adapters/mercurial_adapter_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb index 65e4a23d..bc82c562 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -69,6 +69,17 @@ begin end end + def test_diff_made_by_revision + if @adapter.class.client_version_above?([1, 2]) + [16, '16', '4cddb4e45f52'].each do |r1| + diff1 = @adapter.diff(nil, r1) + assert_equal 5, diff1.size + buf = diff1[4].gsub(/\r\n|\r|\n/, "") + assert_equal '+0885933ad4f68d77c2649cd11f8311276e7ef7ce tag-init-revision', buf + end + end + end + def test_cat [2, '400bb8672109', '400', 400].each do |r| buf = @adapter.cat('sources/welcome_controller.rb', r) From cb7e4f01cc668c0a405817d1a27d7e590a8ec2b5 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 2 Feb 2011 13:13:20 +0000 Subject: [PATCH 40/48] scm: cvs: add unit lib test. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4793 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../redmine/scm/adapters/cvs_adapter_test.rb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb diff --git a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb new file mode 100644 index 00000000..c6c4558e --- /dev/null +++ b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb @@ -0,0 +1,33 @@ +require File.expand_path('../../../../../../test_helper', __FILE__) +begin + require 'mocha' + + class CvsAdapterTest < ActiveSupport::TestCase + + REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/cvs_repository' + MODULE_NAME = 'test' + + if File.directory?(REPOSITORY_PATH) + def setup + @adapter = Redmine::Scm::Adapters::CvsAdapter.new(MODULE_NAME, REPOSITORY_PATH) + end + + def test_revisions_all + cnt = 0 + @adapter.revisions('', nil, nil, :with_paths => true) do |revision| + cnt += 1 + end + assert_equal 14, cnt + end + else + puts "Cvs test repository NOT FOUND. Skipping unit tests !!!" + def test_fake; assert true end + end + end + +rescue LoadError + class CvsMochaFake < ActiveSupport::TestCase + def test_fake; assert(false, "Requires mocha to run those tests") end + end +end + From 1656ce3c538252874299d20b2935a3553b9aa5e2 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 2 Feb 2011 13:13:44 +0000 Subject: [PATCH 41/48] scm: cvs: use localtime at cvs rlog -d option (#996, #3761). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4794 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/cvs_adapter.rb | 8 +++++++- test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 5ca9e741..44a252fc 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -109,7 +109,7 @@ module Redmine path_with_project="#{url}#{with_leading_slash(path)}" cmd = "#{CVS_BIN} -d #{shell_quote root_url} rlog" - cmd << " -d\">#{time_to_cvstime(identifier_from)}\"" if identifier_from + cmd << " -d\">#{time_to_cvstime_rlog(identifier_from)}\"" if identifier_from cmd << " #{shell_quote path_with_project}" shellout(cmd) do |io| state="entry_start" @@ -290,6 +290,12 @@ module Redmine end return time.strftime("%Y-%m-%d %H:%M:%S") end + + def time_to_cvstime_rlog(time) + return nil if time.nil? + t1 = time.clone.localtime + return t1.strftime("%Y-%m-%d %H:%M:%S") + end def normalize_cvs_path(path) normalize_path(path.gsub(/Attic\//,'')) diff --git a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb index c6c4558e..e063d44f 100644 --- a/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb @@ -19,6 +19,15 @@ begin end assert_equal 14, cnt end + + def test_revisions_from_rev3 + rev3_committed_on = Time.gm(2007, 12, 13, 16, 27, 22) + cnt = 0 + @adapter.revisions('', rev3_committed_on, nil, :with_paths => true) do |revision| + cnt += 1 + end + assert_equal 2, cnt + end else puts "Cvs test repository NOT FOUND. Skipping unit tests !!!" def test_fake; assert true end From 02c30b1a6708beb4177c896d90a9f6f9062743c8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 4 Feb 2011 04:28:39 +0000 Subject: [PATCH 42/48] scm: add a feature of configurable path of executable for scm adapters (#7517). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4795 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/configuration.yml.example | 9 +++++++++ lib/redmine/scm/adapters/bazaar_adapter.rb | 2 +- lib/redmine/scm/adapters/cvs_adapter.rb | 2 +- lib/redmine/scm/adapters/darcs_adapter.rb | 2 +- lib/redmine/scm/adapters/git_adapter.rb | 2 +- lib/redmine/scm/adapters/mercurial_adapter.rb | 2 +- lib/redmine/scm/adapters/subversion_adapter.rb | 2 +- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/config/configuration.yml.example b/config/configuration.yml.example index 5756907d..94d1928b 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -107,6 +107,15 @@ default: autologin_cookie_path: autologin_cookie_secure: + # Configuration of SCM executable command. + # Absolute path (ex. /usr/local/bin/hg) or command name (ex. hg.exe, bzr.exe) + # On Windows, *.cmd, *.bat (ex. hg.cmd, bzr.bat) does not work. + scm_command_subversion: svn # (default: svn) + scm_command_mercurial: "\"C:\Program Files\TortoiseHg\hg.exe\"" # (default: hg) + scm_command_git: /usr/local/bin/git # (default: git) + scm_command_bazaar: bzr.exe # (default: bzr) + scm_command_darcs: darcs-1.0.9-i386-linux # (default: darcs) + # specific configuration options for production environment # that overrides the default ones production: diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb index a04c3491..bf31b3a9 100644 --- a/lib/redmine/scm/adapters/bazaar_adapter.rb +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb @@ -23,7 +23,7 @@ module Redmine class BazaarAdapter < AbstractAdapter # Bazaar executable name - BZR_BIN = "bzr" + BZR_BIN = Redmine::Configuration['scm_command_bazaar'] || "bzr" # Get info about the repository def info diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 44a252fc..5b5f5cde 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -23,7 +23,7 @@ module Redmine class CvsAdapter < AbstractAdapter # CVS executable name - CVS_BIN = "cvs" + CVS_BIN = Redmine::Configuration['scm_command_cvs'] || "cvs" # Guidelines for the input: # url -> the project-path, relative to the cvsroot (eg. module name) diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb index 69805a36..0ccc6f10 100644 --- a/lib/redmine/scm/adapters/darcs_adapter.rb +++ b/lib/redmine/scm/adapters/darcs_adapter.rb @@ -23,7 +23,7 @@ module Redmine module Adapters class DarcsAdapter < AbstractAdapter # Darcs executable name - DARCS_BIN = "darcs" + DARCS_BIN = Redmine::Configuration['scm_command_darcs'] || "darcs" class << self def client_version diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 302ded58..d437b955 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -22,7 +22,7 @@ module Redmine module Adapters class GitAdapter < AbstractAdapter # Git executable name - GIT_BIN = "git" + GIT_BIN = Redmine::Configuration['scm_command_git'] || "git" def info begin diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index bbc4a2d6..f7b5ae9d 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -24,7 +24,7 @@ module Redmine class MercurialAdapter < AbstractAdapter # Mercurial executable name - HG_BIN = "hg" + HG_BIN = Redmine::Configuration['scm_command_mercurial'] || "hg" TEMPLATES_DIR = File.dirname(__FILE__) + "/mercurial" TEMPLATE_NAME = "hg-template" TEMPLATE_EXTENSION = "tmpl" diff --git a/lib/redmine/scm/adapters/subversion_adapter.rb b/lib/redmine/scm/adapters/subversion_adapter.rb index b4702cc2..253fa0b2 100644 --- a/lib/redmine/scm/adapters/subversion_adapter.rb +++ b/lib/redmine/scm/adapters/subversion_adapter.rb @@ -24,7 +24,7 @@ module Redmine class SubversionAdapter < AbstractAdapter # SVN executable name - SVN_BIN = "svn" + SVN_BIN = Redmine::Configuration['scm_command_subversion'] || "svn" class << self def client_version From 21585064b28a68438176a5504e3cdd0c9623dda5 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 4 Feb 2011 05:30:14 +0000 Subject: [PATCH 43/48] scm: use "e.g." for "for example" at config/configuration.yml.example (#7517). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4796 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/configuration.yml.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/configuration.yml.example b/config/configuration.yml.example index 94d1928b..7a74711c 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -108,8 +108,8 @@ default: autologin_cookie_secure: # Configuration of SCM executable command. - # Absolute path (ex. /usr/local/bin/hg) or command name (ex. hg.exe, bzr.exe) - # On Windows, *.cmd, *.bat (ex. hg.cmd, bzr.bat) does not work. + # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe) + # On Windows, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work. scm_command_subversion: svn # (default: svn) scm_command_mercurial: "\"C:\Program Files\TortoiseHg\hg.exe\"" # (default: hg) scm_command_git: /usr/local/bin/git # (default: git) From d449ac518d43b0114524ea1b7dbb78d70bdcbf65 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 4 Feb 2011 10:24:10 +0000 Subject: [PATCH 44/48] scm: change key name of configurable command name (#7517, #6159, #7047). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4797 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/configuration.yml.example | 10 +++++----- lib/redmine/scm/adapters/bazaar_adapter.rb | 2 +- lib/redmine/scm/adapters/cvs_adapter.rb | 2 +- lib/redmine/scm/adapters/darcs_adapter.rb | 2 +- lib/redmine/scm/adapters/git_adapter.rb | 2 +- lib/redmine/scm/adapters/mercurial_adapter.rb | 2 +- lib/redmine/scm/adapters/subversion_adapter.rb | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/configuration.yml.example b/config/configuration.yml.example index 7a74711c..a1937959 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -110,11 +110,11 @@ default: # Configuration of SCM executable command. # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe) # On Windows, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work. - scm_command_subversion: svn # (default: svn) - scm_command_mercurial: "\"C:\Program Files\TortoiseHg\hg.exe\"" # (default: hg) - scm_command_git: /usr/local/bin/git # (default: git) - scm_command_bazaar: bzr.exe # (default: bzr) - scm_command_darcs: darcs-1.0.9-i386-linux # (default: darcs) + scm_subversion_command: svn # (default: svn) + scm_mercurial_command: "\"C:\Program Files\TortoiseHg\hg.exe\"" # (default: hg) + scm_git_command: /usr/local/bin/git # (default: git) + scm_bazaar_command: bzr.exe # (default: bzr) + scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs) # specific configuration options for production environment # that overrides the default ones diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb index bf31b3a9..96ec8693 100644 --- a/lib/redmine/scm/adapters/bazaar_adapter.rb +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb @@ -23,7 +23,7 @@ module Redmine class BazaarAdapter < AbstractAdapter # Bazaar executable name - BZR_BIN = Redmine::Configuration['scm_command_bazaar'] || "bzr" + BZR_BIN = Redmine::Configuration['scm_bazaar_command'] || "bzr" # Get info about the repository def info diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 5b5f5cde..5c81e639 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -23,7 +23,7 @@ module Redmine class CvsAdapter < AbstractAdapter # CVS executable name - CVS_BIN = Redmine::Configuration['scm_command_cvs'] || "cvs" + CVS_BIN = Redmine::Configuration['scm_cvs_command'] || "cvs" # Guidelines for the input: # url -> the project-path, relative to the cvsroot (eg. module name) diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb index 0ccc6f10..4eaf4fff 100644 --- a/lib/redmine/scm/adapters/darcs_adapter.rb +++ b/lib/redmine/scm/adapters/darcs_adapter.rb @@ -23,7 +23,7 @@ module Redmine module Adapters class DarcsAdapter < AbstractAdapter # Darcs executable name - DARCS_BIN = Redmine::Configuration['scm_command_darcs'] || "darcs" + DARCS_BIN = Redmine::Configuration['scm_darcs_command'] || "darcs" class << self def client_version diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index d437b955..a40f4507 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -22,7 +22,7 @@ module Redmine module Adapters class GitAdapter < AbstractAdapter # Git executable name - GIT_BIN = Redmine::Configuration['scm_command_git'] || "git" + GIT_BIN = Redmine::Configuration['scm_git_command'] || "git" def info begin diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index f7b5ae9d..f64e70b2 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -24,7 +24,7 @@ module Redmine class MercurialAdapter < AbstractAdapter # Mercurial executable name - HG_BIN = Redmine::Configuration['scm_command_mercurial'] || "hg" + HG_BIN = Redmine::Configuration['scm_mercurial_command'] || "hg" TEMPLATES_DIR = File.dirname(__FILE__) + "/mercurial" TEMPLATE_NAME = "hg-template" TEMPLATE_EXTENSION = "tmpl" diff --git a/lib/redmine/scm/adapters/subversion_adapter.rb b/lib/redmine/scm/adapters/subversion_adapter.rb index 253fa0b2..28ea55e2 100644 --- a/lib/redmine/scm/adapters/subversion_adapter.rb +++ b/lib/redmine/scm/adapters/subversion_adapter.rb @@ -24,7 +24,7 @@ module Redmine class SubversionAdapter < AbstractAdapter # SVN executable name - SVN_BIN = Redmine::Configuration['scm_command_subversion'] || "svn" + SVN_BIN = Redmine::Configuration['scm_subversion_command'] || "svn" class << self def client_version From 3f62da8d82c62af47bf7d666a56c33785659ec5c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 5 Feb 2011 00:57:41 +0000 Subject: [PATCH 45/48] scm: add scm_cvs_command at config/configuration.yml.example (#7517). I forgot to add it. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4798 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/configuration.yml.example | 1 + 1 file changed, 1 insertion(+) diff --git a/config/configuration.yml.example b/config/configuration.yml.example index a1937959..f00d97f4 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -113,6 +113,7 @@ default: scm_subversion_command: svn # (default: svn) scm_mercurial_command: "\"C:\Program Files\TortoiseHg\hg.exe\"" # (default: hg) scm_git_command: /usr/local/bin/git # (default: git) + scm_cvs_command: cvs # (default: cvs) scm_bazaar_command: bzr.exe # (default: bzr) scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs) From 8b64d5d0f03c421ba19b2eb29b30f90b48021aed Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Barth Date: Sun, 6 Feb 2011 00:31:15 +0000 Subject: [PATCH 46/48] Fixed various typos in french locale git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4799 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/locales/fr.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 59810770..c154dd35 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -169,7 +169,7 @@ fr: notice_successful_connection: Connexion réussie. notice_file_not_found: "La page à laquelle vous souhaitez accéder n'existe pas ou a été supprimée." notice_locking_conflict: Les données ont été mises à jour par un autre utilisateur. Mise à jour impossible. - notice_not_authorized: "Vous n'êtes pas autorisés à accéder à cette page." + notice_not_authorized: "Vous n'êtes pas autorisé à accéder à cette page." notice_not_authorized_archived_project: Le projet auquel vous tentez d'accéder a été archivé. notice_email_sent: "Un email a été envoyé à %{value}" notice_email_error: "Erreur lors de l'envoi de l'email (%{value})" @@ -323,11 +323,11 @@ fr: setting_text_formatting: Formatage du texte setting_wiki_compression: Compression historique wiki setting_feeds_limit: Limite du contenu des flux RSS - setting_default_projects_public: Définir les nouveaux projects comme publics par défaut + setting_default_projects_public: Définir les nouveaux projets comme publics par défaut setting_autofetch_changesets: Récupération auto. des commits setting_sys_api_enabled: Activer les WS pour la gestion des dépôts - setting_commit_ref_keywords: Mot-clés de référencement - setting_commit_fix_keywords: Mot-clés de résolution + setting_commit_ref_keywords: Mots-clés de référencement + setting_commit_fix_keywords: Mots-clés de résolution setting_autologin: Autologin setting_date_format: Format de date setting_time_format: Format d'heure @@ -349,7 +349,7 @@ fr: setting_gravatar_enabled: Afficher les Gravatar des utilisateurs setting_diff_max_lines_displayed: Nombre maximum de lignes de diff affichées setting_file_max_size_displayed: Taille maximum des fichiers texte affichés en ligne - setting_repository_log_display_limit: "Nombre maximum de revisions affichées sur l'historique d'un fichier" + setting_repository_log_display_limit: "Nombre maximum de révisions affichées sur l'historique d'un fichier" setting_openid: "Autoriser l'authentification et l'enregistrement OpenID" setting_password_min_length: Longueur minimum des mots de passe setting_new_project_user_role_id: Rôle donné à un utilisateur non-administrateur qui crée un projet @@ -369,7 +369,7 @@ fr: permission_add_subprojects: Créer des sous-projets permission_edit_project: Modifier le projet permission_select_project_modules: Choisir les modules - permission_manage_members: Gérer les members + permission_manage_members: Gérer les membres permission_manage_versions: Gérer les versions permission_manage_categories: Gérer les catégories de demandes permission_view_issues: Voir les demandes @@ -859,7 +859,7 @@ fr: text_issue_added: "La demande %{id} a été soumise par %{author}." text_issue_updated: "La demande %{id} a été mise à jour par %{author}." text_wiki_destroy_confirmation: Etes-vous sûr de vouloir supprimer ce wiki et tout son contenu ? - text_issue_category_destroy_question: "%{count} demandes sont affectées à cette catégories. Que voulez-vous faire ?" + text_issue_category_destroy_question: "%{count} demandes sont affectées à cette catégorie. Que voulez-vous faire ?" text_issue_category_destroy_assignments: N'affecter les demandes à aucune autre catégorie text_issue_category_reassign_to: Réaffecter les demandes à cette catégorie text_user_mail_option: "Pour les projets non sélectionnés, vous recevrez seulement des notifications pour ce que vous surveillez ou à quoi vous participez (exemple: demandes dont vous êtes l'auteur ou la personne assignée)." From 9cd5e6967e946294597d26f4e78015e4374ba9be Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 7 Feb 2011 10:25:52 +0000 Subject: [PATCH 47/48] scm: cvs: change temporary revision number from "_N" to "tmpN" (#996, #3761, #6706). '_' is SQL "like" special character. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4801 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/cvs.rb | 9 ++++++--- test/unit/repository_cvs_test.rb | 24 ++++++++++++++++++++---- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index 3f0e9109..8ea4f230 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -117,7 +117,7 @@ class Repository::Cvs < Repository # we use a temporaray revision number here (just for inserting) # later on, we calculate a continous positive number cs = Changeset.create(:repository => self, - :revision => "_#{tmp_rev_num}", + :revision => "tmp#{tmp_rev_num}", :committer => revision.author, :committed_on => revision.time, :comments => revision.message) @@ -144,11 +144,12 @@ class Repository::Cvs < Repository # Renumber new changesets in chronological order changesets.find( - :all, :order => 'committed_on ASC, id ASC', :conditions => "revision LIKE '_%'" + :all, :order => 'committed_on ASC, id ASC', :conditions => "revision LIKE 'tmp%'" ).each do |changeset| changeset.update_attribute :revision, next_revision_number end end # transaction + @current_revision_number = nil end private @@ -156,7 +157,9 @@ class Repository::Cvs < Repository # Returns the next revision number to assign to a CVS changeset def next_revision_number # Need to retrieve existing revision numbers to sort them as integers - @current_revision_number ||= (connection.select_values("SELECT revision FROM #{Changeset.table_name} WHERE repository_id = #{id} AND revision NOT LIKE '_%'").collect(&:to_i).max || 0) + sql = "SELECT revision FROM #{Changeset.table_name} " + sql << "WHERE repository_id = #{id} AND revision NOT LIKE 'tmp%'" + @current_revision_number ||= (connection.select_values(sql).collect(&:to_i).max || 0) @current_revision_number += 1 end end diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb index 5e0f9850..e7b247ab 100644 --- a/test/unit/repository_cvs_test.rb +++ b/test/unit/repository_cvs_test.rb @@ -47,13 +47,29 @@ class RepositoryCvsTest < ActiveSupport::TestCase def test_fetch_changesets_incremental assert_equal 0, @repository.changesets.count @repository.fetch_changesets - # Remove the 3 latest changesets - @repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 3).each(&:destroy) + # Remove changesets with revision > 3 + @repository.changesets.find(:all).each {|c| c.destroy if c.revision.to_i > 3} @repository.reload - assert_equal 2, @repository.changesets.count - + assert_equal 3, @repository.changesets.count + assert_equal %w|3 2 1|, @repository.changesets.collect(&:revision) + + rev3_commit = @repository.changesets.find(:first, :order => 'committed_on DESC') + assert_equal '3', rev3_commit.revision + # 2007-12-14 01:27:22 +0900 + rev3_committed_on = Time.gm(2007, 12, 13, 16, 27, 22) + assert_equal rev3_committed_on, rev3_commit.committed_on + latest_rev = @repository.latest_changeset + assert_equal rev3_committed_on, latest_rev.committed_on + @repository.fetch_changesets + @repository.reload assert_equal 5, @repository.changesets.count + + assert_equal %w|5 4 3 2 1|, @repository.changesets.collect(&:revision) + rev5_commit = @repository.changesets.find(:first, :order => 'committed_on DESC') + # 2007-12-14 01:30:01 +0900 + rev5_committed_on = Time.gm(2007, 12, 13, 16, 30, 1) + assert_equal rev5_committed_on, rev5_commit.committed_on end def test_deleted_files_should_not_be_listed From 6c207d6ecf7271e4245b3ea1ab31b1d2f0107313 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 7 Feb 2011 10:26:15 +0000 Subject: [PATCH 48/48] scm: cvs: generate pseudo scmid for auto issue close text (#6706). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4802 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/cvs.rb | 11 ++++++++--- test/unit/repository_cvs_test.rb | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb index 8ea4f230..dbbb4694 100644 --- a/app/models/repository/cvs.rb +++ b/app/models/repository/cvs.rb @@ -104,10 +104,11 @@ class Repository::Cvs < Repository scm.revisions('', fetch_since, nil, :with_paths => true) do |revision| # only add the change to the database, if it doen't exists. the cvs log # is not exclusive at all. + tmp_time = revision.time.clone unless changes.find_by_path_and_revision( scm.with_leading_slash(revision.paths[0][:path]), revision.paths[0][:revision]) cs = changesets.find(:first, :conditions=>{ - :committed_on=>revision.time-time_delta..revision.time+time_delta, + :committed_on=>tmp_time - time_delta .. tmp_time + time_delta, :committer=>revision.author, :comments=>Changeset.normalize_comments(revision.message) }) @@ -116,10 +117,14 @@ class Repository::Cvs < Repository unless cs # we use a temporaray revision number here (just for inserting) # later on, we calculate a continous positive number + tmp_time2 = tmp_time.clone.gmtime + branch = revision.paths[0][:branch] + scmid = branch + "-" + tmp_time2.strftime("%Y%m%d-%H%M%S") cs = Changeset.create(:repository => self, - :revision => "tmp#{tmp_rev_num}", + :revision => "tmp#{tmp_rev_num}", + :scmid => scmid, :committer => revision.author, - :committed_on => revision.time, + :committed_on => tmp_time, :comments => revision.message) tmp_rev_num += 1 end diff --git a/test/unit/repository_cvs_test.rb b/test/unit/repository_cvs_test.rb index e7b247ab..a5da09f5 100644 --- a/test/unit/repository_cvs_test.rb +++ b/test/unit/repository_cvs_test.rb @@ -42,6 +42,9 @@ class RepositoryCvsTest < ActiveSupport::TestCase assert_equal 5, @repository.changesets.count assert_equal 14, @repository.changes.count assert_not_nil @repository.changesets.find_by_comments('Two files changed') + + r2 = @repository.changesets.find_by_revision('2') + assert_equal 'v1-20071213-162510', r2.scmid end def test_fetch_changesets_incremental @@ -57,6 +60,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase assert_equal '3', rev3_commit.revision # 2007-12-14 01:27:22 +0900 rev3_committed_on = Time.gm(2007, 12, 13, 16, 27, 22) + assert_equal 'HEAD-20071213-162722', rev3_commit.scmid assert_equal rev3_committed_on, rev3_commit.committed_on latest_rev = @repository.latest_changeset assert_equal rev3_committed_on, latest_rev.committed_on @@ -67,6 +71,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase assert_equal %w|5 4 3 2 1|, @repository.changesets.collect(&:revision) rev5_commit = @repository.changesets.find(:first, :order => 'committed_on DESC') + assert_equal 'HEAD-20071213-163001', rev5_commit.scmid # 2007-12-14 01:30:01 +0900 rev5_committed_on = Time.gm(2007, 12, 13, 16, 30, 1) assert_equal rev5_committed_on, rev5_commit.committed_on