openSUSE/open-build-service

View on GitHub
src/api/app/models/project_config_file.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ProjectConfigFile < ProjectFile
  def initialize(attributes = {})
    super
    @name = '_config'
  end

  # calculates the real url on the backend to search the file
  def full_path(query = {})
    Addressable::URI.encode("/source/#{project_name}/#{name}") + "?#{query.to_query}"
  end

  # You dont want to change name of _config
  private :name=
end