Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

Commit

Permalink
Merge 12f2669 into 4c47d47
Browse files Browse the repository at this point in the history
  • Loading branch information
benansell committed Nov 8, 2018
2 parents 4c47d47 + 12f2669 commit 566d47a
Show file tree
Hide file tree
Showing 98 changed files with 11,700 additions and 3,612 deletions.
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ npm-debug.log
# elm
elm-stuff

# elm-test-extra
plugin/elm-test-extra/ElmTest/

# tests
.nyc_output/
test/**/tests/elm-package.json
test/**/elm-test*/**/elm-package.json
test/integration/**/tests/elm.json
test/integration/**/lobo.json
test-result/
test/integration/elm-test/tests/**/elm.json
test/integration/elm-test-extra/tests/**/elm.json

# lobo
.lobo
6 changes: 6 additions & 0 deletions .idea/angular-settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/Debug___elm_lang.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/runConfigurations/Debug___elm_test_extra.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/runConfigurations/Integration___All.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/runConfigurations/Integration___elm_lang.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/runConfigurations/Integration___elm_test_simple.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/typescript-compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 4 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,20 @@ language: node_js
node_js:
- "6"
- "8"
- "10"

cache:
directories:
- sysconfcpus
- /home/travis/.elm/0.19.0/package

os:
- osx
- linux

env:
matrix:
- ELM_VERSION=0.18.0

before_install:
- | # see https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142
if [ ! -d sysconfcpus/bin ];
then
git clone https://github.com/obmarg/libsysconfcpus.git;
cd libsysconfcpus;
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
make && make install;
cd ..;
fi
- node --version
- npm --version
- npm install -g elm@$ELM_VERSION
- mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old
- printf '%s\n\n' '#!/bin/bash' 'echo "Running elm-make with sysconfcpus -n 2"' '$TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-make-old "$@"' > $(npm config get prefix)/bin/elm-make
- chmod +x $(npm config get prefix)/bin/elm-make
- npm install -g elm

