Commit Graph

102 Commits

Author SHA1 Message Date
Go MAEDA
4fb1e4bea0 Use fixtures :all to ensure consistent test data and improve test reliability (#41961).
Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@23391 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-12-11 10:17:57 +00:00
Go MAEDA
b1767ab637 Fix RuboCop offense Rails/PluralizationGrammar (#39889).
git-svn-id: https://svn.redmine.org/redmine/trunk@22985 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-25 05:08:12 +00:00
Go MAEDA
6e21ae7209 Fix RuboCop offense Layout/SpaceAfterComma, one of the offenses enabled in rubocop-rails-omakase (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22953 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-12 08:36:05 +00:00
Go MAEDA
74e2262efb Fix RuboCop offense Layout/EmptyLinesAroundMethodBody, one of the offenses enabled in rubocop-rails-omakase (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22950 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-12 07:46:58 +00:00
Go MAEDA
6a4abab8ce Add timeout for thumbnail generation process (#37530).
Patch by Go MAEDA (@maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@22847 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-05-27 14:26:16 +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
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
1481c721a2 Use require_relative instead of require File.expand_path(..., __FILE__) (#38093).
Patch by Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22016 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-01-01 07:13:39 +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
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
4db7397d2a Use File.exist? instead of deprecated File.exists? (#36358).
git-svn-id: http://svn.redmine.org/redmine/trunk@21327 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-12-27 03:20:31 +00:00
Go MAEDA
531144e6dd Fixes for Style/FileWrite offense introduced in RuboCop 1.24.0 (#35136).
git-svn-id: http://svn.redmine.org/redmine/trunk@21322 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-12-24 05:30:56 +00:00
Go MAEDA
1bfdccc30f Don't unlink files before closing them (#35539, #35721).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@21194 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-08-18 02:47:32 +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
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
Toshi MARUYAMA
2719f85222 fix source indent of AttachmentTest
git-svn-id: http://svn.redmine.org/redmine/trunk@20209 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-10-27 15:18:33 +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
Toshi MARUYAMA
151d0703f9 remove spaces inside {} of test/unit/attachment_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19915 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-07-19 14:05:45 +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
a24834fa77 Skip thumbnail tests if ImageMagick convert command is not available (#33226).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@19640 e93f8b46-1217-0410-a6f0-8f06a7374b81
2020-04-02 08:04:15 +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
Toshi MARUYAMA
129832837a cleanup: rubocop: fix Layout/AlignArguments in test/unit/attachment_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19035 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-11-09 16:33:43 +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
Go MAEDA
5ce4a363a9 Fix test failure due to missing call to set_tmp_attachments_directory (#32122).
Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18593 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-10-04 11:17:33 +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
96b6bdfb77 Test for r18158 (#22481).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18159 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-05-12 05:43:50 +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
b900ae6107 Support frozen_string_literal in test/**/*.rb (#26561).
Contributed by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@17996 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-21 03:27:53 +00:00
Go MAEDA
26509e7f4c Decode hexadecimal-encoded literals in order to be frozen string literals friendly (#31004).
Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17991 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-19 15:43:55 +00:00
Go MAEDA
e70c283a22 Remove unnecessary encoding magic comment (#31034).
The default script encoding is UTF-8 in Ruby 2.0 or later.

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17976 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-03-16 06:26:33 +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
Jean-Philippe Lang
fb1d0bf165 Clear thumbnails directory to prevent test failure.
git-svn-id: http://svn.redmine.org/redmine/trunk@17752 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-16 13:27:52 +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
Jean-Philippe Lang
fde78164dc Test failure.
git-svn-id: http://svn.redmine.org/redmine/trunk@17729 e93f8b46-1217-0410-a6f0-8f06a7374b81
2018-12-13 17:51:08 +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
Jean-Philippe Lang
d74f0bfd5c Merged rails-5.1 branch (#23630).
git-svn-id: http://svn.redmine.org/redmine/trunk@16859 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-07-23 11:26:04 +00:00
Jean-Philippe Lang
7fd04e1f8d Update copyright.
git-svn-id: http://svn.redmine.org/redmine/trunk@16685 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-06-25 08:40:31 +00:00
Jean-Philippe Lang
2660a2e5b3 Adds a test for when the file comparison fails (#25215).
git-svn-id: http://svn.redmine.org/redmine/trunk@16462 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 12:51:13 +00:00
Jean-Philippe Lang
1b81a030ce Cleanup tests with mock files.
git-svn-id: http://svn.redmine.org/redmine/trunk@16461 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 12:48:58 +00:00
Jean-Philippe Lang
f0e5437d27 Reuse existing identical disk files for new attachments (#25215).
Patch by Jens Kraemer.

git-svn-id: http://svn.redmine.org/redmine/trunk@16458 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 11:54:29 +00:00
Jean-Philippe Lang
ee84b6b24c Adds a rake task to update attachments digests to SHA256 (#25240).
Patch by Jens Krämer.

git-svn-id: http://svn.redmine.org/redmine/trunk@16455 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 11:38:06 +00:00
Jean-Philippe Lang
30f7be9c19 Changes the digest used for attachments to SHA256 (#25240).
Patch by Jens Kraemer.

git-svn-id: http://svn.redmine.org/redmine/trunk@16454 e93f8b46-1217-0410-a6f0-8f06a7374b81
2017-04-03 11:11:36 +00:00
Jean-Philippe Lang
831a2d58ab Test cleanup.
git-svn-id: http://svn.redmine.org/redmine/trunk@16086 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-12-16 08:49:52 +00:00
Jean-Philippe Lang
ae7852adac Test cleanup.
git-svn-id: http://svn.redmine.org/redmine/trunk@16085 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-12-16 08:49:38 +00:00
Jean-Philippe Lang
d74bc734f3 Fixed the assertion (#24186).
git-svn-id: http://svn.redmine.org/redmine/trunk@16084 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-12-16 08:47:37 +00:00