Skip to content

Commit

Permalink
Update ruby and objective c to use latest images to fix #54
Browse files Browse the repository at this point in the history
Re-enable acceptance tests for ruby and objective c

Correct regex to fix #58 and add unit test
  • Loading branch information
andystanton committed Apr 24, 2016
1 parent d0edddb commit 765f68b
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .goxc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"BuildConstraints": "windows,linux,darwin,openbsd",
"PackageVersion": "1.0.5",
"PackageVersion": "1.0.6",
"TaskSettings": {
"bintray": {
"downloadspage": "bintray.md",
Expand Down
1 change: 0 additions & 1 deletion .test/acceptance-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ function get_cwd() {
echo "${script_path}"
}


function get_snapshot_plugin() {
if ! grep -q vagrant-vbox-snapshot <(vagrant plugin list); then
vagrant plugin install vagrant-vbox-snapshot
Expand Down
2 changes: 0 additions & 2 deletions .test/bats/dexec.bats
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ function run_standard_tests() {
}

@test "objc" {
skip
run_standard_tests $BATS_TEST_DESCRIPTION
}

Expand All @@ -112,7 +111,6 @@ function run_standard_tests() {
}

@test "ruby" {
skip
run_standard_tests $BATS_TEST_DESCRIPTION
}

Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][unreleased]

## [1.0.6] - 2016-04-24
### Fixed
- Shebang support for Java files now works.
- Re-enabled Java in acceptance tests.
- Ruby and Objective C no longer output 'stdin: not a tty' before program output.
- Regex for extracting source filenames no longer ignores single character filenames e.g. 'a.cpp'.

### Changed
- Re-enabled Java, Ruby and Objective C in acceptance tests.

## [1.0.5] - 2016-04-23
### Fixed
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Download the appropriate binary for your OS and architecture, then unzip or unta

| OS | 64-bit | 32-bit |
| ------- | ------ | ------ |
| Linux | [64-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.5_linux_amd64.tar.gz) | [32-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.5_linux_386.tar.gz) |
| Mac | [64-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.5_darwin_amd64.zip) | [32-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.5_darwin_386.zip) |
| Windows | [64-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.5_windows_amd64.zip) | [32-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.5_windows_386.zip) |
| Linux | [64-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.6_linux_amd64.tar.gz) | [32-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.6_linux_386.tar.gz) |
| Mac | [64-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.6_darwin_amd64.zip) | [32-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.6_darwin_386.zip) |
| Windows | [64-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.6_windows_amd64.zip) | [32-bit](https://bintray.com/artifact/download/dexec/release/dexec_1.0.6_windows_386.zip) |

Binaries for other distributions are available on [Bintray](https://bintray.com/dexec/release/dexec/_latestVersion).

Expand Down
4 changes: 2 additions & 2 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func ArgToOption(opt string, next string) (OptionType, string, int, error) {
patternCombinationI := regexp.MustCompile(`^--include=(.+)$`)
patternCombinationM := regexp.MustCompile(`^--image=(.+)$`)
patternCombinationE := regexp.MustCompile(`^--extension=(.+)$`)
patternSource := regexp.MustCompile(`^[^-_].+\..+`)
patternSource := regexp.MustCompile(`^[^-_].*\..+`)
patternUpdateFlag := regexp.MustCompile(`^-(-update|u)$`)
patternHelpFlag := regexp.MustCompile(`^-(-help|h)$`)
patternVersionFlag := regexp.MustCompile(`^-(-version|v)$`)
Expand Down Expand Up @@ -177,5 +177,5 @@ func DisplayHelp(filename string) {

// DisplayVersion prints the version information for the program.
func DisplayVersion(filename string) {
fmt.Printf("%s 1.0.6-SNAPSHOT\n", filename)
fmt.Printf("%s 1.0.6\n", filename)
}
4 changes: 4 additions & 0 deletions cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ func TestSources(t *testing.T) {
[]string{"filename", "foo.cpp", "bar.java", "foo.bar.scala", "bar-foo.groovy"},
[]string{"foo.cpp", "bar.java", "foo.bar.scala", "bar-foo.groovy"},
},
{
[]string{"filename", "a.cpp"},
[]string{"a.cpp"},
},
}
for _, c := range cases {
got := ParseOsArgs(c.osArgs)
Expand Down
4 changes: 2 additions & 2 deletions dexec/dexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ var innerMap = map[string]*Image{
"lua": {"Lua", "lua", "dexec/lang-lua", "1.0.1"},
"js": {"JavaScript", "js", "dexec/lang-node", "1.0.2"},
"nim": {"Nim", "nim", "dexec/lang-nim", "1.0.1"},
"m": {"Objective C", "m", "dexec/lang-objc", "1.0.1"},
"m": {"Objective C", "m", "dexec/lang-objc", "1.0.2"},
"ml": {"OCaml", "ml", "dexec/lang-ocaml", "1.0.1"},
"p6": {"Perl 6", "p6", "dexec/lang-perl6", "1.0.1"},
"pl": {"Perl", "pl", "dexec/lang-perl", "1.0.2"},
"php": {"PHP", "php", "dexec/lang-php", "1.0.1"},
"py": {"Python", "py", "dexec/lang-python", "1.0.2"},
"r": {"R", "r", "dexec/lang-r", "1.0.1"},
"rkt": {"Racket", "rkt", "dexec/lang-racket", "1.0.1"},
"rb": {"Ruby", "rb", "dexec/lang-ruby", "1.0.1"},
"rb": {"Ruby", "rb", "dexec/lang-ruby", "1.0.2"},
"rs": {"Rust", "rs", "dexec/lang-rust", "1.0.1"},
"scala": {"Scala", "scala", "dexec/lang-scala", "1.0.1"},
"sh": {"Bash", "sh", "dexec/lang-bash", "1.0.1"},
Expand Down
4 changes: 2 additions & 2 deletions dexec/dexec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestLookupImageByExtension(t *testing.T) {
{"lisp", "lisp", "dexec/lang-lisp", "1.0.1", nil},
{"lua", "lua", "dexec/lang-lua", "1.0.1", nil},
{"js", "js", "dexec/lang-node", "1.0.2", nil},
{"m", "m", "dexec/lang-objc", "1.0.1", nil},
{"m", "m", "dexec/lang-objc", "1.0.2", nil},
{"ml", "ml", "dexec/lang-ocaml", "1.0.1", nil},
{"nim", "nim", "dexec/lang-nim", "1.0.1", nil},
{"p6", "p6", "dexec/lang-perl6", "1.0.1", nil},
Expand All @@ -80,7 +80,7 @@ func TestLookupImageByExtension(t *testing.T) {
{"py", "py", "dexec/lang-python", "1.0.2", nil},
{"r", "r", "dexec/lang-r", "1.0.1", nil},
{"rkt", "rkt", "dexec/lang-racket", "1.0.1", nil},
{"rb", "rb", "dexec/lang-ruby", "1.0.1", nil},
{"rb", "rb", "dexec/lang-ruby", "1.0.2", nil},
{"rs", "rs", "dexec/lang-rust", "1.0.1", nil},
{"scala", "scala", "dexec/lang-scala", "1.0.1", nil},
{"sh", "sh", "dexec/lang-bash", "1.0.1", nil},
Expand Down

0 comments on commit 765f68b

Please sign in to comment.