Skip to content

Commit

Permalink
Handling the absense of env dir, #23
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvam committed May 30, 2016
1 parent d8304a3 commit 5f3aedd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions gauge-ruby.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ package main
import (
"flag"
"fmt"
"github.com/getgauge/common"
"os"
"os/exec"
"path"

"github.com/getgauge/common"
)

const (
Expand All @@ -50,6 +51,10 @@ func createStepImplementationsDirectory() {
createDirectory(path.Join(projectRoot, "step_implementations"))
}

func createEnvDir() {
createDirectory(path.Join(projectRoot, "env", "default"))
}

func createDirectory(filePath string) {
showMessage("create", filePath)
if !common.DirExists(filePath) {
Expand Down Expand Up @@ -154,7 +159,7 @@ func main() {
os.Chdir(projectRoot)
runCommand("ruby", "-e", "require 'gauge_runtime'")
} else if *initialize {
funcs := []initializerFunc{createStepImplementationsDirectory, createStepImplementationFile, createRubyPropertiesFile, createOrAppendToGemFile}
funcs := []initializerFunc{createStepImplementationsDirectory, createStepImplementationFile, createEnvDir, createRubyPropertiesFile, createOrAppendToGemFile}
for _, f := range funcs {
f()
}
Expand Down
2 changes: 1 addition & 1 deletion ruby.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id" : "ruby",
"version" : "0.2.0",
"version" : "0.2.1",
"description": "ruby support for gauge",
"install": {
"windows": [],
Expand Down

0 comments on commit 5f3aedd

Please sign in to comment.