Skip to content

Commit

Permalink
fix(init): fix maven and ruby default module naming
Browse files Browse the repository at this point in the history
  • Loading branch information
xizhao committed Mar 2, 2018
1 parent 272363c commit f23ee34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builders/maven.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (builder *MavenBuilder) DiscoverModules(dir string) ([]config.ModuleConfig,
_, err := os.Stat(filepath.Join(dir, "pom.xml"))
if err == nil {
// Root pom found; parse and return
artifactName := filepath.Dir(dir)
artifactName := filepath.Base(filepath.Dir(dir))
var rootPom POMFile
if err := parseLoggedWithUnmarshaller(mavenLogger, filepath.Join(dir, "pom.xml"), &rootPom, xml.Unmarshal); err == nil {
if rootPom.Name != "" {
Expand Down
2 changes: 1 addition & 1 deletion builders/ruby.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (builder *RubyBuilder) DiscoverModules(dir string) ([]config.ModuleConfig,
}
moduleConfigs := make([]config.ModuleConfig, len(gemFilePaths))
for i, path := range gemFilePaths {
gemName := filepath.Dir(path)
gemName := filepath.Base(filepath.Dir(path))
// infer title from *.gemspec in directory if exists
gemSpecs, err := doublestar.Glob(filepath.Join(filepath.Dir(path), "*.gemspec"))
if err == nil && len(gemSpecs) > 0 {
Expand Down

0 comments on commit f23ee34

Please sign in to comment.