Upgrade electron to v1.1.1 (#427)

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
Juan Cruz Viotti 2016-05-24 10:37:31 -04:00
parent d9f6c1b838
commit c1074de198
7 changed files with 19 additions and 10 deletions

View File

@ -10,7 +10,7 @@ Thanks for your interest in contributing to this project! This document aims to
## Running locally
- Install [NodeJS v5.10.0](https://nodejs.org/en/).
- Install [NodeJS](https://nodejs.org/en/).
Sadly we need to enforce the same NodeJS version that the Electron version we use is running to avoid module version mismatches when building native dependencies (`electron-rebuild` doesn't seem to be enough).

View File

@ -17,7 +17,6 @@
'use strict';
const electron = require('electron');
const globalShortcut = require('global-shortcut');
const path = require('path');
const elevate = require('../src/elevate');
const packageJSON = require('../../package.json');
@ -64,7 +63,7 @@ electron.app.on('ready', function() {
mainWindow = null;
});
globalShortcut.register('CmdOrCtrl+Alt+I', function() {
electron.globalShortcut.register('CmdOrCtrl+Alt+I', function() {
mainWindow.webContents.openDevTools();
});

View File

@ -16,7 +16,7 @@
'use strict';
const shell = require('shell');
const electron = require('electron');
const os = require('os');
const nodeOpen = require('open');
@ -64,7 +64,7 @@ module.exports = function() {
return nodeOpen(attributes.osOpenExternal);
}
shell.openExternal(attributes.osOpenExternal);
electron.shell.openExternal(attributes.osOpenExternal);
});
}
};

View File

@ -31,6 +31,12 @@ module.exports = function() {
* @example
* {{ '/foo/bar/baz' | basename }}
*/
return path.basename;
return function(input) {
if (!input) {
return;
}
return path.basename(input);
}
};

View File

@ -6,7 +6,7 @@
"description": "An image flasher with support for Windows, OS X and GNU/Linux.",
"homepage": "https://github.com/resin-io/etcher",
"engines" : {
"node" : "5.10.0"
"node" : "6.1.0"
},
"repository": {
"type": "git",
@ -82,7 +82,7 @@
"electron-mocha": "^1.2.2",
"electron-osx-sign": "^0.3.0",
"electron-packager": "^7.0.1",
"electron-prebuilt": "0.37.6",
"electron-prebuilt": "1.1.1",
"gulp": "^3.9.0",
"gulp-jscs": "^3.0.2",
"gulp-jshint": "^2.0.0",

View File

@ -19,7 +19,7 @@
const m = require('mochainon');
const os = require('os');
const angular = require('angular');
const shell = require('shell');
const electron = require('electron');
require('angular-mocks');
describe('Browser: OSOpenExternal', function() {
@ -56,7 +56,7 @@ describe('Browser: OSOpenExternal', function() {
});
it('should call Electron shell.openExternal with the attribute value', function() {
const shellExternalStub = m.sinon.stub(shell, 'openExternal');
const shellExternalStub = m.sinon.stub(electron.shell, 'openExternal');
const element = $compile('<span os-open-external="https://resin.io">Resin.io</span>')($rootScope);
element.triggerHandler('click');
$rootScope.$digest();

View File

@ -19,6 +19,10 @@ describe('Browser: Path', function() {
basenameFilter = _basenameFilter_;
}));
it('should return undefined if no input', function() {
m.chai.expect(basenameFilter()).to.be.undefined;
});
it('should return the basename', function() {
const isWindows = os.platform() === 'win32';
let basename;