Skip to content

Commit

Permalink
Merge pull request #16 from plouc/mozaik-1.1.x
Browse files Browse the repository at this point in the history
Migrate to mozaik >= 1.1.0
  • Loading branch information
Raphaël Benitte committed Apr 4, 2016
2 parents 713903e + df26b66 commit 35e89be
Show file tree
Hide file tree
Showing 18 changed files with 353 additions and 250 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"es2015",
"react"
]
}
113 changes: 62 additions & 51 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,52 +1,63 @@
{
"parser": "babel-eslint",
"env": {
"es6": true,
"browser": true,
"node": true
},
"plugins": [
"eslint-plugin-react"
],
"extends": "eslint:recommended",
"rules": {
"no-unused-vars": 1,
"arrow-spacing": 2,
"array-bracket-spacing": [2, "never"],
"brace-style": [2, "1tbs", {
"allowSingleLine": false
}],
"camelcase": [2, {
"properties": "always"
}],
"comma-dangle": [2, "never"],
"eol-last": 2,
"eqeqeq": 2,
"handle-callback-err": 2,
"indent": [2, 4, {
"SwitchCase": 1
}],
"key-spacing": [2, {
"align": "value",
"beforeColon": false,
"afterColon": true
}],
"no-console": 2,
"no-else-return": 2,
"no-empty": 2,
"no-extra-semi": 2,
"no-eval": 2,
"no-invalid-this": 2,
"no-lone-blocks": 2,
"no-multiple-empty-lines": [2, {"max": 2}],
"no-redeclare": 2,
"no-var": 2,
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-template": 2,
"semi": 2,
"react/prop-types": 2,
"react/prefer-es6-class": 2,
"react/jsx-indent": [2, 4]
}
}
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"blockBindings": true,
"jsx": true
},
},
"env": {
"browser": true,
"es6": true
},
"plugins": [
"react"
],
"rules": {
"semi": 2,
"prefer-template": 2,
"indent": [2, 4, {
"SwitchCase": 1
}],
"dot-notation": [2, {
"allowKeywords": true
}],
"key-spacing": [2, {
"align": "value",
"beforeColon": false,
"afterColon": true
}],
"quotes": [2, "single"],
"jsx-quotes": [2, "prefer-double"],
"array-bracket-spacing": [2, "never"],
"eol-last": 2,
"comma-style": [2, "last"],
"space-before-function-paren": [2, {
"anonymous": "always",
"named": "never"
}],
"react/jsx-key": 2,
"react/jsx-pascal-case": 2,
"react/jsx-indent": [2, 4],
"react/jsx-closing-bracket-location": 2,
"react/jsx-curly-spacing": [2, "never"],
"react/jsx-no-duplicate-props": [2, {
"ignoreCase": true
}],
"react/jsx-no-bind": [1, {
"ignoreRefs": false,
"allowArrowFunctions": false,
"allowBind": false
}],
"react/no-direct-mutation-state": 2,
"react/no-deprecated": [2, {
"react": "0.13.3"
}],
"react/prop-types": [1, {}],
"react/react-in-jsx-scope": 2,
"react/prefer-es6-class": [2, "always"],
"react/display-name": 2
}
}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
node_modules
npm-debug.log
lib
npm-debug.log*
.nyc_output
coverage
10 changes: 8 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
src/tests
test
preview
.travis.yml
.travis.yml
.eslintrc
npm-debug.log*
.nyc_output
coverage
.DS_Store
ISSUE_TEMPLATE.md
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ node_js:
- '0.12'
- '4'
- '5'
before_install:
- npm install -g npm
script:
- npm run eslint
- npm test
- npm run test-cover
after_success:
- npm run coveralls
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# 1.1.0 (2016-03-20)
# mozaik-ext-jenkins Changelog

> **Tags:**
> - [New Feature]
> - [Bug Fix]
> - [Breaking Change]
> - [Documentation]
> - [Internal]
> - [Polish]

## v1.2.0 (2016-04-05)

