Skip to content

Commit

Permalink
Renaming m2h to spectacle
Browse files Browse the repository at this point in the history
  • Loading branch information
kashishm committed Jun 30, 2016
1 parent bf1f948 commit f26c3aa
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
M2H
===
Spectacle
=========
Generates HTML from Specification/Markdown files. This is a plugin for [gauge](http://getgauge.io).

Install through Gauge
---------------------
```
gauge --install m2h
gauge --install spectacle
```

Export to HTML
--------------
Run the following command to export to HTML in a Gauge project

```
gauge --docs m2h <path to specs dir>
gauge --docs spectacle <path to specs dir>
```

Build from Source
Expand Down Expand Up @@ -58,4 +58,4 @@ License
-------

![GNU Public License version 3.0](http://www.gnu.org/graphics/gplv3-127x51.png)
`M2H` is released under [GNU Public License version 3.0](http://www.gnu.org/licenses/gpl-3.0.txt)
`Spectacle` is released under [GNU Public License version 3.0](http://www.gnu.org/licenses/gpl-3.0.txt)
12 changes: 6 additions & 6 deletions build/make.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
bin = "bin"
newDirPermissions = 0755
gauge = "gauge"
m2h = "m2h"
spectacle = "spectacle"
pluginJsonFile = "plugin.json"
)

Expand All @@ -52,7 +52,7 @@ func compile() {
if *allPlatforms {
compileAcrossPlatforms()
} else {
compileGoPackage(m2h)
compileGoPackage(spectacle)
}
}

Expand All @@ -71,7 +71,7 @@ func createPluginDistro(forAllPlatforms bool) {
}

func createDistro() {
packageName := fmt.Sprintf("%s-%s-%s.%s", m2h, getPluginVersion(), getGOOS(), getArch())
packageName := fmt.Sprintf("%s-%s-%s.%s", spectacle, getPluginVersion(), getGOOS(), getArch())
mirrorFile(pluginJsonFile, filepath.Join(getBinDir(), pluginJsonFile))
os.Mkdir(filepath.Join(bin, distros), 0755)
createZipFromUtil(getBinDir(), packageName)
Expand Down Expand Up @@ -181,7 +181,7 @@ func executeCommand(command string, arg ...string) (string, error) {
}

func compileGoPackage(packageName string) {
runProcess("go", "build", "-o", getGaugeExecutablePath(m2h))
runProcess("go", "build", "-o", getGaugeExecutablePath(spectacle))
}

func getGaugeExecutablePath(file string) string {
Expand Down Expand Up @@ -251,12 +251,12 @@ func compileAcrossPlatforms() {
for _, platformEnv := range platformEnvs {
setEnv(platformEnv)
fmt.Printf("Compiling for platform => OS:%s ARCH:%s \n", platformEnv[GOOS], platformEnv[GOARCH])
compileGoPackage(m2h)
compileGoPackage(spectacle)
}
}

func installPlugin(installPrefix string) {
pluginInstallPath := filepath.Join(installPrefix, m2h, getPluginVersion())
pluginInstallPath := filepath.Join(installPrefix, spectacle, getPluginVersion())
mirrorDir(getBinDir(), pluginInstallPath)
mirrorFile(pluginJsonFile, filepath.Join(pluginInstallPath, pluginJsonFile))
}
Expand Down
2 changes: 1 addition & 1 deletion genproto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ sed -i.backup '/import gauge_messages1 "spec.pb"/d' gauge_messages/spec.pb.go &
sed -i.backup '/import gauge_messages1 "spec.pb"/d' gauge_messages/api.pb.go && sed -i.backup 's/gauge_messages1.//g' gauge_messages/api.pb.go && rm gauge_messages/api.pb.go.backup

sed -i.backup '/import "."/d' gauge_messages/spec.pb.go && rm gauge_messages/spec.pb.go.backup
go fmt github.com/getgauge/M2H/...
go fmt github.com/getgauge/spectacle/...

6 changes: 3 additions & 3 deletions json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"path/filepath"
"strings"

"github.com/getgauge/M2H/constant"
"github.com/getgauge/M2H/gauge_messages"
"github.com/getgauge/M2H/util"
"github.com/getgauge/spectacle/constant"
"github.com/getgauge/spectacle/gauge_messages"
"github.com/getgauge/spectacle/util"
"github.com/golang/protobuf/proto"
)

Expand Down
10 changes: 5 additions & 5 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"id" : "m2h",
"id" : "spectacle",
"version" : "0.0.1",
"name" : "M2H",
"name" : "Spectacle",
"description" : "Markdown to HTML",
"install": {
"windows": [],
"linux": [],
"darwin": []
},
"command" : {
"windows" : ["m2h"],
"linux" : ["m2h"],
"darwin" : ["m2h"]
"windows" : ["spectacle"],
"linux" : ["spectacle"],
"darwin" : ["spectacle"]
},
"scope" : ["documentation"],
"gaugeVersionSupport": {
Expand Down
2 changes: 1 addition & 1 deletion processor/messageProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"net"
"time"

"github.com/getgauge/M2H/gauge_messages"
"github.com/getgauge/spectacle/gauge_messages"
"github.com/golang/protobuf/proto"
)

Expand Down
8 changes: 4 additions & 4 deletions m2h.go → spectacle.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"path/filepath"
"strings"

"github.com/getgauge/M2H/constant"
"github.com/getgauge/M2H/json"
"github.com/getgauge/M2H/processor"
"github.com/getgauge/M2H/util"
"github.com/getgauge/spectacle/constant"
"github.com/getgauge/spectacle/json"
"github.com/getgauge/spectacle/processor"
"github.com/getgauge/spectacle/util"
"github.com/golang-commonmark/markdown"
)

Expand Down

0 comments on commit f26c3aa

Please sign in to comment.