Permalink
Browse files

Release openproject-ce v5.0.5

  • Loading branch information...
2 parents d34b941 + c3fc3ae commit b2a2c2f6cc4f24579c14e990c8c618719fe01fe5 @oliverguenther oliverguenther committed Dec 2, 2015
Showing with 1,193 additions and 1,016 deletions.
  1. +0 −1 .codeclimate.yml
  2. +2 −2 Gemfile
  3. +56 −56 Gemfile.lock
  4. +1 −1 Gemfile.plugins
  5. +5 −1 app/assets/stylesheets/_misc_legacy.sass
  6. +19 −31 app/controllers/attachments_controller.rb
  7. +21 −75 app/controllers/repositories_controller.rb
  8. +15 −31 app/controllers/users_controller.rb
  9. +0 −4 app/controllers/watchers_controller.rb
  10. +26 −62 app/helpers/application_helper.rb
  11. +0 −70 app/helpers/issues_helper.rb
  12. +14 −1 app/models/attachment.rb
  13. +39 −32 app/models/permitted_params.rb
  14. +12 −12 app/models/project.rb
  15. +9 −0 app/models/work_package.rb
  16. +18 −46 app/models/work_package/pdf_exporter.rb
  17. +2 −2 app/seeders/basic_data/builtin_roles_seeder.rb
  18. +2 −2 app/seeders/demo_data/project_seeder.rb
  19. +4 −0 app/uploaders/file_uploader.rb
  20. +13 −0 app/uploaders/fog_file_uploader.rb
  21. +0 −39 app/views/attachments/diff.html.erb
  22. +0 −46 app/views/attachments/file.html.erb
  23. +4 −3 app/views/timelog/edit.html.erb
  24. +14 −14 config/locales/en.seeders.yml
  25. +2 −2 config/locales/js-en.yml
  26. +4 −4 config/routes.rb
  27. +1 −1 db/migrate/migration_utils/legacy_journal_migrator.rb
  28. +0 −1 extra/Apache/OpenProjectRepoman.pm
  29. +3 −1 features/support/paths.rb
  30. +2 −2 features/work_packages/editable_fields.feature
  31. +1 −1 features/work_packages/error_on_update.feature
  32. +2 −2 features/work_packages/switch_type.feature
  33. +2 −2 features/work_packages/update.feature
  34. +45 −0 frontend/app/components/common/services/loading-indicator.service.js
  35. +31 −46 frontend/app/components/routes/controllers/work-packages-list.controller.js
  36. +2 −14 frontend/app/components/routes/partials/work-packages.list.html
  37. +1 −12 frontend/app/components/routes/partials/work-packages.show.html
  38. 0 frontend/app/components/{work-packages/activity → wp-activity}/activity-entry.directive.html
  39. +1 −1 frontend/app/components/{work-packages/activity → wp-activity}/activity-entry.directive.js
  40. +1 −1 ...e-button/wp-create-button.directive.html → wp-buttons/create-button/create-button.directive.html}
  41. +10 −4 ...reate-button/wp-create-button.directive.js → wp-buttons/create-button/create-button.directive.js}
  42. +39 −0 frontend/app/components/wp-buttons/create-button/types-drop-down-menu.service.js
  43. +2 −4 ...asks_dropdown_menu.html → components/wp-buttons/create-button/types-drop-down-menu.template.html}
  44. +13 −0 frontend/app/components/wp-buttons/view-button/view-button.directive.html
  45. +69 −0 frontend/app/components/wp-buttons/view-button/view-button.directive.js
  46. 0 ...utton/wp-watcher-button.directive.html → wp-buttons/watcher-button/watcher-button.directive.html}
  47. +1 −2 ...er-button/wp-watcher-button.directive.js → wp-buttons/watcher-button/watcher-button.directive.js}
  48. +1 −1 frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.js
  49. +49 −0 frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.test.js
  50. +1 −1 frontend/app/openproject-app.js
  51. +1 −1 frontend/app/templates/work_packages/activities/_link.html
  52. +0 −9 frontend/app/work_packages/controllers/menus/index.js
  53. +1 −5 frontend/app/work_packages/controllers/work-packages-controller.js
  54. +76 −9 frontend/npm-shrinkwrap.json
  55. +1 −0 frontend/package.json
  56. +2 −2 frontend/scripts/clean-shrinkwrap.js
  57. +2 −1 frontend/webpack.config.js
  58. +1 −1 lib/api/v3/attachments/attachment_representer.rb
  59. +2 −2 lib/api/v3/utilities/path_helper.rb
  60. +0 −15 lib/open_project/a_r_object_cache.rb
  61. +1 −2 lib/open_project/object_linking.rb
  62. +3 −2 lib/open_project/version.rb
  63. +4 −0 lib/tabular_form_builder.rb
  64. +8 −4 spec/controllers/attachments_controller_spec.rb
  65. +62 −0 spec/features/watching/toggle_watching_spec.rb
  66. +1 −1 spec/features/work_packages/details/activity_comments_spec.rb
  67. +1 −1 spec/features/work_packages/details/inplace_editor/version_editor_spec.rb
  68. +1 −1 spec/features/work_packages/new_work_package_spec.rb
  69. +173 −0 spec/features/work_packages/tabs/activity_tab_spec.rb
  70. +8 −2 spec/lib/api/v3/utilities/path_helper_spec.rb
  71. +44 −44 spec/models/permitted_params_spec.rb
  72. +219 −205 spec/models/work_package/work_package_nested_set_spec.rb
  73. +6 −2 spec/support/pages/full_work_package.rb
  74. +6 −2 spec/support/pages/split_work_package.rb
  75. +2 −53 spec_legacy/functional/attachments_controller_spec.rb
  76. +3 −3 spec_legacy/functional/user_mailer_spec.rb
  77. +3 −13 spec_legacy/integration/routing_spec.rb
  78. +3 −3 spec_legacy/unit/helpers/application_helper_spec.rb