* **Internal**
* `mozaik`: [#16](https://github.com/plouc/mozaik-ext-jenkins/pull/16) Make extension compatible with `[email protected]`.
* `babel`: [#16](https://github.com/plouc/mozaik-ext-jenkins/pull/16) Update babel packages.
* `test-runner`: [#16](https://github.com/plouc/mozaik-ext-jenkins/pull/16) Move tests to **ava**.
* `code-coverage`: [#16](https://github.com/plouc/mozaik-ext-jenkins/pull/16) Generate code coverage through **nyc**.


## v1.1.0 (2016-03-20)

### Features

Expand Down
19 changes: 19 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2015-2016 Raphaël Benitte

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Mozaïk jenkins widgets

[![License][license-image]][license-url]
[![Travis CI][travis-image]][travis-url]
[![NPM version][npm-image]][npm-url]
[![Dependencies][gemnasium-image]][gemnasium-url]
[![Coverage Status][coverage-image]][coverage-url]
![widget count][widget-count-image]

## Jenkins Client Configuration
Expand Down Expand Up @@ -130,10 +132,15 @@ key | required | description
}
```


[license-image]: https://img.shields.io/github/license/plouc/mozaik-ext-jenkins.svg?style=flat-square
[license-url]: https://github.com/plouc/mozaik-ext-jenkins/blob/master/LICENSE.md
[travis-image]: https://img.shields.io/travis/plouc/mozaik-ext-jenkins.svg?style=flat-square
[travis-url]: https://travis-ci.org/plouc/mozaik-ext-jenkins
[npm-image]: https://img.shields.io/npm/v/mozaik-ext-jenkins.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/mozaik-ext-jenkins
[gemnasium-image]: https://img.shields.io/gemnasium/plouc/mozaik-ext-jenkins.svg?style=flat-square
[gemnasium-url]: https://gemnasium.com/plouc/mozaik-ext-jenkins
[widget-count-image]: https://img.shields.io/badge/widgets-x4-green.svg?style=flat-square
[coverage-image]: https://img.shields.io/coveralls/plouc/mozaik-ext-jenkins.svg?style=flat-square
[coverage-url]: https://coveralls.io/github/plouc/mozaik-ext-jenkins
[widget-count-image]: https://img.shields.io/badge/widgets-x4-green.svg?style=flat-square
1 change: 0 additions & 1 deletion mocha.opts

This file was deleted.

74 changes: 51 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mozaik-ext-jenkins",
"version": "1.1.0",
"version": "1.2.0",
"description": "Mozaik jenkins widgets",
"repository": {
"type": "git",
Expand All @@ -17,49 +17,77 @@
},
"keywords": [
"jenkins",
"hudson",
"ci",
"mozaik",
"widget",
"extension",
"dashboard"
],
"engines": {
"node": "0.12.x"
"node": "0.12.x",
"npm": ">=3.0.0"
},
"main": "./src/components/index.js",
"dependencies": {
"babelify": "^6.1.3",
"chalk": "^0.5.1",
"babelify": "7.2.0",
"babel-core": "6.7.2",
"babel-preset-es2015": "6.6.0",
"babel-preset-react": "6.5.0",
"bluebird": "3.3.4",
"chalk": "1.1.3",
"classnames": "2.2.3",
"convict": "^0.6.1",
"lodash": "^3.2.0",
"moment": "^2.10.3",
"moment-duration-format": "^1.3.0",
"react": "^0.13.3",
"react-mixin": "^1.7.0",
"reflux": "^0.2.11",
"superagent-bluebird-promise": "^0.6.0"
"convict": "1.2.0",
"lodash": "4.8.1",
"moment": "2.12.0",
"moment-duration-format": "1.3.0",
"react-mixin": "3.0.4",
"reflux": "0.4.0",
"superagent": "1.8.3",
"superagent-bluebird-promise": "3.0.0"
},
"devDependencies": {
"babel": "^5.8.12",
"babel-eslint": "4.1.7",
"enzyme": "1.4.0",
"eslint": "1.10.3",
"eslint-plugin-react": "3.15.0",
"expect": "1.15.2",
"mocha": "2.3.4",
"mockery": "1.4.0"
"ava": "0.13.0",
"babel-eslint": "5.0.0",
"babel-register": "6.7.2",
"coveralls": "2.11.8",
"enzyme": "2.1.0",
"eslint": "2.2.0",
"eslint-plugin-react": "4.2.2",
"mockery": "1.4.1",
"nyc": "6.1.1",
"react": "^0.13.3"
},
"peerDependencies": {
"mozaik": "1.x"
"mozaik": ">=1.1.0",
"react": "^0.13.3"
},
"scripts": {
"test": "mocha --opts mocha.opts ./src/tests/**/*.test.js",
"eslint": "eslint --ext .js --ext .jsx ./src/*"
"eslint": "eslint --ext .js --ext .jsx ./src/** ./test/**",
"test": "ava",
"test-cover": "nyc ava",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"cover-report": "nyc report --reporter=lcov && open coverage/lcov-report/index.html"
},
"browserify": {
"transform": [
"babelify"
]
},
"ava": {
"files": [
"test/**/*.test.js"
],
"tap": false,
"failFast": true,
"require": [
"babel-register"
],
"babel": "inherit"
},
"nyc": {
"extension": [
".jsx"
]
}
}
2 changes: 1 addition & 1 deletion src/components/ViewJobBuildDuration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ViewJobBuildDuration extends Component {

return (
<td className="table__cell">
{ moment.duration(build.duration, 'ms').format('m [mn] s [s]')}
{moment.duration(build.duration, 'ms').format('m [mn] s [s]')}
</td>
);
}
Expand Down
Loading

0 comments on commit 35e89be

Please sign in to comment.