Skip to content

Commit

Permalink
Merge pull request #2 from XbyOrange/release-1.0.0
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
javierbrea committed Jun 3, 2019
2 parents 986bb18 + aa32285 commit fff6c15
Show file tree
Hide file tree
Showing 73 changed files with 13,470 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,22 @@
{
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": "2018"
},
"plugins": ["prettier"],
"rules": {
"prettier/prettier": [
"error",
{
"printWidth": 99,
"parser": "flow"
}
],
"no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
},
"extends": ["prettier"],
"root": true
}
46 changes: 46 additions & 0 deletions .github/CODE_OF_CONDUCT.md
@@ -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. 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/
112 changes: 112 additions & 0 deletions .github/CONTRIBUTING.md
@@ -0,0 +1,112 @@
# Contributing

First off, thanks for taking the time to contribute!

The following is a set of guidelines for contributing to this project. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

#### Table Of Contents

* [Code of Conduct](#code-of-conduct)
* [Project governance](#project-governance)
* [Rules](#rules)
* [Releases](#releases)
* [Changes to this arrangement](#changes-to-this-arrangement)
* [Pull Requests](#pull-requests)
* [Styleguides](#styleguides)
* [Git Commit Messages](#git-commit-messages)
* [JavaScript Styleguide](#javascript-styleguide)
* [Tests Styleguide](#tests-styleguide)
* [Developer's certificate of origin](#developers-certificate-of-origin)

## Code of Conduct

This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.

## Project Governance

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit.

### Rules

There are a few basic ground-rules for contributors:

1. **No `--force` pushes** or modifying the Git history in any way.
2. **All modifications** should be subject to a **pull request** to solicit feedback from other contributors. The base branch of the pull request should correspond with the assigned "release milestone" of the related issue. When an issue is created, it will be prioritized and a "release milestone" will be assigned to it, at the criteria of contributors. A branch will be created from master for that release milestone, and all related issues should be merged into it, until is ready to declare a formal release.

### Releases

Declaring formal releases remains the prerogative of the project maintainer.

### Changes to this arrangement

This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.

## Pull Requests

* Fill in [the required template](PULL_REQUEST_TEMPLATE.md).
* Do not include issue numbers in the PR title.
* Follow the [JavaScript styleguide](#javascript-styleguide).
* Follow the [Tests styleguide](#tests-styleguide).
* All enhancements and bug fixes must be accompanied with all needed new related regression test.
* Coverage of unit tests must remain 100%.
* Run tests often. Tests are ran automatically with Travis when you push, but you still need to run them locally before pushing.
* Document new features, or update documentation if changes affect to it.
* End all files with a newline.
* Place requires in the following order:
* Built in Node Modules (such as `path`)
* NPM Modules (such as `lodash`)
* Local Modules (using relative paths)

## Styleguides

### Git Commit Messages

* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
* Reference issues and pull requests liberally after the first line

### JavaScript Styleguide

All JavaScript must adhere to the style defined in the `.eslintrc.json` file.

### Tests Styleguide

- Fail tests first. How do you know if it is actually testing anything if the assert never failed?
- Treat `describe` as a noun or situation (Situations usually start with "when").
- Treat `it` as a statement about state or how an operation changes state. Usually, all `it` should start with "should".
- Prefer fewer asserts per `it`.
- Prefer one file for all specs of a javascript file, but, if it grows too much, split it into many files adding a sufix describing the behavior being tested in it (`file.behavior.js`)

#### Example

```js
describe("a dog", () => {
describe("when is happy", () => {
it("should wags its tail", () => {
expect(dog.tail.moving).to.be.true();
});
});
});
```

## Developer's Certificate of Origin

By making a contribution to this project, I certify that:

- (a) The contribution was created in whole or in part by me and I have the right to
submit it under the open source license indicated in the file; or

- (b) The contribution is based upon previous work that, to the best of my knowledge, is
covered under an appropriate open source license and I have the right under that license
to submit that work with modifications, whether created in whole or in part by me, under
the same open source license (unless I am permitted to submit under a different
license), as indicated in the file; or

- (c) The contribution was provided directly to me by some other person who certified
(a), (b) or (c) and I have not modified it.

- (d) I understand and agree that this project and the contribution are public and that a
record of the contribution (including all personal information I submit with it,
including my sign-off) is maintained indefinitely and may be redistributed consistent
with this project or the open source license(s) involved.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Logs**
If applicable, add logs to help explain your problem.

** Operating system, Node.js an npm versions, or browser version (please complete the following information):**
- OS: [e.g. Ubuntu 18.04]
- Node.js: [e.g. 8.11.1]
- npm: [e.g. 5.6.0]
- Browser: [e.g. Chrome 73.0.3683]

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or examples about the feature request here.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,11 @@
**IMPORTANT: Please do not create a Pull Request without creating an issue first.**

*Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.*

Please provide enough information so that others can review your pull request:

Explain the **details** for making this change. What existing problem does the pull request solve?

**Closing issues**

Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes.
25 changes: 25 additions & 0 deletions .gitignore
@@ -0,0 +1,25 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

#environment variables
.env

# dependencies
/node_modules

# tests
/coverage

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# ides
.idea
.vs
31 changes: 31 additions & 0 deletions .travis.yml
@@ -0,0 +1,31 @@
language: node_js

node_js:
- "10"

cache:
directories:
- "node_modules"
- "$HOME/.sonar/cache"

addons:
sonarcloud:
organization: "javierbrea"
token:
secure: "$SONAR_TOKEN"
branch:
name: "$TRAVIS_CURRENT_BRANCH"

script:
- npm run lint
- npm run test-ci
- npm run coveralls
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then sonar-scanner; fi'

deploy:
provider: npm
email: "devops@xbyorange.com"
api_key: "$NPM_TOKEN"
on:
tags: true
skip_cleanup: true
15 changes: 15 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,15 @@
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [unreleased]
### Added
### Changed
### Fixed
### Removed

## [1.0.0] - 2019-06-04
### Changed
- Forked from xbyorange mocks-server gitlab private repository.

0 comments on commit fff6c15

Please sign in to comment.