Skip to content

Commit

Permalink
Finish v0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
khorevaa committed Dec 19, 2020
2 parents e7db298 + 64e0464 commit 8c26979
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
12 changes: 6 additions & 6 deletions api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestApiConfig(t *testing.T) {
"/DisableStartupDialogs",
"/LoadCfg ./1cv8.cf",
"/UpdateDBCfg",
"-Dynamic+",
//"-Dynamic+", FIX: поправить после исправления https://github.com/v8platform/marshaler/issues/1
"-Server",
},
},
Expand Down Expand Up @@ -156,7 +156,7 @@ func TestApiConfig(t *testing.T) {
"/DisableStartupDialogs",
"/LoadConfigFromFiles ./src",
"/UpdateDBCfg",
"-Dynamic+",
//"-Dynamic+", FIX: поправить после исправления https://github.com/v8platform/marshaler/issues/1
"-Server",
},
},
Expand Down Expand Up @@ -197,7 +197,7 @@ func TestApiConfig(t *testing.T) {
"/UpdateCfg ./1cv8.cf",
"-Force",
"/UpdateDBCfg",
"-Dynamic+",
//"-Dynamic+", FIX: поправить после исправления https://github.com/v8platform/marshaler/issues/1
"-Server",
},
},
Expand Down Expand Up @@ -235,13 +235,13 @@ func TestApiConfig(t *testing.T) {
"/IBConnectionString File='./test_ib';",
"/DisableStartupDialogs",
"/DumpConfigToFiles ./src",
"-Force",
"-force",
},
},
{
"DumpConfigToFiles_update",
ib,
DumpConfigToFiles("./src", false).WithUpdate(false, ""),
DumpConfigToFiles("./src", false).WithUpdate(""),
nil,
[]string{
"DESIGNER",
Expand All @@ -254,7 +254,7 @@ func TestApiConfig(t *testing.T) {
{
"DumpConfigToFiles_configDumpInfo",
ib,
DumpConfigToFiles("./src", false).WithUpdate(false, "./dumpInfo.xml"),
DumpConfigToFiles("./src", false).WithUpdate("./dumpInfo.xml"),
nil,
[]string{
"DESIGNER",
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func ExampleDumpConfigToFiles_with_update() {
//infobase := v8.NewFileIB("./infobase")
//infobase := v8.NewServerIB("app", "demobase")

what := v8.DumpConfigToFiles("./src").WithUpdate(false, "./src/dumpInfo.xml")
what := v8.DumpConfigToFiles("./src").WithUpdate("./src/dumpInfo.xml")
//what := v8.DumpConfigToFiles("./src", true)

err = v8.Run(infobase, what)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.15

require (
github.com/stretchr/testify v1.6.1
github.com/v8platform/designer v0.1.1
github.com/v8platform/designer v0.2.0
github.com/v8platform/enterprise v0.1.0
github.com/v8platform/errors v0.1.0
github.com/v8platform/marshaler v0.1.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ github.com/v8platform/agent v0.0.0-20200703051804-b06e6737a7b5 h1:exdR2JPaLRuRva
github.com/v8platform/agent v0.0.0-20200703051804-b06e6737a7b5/go.mod h1:fLdJkSja8K++qa7+Lw4RQBHsEdS18GcE2F2BlFK33Z4=
github.com/v8platform/designer v0.1.1 h1:YnC2+GVP7t/9QfAsRD2+dm3BaQVKi2PCGO56acvgcSk=
github.com/v8platform/designer v0.1.1/go.mod h1:LdRGRiHK3+eIIMJcI1eEF90VSzYqU2cMhXOWeJu2bHE=
github.com/v8platform/designer v0.2.0 h1:ldcp4MdpIcBxzZw+VH0fterpC5yMCk+OZxAYaBUjDzc=
github.com/v8platform/designer v0.2.0/go.mod h1:pPkrPaXbTXLQHBfUu9+ikp4W6XRTN3iIF2/MNDTj4Sc=
github.com/v8platform/enterprise v0.1.0 h1:OKJ3ig9AvUDvIN+R0GRWJUPVNy5rPNtOKoqS2JPLnvw=
github.com/v8platform/enterprise v0.1.0/go.mod h1:A2XY7UYAi/o9xdKrHzU63XnVD8wvIe6jMBUlUrNANQs=
github.com/v8platform/errors v0.1.0 h1:7167okMmxBb76FA3+irT4LW9KTVura0vhMWnFDMHcZw=
Expand Down
15 changes: 7 additions & 8 deletions repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package v8

import (
"github.com/v8platform/designer"
"github.com/v8platform/designer/repository"
)

func NewRepository(path string, userAndPassword ...string) repository.Repository {
func NewRepository(path string, userAndPassword ...string) designer.Repository {

repo := repository.Repository{
repo := designer.Repository{
Path: path,
}

Expand All @@ -23,16 +22,16 @@ func NewRepository(path string, userAndPassword ...string) repository.Repository

// RepositoryUpdateCfg получает команду обновления конфигурации из хранилища конфигурации
// Подробнее в пакете designer.UpdateCfgOptions
func RepositoryUpdateCfg(repo repository.Repository, updateDBCfg ...designer.UpdateDBCfgOptions) repository.RepositoryUpdateCfgOptions {
func RepositoryUpdateCfg(repo designer.Repository, updateDBCfg ...designer.UpdateDBCfgOptions) designer.RepositoryUpdateCfgOptions {

command := repository.RepositoryUpdateCfgOptions{
command := designer.RepositoryUpdateCfgOptions{
Repository: repo,
Designer: designer.NewDesigner(),
}

if len(updateDBCfg) > 0 {
command.UpdateDBCfg = &updateDBCfg[0]
}
//if len(updateDBCfg) > 0 {
// command.UpdateDBCfg = &updateDBCfg[0]
//}

return command
}

0 comments on commit 8c26979

Please sign in to comment.