[ARVADOS] updated: de3e44ace0d878d15201331373e864a9e260ce6e
git at public.curoverse.com
git at public.curoverse.com
Wed Apr 15 17:06:20 EDT 2015
Summary of changes:
services/api/app/models/commit.rb | 7 +++++--
services/api/test/helpers/git_test_helper.rb | 1 +
services/api/test/unit/commit_test.rb | 4 ----
3 files changed, 6 insertions(+), 6 deletions(-)
via de3e44ace0d878d15201331373e864a9e260ce6e (commit)
from d062a3ce560b4177d5254823df4461b7172449ee (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit de3e44ace0d878d15201331373e864a9e260ce6e
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Apr 15 16:50:14 2015 -0400
3126: Delete git cache dir in test teardown. Remove no-op test.
diff --git a/services/api/app/models/commit.rb b/services/api/app/models/commit.rb
index 830854d..ee8c55c 100644
--- a/services/api/app/models/commit.rb
+++ b/services/api/app/models/commit.rb
@@ -154,8 +154,11 @@ class Commit < ActiveRecord::Base
end
def self.cache_dir_for git_url
- Rails.root.join('tmp', 'git', Digest::SHA1.hexdigest(git_url) + ".git").
- to_s
+ File.join(cache_dir_base, Digest::SHA1.hexdigest(git_url) + ".git").to_s
+ end
+
+ def self.cache_dir_base
+ Rails.root.join 'tmp', 'git'
end
def self.fetch_remote_repository gitdir, git_url
diff --git a/services/api/test/helpers/git_test_helper.rb b/services/api/test/helpers/git_test_helper.rb
index b4ac46d..9abdc4f 100644
--- a/services/api/test/helpers/git_test_helper.rb
+++ b/services/api/test/helpers/git_test_helper.rb
@@ -27,6 +27,7 @@ module GitTestHelper
base.teardown do
FileUtils.remove_entry @tmpdir, true
+ FileUtils.remove_entry Commit.cache_dir_base, true
end
end
diff --git a/services/api/test/unit/commit_test.rb b/services/api/test/unit/commit_test.rb
index 4f7aa0d..67068ee 100644
--- a/services/api/test/unit/commit_test.rb
+++ b/services/api/test/unit/commit_test.rb
@@ -64,10 +64,6 @@ class CommitTest < ActiveSupport::TestCase
assert_equal [], c
end
- test 'fetch_remote_repository finds versions' do
- skip 'not written yet'
- end
-
test 'tag_in_internal_repository creates and updates tags in internal.git' do
authorize_with :active
gitint = "git --git-dir #{Rails.configuration.git_internal_dir}"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list