Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9 use gitlab git #102

Merged
merged 20 commits into from
Apr 25, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/blob.rb
Original file line number Diff line number Diff line change
@@ -185,6 +185,7 @@ def create_file_version(commit_sha)
file_version =
FileVersion.new(path: path,
commit_sha: commit_sha,
repository_id: repository.pk,
url_path_method: ->(_file_version) { url_path })
file_version.save
file_version
3 changes: 3 additions & 0 deletions app/models/repository_compound.rb
Original file line number Diff line number Diff line change
@@ -17,6 +17,9 @@ def where(*args)

def wrap(repository)
return repository if repository.is_a?(RepositoryCompound)
unless repository.is_a?(Repository)
raise "Object given to ##{__method__} is not a repository"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is untested, which is OK, since it is only triggerd when we mess something up during development. So I would wrap this in nocov.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 3f08fe2

end
object = new
object.instance_variable_set(:@repository, repository)
object
Loading