View
@@ -27,4 +27,3 @@ exclude_paths:
- .bundle/**/*
- lib/plugins/rfpdf/**/*
- spec_legacy/**/*
- - lib/redcloth3.rb
View
@@ -193,7 +193,7 @@ group :development, :test do
gem 'pry-rescue'
gem 'pry-byebug', platforms: [:mri]
gem 'pry-doc'
- gem 'parallel_tests'
+ gem 'parallel_tests', '~> 2.1.2'
gem 'rubocop', '~> 0.32'
end
@@ -230,7 +230,7 @@ platforms :jruby do
end
group :opf_plugins do
- gem 'openproject-translations', git:'https://github.com/opf/openproject-translations.git', tag: 'v5.0.4'
+ gem 'openproject-translations', git:'https://github.com/opf/openproject-translations.git', tag: 'v5.0.5'
end
# Load Gemfile.local, Gemfile.plugins and plugins' Gemfiles
View
@@ -41,132 +41,132 @@ GIT
GIT
remote: https://github.com/finnlabs/openproject-announcements.git
- revision: 1dbb4796a71edc41c6368e4d9a2e12910449d5a0
- tag: v5.0.4
+ revision: f741d7317313b01daea87f45454321b32f546a96
+ tag: v5.0.5
specs:
- openproject-announcements (5.0.4)
+ openproject-announcements (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-backlogs.git
- revision: 858bf2bbac1acecb584651fde4158610eac358d3
- tag: v5.0.4
+ revision: 942b39742247ab76d2e7fd7aa527c8f9ccdfd67d
+ tag: v5.0.5
specs:
- openproject-backlogs (5.0.4)
+ openproject-backlogs (5.0.5)
acts_as_silent_list (~> 2.0.0)
openproject-pdf_export
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-costs.git
- revision: ebe7da2dd579b1aeb54fadbe6148c7f4b54af932
- tag: v5.0.4
+ revision: 425527719722b72459a7b5221f1bb3ec3ba74861
+ tag: v5.0.5
specs:
- openproject-costs (5.0.4)
+ openproject-costs (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-github_integration
- revision: 03f2638001f88deb5d86293512eac610d8970e5d
- tag: v5.0.4
+ revision: fa83c972346c9fcbebbb0f670474379e87b220d6
+ tag: v5.0.5
specs:
- openproject-github_integration (5.0.4)
+ openproject-github_integration (5.0.5)
openproject-webhooks (~> 5.0.1)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-global_roles.git
- revision: 13ddf1172d3d4b712e5048359f57fbb17f9b061a
- tag: v5.0.4
+ revision: ac89840b562e72b238fe75d0c152b88aba845d33
+ tag: v5.0.5
specs:
- openproject-global_roles (5.0.4)
+ openproject-global_roles (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-help_link.git
- revision: 70a681b77028a87d1d8a74d3157c36aded2ff4fd
- tag: v5.0.4
+ revision: 0c9dee7ff4ac07febc282457c1713c46a2aa6f81
+ tag: v5.0.5
specs:
- openproject-help_link (5.0.4)
+ openproject-help_link (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-local_avatars
- revision: e405d7080530068761b8c4678599cc477532fdd9
- tag: v5.0.4
+ revision: 9e7c8b132b13476a2f7751aab472dda3a1ad5e16
+ tag: v5.0.5
specs:
- openproject-local_avatars (5.0.4)
+ openproject-local_avatars (5.0.5)
rails (~> 4.2.4)
rmagick (~> 2.15.4)
GIT
remote: https://github.com/finnlabs/openproject-meeting.git
- revision: 75cf0f546bc8b56421645d708d239eae147c229e
- tag: v5.0.4
+ revision: 59bfaaf13d92a72a711d51b60edf1f2ad15a1445
+ tag: v5.0.5
specs:
- openproject-meeting (5.0.4)
+ openproject-meeting (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-my_project_page.git
- revision: 95204106779c5d63e37e3c2cd0fe4b59c878343d
- tag: v5.0.4
+ revision: a44a0932ec934e012ed8f284c16f17f98d38daf5
+ tag: v5.0.5
specs:
- openproject-my_project_page (5.0.4)
+ openproject-my_project_page (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-openid_connect.git
- revision: e92814c86659e6a29b652124b3c3225b2574cef7
- tag: v5.0.4
+ revision: ab3e396982073e9ab290cd065cc56feabaae2622
+ tag: v5.0.5
specs:
- openproject-openid_connect (5.0.4)
+ openproject-openid_connect (5.0.5)
lobby_boy (~> 0.1)
omniauth-openid_connect-providers (~> 0.1)
openproject-auth_plugins (~> 5.0.1)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-pdf_export.git
- revision: 3e1b877322d55c0181dd8023d9e889b7cc651795
- tag: v5.0.4
+ revision: c4595a1555976c31b17657fe9dfc0ee4c0af8ea7
+ tag: v5.0.5
specs:
- openproject-pdf_export (5.0.4)
+ openproject-pdf_export (5.0.5)
prawn (~> 0.14.0)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-reporting.git
- revision: ca992db6f2167fe9779fcced3caafc1813dd68f8
- tag: v5.0.4
+ revision: 0c82d9595241e5f82d1c0547a97cfe623ef740a6
+ tag: v5.0.5
specs:
- openproject-reporting (5.0.4)
+ openproject-reporting (5.0.5)
openproject-costs (>= 5.0.1)
rails (~> 4.2.4)
reporting_engine (>= 1.1.0)
GIT
remote: https://github.com/finnlabs/openproject-themes-dark.git
- revision: c5fdc9ee4517cb30f93e16310daa412bff7103d5
- tag: v5.0.4
+ revision: 1b3092c9ece132acc0b029f43960da7b2824bde7
+ tag: v5.0.5
specs:
- openproject-themes-dark (5.0.4)
+ openproject-themes-dark (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-webhooks
- revision: 50a67373c2e7a72b4a15489bdb5549afa3d4c88c
- tag: v5.0.4
+ revision: b77164156b167e9384ab4878e1f09c4f1c536786
+ tag: v5.0.5
specs:
- openproject-webhooks (5.0.4)
+ openproject-webhooks (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/finnlabs/openproject-xls_export.git
- revision: a4ce7881661b3992389cbcff52573c204e5f1e49
- tag: v5.0.4
+ revision: 0c7eb0c3499bd760552f090cac428fb5f4299fc9
+ tag: v5.0.5
specs:
- openproject-xls_export (5.0.4)
+ openproject-xls_export (5.0.5)
rails (~> 4.2.4)
spreadsheet (~> 0.8.9)
@@ -203,27 +203,27 @@ GIT
GIT
remote: https://github.com/opf/openproject-auth_plugins.git
- revision: fffb41413f16e50e620508689c9821ab42e01b65
- tag: v5.0.4
+ revision: a1e88d0d70f914d0c1fc0508cc1ae739754da410
+ tag: v5.0.5
specs:
- openproject-auth_plugins (5.0.4)
+ openproject-auth_plugins (5.0.5)
omniauth (~> 1.0)
rails (~> 4.2.4)
GIT
remote: https://github.com/opf/openproject-documents.git
- revision: d7c51bd0a5ca14c080081bc7825cc1f01e6bd52a
- tag: v5.0.4
+ revision: 0a8e083811dafbb6850a7ccfe59b313ee81b1f91
+ tag: v5.0.5
specs:
- openproject-documents (5.0.4)
+ openproject-documents (5.0.5)
rails (~> 4.2.4)
GIT
remote: https://github.com/opf/openproject-translations.git
- revision: 9c87aec9d0cd956a1cfaea2a4d7bbdbadd2997bf
- tag: v5.0.4
+ revision: ec3502e1f18542b6acb9558f0ba2fe801fe77e55
+ tag: v5.0.5
specs:
- openproject-translations (5.0.4)
+ openproject-translations (5.0.5)
crowdin-api (~> 0.4.0)
mixlib-shellout (~> 2.1.0)
rails (~> 4.2.3)
@@ -530,7 +530,7 @@ GEM
validate_url
webfinger (>= 0.0.2)
parallel (1.6.1)
- parallel_tests (1.6.1)
+ parallel_tests (2.1.2)
parallel
parser (2.2.2.5)
ast (>= 1.1, < 3.0)
@@ -858,7 +858,7 @@ DEPENDENCIES
openproject-translations!
openproject-webhooks!
openproject-xls_export!
- parallel_tests
+ parallel_tests (~> 2.1.2)
pdf-inspector (~> 1.0.0)
pg (~> 0.18.3)
poltergeist
View
@@ -1,4 +1,4 @@
-CORE_VERSION = 'v5.0.4'
+CORE_VERSION = 'v5.0.5'
# the dependencies from the gemspec from a git repo are ignored
# see also https://github.com/bundler/bundler/issues/1041
@@ -33,6 +33,8 @@
// placed elsewhere. Pleade DO NOT add to this file. Instead MOVE, refactor or
// REMOVE with ruthlessness.
+$version-summary-width: 380px
+
#watchers
ul
margin: 0
@@ -192,9 +194,11 @@ div
font-size: 120%
h2
font-size: 110%
+ .generic-table--no-results-container
+ max-width: calc(100% - #{$version-summary-width})
&#version-summary
float: right
- width: 380px
+ width: $version-summary-width
margin-left: 16px
margin-bottom: 16px
background-color: #fff
@@ -32,29 +32,14 @@ class AttachmentsController < ApplicationController
before_filter :file_readable, :read_authorize, except: :destroy
before_filter :delete_authorize, only: :destroy
- def show
- if @attachment.is_diff?
- @diff = File.new(@attachment.diskfile, 'rb').read
- render action: 'diff'
- elsif @attachment.is_text? && @attachment.filesize <= Setting.file_max_size_displayed.to_i.kilobyte
- @content = File.new(@attachment.diskfile, 'rb').read
- render action: 'file'
- else
- redirect_to link_to_attachment(@attachment)
- end
- end
-
def download
- if @attachment.container.is_a?(Version) || @attachment.container.is_a?(Project)
- @attachment.increment_download
- end
+ url = @attachment.external_url
- # browsers should not try to guess the content-type
- response.headers['X-Content-Type-Options'] = 'nosniff'
-
- send_file @attachment.diskfile, filename: filename_for_content_disposition(@attachment.filename),
- type: @attachment.content_type,
- disposition: @attachment.content_disposition
+ if url
+ redirect_to url.to_s
+ else
+ serve_attachment @attachment
+ end
end
def destroy
@@ -69,16 +54,6 @@ def destroy
private
- def link_to_attachment(attachment)
- url = URI.parse attachment.file.download_url
-
- if url.host # check if URL or file path
- url.to_s
- else
- download_attachment_url filename: attachment.filename, id: attachment.id
- end
- end
-
def find_project
@attachment = Attachment.find(params[:id])
# Show 404 if the filename in the url is wrong
@@ -104,4 +79,17 @@ def delete_authorize
def destroy_response_url(container)
url_for(container.is_a?(WikiPage) ? [@project, container.wiki] : container)
end
+
+ def serve_attachment(attachment)
+ if attachment.container.is_a?(Version) || attachment.container.is_a?(Project)
+ attachment.increment_download
+ end
+
+ # browsers should not try to guess the content-type
+ response.headers['X-Content-Type-Options'] = 'nosniff'
+
+ send_file attachment.diskfile, filename: filename_for_content_disposition(attachment.filename),
+ type: attachment.content_type,
+ disposition: attachment.content_disposition
+ end
end
Oops, something went wrong.

0 comments on commit b2a2c2f

Please sign in to comment.