Merge branch 'master' into jeffdm-windows

Conflicts:
	README.md
This commit is contained in:
Jeffrey Morgan 2015-04-07 21:01:53 -04:00
Родитель 97272b971f 9776f44d2c
Коммит 159ea8013f
13 изменённых файлов: 72 добавлений и 29 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -3,6 +3,7 @@
build
dist
node_modules
coverage
npm-debug.log
# Signing Identity
@ -19,4 +20,4 @@ cache
settings.json
# IDEs
.idea
.idea

Просмотреть файл

@ -27,5 +27,5 @@
"jest": true,
"pit": true
},
"predef": [ "-Promise" ]
"predef": [ "Promise" ]
}

13
.travis.yml Normal file
Просмотреть файл

@ -0,0 +1,13 @@
language: node_js
node_js:
- "0.10"
sudo: false
cache:
directories:
- resources
- node_modules
after_success:
- which ./node_modules/coveralls/bin/coveralls.js && cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

Просмотреть файл

@ -1,4 +1,5 @@
[![CircleCI](https://img.shields.io/circleci/project/kitematic/kitematic.svg)](https://circleci.com/gh/kitematic/kitematic/tree/master)
[![Build Status](https://travis-ci.org/kitematic/kitematic.svg?branch=master)](https://travis-ci.org/kitematic/kitematic)
[![Coverage Status](https://coveralls.io/repos/kitematic/kitematic/badge.svg?branch=master)](https://coveralls.io/r/kitematic/kitematic?branch=master)
[![bitHound Score](https://app.bithound.io/kitematic/kitematic/badges/score.svg)](http://app.bithound.io/kitematic/kitematic)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kitematic/kitematic?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Просмотреть файл

@ -5,3 +5,6 @@ dependencies:
cache_directories:
- "resources"
- "node_modules"
notify:
webhooks:
- url: https://coveralls.io/webhook

Просмотреть файл

@ -12,7 +12,7 @@
"bugs": "https://github.com/kitematic/kitematic/issues",
"scripts": {
"start": "gulp",
"test": "jest",
"test": "jest --coverage",
"release": "gulp release",
"release:beta": "gulp release --beta",
"lint": "jsxhint src && jsxhint browser",
@ -27,16 +27,21 @@
"jest": {
"scriptPreprocessor": "<rootDir>/util/preprocessor.js",
"setupEnvScriptFile": "<rootDir>/util/testenv.js",
"collectCoverage": true,
"testDirectoryName": "src",
"testPathIgnorePatterns": [
"/node_modules/",
"^((?!-test).)*$"
],
"unmockedModulePathPatterns": [
"stream",
"tty",
"net",
"crypto",
"stream",
"<rootDir>/node_modules/.*JSONStream",
"<rootDir>/node_modules/object-assign",
"<rootDir>/node_modules/underscore",
"<rootDir>/node_modules/react",
"<rootDir>/node_modules/bluebird",
"<rootDir>/node_modules/babel"
"<rootDir>/node_modules/bluebird"
]
},
"docker-version": "1.5.0",
@ -53,7 +58,8 @@
"async": "^0.9.0",
"bluebird": "^2.9.12",
"bugsnag-js": "^2.4.7",
"dockerode": "^2.0.7",
"coveralls": "^2.11.2",
"dockerode": "^2.1.1",
"exec": "0.2.0",
"fs-extra": "^0.17.0",
"fs-promise": "^0.3.1",
@ -81,6 +87,7 @@
"gulp-cssmin": "^0.1.6",
"gulp-download-atom-shell": "0.0.4",
"gulp-if": "^1.2.5",
"gulp-insert": "^0.4.0",
"gulp-less": "^3.0.1",
"gulp-livereload": "^3.8.0",
"gulp-plumber": "^0.6.6",
@ -89,7 +96,7 @@
"gulp-shell": "^0.3.0",
"gulp-sourcemaps": "^1.5.0",
"gulp-util": "^3.0.4",
"jest-cli": "^0.4.0",
"jest-cli": "kitematic/jest",
"jsxhint": "^0.12.1",
"react-tools": "^0.12.2",
"run-sequence": "^1.0.2"

Просмотреть файл

@ -74,7 +74,9 @@ var ContainerHome = React.createClass({
if (this.props.error) {
body = (
<div className="details-progress">
<h3>There was a problem connecting to the Docker Engine in the VirtualBox VM.<br/>This could be caused because this Mac is currently connected to a VPN, blocking access to the VM. If the issue persists, please <a onClick={this.handleErrorClick}>file a ticket on our GitHub repo.</a></h3>
<h3>An error occurred:</h3>
<h2>{this.props.error.statusCode} {this.props.error.reason} - {this.props.error.json}</h2>
<h3>If you feel that this error is invalid, please <a onClick={this.handleErrorClick}>file a ticket on our GitHub repo.</a></h3>
<Radial progress={100} error={true} thick={true} transparent={true}/>
</div>
);

Просмотреть файл

@ -38,9 +38,6 @@ var ContainerHomePreview = React.createClass({
});
}
},
componentDidUpdate: function () {
this.reload();
},
componentWillUnmount: function() {
clearInterval(this.timer);
},

Просмотреть файл

@ -9,8 +9,14 @@ var ContainerList = React.createClass({
render: function () {
var self = this;
var containers = this.props.containers.map(function (container) {
var containerId = container.Id;
if (!containerId && container.State.Downloading) {
// Fall back to the container image name when there is no id. (when the
// image is downloading).
containerId = container.Image;
}
return (
<ContainerListItem key={container.Id} container={container} start={self._start}/>
<ContainerListItem key={containerId} container={container} start={self._start} />
);
});
var newItem;

Просмотреть файл

@ -56,6 +56,12 @@ var ContainerStore = assign(Object.create(EventEmitter.prototype), {
var data = JSON.parse(str);
console.log(data);
if (data.error) {
_error = data.error;
callback(data.error);
return;
}
if (data.status && (data.status === 'Pulling dependent layers' || data.status.indexOf('already being pulled by another client') !== -1)) {
blockedCallback();
return;
@ -82,7 +88,8 @@ var ContainerStore = assign(Object.create(EventEmitter.prototype), {
progressCallback(totalProgress);
});
stream.on('end', function () {
callback();
callback(_error);
_error = null;
});
});
});

Просмотреть файл

@ -31,11 +31,11 @@ var ImageCard = React.createClass({
handleTagOverlayClick: function (name) {
var $tagOverlay = $(this.getDOMNode()).find('.tag-overlay');
$tagOverlay.fadeIn(300);
$.get('https://registry.hub.docker.com/v1/repositories/' + name + '/tags', function (result) {
$.get('https://registry.hub.docker.com/v1/repositories/' + name + '/tags', result => {
this.setState({
tags: result
});
}.bind(this));
});
},
handleCloseTagOverlay: function () {
var $tagOverlay = $(this.getDOMNode()).find('.tag-overlay');
@ -50,6 +50,14 @@ var ImageCard = React.createClass({
}
util.exec(['open', $repoUri + this.props.image.name]);
},
componentDidMount: function() {
$.get('https://registry.hub.docker.com/v1/repositories/' + this.props.image.name + '/tags', result => {
this.setState({
tags: result,
chosenTag: result[0].name
});
});
},
render: function () {
var self = this;
var name;

Просмотреть файл

@ -1,10 +1,9 @@
jest.dontMock('../src/SetupStore');
var setupStore = require('../src/SetupStore');
var virtualBox = require('../src/VirtualBox');
var util = require('../src/Util');
var machine = require('../src/DockerMachine');
var setupUtil = require('../src/SetupUtil');
var Promise = require('bluebird');
jest.dontMock('./SetupStore');
var setupStore = require('./SetupStore');
var virtualBox = require('./VirtualBox');
var util = require('./Util');
var machine = require('./DockerMachine');
var setupUtil = require('./SetupUtil');
describe('SetupStore', function () {
describe('download step', function () {

Просмотреть файл

@ -1,7 +1,6 @@
jest.dontMock('../src/VirtualBox');
var virtualBox = require('../src/VirtualBox');
var util = require('../src/Util');
var Promise = require('bluebird');
jest.dontMock('./VirtualBox');
var virtualBox = require('./VirtualBox');
var util = require('./Util');
describe('VirtualBox', function () {
it('returns the right command', function () {