From dbcdc3415d19cbfa57f24813a60154909a983278 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Feb 2015 21:10:22 +0000 Subject: Removed no longer used :find_options option for acts_as_activity_provider. git-svn-id: http://svn.redmine.org/redmine/trunk@14030 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- extra/sample_plugin/app/models/meeting.rb | 2 +- lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/extra/sample_plugin/app/models/meeting.rb b/extra/sample_plugin/app/models/meeting.rb index c424bdec4..62dcd8abe 100644 --- a/extra/sample_plugin/app/models/meeting.rb +++ b/extra/sample_plugin/app/models/meeting.rb @@ -7,5 +7,5 @@ class Meeting < ActiveRecord::Base :url => Proc.new {|o| {:controller => 'meetings', :action => 'show', :id => o.id}} acts_as_activity_provider :timestamp => 'scheduled_on', - :find_options => { :include => :project } + :scope => includes(:project) end diff --git a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb index 0637428d5..5e96651ca 100644 --- a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb +++ b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb @@ -29,7 +29,7 @@ module Redmine send :include, Redmine::Acts::ActivityProvider::InstanceMethods end - options.assert_valid_keys(:type, :permission, :timestamp, :author_key, :find_options, :scope) + options.assert_valid_keys(:type, :permission, :timestamp, :author_key, :scope) self.activity_provider_options ||= {} # One model can provide different event types @@ -37,7 +37,6 @@ module Redmine event_type = options.delete(:type) || self.name.underscore.pluralize options[:timestamp] ||= "#{table_name}.created_on" - options[:find_options] ||= {} options[:author_key] = "#{table_name}.#{options[:author_key]}" if options[:author_key].is_a?(Symbol) self.activity_provider_options[event_type] = options end -- cgit v1.2.3 From 2277f61046131b093cf9f2260246c06217f66e81 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Feb 2015 21:11:37 +0000 Subject: Added missing :permission option in sample plugin. git-svn-id: http://svn.redmine.org/redmine/trunk@14031 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- extra/sample_plugin/app/models/meeting.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extra/sample_plugin/app/models/meeting.rb b/extra/sample_plugin/app/models/meeting.rb index 62dcd8abe..ca8af1021 100644 --- a/extra/sample_plugin/app/models/meeting.rb +++ b/extra/sample_plugin/app/models/meeting.rb @@ -7,5 +7,6 @@ class Meeting < ActiveRecord::Base :url => Proc.new {|o| {:controller => 'meetings', :action => 'show', :id => o.id}} acts_as_activity_provider :timestamp => 'scheduled_on', - :scope => includes(:project) + :scope => includes(:project), + :permission => nil end -- cgit v1.2.3 From d750c9906ef7ad35abae516d3a39dee073b7b2d0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Feb 2015 17:37:34 +0000 Subject: DEPRECATION WARNING: db/migrate/001_setup.rb (#19132). mail_notification is a boolean column when this migration runs. git-svn-id: http://svn.redmine.org/redmine/trunk@14032 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- db/migrate/001_setup.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/001_setup.rb b/db/migrate/001_setup.rb index 1af42a783..15d783c45 100644 --- a/db/migrate/001_setup.rb +++ b/db/migrate/001_setup.rb @@ -291,7 +291,7 @@ class Setup < ActiveRecord::Migration user = User.new :firstname => "Redmine", :lastname => "Admin", :mail => "admin@example.net", - :mail_notification => 'all', + :mail_notification => true, :status => 1 user.login = 'admin' user.hashed_password = "d033e22ae348aeb5660fc2140aec35850c4da997" -- cgit v1.2.3 From 0b04de0a23e2b9ce991cb06d2a1788ef0cc834cf Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Feb 2015 17:46:24 +0000 Subject: Send a better content type than application/octet-stream (#19131). git-svn-id: http://svn.redmine.org/redmine/trunk@14034 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/attachments_controller.rb | 2 +- test/fixtures/attachments.yml | 4 ++-- test/functional/attachments_controller_test.rb | 11 ++++++++++- test/integration/api_test/attachments_test.rb | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 4edcc0a41..9d3f7d75c 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -183,7 +183,7 @@ class AttachmentsController < ApplicationController def detect_content_type(attachment) content_type = attachment.content_type - if content_type.blank? + if content_type.blank? || content_type == "application/octet-stream" content_type = Redmine::MimeType.of(attachment.filename) end content_type.to_s diff --git a/test/fixtures/attachments.yml b/test/fixtures/attachments.yml index 9437ed102..6f56c0811 100644 --- a/test/fixtures/attachments.yml +++ b/test/fixtures/attachments.yml @@ -78,7 +78,7 @@ attachments_006: filesize: 157 filename: archive.zip author_id: 2 - content_type: application/octet-stream + content_type: application/zip attachments_007: created_on: 2006-07-19 21:07:27 +02:00 container_type: Issue @@ -91,7 +91,7 @@ attachments_007: filesize: 157 filename: archive.zip author_id: 1 - content_type: application/octet-stream + content_type: application/zip attachments_008: created_on: 2006-07-19 21:07:27 +02:00 container_type: Project diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index efd537599..5174c8da1 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -192,7 +192,7 @@ class AttachmentsControllerTest < ActionController::TestCase def test_show_other get :show, :id => 6 assert_response :success - assert_equal 'application/octet-stream', @response.content_type + assert_equal 'application/zip', @response.content_type set_tmp_attachments_directory end @@ -262,6 +262,15 @@ class AttachmentsControllerTest < ActionController::TestCase set_tmp_attachments_directory end + def test_download_should_assign_better_content_type_than_application_octet_stream + Attachment.find(4).update! :content_type => "application/octet-stream" + + get :download, :id => 4 + assert_response :success + assert_equal 'text/x-ruby', @response.content_type + set_tmp_attachments_directory + end + def test_download_missing_file get :download, :id => 2 assert_response 404 diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb index d4b483527..0f7e6ebdb 100644 --- a/test/integration/api_test/attachments_test.rb +++ b/test/integration/api_test/attachments_test.rb @@ -65,7 +65,7 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base test "GET /attachments/download/:id/:filename should return the attachment content" do get '/attachments/download/7/archive.zip', {}, credentials('jsmith') assert_response :success - assert_equal 'application/octet-stream', @response.content_type + assert_equal 'application/zip', @response.content_type set_tmp_attachments_directory end -- cgit v1.2.3 From ec201b08b3cfd1e115704abdbd7bc541a3651fe1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 19 Feb 2015 19:02:11 +0000 Subject: Updates docs fro 3.0.0 release. git-svn-id: http://svn.redmine.org/redmine/trunk@14037 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- doc/CHANGELOG | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/INSTALL | 2 +- 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 1c3e29d9c..a9289b865 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -4,6 +4,98 @@ Redmine - project management software Copyright (C) 2006-2015 Jean-Philippe Lang http://www.redmine.org/ +== 2015-02-19 v3.0.0 + +* Defect #2573: Latest projects list: no space after lists in project description +* Defect #6579: Tree hierachy being currupted on multiple submissions of an issue +* Defect #14151: Grammer problem with German x_days +* Defect #15789: Users can see all groups when adding a filter "Assignee's Group" +* Defect #15988: Unexpected behaviour on issue fields for users that have multiple roles +* Defect #18237: From a rake task context, impossible to create an IssueRelation normally +* Defect #18265: Wrong csv separator in Croatian +* Defect #18301: Revision shortlink at end of URL breaks URL autolinking +* Defect #18314: German Translation - button_update +* Defect #18605: Wrong usage of logger.info to test log level +* Defect #18654: Custom field is rendered, even if its value is empty (for multiple) +* Defect #18711: Respect cross-project subtask setting on issue bulk edit form +* Defect #18781: Redmine::FieldFormat::IntFormat does not accept "real" Integer values +* Defect #18832: Activity Stream Filter missing on right hand side due to permission +* Defect #18855: User with only Move Issue rights in the project can still create issues using mass copy! +* Defect #18918: Grouping label for "none" should be changed to "null", "No Value", or" (blank) ". +* Defect #19024: link_to in Redmine::Hook::ViewListener omits url root +* Defect #19030: Links to completed versions on the roadmap page might lead to a "403 not authorized page" +* Defect #19039: Mail notification is formatting dates with changer's locale +* Defect #19040: Potential DB deadlocks on concurrent issue creation +* Defect #19055: 'label_per_page' is no longer used +* Defect #19111: Bad spelling in Spanish "mail_body_reminder" +* Feature #992: Option to search open issues only +* Feature #1326: Add / edit an attachment description after upload +* Feature #1415: Let system administrator limit repositories valid sources +* Feature #4244: Multiple email addresses for each user +* Feature #4383: Search Names of Files Attached to Issues +* Feature #4518: Wiki formatting documentation for nested lists +* Feature #5450: Move wiki page to other project +* Feature #5991: Tracker should have it's own default issue status +* Feature #6426: MenuManager::MenuItem should support a named route as a url +* Feature #7249: Custom fields for Documents +* Feature #8121: Allow overriding direction of part of text +* Feature #8818: Repository user-mapping with multiple email addresses +* Feature #11702: Add user/group to multiple projects at once +* Feature #11724: Prevent users from seeing other users based on their project membership +* Feature #12097: Multi Thread Support +* Feature #12734: Add table reference to textile help +* Feature #13051: Support any macro in (pdf) export for wiki's and issues +* Feature #13425: Ignore X-Autoreply mails +* Feature #13497: Document all available Redmine links properly +* Feature #13849: Grouped filters in the filter drop-down +* Feature #14371: Drop Ruby 1.8.7 support +* Feature #14534: Upgrade to Rails 4.2 +* Feature #15236: Propose diff view for long text custom fields +* Feature #16823: IMAP STARTTLS support +* Feature #17354: User detail : show user login to admins +* Feature #17763: Ability to render multiple partials with view hook +* Feature #18500: Optional linking when copying issues +* Feature #18571: Tab "New Issue" should not be displayed if a project has no trackers +* Feature #18631: Better search results pagination +* Feature #18801: Support for accent insensitive search with PostgreSQL +* Feature #18860: Replace awesome_nested_set gem with a custom implementation of nested sets +* Feature #18947: Ruby 2.2 support +* Feature #19131: Use a better content type for attachments created with application/octet-stream +* Patch #6586: Calendar view hook Request +* Patch #13120: Translation in language selection +* Patch #18182: Latvian translation update +* Patch #18261: Japanese translation change (fix terms mismatch "default") +* Patch #18276: Allow queries captions to be dynamic +* Patch #18290: Issue performance patch +* Patch #18390: Better RTL css for the system +* Patch #18392: German translation: Self-registration +* Patch #18565: html improvements on project landing page +* Patch #18659: Do not truncate subissue/related issues titles on single issue view +* Patch #18671: Japanese translation change (fix misspelled word) +* Patch #18679: LabelledFormBuilder#label outputs 2 label elements +* Patch #18692: Access keys for previous (p)/next (n) links +* Patch #18707: Allow attachment thumbnails from REST api +* Patch #18817: Sort helper undefined to_a for string +* Patch #18818: TimeEntry acts_as_activity_provider scope should joins(:project) +* Patch #18983: Allow filtering of Redmine Reminders by Version +* Patch #19005: Make search results per page configurable +* Patch #19035: Japanese translation fix (label_age) + +== 2015-02-19 v2.6.2 + +* Defect #10681: Export to Persian PDF problem +* Defect #17722: Plugin update check not working if redmine is viewed over https +* Defect #18586: Arabic PDF +* Defect #18632: PDF Export has no left padding for tables +* Defect #18883: Slow rendering of large textile tables +* Defect #18894: Grouping of Boolean field: Both "No" and "blank" tickets are grouped in "none" groups +* Defect #18896: Grouping of Boolean field in Query: group not displayed for "No" value if the group is in first position +* Defect #18922: rdm-mailhandler.rb should catch EOFError +* Defect #18961: {{macro_list}} error when choose markdown as wiki language +* Defect #19065: API: issue details created_on timestamp not formatted as expected +* Defect #19120: Wrap parent task title on the issue list +* Defect #19117: Potential XSS vulnerability in some flash messages rendering + == 2015-01-11 v2.6.1 * Defect #13608: Parent column in CSV export should include issue id only diff --git a/doc/INSTALL b/doc/INSTALL index b151d3359..2adc73641 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -72,7 +72,7 @@ Optional: 8. Test the installation by running the WEBrick web server Under the main application directory run: - ruby script/rails server -e production + ruby bin/rails server -e production Once WEBrick has started, point your browser to http://localhost:3000/ You should now see the application welcome page. -- cgit v1.2.3