Skip to content
This repository

Starting a major refactor of the client code. #184

Merged
merged 7 commits into from over 2 years ago
+4,230 9,423

3 participants

Nick Niemeir Ward Cunningham Gerry Gleason
Nick Niemeir
Collaborator
nrn commented

This is the start of modularizing the client code, and adding unit tests. We are using a node based build process, using browserify, and adding tests with mocha. client.coffee is getting split into files in lib, and files with the same name in test are being used to unit test them.

The commands to work with this are currently in notes.md.

Thanks to @WardCunningham for pairing on this.

Nick Niemeir
Collaborator
nrn commented

I'm continuing to work on this branch, slowly moving parts out of legacy and adding some tests. The test setup we have seems to be working very well, using Mocha to run the tests, Expect to assert things, and I just added Sinon for spys, stubs, and mochs.

Ward Cunningham
Owner

I've untwisted much of the client code (now in legacy.coffee) and fixed a few bugs too.

made refresh small enough to understand
pass item forward to buildPage through the dom
collected like methods together, improving comments
fixed bug that led to out of order fetch resolution

Ward Cunningham
Owner

I've moved the code to a branch named modules. I've messed up my models branch and can't push it.

Nick Niemeir
Collaborator
nrn commented

Doh. I'm off to jury duty today :/ But if there is anything I can do to help tomorrow or thursday let me know.

Gerry Gleason

Too bad they hold you in-communicado when in the courthouse. Can you use a portable computer? I think Ethan is coding today while traveling to Portland. Git works great disconnected :)

Nick Niemeir
Collaborator
nrn commented

I actually could have, I didn't know ahead of time, but they had wifi, tables, and power. I took the time to catch up on some reading though.

Ward, do you want me to take a stab at merging models and modules, or wait till we have a moment to work together on this?

Ward Cunningham
Owner
Nick Niemeir
Collaborator
nrn commented

No worries Ward, this reorganization stuff does not play well with git.

I'm having problems figuring out how to test some stuff (like the history/location code), but most things I feel like I'm getting meaningful tests in on. Getting jQuery on the test page how we really want it is part of what we are wedged up on :)

Very nice!

Nick Niemeir nrn Merge remote-tracking branch 'wc/modules' into models
Conflicts:
	client/client.js
	client/lib/legacy.coffee
	client/lib/util.coffee
	client/test/testclient.js
	client/test/util.coffee
	client/testclient.coffee
2081903
Nick Niemeir
Collaborator
nrn commented

Big merge resolved! Everything is looking good so far, but this needs some shaking out for sure. One test fails because we haven't gotten the main wiki api free yet, and I figured it was better to leave it broken instead of faking it.

nrn added some commits
Nick Niemeir nrn Merge pull request #1 from WardCunningham/4a6e239fcf5a900fe8a9f1d4163…
…ce18a229c99f0

improve reporting of recent changes
63e596c
Nick Niemeir nrn Merge pull request #2 from WardCunningham/modules
speeding up the talking builder
9ff202b
Ward Cunningham WardCunningham merged commit 9ff202b into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 7 unique commits by 2 authors.

Apr 09, 2012
Nick Niemeir nrn Move asSlug to util, plugin stuff split to plugin.coffee f4f55f6
Ward Cunningham report changes as federated wiki citations 4a6e239
Apr 10, 2012
Nick Niemeir nrn Split plugin handling off, add sinon.js for test objects. 720e482
Nick Niemeir nrn History state stuff separated a5e2bad
Apr 12, 2012
Nick Niemeir nrn Merge remote-tracking branch 'wc/modules' into models
Conflicts:
	client/client.js
	client/lib/legacy.coffee
	client/lib/util.coffee
	client/test/testclient.js
	client/test/util.coffee
	client/testclient.coffee
2081903
Nick Niemeir nrn Merge pull request #1 from WardCunningham/4a6e239fcf5a900fe8a9f1d4163…
…ce18a229c99f0

improve reporting of recent changes
63e596c
Nick Niemeir nrn Merge pull request #2 from WardCunningham/modules
speeding up the talking builder
9ff202b
Something went wrong with that request. Please try again.