install:
- npm install
Expand Down
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at code@benansell.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Contributions and suggestions welcome! In the first instance please raise
an issue to against this project before starting work on a pull request.
59 changes: 33 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ test frameworks
* Default console reporter that displays a summary of the test run
* Watch mode that builds and runs the tests when the source code is
updated
* Checks elm-package.json in base directory and test directory for
missing source directories and packages
* Checks elm.json for missing source directories and packages
* Friendly error output
* Test suite generation
* Test suite analysis that checks for hidden and over exposed tests
Expand All @@ -37,7 +36,7 @@ missing source directories and packages
The installation guide assumes that you already have the following
installed:
* [npm](https://docs.npmjs.com/)
* [elm](http://elm-lang.org/install) - v18.0 or greater
* [elm](http://elm-lang.org/install) - v19.0 or greater

## Install
It is recommended to install lobo locally for your application and
Expand All @@ -52,18 +51,23 @@ Once they are installed you can run lobo via the following command:
lobo --help
```

## .lobo directory
Once lobo has been run once you should see a ".lobo" directory in the
root of your project - this is the lobo temp directory.
## lobo.json & .lobo directory
Once lobo has been run once you should find the "lobo.json" file and
the ".lobo" directory in the root of your project.

This directory only contains temp files for the running of lobo. You
The lobo.json file is similar to the elm.json file with the additional
dependencies and source directories required to run lobo. This file is
created and managed automatically by lobo. In general you should not
edit this file by hand. It is recommended that you check this file into
your source control.

The .lobo directory only contains temp files for the running of lobo. You
should configure your source control to ignore this directory and its
contents.

## Upgrading
After updating lobo, you may find that elm does not properly find the
lobo elm code. To fix this delete your test elm-stuff and .lobo
directories.
lobo elm code. To fix this delete lobo.json, .lobo and elm-stuff.

### Versions of lobo prior to 0.5
Prior to 0.5 lobo did not generate the test suite and required you to
Expand Down Expand Up @@ -160,24 +164,23 @@ Assuming your application follows the recommended directory structure
for an elm application:
```
.lobo --> lobo temp directory - should be ignored by source control
elm-package.json --> definition of the elm required packages
elm.json --> definition of the elm required packages
lobo.json --> lobo configuration file
elm-stuff/ --> elm installed packages
node_modules/ --> npm installed modules
package.json --> definition of the npm required packages
src/ --> source code directory
tests/ --> test code directory
elm-package.json --> definition of the elm required packages for app & testing
elm-stuff/ --> elm installed packages for app & testing
```

Locally running the following command will start lobo in watch mode:
```
lobo --watch
```

Lobo will then check that the elm-package.json files in the application
directory and tests directory are in-sync. If they are out of sync it
will ask you if the tests elm-package.json can be updated.
Lobo will then check that the elm.json and lobo.json files are in-sync.
If they are out of sync it will ask you if the tests lobo.json can be
updated.

Lobo will then attempt to generate the test suite and build the tests,
if this fails the errors from elm make will be displayed
Expand All @@ -204,7 +207,7 @@ lobo --framework=elm-test
```

### --compiler
The path to elm-package and elm-make
The path to elm executable

### --debug
Disables auto-cleanup of temporary files. This can be useful when
Expand Down Expand Up @@ -232,16 +235,20 @@ when the analysis is reporting false positives that cause the tests not
to run.

### --noInstall
Prevents lobo from trying to run elm-package when running the tests.
Prevents lobo from trying to run elm install when running the tests.
This can be useful when using lobo without an internet connection.

### --noUpdate
Prevents lobo from trying to update the elm-package.json file in tests
directory. The default is to try and sync the elm-package.json files
in the base and test directories.
Prevents lobo from trying to update the lobo.json file when running the
tests.

### --optimize (Experimental)
Attempts to build with the elm optimize flag. However, setting this flag
will be ignored if lobo finds usages of the Debug module in the elm.json
source directories.

### --noWarn
Hides elm make build warnings. The default is to show warning messages
Note: The optimizations performed by elm will prevent useful test
failure messages from being displayed.

### --prompt
Prevents lobo and elm tools asking your permission, and always answers
Expand Down Expand Up @@ -275,14 +282,14 @@ Put lobo in a infinite loop that watches for changes and automatically
reruns the build and tests when the source code has changed.

Note: Currently watch mode does not deal with changes to the
elm-package.json source directories. If you change these you will need
elm.json source directories. If you change these you will need
to exit watch mode and restart it.


## Test Frameworks
The following test frameworks are supported:
* [elm-test-extra](http://package.elm-lang.org/packages/benansell/lobo-elm-test-extra/latest)
* [elm-test](http://package.elm-lang.org/packages/elm-community/elm-test/latest)
* [elm-test](http://package.elm-lang.org/packages/elm-explorations/test/latest)

### elm-test-extra
elm-test-extra is the default framework, it is similar to elm-test with
Expand Down Expand Up @@ -344,8 +351,8 @@ html; defaults to text
* reportFile - the path to save the test run report to

## Troubleshooting
In general if lobo quits abnormaly try deleting your test elm-stuff and
.lobo directories.
In general if lobo quits abnormally try deleting lobo.json, .lobo and
elm-stuff.

### The argument to function `findTests` is causing a mismatch
If you are seeing an error similar to the following:
Expand Down
7 changes: 5 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
environment:
ELM_VERSION: "0.18.0"
matrix:
- nodejs_version: "6"
- nodejs_version: "8"
- nodejs_version: "10"

cache:
- '%APPDATA%\elm\0.19.0\package'

platform:
- x64

Expand All @@ -21,7 +24,7 @@ install:
- npm --version

# install dependencies
- npm install -g elm@%ELM_VERSION%
- npm install -g elm
- npm install

build_script:
Expand Down

0 comments on commit 566d47a

Please sign in to comment.