Commit Graph

150 Commits

Author SHA1 Message Date
Go MAEDA
fdd90bab2b Fix RuboCop offenses Style/NegatedIf and Style/NegatedWhile (#39887, #7770).
git-svn-id: https://svn.redmine.org/redmine/trunk@22987 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-25 08:44:33 +00:00
Go MAEDA
93645a279e Use anonymous block forwarding introduced in Ruby 3.1 (#38585).
git-svn-id: https://svn.redmine.org/redmine/trunk@22973 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-21 00:46:15 +00:00
Go MAEDA
ddde0ff47d Fix RuboCop offense Rails/ActiveRecordCallbacksOrder (#39889).
git-svn-id: https://svn.redmine.org/redmine/trunk@22879 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-06-17 03:11:08 +00:00
Marius Balteanu
b4bfb6b581 Replaces use of Digest::MD5 / Digest::SHA1 with ActiveSupport::Digest (#35217).
Patch by Jens Krämer (@jkraemer).

git-svn-id: https://svn.redmine.org/redmine/trunk@22816 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-05-07 18:36:46 +00:00
Marius Balteanu
38d950df55 Remove current year from source file copyright headers and update year in footer to 2024 (#40043).
git-svn-id: https://svn.redmine.org/redmine/trunk@22746 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-02-26 22:55:54 +00:00
Marius Balteanu
13aeb797cf Use ApplicationRecord instead of ActiveRecord::Base (#38975).
Patch by Minoru Maeda (@maeda-m).

git-svn-id: https://svn.redmine.org/redmine/trunk@22619 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-01-23 11:52:38 +00:00
Marius Balteanu
7b911245d3 Updates Rails to 7.1.2 (#36320).
Patch by Takashi Kato.

git-svn-id: https://svn.redmine.org/redmine/trunk@22488 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-11-27 20:58:55 +00:00
Go MAEDA
91705e083b Support for WebP images (#38168).
* Inline image
* Thumbnail
* Inserting markup for an image uploaded by drag and drop

Patch by Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22045 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-01-16 01:23:36 +00:00
Go MAEDA
92bd67c279 Update copyright year to 2023 (#38141).
git-svn-id: https://svn.redmine.org/redmine/trunk@22013 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-01-01 06:19:35 +00:00
Go MAEDA
2cd4996a54 Fix RuboCop offense Lint/NonAtomicFileOperation (#36919).
git-svn-id: https://svn.redmine.org/redmine/trunk@21694 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-06-30 07:35:23 +00:00
Go MAEDA
fe1202d626 Attachment activity provider SQL optimization (#37057).
Patch by Jens Krämer.


git-svn-id: https://svn.redmine.org/redmine/trunk@21573 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-05-14 07:38:36 +00:00
Go MAEDA
3686b77eb6 Update copyright year in source files to 2022 (#36379).
git-svn-id: http://svn.redmine.org/redmine/trunk@21342 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-01-02 05:29:10 +00:00
Go MAEDA
1578c7207b Fix that binmode specified twice (#35539, #35720).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@21193 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-08-18 02:34:46 +00:00
Go MAEDA
8e4d71adc9 Ensure unique attachment filenames (#35539).
Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@21071 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-07-19 13:27:59 +00:00
Go MAEDA
e41cf61de8 Validate attachment filenames on every change (#34367).
Patch by Holger Just.


git-svn-id: http://svn.redmine.org/redmine/trunk@20946 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-04-16 01:36:59 +00:00
Go MAEDA
ab3128106e The result of Attachment.latest_attach is unstable if attachments have the same timestamp (#34999).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@20923 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-04-07 05:30:01 +00:00
Go MAEDA
3e36b5c452 Update copyright year in source files to 2021 (#33069).
git-svn-id: http://svn.redmine.org/redmine/trunk@20846 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-03-25 06:58:56 +00:00
Go MAEDA
7337343f56 Case-insensitive matching fails for Unicode filenames when referring to attachments in text formatting (#27780).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@20835 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-03-20 23:29:21 +00:00
Go MAEDA
a8170e6a14 Introduces an additional check before removing a deduplicated file (#34479).
Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@20812 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-03-17 13:46:18 +00:00
Go MAEDA
7c824702c2 Reverts r20654.
git-svn-id: http://svn.redmine.org/redmine/trunk@20811 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-03-17 13:32:44 +00:00
Toshi MARUYAMA
863ea48a65 remove redundant 'return' from app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20677 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-12-19 17:32:56 +00:00
Toshi MARUYAMA
0beee7746e place the '.' on the previous line of the method call at app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20654 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-12-17 13:09:50 +00:00
Toshi MARUYAMA
00ab304a15 shorten long line of app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20590 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-12-09 14:11:37 +00:00
Toshi MARUYAMA
78828a7dc4 add empty line after guard clause to app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20265 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-11-05 13:42:39 +00:00
Toshi MARUYAMA
bf3f2e19d3 shorten long line of app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20158 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-10-22 14:17:35 +00:00
Go MAEDA
e48ff48820 Evaluate acts_as_activity_provider's scope lazily (#33664).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@20148 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-10-17 02:02:50 +00:00
Go MAEDA
26bc3838e1 When creating more than two identical attachments in a single transaction, the first one always ends up unreadable (#33769).
Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@20094 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-09-28 14:25:35 +00:00
Go MAEDA
ea54e1acdb Fix that bulk download raises Errno::EACCES on Windows (#7056).
Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@19688 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-11 07:58:01 +00:00
Go MAEDA
0a80c4c14b Replace File#readable? with Attachment#readable? (#7056).
git-svn-id: http://svn.redmine.org/redmine/trunk@19631 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-01 09:14:16 +00:00
Go MAEDA
ab47fb8ae0 Download all attachments at once (#7056).
Patch by Mizuki ISHIKAWA.


git-svn-id: http://svn.redmine.org/redmine/trunk@19601 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-03-21 05:59:31 +00:00
Go MAEDA
907e0173e4 Update copyright year in source files to 2020 (#33069).
git-svn-id: http://svn.redmine.org/redmine/trunk@19553 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-03-03 00:24:10 +00:00
Go MAEDA
3ece374177 Don't try to generate thumbnails if convert command is not available (#32289).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18885 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-31 13:07:14 +00:00
Toshi MARUYAMA
c95bead933 code cleanup: rubocop: fix Style/WhileUntilModifier in app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18783 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-19 13:34:16 +00:00
Toshi MARUYAMA
d836d9cc69 code cleanup: rubocop: fix Lint/IneffectiveAccessModifier in app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18781 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-19 13:33:54 +00:00
Toshi MARUYAMA
59dd9ec091 code cleanup: rubocop: fix Layout/IndentationConsistency in app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18640 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-09 07:39:28 +00:00
Go MAEDA
7763902629 Use Redmine::MimeType.of instead of regexp to check if the attachment is Textile (#29752).
git-svn-id: http://svn.redmine.org/redmine/trunk@18586 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-03 09:30:43 +00:00
Go MAEDA
3ce678510e Render Textile and Markdown attachments on the preview page (#29752).
Patch by Takenori TAKAKI.


git-svn-id: http://svn.redmine.org/redmine/trunk@18584 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-03 00:09:28 +00:00
Toshi MARUYAMA
a8c1fc77ef code cleanup: rubocop: fix Layout/EmptyLinesAroundBlockBody in app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18558 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-09-30 08:59:54 +00:00
Go MAEDA
4082069c75 Update copyright year.
git-svn-id: http://svn.redmine.org/redmine/trunk@18198 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-25 07:36:06 +00:00
Go MAEDA
c4a4133178 Render PDF thumbnail using ImageMagick/GhostScript (#22481).
Patch by Gregor Schmidt.


git-svn-id: http://svn.redmine.org/redmine/trunk@18158 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-12 03:55:56 +00:00
Go MAEDA
400e1ca2ff Attachment preview does not work for some source files such as JavaScript and Go (#29259).
Patch by Go MAEDA with the help of Stephan Wenzel's contribution.


git-svn-id: http://svn.redmine.org/redmine/trunk@18122 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-04 09:32:05 +00:00
Go MAEDA
72e1451159 Use Regexp#match? to reduce allocations of MatchData object (#28940).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@18011 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-27 02:15:24 +00:00
Go MAEDA
bd5977d97e Support frozen_string_literal in app/**/*.rb (#26561).
Contributed by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@17987 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-17 13:36:03 +00:00
Go MAEDA
5861160ffc Add "frozen_string_literal: false" for all files (#26561).
This will be changed to true in the future.


git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-15 01:32:57 +00:00
Go MAEDA
4c38f46184 Makes sure the generated thumbnail is always of at least the requested size (#13688).
Patch by Jens Krämer and Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@17850 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-02-05 13:50:20 +00:00
Go MAEDA
cccd14ae5c Deletes thumbnails when the attachment diskfile is deleted (#30177).
Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@17736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-15 02:58:45 +00:00
Go MAEDA
bda0de0044 Allows re-use of thumbnails for identical attachments (#30177).
Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@17735 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-15 02:37:00 +00:00
Go MAEDA
e159928e6b Use find_by instead of where.first to remove unnecessary sorting (#26747).
Patch by  Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17586 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-10-06 16:03:26 +00:00
Go MAEDA
51fdc31e1c "thumbnail" macro may break filename attribute of the attachment (#29038).
Patch by Toru Takahashi.


git-svn-id: http://svn.redmine.org/redmine/trunk@17428 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-07-02 02:36:22 +00:00
Go MAEDA
37d1fcf8a4 Adds previews for audio / video attachments (#27336).
Patch by Jens Kraemer.


git-svn-id: http://svn.redmine.org/redmine/trunk@17340 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-05-17 13:09:43 +00:00