summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/pipeline.rb2
-rw-r--r--app/models/project.rb6
-rw-r--r--app/models/repository.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 8db53ea56dd..70bb4a224a1 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -283,7 +283,7 @@ module Ci
def ci_yaml_file
return @ci_yaml_file if defined?(@ci_yaml_file)
- @ci_yaml_file ||= project.repository.ci_yaml_file(sha)
+ @ci_yaml_file ||= project.repository.gitlab_ci_yml_for(sha)
end
def has_yaml_errors?
diff --git a/app/models/project.rb b/app/models/project.rb
index 42a79557136..15c6e25e73f 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1342,10 +1342,10 @@ class Project < ActiveRecord::Base
end
end
- def route_map_for_commit(commit_sha)
+ def route_map_for(commit_sha)
@route_maps_by_commit ||= Hash.new do |h, sha|
h[sha] = begin
- data = repository.route_map_file(sha)
+ data = repository.route_map_for(sha)
next unless data
Gitlab::RouteMap.new(data)
@@ -1358,7 +1358,7 @@ class Project < ActiveRecord::Base
end
def public_path_for_source_path(path, commit_sha)
- map = route_map_for_commit(commit_sha)
+ map = route_map_for(commit_sha)
return unless map
map.public_path_for_source_path(path)
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 9aa0cc250f0..ba9c038b66d 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -1187,14 +1187,14 @@ class Repository
end
end
- def route_map_file(sha)
+ def route_map_for(sha)
blob = blob_at(sha, ROUTE_MAP_PATH)
return unless blob
blob.load_all_data!(self)
blob.data
end
- def ci_yaml_file(sha)
+ def gitlab_ci_yml_for(sha)
blob = blob_at(sha, GITLAB_CI_YML_PATH)
return unless blob
blob.load_all_data!(self)