Skip to content

Commit 43c5b35

Browse files
Merge pull request #125 from nodezoo/coveralls
Coveralls integration
2 parents 82481b4 + a471356 commit 43c5b35

File tree

7 files changed

+62
-8
lines changed

7 files changed

+62
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Coveralls integration
12
* Set Up Mocha and Instabul
23

34
## 11 April 2016 - 6.1.0

client/assets/css/components/logos.styl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,20 @@
2020
width: 213px
2121
background-image: url("../img/logo-nodezoo.svg")
2222

23-
// Github, Travis and Npm shared logo styles
23+
// Github, Travis, Npm and Coveralls shared logo styles
2424

2525
.logo-github,
2626
.logo-npm,
27-
.logo-travis
27+
.logo-travis,
28+
.logo-coveralls
2829
height: 24px
2930
width: 24px
3031
margin 0 4px
3132

3233
.logo-github-large,
3334
.logo-npm-large,
34-
.logo-travis-large
35+
.logo-travis-large,
36+
.logo-coveralls-large
3537
height: 30px
3638
width: 30px
3739

@@ -46,3 +48,7 @@
4648
// Travis logo
4749
.logo-travis
4850
background-image: url("../img/logo-travis.svg")
51+
52+
// Coveralls logo
53+
.logo-coveralls
54+
background-image: url("../img/logo-coveralls.svg")
Lines changed: 13 additions & 0 deletions
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'use strict'
2+
3+
import React from 'react'
4+
5+
export const CoverallsInfo = React.createClass({
6+
propTypes: {
7+
coveralls: React.PropTypes.object.isRequired
8+
},
9+
10+
render () {
11+
return (
12+
<div className="panel-module">
13+
<h2 className="mt0"><span className="logo logo-coveralls"></span> Coveralls</h2>
14+
<ul className="list-unstyled cf module-info-list">
15+
<li><strong className="module-info-heading">Name:</strong> {this.props.coveralls.name}</li>
16+
<li><strong className="module-info-heading">URL:</strong> <a href={this.props.coveralls.url}>{this.props.coveralls.url}</a></li>
17+
<li><strong className="module-info-heading">Coverage change:</strong> {this.props.coveralls.coverageChange}</li>
18+
<li><strong className="module-info-heading">Covered percent:</strong> {this.props.coveralls.coveredPercent}</li>
19+
<li><strong className="module-info-heading">Badge:</strong> <img src={this.props.coveralls.badgeUrl} alt="Coveralls"/></li>
20+
</ul>
21+
</div>
22+
)
23+
}
24+
})
25+
26+
export default CoverallsInfo

client/containers/info.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {GitInfo} from '../components/git-info'
77
import {GitReadme} from '../components/git-readme'
88
import {NpmInfo} from '../components/npm-info'
99
import {TravisInfo} from '../components/travis-info'
10+
import {CoverallsInfo} from '../components/coveralls-info'
1011

1112
export const Info = React.createClass({
1213
propTypes: {
@@ -31,7 +32,7 @@ export const Info = React.createClass({
3132
let body = null
3233

3334
if (this.props.result) {
34-
const {no_github, github, no_npm, npm, no_travis, travis} = this.props.result
35+
const {no_github, github, no_npm, npm, no_travis, travis, no_coveralls, coveralls} = this.props.result
3536

3637
body = (
3738
<div className="panel panel-module-info txt-left">
@@ -53,6 +54,12 @@ export const Info = React.createClass({
5354
}
5455
})()}
5556

57+
{(() => {
58+
if (!no_coveralls) {
59+
return <CoverallsInfo coveralls={coveralls} />
60+
}
61+
})()}
62+
5663
{(() => {
5764
if (!no_github && github.readme) {
5865
return <GitReadme github={github} />
@@ -61,7 +68,7 @@ export const Info = React.createClass({
6168
</div>
6269
)
6370

64-
if (no_github || no_npm || no_travis) {
71+
if (no_github || no_npm || no_travis || no_coveralls) {
6572
setTimeout(() => {
6673
this.props.dispatch(getInfo(moduleName))
6774
}, 3000)

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "nodezoo-web",
3-
"version": "6.1.3",
3+
"version": "6.2.0",
44
"description": "Frontend for NodeZoo",
55
"author": "Richard Rodger",
66
"contributors": [
77
"Richard Rodger (https://github.com/rjrodger)",
88
"Dean McDonnell (https://github.com/mcdonnelldean)",
99
"Karolina Szczur (https://github.com/thefoxis)",
1010
"Georgette Pincin (https://github.com/Georgette)",
11-
"Vladimir Islamov (https://github.com/vislamov)"
11+
"Vladimir Islamov (https://github.com/vislamov)",
12+
"Mihai Dima (https://github.com/mihaidma)"
1213
],
1314
"main": "./server/start.js",
1415
"license": "MIT",

server/routes/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = [
3232
data.no_npm = !data.npm
3333
data.no_github = !data.github
3434
data.no_travis = !data.travis
35-
35+
data.no_coveralls = !data.coveralls
3636

3737
return reply(data)
3838
})

0 commit comments

Comments
 (0)