rename 'config' to 'env'

This commit is contained in:
Rick Olson 2014-06-05 10:52:32 -06:00
parent 698f15f702
commit d9935fa14f
3 changed files with 8 additions and 22 deletions

@ -4,11 +4,11 @@ import (
"github.com/github/git-media/gitmedia"
)
type ConfigCommand struct {
type EnvCommand struct {
*Command
}
func (c *ConfigCommand) Run() {
func (c *EnvCommand) Run() {
config := gitmedia.Config
if endpoint := config.Endpoint(); len(endpoint) > 0 {
@ -25,7 +25,7 @@ func (c *ConfigCommand) Run() {
}
func init() {
registerCommand("config", func(c *Command) RunnableCommand {
return &ConfigCommand{Command: c}
registerCommand("env", func(c *Command) RunnableCommand {
return &EnvCommand{Command: c}
})
}

@ -6,14 +6,14 @@ import (
"testing"
)
func TestConfig(t *testing.T) {
func TestEnv(t *testing.T) {
repo := NewRepository(t, "empty")
defer repo.Test()
repo.AddPath(repo.Path, ".git")
repo.AddPath(repo.Path, "subdir")
cmd := repo.Command("config")
cmd := repo.Command("env")
SetConfigOutput(cmd, map[string]string{
"Endpoint": "https://example.com/git/media.git/info/media",
"LocalWorkingDir": repo.Path,
@ -23,11 +23,11 @@ func TestConfig(t *testing.T) {
})
}
func TestConfigWithMediaUrl(t *testing.T) {
func TestEnvWithMediaUrl(t *testing.T) {
repo := NewRepository(t, "config_media_url")
defer repo.Test()
cmd := repo.Command("config")
cmd := repo.Command("env")
SetConfigOutput(cmd, map[string]string{
"Endpoint": "http://foo/bar",
"LocalWorkingDir": repo.Path,

@ -1,14 +0,0 @@
git-media-config(1) -- Display the Git Media environment.
=========================================================
## SYNOPSIS
`git media config`
## DESCRIPTION
Displays the current Git Media environment.
## SEE ALSO
Part of the git-media(1) suite.