-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jake Harding
committed
Jul 12, 2014
1 parent
bc98cd6
commit f5af04b
Showing
6 changed files
with
576 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,33 @@ | ||
language: node_js | ||
node_js: | ||
- 0.10 | ||
before_script: | ||
- npm install -g bower@1.2.8 | ||
- bower install | ||
env: | ||
matrix: | ||
- TEST_SUITE=unit | ||
- TEST_SUITE=integration BROWSER='firefox' | ||
- TEST_SUITE=integration BROWSER='firefox:3.5' | ||
- TEST_SUITE=integration BROWSER='firefox:3.6' | ||
- TEST_SUITE=integration BROWSER='safari:5' | ||
- TEST_SUITE=integration BROWSER='safari:6' | ||
- TEST_SUITE=integration BROWSER='safari:7' | ||
- TEST_SUITE=integration BROWSER='internet explorer:7' | ||
- TEST_SUITE=integration BROWSER='internet explorer:8' | ||
- TEST_SUITE=integration BROWSER='internet explorer:9' | ||
- TEST_SUITE=integration BROWSER='internet explorer:10' | ||
- TEST_SUITE=integration BROWSER='internet explorer:11' | ||
#- TEST_SUITE=integration BROWSER='opera:11' | ||
#- TEST_SUITE=integration BROWSER='opera:12' | ||
- TEST_SUITE=integration BROWSER='chrome' | ||
global: | ||
- secure: VY4J2ERfrMEin++f4+UDDtTMWLuE3jaYAVchRxfO2c6PQUYgR+SW4SMekz855U/BuptMtiVMR2UUoNGMgOSKIFkIXpPfHhx47G5a541v0WNjXfQ2qzivXAWaXNK3l3C58z4dKxgPWsFY9JtMVCddJd2vQieAILto8D8G09p7bpo= | ||
- secure: kehbNCoYUG2gLnhmCH/oKhlJG6LoxgcOPMCtY7KOI4ropG8qlypb+O2b/19+BWeO3aIuMB0JajNh3p2NL0UKgLmUK7EYBA9fQz+vesFReRk0V/KqMTSxHJuseM4aLOWA2Wr9US843VGltfODVvDN5sNrfY7RcoRx2cTK/k1CXa8= | ||
node_js: | ||
- 0.11 | ||
before_script: | ||
- npm install -g grunt-cli@0.1.13 | ||
- npm install -g node-static@0.7.3 | ||
# until https://github.com/bower/bower/pull/1403 is merged | ||
- npm install -g git://github.com/jharding/bower.git | ||
- bower install | ||
- grunt build | ||
script: test/ci | ||
addons: | ||
sauce_connect: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash -x | ||
|
||
if [ "$TEST_SUITE" == "unit" ]; then | ||
./node_modules/.bin/karma start --single-run --browsers PhantomJS | ||
elif [ "$TRAVIS_SECURE_ENV_VARS" == "true" -a "$TEST_SUITE" == "integration" ]; then | ||
static -p 8888 & | ||
sleep 3 | ||
# integration tests are flaky, don't let them fail the build | ||
./node_modules/mocha/bin/mocha --harmony -R spec ./test/integration/test.js || true | ||
else | ||
echo "Not running any tests" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title></title> | ||
<script src="../../bower_components/jquery/jquery.js"></script> | ||
<script src="../../dist/typeahead.bundle.js"></script> | ||
|
||
<style> | ||
.container { | ||
width: 800px; | ||
margin: 50px auto; | ||
} | ||
|
||
.typeahead-wrapper { | ||
display: block; | ||
margin: 50px 0; | ||
} | ||
|
||
.tt-dropdown-menu { | ||
background-color: #fff; | ||
border: 1px solid #000; | ||
} | ||
|
||
.tt-suggestion.tt-cursor { | ||
background-color: #ccc; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<form action="/where" method="GET"> | ||
<div class="typeahead-wrapper"> | ||
<input id="states" name="states" type="text"> | ||
<input type="submit"> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
<script> | ||
var states = new Bloodhound({ | ||
datumTokenizer: function(d) { | ||
return Bloodhound.tokenizers.whitespace(d.val); | ||
}, | ||
queryTokenizer: Bloodhound.tokenizers.whitespace, | ||
local: [ | ||
{ val: 'Alabama' }, | ||
{ val: 'Alaska' }, | ||
{ val: 'Arizona' }, | ||
{ val: 'Arkansas' }, | ||
{ val: 'California' }, | ||
{ val: 'Colorado' }, | ||
{ val: 'Connecticut' }, | ||
{ val: 'Delaware' }, | ||
{ val: 'Florida' }, | ||
{ val: 'Georgia' }, | ||
{ val: 'Hawaii' }, | ||
{ val: 'Idaho' }, | ||
{ val: 'Illinois' }, | ||
{ val: 'Indiana' }, | ||
{ val: 'Iowa' }, | ||
{ val: 'Kansas' }, | ||
{ val: 'Kentucky' }, | ||
{ val: 'Louisiana' }, | ||
{ val: 'Maine' }, | ||
{ val: 'Maryland' }, | ||
{ val: 'Massachusetts' }, | ||
{ val: 'Michigan' }, | ||
{ val: 'Minnesota' }, | ||
{ val: 'Mississippi' }, | ||
{ val: 'Missouri' }, | ||
{ val: 'Montana' }, | ||
{ val: 'Nebraska' }, | ||
{ val: 'Nevada' }, | ||
{ val: 'New Hampshire' }, | ||
{ val: 'New Jersey' }, | ||
{ val: 'New Mexico' }, | ||
{ val: 'New York' }, | ||
{ val: 'North Carolina' }, | ||
{ val: 'North Dakota' }, | ||
{ val: 'Ohio' }, | ||
{ val: 'Oklahoma' }, | ||
{ val: 'Oregon' }, | ||
{ val: 'Pennsylvania' }, | ||
{ val: 'Rhode Island' }, | ||
{ val: 'South Carolina' }, | ||
{ val: 'South Dakota' }, | ||
{ val: 'Tennessee' }, | ||
{ val: 'Texas' }, | ||
{ val: 'Utah' }, | ||
{ val: 'Vermont' }, | ||
{ val: 'Virginia' }, | ||
{ val: 'Washington' }, | ||
{ val: 'West Virginia' }, | ||
{ val: 'Wisconsin' }, | ||
{ val: 'Wyoming' }, | ||
{ val: 'this is a very long value so deal with it' } | ||
] | ||
}); | ||
|
||
states.initialize(); | ||
|
||
$('#states').typeahead({ | ||
highlight: true | ||
}, | ||
{ | ||
displayKey: 'val', | ||
source: states.ttAdapter() | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.