git2consul
Advanced tools
Comparing version 0.10.2 to 0.10.3
@@ -1,1 +0,1 @@ | ||
["172.17.20.0:8300"] | ||
["172.17.6.101:8300"] |
@@ -24,2 +24,7 @@ var fs = require('fs'); | ||
Object.defineProperty(this, 'mountpoint', {value: repo_config['mountpoint'] }); | ||
if (repo_config['source_root'] && | ||
repo_config.source_root.length > 0 && | ||
(repo_config.source_root.charAt(repo_config.source_root.length - 1) == '/')) { | ||
repo_config.source_root = repo_config.source_root.substring(0, repo_config.source_root.length - 1); | ||
} | ||
Object.defineProperty(this, 'source_root', {value: repo_config['source_root'] }); | ||
@@ -26,0 +31,0 @@ |
{ | ||
"name": "git2consul", | ||
"description": "System for moving data from git to consul", | ||
"version": "0.10.2", | ||
"version": "0.10.3", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ { |
#### git2consul | ||
[![Join the chat at https://gitter.im/Cimpress-MCP/git2consul](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Cimpress-MCP/git2consul?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
git2consul takes one or many git repositories and mirrors them into [Consul](http://www.consul.io/) KVs. The goal is for organizations of any size to use git as the backing store, audit trail, and access control mechanism for configuration changes and Consul as the delivery mechanism. | ||
@@ -4,0 +6,0 @@ |
@@ -49,2 +49,30 @@ var should = require('should'); | ||
it ('should support setting a custom source_root for repos', function(done) { | ||
// Create a remote git repo. Then, init a Repo object with include_branch_name disabled and validate | ||
// that files are in the appropriate place in the Consul KV store. | ||
git_commands.init(git_utils.TEST_REMOTE_REPO, function(err) { | ||
if (err) return done(err); | ||
mkdirp(git_utils.TEST_REMOTE_REPO + "nested/enough/for/my/purposes", function(cb) { | ||
if (err) return done(err); | ||
git_utils.addFileToGitRepo("nested/enough/for/my/purposes/readme.md", "Test file beneath source_root", "Test commit.", function(err) { | ||
if (err) return done(err); | ||
var repo_config = git_utils.createRepoConfig(); | ||
repo_config.source_root = "nested/enough/"; | ||
var repo = new Repo(repo_config); | ||
repo.init(function(err) { | ||
if (err) return done(err); | ||
consul_utils.validateValue('test_repo/master/for/my/purposes/readme.md', "Test file beneath source_root", function(err, value) { | ||
if (err) return done(err); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
21021569
3083
216