Skip to content

Commit

Permalink
Merge pull request angular-ui#1511 from nmccready/dev/nmccready/under…
Browse files Browse the repository at this point in the history
…scoreSpecs

feat(underscore):support specs against underscore
  • Loading branch information
nmccready committed Sep 16, 2015
2 parents 92849de + cd028f1 commit 96039bf
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
node_js:
- "0.12"
before_script: PATH="$(npm bin):$PATH" npm install
script: grunt
script: npm test
branches:
only:
- master
Expand Down
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
],
"devDependencies": {
"angular-mocks": "1.2 - 1.4",
"uuid": "http://github.com/LiosK/UUID.js/archive/v3.2.tar.gz",
"angular-route": "1.2 - 1.4",
"bootstrap-without-jquery": "git://github.com/tagawa/bootstrap-without-jquery.git",
"data-structures": "~1.4.2",
"OverlappingMarkerSpiderfier": "git://github.com/nmccready/OverlappingMarkerSpiderfier.git"
"OverlappingMarkerSpiderfier": "git://github.com/nmccready/OverlappingMarkerSpiderfier.git",
"underscore": "~1.8.3",
"uuid": "http://github.com/LiosK/UUID.js/archive/v3.2.tar.gz"
}
}
4 changes: 0 additions & 4 deletions circle.yml

This file was deleted.

19 changes: 10 additions & 9 deletions grunt/jasmine.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ log = require('util').log

doCover = false #clean cheap way to disable coverage so you can debug the darn code.. thank you blanket

_requireConfig =
_requireConfig = (loPath = 'bower_components/lodash/lodash') ->
paths:
'lodash': 'bower_components/lodash/lodash'
lodash: loPath
'angular-mock': 'bower_components/angular-mocks/angular-mocks'
deps: ['lodash', 'angular-mock']

# log('jasmineSettings: past requireConfig')

spec =
spec = (loPath) ->
src: ['dist/angular-google-maps_dev_mapped.js']
options:
keepRunner: true
Expand All @@ -27,17 +27,16 @@ spec =
]
template: require 'grunt-template-jasmine-requirejs'
templateOptions:
requireConfig: _requireConfig
requireConfig: _requireConfig(loPath)

consoleSpec = _.extend {}, spec
consoleSpec.src = 'dist/angular-google-maps.js'
consoleSpec = _.extend spec(), src: 'dist/angular-google-maps.js'

# log('jasmineSettings: past spec')

coverage = undefined

if doCover
coverage = _.clone spec
coverage = _.clone spec()
coverage.options = _.extend coverage.options,
template: require 'grunt-template-jasmine-istanbul'
templateOptions:
Expand All @@ -56,9 +55,11 @@ if doCover
# log('jasmineSettings: past coverage')

toExport =
spec: spec
spec: spec()
consoleUnderscoreSpec: _.extend(spec('bower_components/underscore/underscore'), src: 'dist/angular-google-maps.js')
consoleSpec: consoleSpec
toExport['coverage'] = coverage if coverage

toExport.coverage = coverage if coverage

# log('jasmineSettings: past toExport')
module.exports = toExport
21 changes: 11 additions & 10 deletions grunt/options.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ _ = require 'lodash'
_pkg = require '../package.json'

_pkg.nextVersion = do ->
# note this will fail on new minor or major releases.. oh well manually fix it
# for now as this is mainly for changelog
last = _.last _pkg.version.split('.')
next = Number(last) + 1
_pkg.version.replace(last, String(next))
# note this will fail on new minor or major releases.. oh well manually fix it
# for now as this is mainly for changelog
last = _.last _pkg.version.split('.')
next = Number(last) + 1
_pkg.version.replace(last, String(next))

pipeline = [
"src/coffee/module"
Expand Down Expand Up @@ -260,6 +260,7 @@ module.exports = (grunt) ->
jasmine:
spec: jasmineSettings.spec
consoleSpec: jasmineSettings.consoleSpec
underscoreSpec: jasmineSettings.consoleUnderscoreSpec

replace:
utils:
Expand Down Expand Up @@ -304,13 +305,13 @@ module.exports = (grunt) ->
filename: "webpack.[name].js",

changelog:
options:
version: _pkg.nextVersion
options:
version: _pkg.nextVersion

angular_architecture_graph:
diagram:
files:
"dist/architecture": ["dist/angular-google-maps.js"]
diagram:
files:
"dist/architecture": ["dist/angular-google-maps.js"]

options.jasmine.coverage = jasmineSettings.coverage if jasmineSettings.coverage
return options
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"build": "grunt",
"example": "grunt example",
"test": "grunt"
"test": "grunt && grunt jasmine:underscoreSpec"
},
"keywords": [
"angularjs",
Expand Down

0 comments on commit 96039bf

Please sign in to comment.