Skip to content

Commit

Permalink
Merge branch 'release/0.1.7'
Browse files Browse the repository at this point in the history
Conflicts:
	src/package.json
  • Loading branch information
Marco committed Dec 4, 2015
2 parents 90de3ef + 3c89d96 commit edf048a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 13 deletions.
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
notifications:
email: false
language: node_js
node_js:
- '4.1'
sudo: false
install:
- npm install
- npm install -g gulp bower
script:
- gulp
addons:
apt:
packages:
- wine
deploy:
provider: releases
api_key:
secure: FoiDMNJi5TpJEN1lcxaQ4o8P+p3KRv5W41A1Z7mvxmREsgEgZNzHGsEKssBJdchZOexFtQmQW5/KQBr2StgcYYThfyDs5et0G1xVUitRp5/WtJ40LZmvsA895aYOI5ZpyIeGKG1Xaa059kC5bAqgZNyhOaVRT+ulsNroYcgEM6qNU54D7K6bAy5WQKqIqVU6V8FdQxTp+6XHrvJBayY2vBROzSUch02dsI5+2PpWG+RHH6lT/WnDlmtaQwBO1UTNHn+WfJELbXcovY8SkmBuIjNnqkmAWhgcrOMJ1NGELV4L10kNyisx14M+kEsagIg7Le4qDp0nYuz1yKu8qjTfUdF4SCSvSDaCTTcC9IDRgCxpX9FrIgesDbzENQKggzXs/KHUgp1RBvuFQAOTrBX8/ThZ12pLnxDaVnfRgi1xjJzwKOHthu8ZorrcK9KVRZBdSsHqqrLJ6TUa+bjDUJQZn1NHkxFigpv718ki8ynL31qOxeeCjU6anJx+tGxVUWdfHR1SVvGrtaQ3ekXVV1IOVqAkLc8MdueLvZvDOwxniN/rW/HZQdbKEE+VZLT0vA8AJWs00tuJb/S0EJtFJ5lclNCsKToJmUKE3PW6I6EDH8ym4wzOorVBr4yW8Q3BUb5OJQipXs+V5ZfDdmf74INYpEKp9Lu1qA3T/YwmpJfnRFQ=
file:
- "release/v0.35.2/aof-replay-client-0.1.7-darwin-x64.zip"
- "release/v0.35.2/aof-replay-client-0.1.7-win32-ia32.zip"
- "release/v0.35.2/aof-replay-client-0.1.7-win32-x64.zip"
on:
tags: true
repo: AnalyzeOrFeed/aof-replay-client
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"scripts": {
"postinstall": "npm install --prefix src",
"start": "./node_modules/.bin/electron ./src",
"test": "",
"build": "./node_modules/.bin/gulp"
},
"author": "Analyze Or Feed",
"license": "MIT",
"devDependencies": {
"electron-prebuilt": "^0.34.3",
"electron-prebuilt": "^0.35.2",
"gulp": "^3.9.0",
"gulp-electron": "0.0.9",
"gulp-util": "^3.0.7"
Expand Down
14 changes: 8 additions & 6 deletions src/app/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var app = angular.module('app.controllers', ['ngSanitize']);

app.controller('MainController', ['$scope', '$rootScope', '$mdDialog',
function($scope, $rootScope, $mdDialog) {
var ipc = require('ipc');
var ipc = require("electron").ipcRenderer;

var matchClientVersionToReplayVersion = function() {
if ($scope.lolClientVersion && $scope.replay && $scope.replay.riotVersion) {
Expand Down Expand Up @@ -106,23 +106,25 @@ app.controller('MainController', ['$scope', '$rootScope', '$mdDialog',
ipc.send("play");
};

ipc.on("loading", function(obj) {
ipc.on("loading", function(event, obj) {
$scope.$apply(function() {
$scope.loading = obj.loading;
$scope.msg = obj.msg;
});
});

ipc.on("aofUpdate", function(obj) {
ipc.on("aofUpdate", function(event, obj) {
$scope.$apply(function() {
$scope.aofClientInfo = obj;
});
});

ipc.on("clientInfo", function(obj) {
ipc.on("clientInfo", function(event, obj) {
console.log(obj);
$scope.$apply(function() {
$scope.lolClientFound = obj.found;
$scope.lolClientVersion = obj.version;
console.log($scope.lolClientVersion);
var regex = $scope.lolClientVersion.match(/(?:.*?\s)(\d+)\.(\d+)\./);
if (regex && regex.length == 3) {
$scope.lolClientVersionShort = regex[1] + "." + regex[2];
Expand All @@ -131,14 +133,14 @@ app.controller('MainController', ['$scope', '$rootScope', '$mdDialog',
});
});

ipc.on("parsedReplayFile", function(obj) {
ipc.on("parsedReplayFile", function(event, obj) {
$scope.$apply(function() {
$scope.replay = obj;
matchClientVersionToReplayVersion();
});
});

ipc.on("error", function(obj) {
ipc.on("error", function(event, obj) {
$scope.showDialog(obj.title, obj.content);
});

Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use strict";

let app = require("app");
let app = require("electron").app;
let request = require("request");
let ipc = require("ipc");
let dialog = require("dialog");
let BrowserWindow = require("browser-window");
let ipc = require("electron").ipcMain;
let dialog = require("electron").dialog;
let BrowserWindow = require("electron").BrowserWindow;
let _ = require("underscore");
let fs = require("fs");
let winston = require("winston");
Expand Down Expand Up @@ -335,7 +335,7 @@ app.on("ready", function() {
//mainWindow.openDevTools();

// Load the index.html of the app.
mainWindow.loadUrl("file://" + __dirname + "/index.html");
mainWindow.loadURL("file://" + __dirname + "/index.html");

// When window is closed
mainWindow.on("closed", function() {
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aof-replay-client",
"version": "0.1.6",
"version": "0.1.7",
"main": "./index.js",
"scripts": {
"start": "cd .. && npm start",
Expand Down

0 comments on commit edf048a

Please sign in to comment.