summaryrefslogtreecommitdiff
path: root/app/models/commit_range.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-01 12:49:22 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-01 12:49:22 +0100
commitbd4ab21c07061e06166b08d86157e4004665ccbc (patch)
tree1919104e423a1aca38a9a7cd1f2116990b1151c6 /app/models/commit_range.rb
parent4a0ebccf6b96184888f2d28b6e97592c6cb239c7 (diff)
downloadgitlab-ce-bd4ab21c07061e06166b08d86157e4004665ccbc.tar.gz
Fix code docs
Diffstat (limited to 'app/models/commit_range.rb')
-rw-r--r--app/models/commit_range.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/commit_range.rb b/app/models/commit_range.rb
index 7b1164b024c..449689faf65 100644
--- a/app/models/commit_range.rb
+++ b/app/models/commit_range.rb
@@ -13,8 +13,7 @@
# range.to_param # => {from: "f3f856029bc5f966c5a7ee24cf7efefdd20e6019^", to: "e86e1013709735be5bb767e2b228930c543f25ae"}
# range.to_s # => "f3f85602..e86e1013"
#
-# # Assuming `project` is a Project with a repository containing both commits:
-# range.project = project
+# # Assuming the specified project has a repository containing both commits:
# range.valid_commits? # => true
#
class CommitRange
@@ -68,7 +67,7 @@ class CommitRange
range_string.strip!
- unless range_string.match(/\A#{PATTERN}\z/)
+ unless range_string =~ /\A#{PATTERN}\z/
raise ArgumentError, "invalid CommitRange string format: #{range_string}"
end
@@ -123,8 +122,6 @@ class CommitRange
# Check if both the starting and ending commit IDs exist in a project's
# repository
- #
- # project - An optional Project to check (default: `project`)
def valid_commits?
commit_start.present? && commit_end.present?
end