Skip to content

Commit d02a525

Browse files
author
travis
committed
Adding documentation to methods
suggested from Pull Review
1 parent 7edc3cb commit d02a525

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

.pullreview.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Keeping to style of Redmine
2+
---
3+
rules:
4+
ignore:
5+
- simplify_call_to_render_partial

lib/issue_helper_patch.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def humanized_time(entry_hours)
1616
end
1717
end
1818

19+
# Human readable format for Hour data
1920
def humanized_hour(hours)
2021
if hours == 1
2122
t('plugin_spent_time_in_issue.datetime.hours.one')
@@ -26,6 +27,7 @@ def humanized_hour(hours)
2627
end
2728
end
2829

30+
# Human readable format for Hour minute
2931
def humanized_minute(minutes)
3032
if minutes == 1
3133
' ' << t('plugin_spent_time_in_issue.datetime.minutes.one')
@@ -36,6 +38,7 @@ def humanized_minute(minutes)
3638
end
3739
end
3840

41+
# Time Spent value in format specified by configuration.
3942
def report_time_spent(entry)
4043
if Setting.plugin_redmine_spent_time_in_issue_description['time_format'].eql? 'human'
4144
humanized_time(entry.hours)

lib/setup_issue_show.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def initialize
1414
@current_version = [Redmine::VERSION::MAJOR, Redmine::VERSION::MINOR, Redmine::VERSION::TINY].join('.')
1515
end
1616

17+
# Location of file to use as Issue#show
1718
def show_file
1819
possible_files = @issues_directory.children(false).select { |files| files.to_s.index(/\d.*show/) }
1920
show_file = possible_files.sort { |x, y| y <=> x }.find do |file|

test/unit/setup_issue_show_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def test_show_file
1919
assert_equal @setup_issue_show.show_file.class, Pathname
2020
end
2121

22+
# Test the different versions of files that can be found.
2223
def test_correct_file_found
2324
@setup_issue_show.current_version = '2.3.1'
2425
assert_equal '2.3.1', @setup_issue_show.show_file.redmine_version, 'Did not find the exact match.'

0 commit comments

Comments
 (0)