Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions omega-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.1",
"private": true,
"devDependencies": {
"grunt": "~0.4.1",
"grunt-hub": "^0.7.0"
"grunt": "^1.0.3",
"grunt-hub": "^1.0.0"
},
"scripts": {
"deps": "npm install && (cd ../omega-pac && npm install) && (cd ../omega-target && npm install) && (cd ../omega-web && npm install && bower install) && (cd ../omega-target-chromium-extension/ && npm install)",
Expand Down
2 changes: 1 addition & 1 deletion omega-pac/grunt/mochaTest.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module.exports =
test:
options:
reporter: 'spec'
require: 'coffee-script/register'
require: 'coffeescript/register'
src: ['test/**/*.coffee']
29 changes: 15 additions & 14 deletions omega-pac/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@
"private": true,
"main": "./index.js",
"devDependencies": {
"chai": "~1.9.1",
"coffee-script": "^1.7.1",
"coffeeify": "^0.7.0",
"chai": "^4.2.0",
"coffeeify": "^3.0.1",
"coffeelint": "^1.16.0",
"grunt": "^0.4.5",
"grunt-browserify": "^3.0.0",
"grunt-coffeelint": "^0.0.13",
"grunt-contrib-coffee": "^0.11.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-mocha-test": "~0.11.0",
"load-grunt-config": "^0.13.1",
"lolex": "^1.4.0",
"minifyify": "^4.1.1"
"coffeescript": "^1.7.1",
"grunt": "^1.0.3",
"grunt-browserify": "^5.3.0",
"grunt-coffeelint": "0.0.16",
"grunt-contrib-coffee": "^2.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-mocha-test": "^0.13.3",
"load-grunt-config": "^1.0.1",
"lolex": "^3.0.0",
"minifyify": "^7.3.5"
},
"dependencies": {
"ip-address": "^4.0.0",
"tldjs": "^1.5.2",
"ip-address": "^5.8.9",
"mocha": "^5.2.0",
"tldjs": "^2.3.1",
"uglify-js": "^2.4.15"
},
"browser": {
Expand Down
10 changes: 5 additions & 5 deletions omega-pac/src/conditions.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ module.exports = exports =
parseIp: (ip) ->
if ip.charCodeAt(0) == '['.charCodeAt(0)
ip = ip.substr 1, ip.length - 2
addr = new IP.v4.Address(ip)
addr = new IP.Address4(ip)
if not addr.isValid()
addr = new IP.v6.Address(ip)
addr = new IP.Address6(ip)
if not addr.isValid()
return null
return addr
normalizeIp: (addr) ->
return (addr.correctForm ? addr.canonicalForm).call(addr)
ipv6Max: new IP.v6.Address('::/0').endAddress().canonicalForm()
ipv6Max: new IP.Address6('::/0').endAddress().canonicalForm()

localHosts: ["127.0.0.1", "[::1]", "localhost"]

Expand Down Expand Up @@ -479,9 +479,9 @@ module.exports = exports =
throw new Error "Invalid IP address #{addr}"
cache.normalized = @normalizeIp cache.addr
mask = if cache.addr.v4
new IP.v4.Address('255.255.255.255/' + cache.addr.subnetMask)
new IP.Address4('255.255.255.255/' + cache.addr.subnetMask)
else
new IP.v6.Address(@ipv6Max + '/' + cache.addr.subnetMask)
new IP.Address6(@ipv6Max + '/' + cache.addr.subnetMask)
cache.mask = @normalizeIp mask.startAddress()
cache
match: (condition, request, cache) ->
Expand Down
4 changes: 2 additions & 2 deletions omega-pac/test/conditions.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ describe 'Conditions', ->
describe 'WeekdayCondition', ->
clock = null
before ->
clock = lolex.install 0, ['Date']
clock = lolex.install now: 0, toFake: ['Date']
after ->
clock.uninstall()

Expand Down Expand Up @@ -458,7 +458,7 @@ describe 'Conditions', ->
describe 'TimeCondition', ->
clock = null
before ->
clock = lolex.install 0, ['Date']
clock = lolex.install now: 0, toFake: ['Date']
after ->
clock.uninstall()

Expand Down
2 changes: 1 addition & 1 deletion omega-target-chromium-extension/grunt/mochaTest.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module.exports =
test:
options:
reporter: 'spec'
require: 'coffee-script/register'
require: 'coffeescript/register'
src: ['test/**/*.coffee']
23 changes: 12 additions & 11 deletions omega-target-chromium-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
"main": "./index",
"devDependencies": {
"chai": "~1.9.1",
"coffee-script": "^1.7.1",
"coffeeify": "^0.7.0",
"coffeelint": "^1.16.0",
"grunt": "^0.4.5",
"grunt-browserify": "^3.0.0",
"grunt-coffeelint": "^0.0.13",
"grunt-contrib-coffee": "^0.11.1",
"grunt-contrib-compress": "^0.12.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-mocha-test": "~0.11.0",
"load-grunt-config": "^0.13.1",
"minifyify": "^4.1.1",
"coffeescript": "^1.7.1",
"grunt": "^1.0.3",
"grunt-browserify": "^5.3.0",
"grunt-coffeelint": "0.0.16",
"grunt-contrib-coffee": "^2.0.0",
"grunt-contrib-compress": "^1.4.3",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-mocha-test": "^0.13.3",
"load-grunt-config": "^1.0.1",
"minifyify": "^7.3.5",
"mocha": "^5.2.0",
"po2json": "^0.3.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion omega-target/grunt/mochaTest.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module.exports =
test:
options:
reporter: 'spec'
require: 'coffee-script/register'
require: 'coffeescript/register'
src: ['test/**/*.coffee']
23 changes: 12 additions & 11 deletions omega-target/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@
"main": "./index.js",
"devDependencies": {
"chai": "^1.10.0",
"coffee-script": "^1.8.0",
"coffeeify": "^0.7.0",
"coffeelint": "^1.16.0",
"grunt": "^0.4.5",
"grunt-browserify": "^3.0.0",
"grunt-coffeelint": "^0.0.13",
"grunt-contrib-coffee": "^0.11.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-mocha-test": "~0.11.0",
"load-grunt-config": "^0.13.1",
"minifyify": "^4.1.1",
"coffeeify": "^1.2.0",
"coffeelint": "^2.1.0",
"coffeescript": "^1.12.7",
"grunt": "^1.0.3",
"grunt-browserify": "^5.3.0",
"grunt-coffeelint": "^0.0.16",
"grunt-contrib-coffee": "^2.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-mocha-test": "^0.13.3",
"load-grunt-config": "^1.0.1",
"minifyify": "^7.3.5",
"mocha": "^5.2.0",
"sinon": "^1.12.2",
"sinon-chai": "^2.6.0"
},
Expand Down
4 changes: 2 additions & 2 deletions omega-target/test/options_sync.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ describe 'OptionsSync', ->
sync = new OptionsSync(remote)
sync.copyTo(storage)

it 'should merge with local as base', (done) ->
it 'should merge with local as base', ->
check = ->
return if storage.set.callCount == 0 or storage.remove.callCount == 0
storage.set.should.have.been.calledOnce.and.calledWith({b: 2, c: 3})
storage.remove.should.have.been.calledOnce.and.calledWith(['d'])
done()
#done() # TODO: REVIEW or FIX ME in mocha 3.0+

remote = new Storage()
remote.set({a: 1, b: 2, c: 3, d: undefined})
Expand Down
19 changes: 9 additions & 10 deletions omega-web/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@
"angular-loader": "~1.7.2",
"angular-i18n": "~1.7.2",
"angular-sanitize": "~1.7.2",

"angular-bootstrap": "~0.12.0",
"angular-ui-router": "~0.2.18",
"bootstrap": "~3.3.2",
"angular-bootstrap": "~2.5.0",
"angular-ui-router": "~1.0.20",
"bootstrap": "~3.4.0",
"script.js": "~2.5.3",
"ngprogress": "~1.0.4",
"angular-ui-sortable": "~0.13.3",
"jsondiffpatch": "~0.1.7",
"ngprogress": "~1.1.3",
"angular-ui-sortable": "~0.19.0",
"jsondiffpatch": "~0.3.11",
"angular-spectrum-colorpicker": "~1.3.5",
"blob": "*",
"FileSaver": "=1.3.3",
"FileSaver": "~2.0.0",
"angular-ui-utils": "bower-validate",
"angular-ladda": "~0.2.1",
"shepherd.js": "~0.5.1",
"angular-ladda": "~0.4.3",
"shepherd.js": "~2.3.2",
"jqueryui-touch-punch": "*"
},
"exportsOverride": {
Expand Down
2 changes: 1 addition & 1 deletion omega-web/grunt/mochaTest.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module.exports =
test:
options:
reporter: 'spec'
require: 'coffee-script/register'
require: 'coffeescript/register'
src: ['test/**/*.coffee']
27 changes: 14 additions & 13 deletions omega-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
"private": true,
"devDependencies": {
"chai": "~1.9.1",
"coffeelint": "^1.16.0",
"grunt": "^0.4.5",
"grunt-autoprefixer": "^1.0.1",
"coffeelint": "^2.1.0",
"grunt": "^1.0.3",
"grunt-autoprefixer": "^3.0.4",
"grunt-bower-task": "^0.5.0",
"grunt-coffeelint": "^0.0.13",
"grunt-contrib-coffee": "^0.11.1",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-jade": "^0.12.0",
"grunt-contrib-less": "^0.11.4",
"grunt-contrib-watch": "^0.6.1",
"grunt-mocha-test": "~0.11.0",
"grunt-ng-annotate": "^0.3.2",
"load-grunt-config": "^0.13.1",
"grunt-coffeelint": "0.0.16",
"grunt-contrib-coffee": "^2.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jade": "^1.0.0",
"grunt-contrib-less": "^2.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-mocha-test": "^0.13.3",
"grunt-ng-annotate": "^3.0.0",
"load-grunt-config": "^1.0.1",
"mocha": "^5.2.0",
"omega-pac": "../omega-pac"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions omega-web/src/less/popup.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ li > a {
&.profile-with-default-edit {
padding-right: 32px;
position: relative;
.dropdown-toggle {
.uib-dropdown-toggle {
margin: -5px 0;
color: inherit;
padding: 5px 8px 3px;
Expand All @@ -67,7 +67,7 @@ li > a {
}
}

> li.active .dropdown-toggle {
> li.active .uib-dropdown-toggle {
border-color: transparent !important;
border-left: solid 1px !important;
background: none !important;
Expand Down
4 changes: 2 additions & 2 deletions omega-web/src/omega/controllers/about.coffee
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
angular.module('omega').controller 'AboutCtrl', ($scope, $rootScope,
$modal, omegaDebug) ->
$uibModal, omegaDebug) ->

$scope.downloadLog = omegaDebug.downloadLog
$scope.reportIssue = omegaDebug.reportIssue

$scope.showResetOptionsModal = ->
$modal.open(templateUrl: 'partials/reset_options_confirm.html').result
$uibModal.open(templateUrl: 'partials/reset_options_confirm.html').result
.then -> omegaDebug.resetOptions()

try
Expand Down
4 changes: 2 additions & 2 deletions omega-web/src/omega/controllers/fixed_profile.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('omega').controller 'FixedProfileCtrl', ($scope, $modal,
angular.module('omega').controller 'FixedProfileCtrl', ($scope, $uibModal,
trFilter) ->
$scope.urlSchemes = ['', 'http', 'https', 'ftp']
$scope.urlSchemeDefault = 'fallbackProxy'
Expand Down Expand Up @@ -55,7 +55,7 @@ angular.module('omega').controller 'FixedProfileCtrl', ($scope, $modal,
scope.auth = auth && angular.copy(auth)
scope.authSupported = $scope.authSupported[proxy.scheme]
scope.protocolDisp = proxy.scheme
$modal.open(
$uibModal.open(
templateUrl: 'partials/fixed_auth_edit.html'
scope: scope
size: if scope.authSupported then 'sm' else 'lg'
Expand Down
14 changes: 7 additions & 7 deletions omega-web/src/omega/controllers/master.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
angular.module('omega').controller 'MasterCtrl', ($scope, $rootScope, $window,
$q, $modal, $state, profileColors, profileIcons, omegaTarget,
$q, $uibModal, $state, profileColors, profileIcons, omegaTarget,
$timeout, $location, $filter, getAttachedName, isProfileNameReserved,
isProfileNameHidden, dispNameFilter, downloadFile) ->

Expand Down Expand Up @@ -118,7 +118,7 @@ angular.module('omega').controller 'MasterCtrl', ($scope, $rootScope, $window,
$rootScope.applyOptionsConfirm = ->
return $q.reject 'form_invalid' unless checkFormValid()
return $q.when(true) unless $rootScope.optionsDirty
$modal.open(templateUrl: 'partials/apply_options_confirm.html').result
$uibModal.open(templateUrl: 'partials/apply_options_confirm.html').result
.then -> $rootScope.applyOptions()

$rootScope.newProfile = ->
Expand All @@ -134,7 +134,7 @@ angular.module('omega').controller 'MasterCtrl', ($scope, $rootScope, $window,
scope.dispNameFilter = dispNameFilter
scope.options = $scope.options
scope.pacProfilesUnsupported = $scope.pacProfilesUnsupported
$modal.open(
$uibModal.open(
templateUrl: 'partials/new_profile.html'
scope: scope
).result.then (profile) ->
Expand All @@ -161,7 +161,7 @@ angular.module('omega').controller 'MasterCtrl', ($scope, $rootScope, $window,
disp-name="dispNameFilter" style="display: inline-block;">
</div>
"""
$modal.open(
$uibModal.open(
templateUrl: 'partials/replace_profile.html'
scope: scope
).result.then ({fromName, toName}) ->
Expand Down Expand Up @@ -191,7 +191,7 @@ angular.module('omega').controller 'MasterCtrl', ($scope, $rootScope, $window,
reserved: '!$value || !isProfileNameReserved($value)'
scope.dispNameFilter = $scope.dispNameFilter
scope.options = $scope.options
$modal.open(
$uibModal.open(
templateUrl: 'partials/rename_profile.html'
scope: scope
).result.then (toName) ->
Expand Down Expand Up @@ -309,7 +309,7 @@ angular.module('omega').controller 'MasterCtrl', ($scope, $rootScope, $window,
'error': 'glyphicon-remove',
'danger': 'glyphicon-danger',

$scope.alertClassForType = (type) ->
$scope.alertClassForType = (type) -> # TODO: Fix or remove it.
return '' if not type
if type == 'error'
type = 'danger'
Expand Down Expand Up @@ -337,7 +337,7 @@ angular.module('omega').controller 'MasterCtrl', ($scope, $rootScope, $window,

scope = $rootScope.$new('isolate')
scope.upgrade = (firstRun == 'upgrade')
$modal.open(
$uibModal.open(
templateUrl: 'partials/options_welcome.html'
keyboard: false
scope: scope
Expand Down
4 changes: 2 additions & 2 deletions omega-web/src/omega/controllers/pac_profile.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('omega').controller 'PacProfileCtrl', ($scope, $modal) ->
angular.module('omega').controller 'PacProfileCtrl', ($scope, $uibModal) ->
# coffeelint: disable=max_line_length

# https://github.com/angular/angular.js/blob/master/src/ng/directive/input.js#L13
Expand Down Expand Up @@ -36,7 +36,7 @@ angular.module('omega').controller 'PacProfileCtrl', ($scope, $modal) ->
auth = $scope.profile.auth?[prop]
scope = $scope.$new('isolate')
scope.auth = auth && angular.copy(auth)
$modal.open(
$uibModal.open(
templateUrl: 'partials/fixed_auth_edit.html'
scope: scope
size: 'sm'
Expand Down
Loading