Skip to content

Commit 5d07ac9

Browse files
markpeteachingbrain
authored andcommitted
Updating dependencies and fixing failing Ping Bell test
Updating dependencies and fixing failing Ping Bell test Fixing Package info Fighting with Travis
1 parent b40401d commit 5d07ac9

File tree

6 files changed

+28
-24
lines changed

6 files changed

+28
-24
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
language: node_js
22

33
node_js:
4-
- '0.10'
5-
- '0.12'
6-
- '4'
74
- '5'
5+
- '7'
6+
- 'lts/*'
7+
- 'node'
88

99
before_install:
1010
- npm install -g gulp

exercises/ping_bell/exercise.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ exercise.addVerifyProcessor(verifyProcessor(exercise, function (test, done) {
4040
test.equals(piezo.pin, pins.piezo, 'connect_speaker_to_pin', {pin: pins.piezo})
4141

4242
var initial = {
43-
tone: {callCount: piezo.tone.callCount}
43+
play: {callCount: piezo.play.callCount}
4444
}
4545

4646
var buffer = new Buffer('HAI!?')
@@ -50,7 +50,7 @@ exercise.addVerifyProcessor(verifyProcessor(exercise, function (test, done) {
5050
// Allow some time for the udp packet to reach server and sound to be played
5151
setTimeout(function () {
5252
try {
53-
test.truthy(piezo.tone.callCount > initial.tone.callCount, 'speaker_played_tune_on_udp_message')
53+
test.truthy(piezo.play.callCount > initial.play.callCount, 'speaker_played_tune_on_udp_message')
5454

5555
done()
5656
} catch (error) {

exercises/ping_bell/solution/solution.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ board.on('ready', function () {
77
var server = dgram.createSocket('udp4')
88

99
server.on('message', function () {
10-
piezo.tone(five.Piezo.Notes.c4, 1000)
11-
})
10+
piezo.play({
11+
song: 'C D F D A',
12+
beats: 1 / 4,
13+
tempo: 100
14+
});
15+
});
1216

1317
server.bind(1337)
14-
})
18+
});

nodebot-workshop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const workshop = require('workshopper-adventure')({
44
appDir : __dirname
55
, languages : ['en', 'ja', 'fr']
6-
, menu : {fg: 'black', bg: /^win/.test(process.platform) ? 'yellow' : 220}
6+
, menu : {fg: 'black', bg: 220}
77
, header : require('workshopper-adventure/default/header')
88
, footer : require('workshopper-adventure/default/footer')
99
})

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@
3636
"url": "https://github.com/tableflip/nodebot-workshop/issues"
3737
},
3838
"dependencies": {
39-
"async": "^2.0.1",
40-
"dnode": "^1.2.0",
41-
"ioboard": "^3.0",
42-
"johnny-five": "^0.10.0",
43-
"proxyquire": "^1.0.0",
44-
"sinon": "^1.9",
45-
"workshopper-adventure": "4.6.1",
46-
"workshopper-exercise": "^2.5.3"
39+
"async": "^2.6.0",
40+
"dnode": "^1.2.2",
41+
"ioboard": "^3.0.0",
42+
"johnny-five": "^0.14.1",
43+
"proxyquire": "^1.8.0",
44+
"sinon": "^4.4.2",
45+
"workshopper-adventure": "^6.0.3",
46+
"workshopper-exercise": "^3.0.1"
4747
},
4848
"optionalDependencies": {
49-
"node-notifier": "^4.3.1"
49+
"node-notifier": "^5.2.1"
5050
},
5151
"devDependencies": {
5252
"gulp": "^3.9.1",
53-
"gulp-jshint": "^2.0.0",
54-
"gulp-shell": "^0.5.1",
55-
"jshint": "^2.8.0",
56-
"jshint-stylish": "^2.1.0",
57-
"pre-commit": "^1.1.2"
53+
"gulp-jshint": "^2.1.0",
54+
"gulp-shell": "^0.6.5",
55+
"jshint": "^2.9.5",
56+
"jshint-stylish": "^2.2.1",
57+
"pre-commit": "^1.2.2"
5858
},
5959
"pre-commit": [
6060
"lint",

tests/verify-solutions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ if (process.argv.length > 2){
7979

8080
// foo/exercises/ping_bell/solution/solution.js -> Ping Bell
8181
function nameFromPath(path){
82-
var regex = /exercises\/(\w+)\/solution\/solution\.js/
82+
var regex = /exercises(?:\/|\\)(\w+)(?:\/|\\)solution(?:\/|\\)solution\.js/
8383
var res = path.match(regex)
8484
if(!res) throw new Error('Cannot establish exercise from path: ' + path)
8585
return res[1]

0 commit comments

Comments
 (0)