Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
hypothesis/h
40a/h
AFDudley/h
BigBlueHat/h
BinaryStars/h
CCH543/h
Cinemacloud/h
Ericgood/h
FTG-003/h
Forethinker/h
GratefulTony/h
HGldJ1966/h
JJediny/h
John-Williams/h
Laurian/h
LittleFancy/h
MattyQ/h
Mishkin2015/h
RichardLitt/h
Staffan1/h
SteelWagstaff/h
TowerBR/h
VanyTang/h
abigailricarte/h
ackermann/h
alecchap/h
alesarrett/h
alexsegura/h
almereyda/h
alon/h
andzi/h
angelicxsoul/h
ansmoh/h
apurvajalit/h
arjunvasan/h
asdevor/h
bZichett/h
badgettrg/Webmarks
balmas/h
balupton/h
bbarker/h
bennlich/h
benthor/h
blakewest/h
bogste/h
bradparks/h
brittanystoroz/h
buiquangchien/h
cdchapman/h
charblanc/h
chowsamihq/h
chr7stos/Webmarks
chrber/h
chrismPssina/h
christinaphamAD/h
cmbirk/h
codeaudit/h
coolcool21/h
cove/h
csillag/h
danjimilk/h
dannyhope/h
daredream/h
davidmcclure/h
dennisplucinik/h
dezynetechnologies/h
diegodlh/h
djcun95/h
donsequitur/h
edsu/h
eiro10/h
emckean/h
ercchy/h
eshellman/h
fangang123/h
fchasen/h
fcrimins/h
fhirsch/h
ficolo/h
fragkopoulos/h
gauravkeerthi/h
geass/h
gergely-ujvari/h
gitter-badger/h
gnott/h
gobengo/h
gorinovic/h
gus3000/h
hashin/h
helemaalbigt/h
hmstepanek/h
hwasiti/h
hylhero/h
hyperstudio/h
iHDeveloper/h
imeysam/h
jackspaceBerkeley/h
jarey/h
jasdeep/h
jason790/h
jasonzou/j
jazahn/h
jccr/h
jean/h
jeka57/h
jeremydean/h
jermnelson/h
jibe-b/h
jnishiyama/h
jojksd/h
jpadilla/h
jtremback/h
judell/h
juli-so/h
kabacs/h
karissa/h
kaushikvijay/h
kaydoh/h
kill4uk/h
klopiinas/h
klrkdekira/h
koulihong311/h
krassif/h
krstnkngs/h
leoqmp/h
linhua55/h
lucadealfaro/h
lyspooner/h
lyzadanger/h
m1yag1/h
magee/h
mambocab/h
manunymous/h
maraino/h
mari-ja/h
markbarratt/h
martinq/h
mbbaig/h
mcarv63/h
meawoppl/h
meflyup/h
metasj/h
mgasner/h
mgax/h
mollycr/h
mrchrisadams/h
mrienstra/h
mshavlovsky/h
muddasani/h
nagyist/hyphothesis-h
nagyistoce/hypothesis-h
nanxio/h
neozhangthe1/h
ningyifan/h
nkingsley/h
nlholdem/h
nlisgo/h
noscripter/h
nshkuro/h
odnodn/h
oliversauter/h
openbizgit/h
opengovfoundation/h
openstax/hypothesis-server
ouroboros8/h
pablomarti/h
pamo/h
philipn/h
philschatz/h
pinballwonder/h
plainspace/h
raowl/h
rickyhan/h
rmoorman/h
rmtsukuru/h
robertknight/h
rowhit/h
rsarxiv/h
saakaifoundry/h
samrose/h
scharf/h
shepazu/h
sherah/h
shofheinz/h
soapdog/h
ssin122/test-h
st-fresh/h
stuk88/h
sylvanmist/h
tetratorus/h
tilgovi/h
tomnar/h
trivenews/h
truthadjustr/h
utngz/h
voidfiles/h
wenchen/h
yargevad/h
yumatch/h
zshen777/h
Nothing to show
Choose a Head Repository
hypothesis/h
40a/h
AFDudley/h
BigBlueHat/h
BinaryStars/h
CCH543/h
Cinemacloud/h
Ericgood/h
FTG-003/h
Forethinker/h
GratefulTony/h
HGldJ1966/h
JJediny/h
John-Williams/h
Laurian/h
LittleFancy/h
MattyQ/h
Mishkin2015/h
RichardLitt/h
Staffan1/h
SteelWagstaff/h
TowerBR/h
VanyTang/h
abigailricarte/h
ackermann/h
alecchap/h
alesarrett/h
alexsegura/h
almereyda/h
alon/h
andzi/h
angelicxsoul/h
ansmoh/h
apurvajalit/h
arjunvasan/h
asdevor/h
bZichett/h
badgettrg/Webmarks
balmas/h
balupton/h
bbarker/h
bennlich/h
benthor/h
blakewest/h
bogste/h
bradparks/h
brittanystoroz/h
buiquangchien/h
cdchapman/h
charblanc/h
chowsamihq/h
chr7stos/Webmarks
chrber/h
chrismPssina/h
christinaphamAD/h
cmbirk/h
codeaudit/h
coolcool21/h
cove/h
csillag/h
danjimilk/h
dannyhope/h
daredream/h
davidmcclure/h
dennisplucinik/h
dezynetechnologies/h
diegodlh/h
djcun95/h
donsequitur/h
edsu/h
eiro10/h
emckean/h
ercchy/h
eshellman/h
fangang123/h
fchasen/h
fcrimins/h
fhirsch/h
ficolo/h
fragkopoulos/h
gauravkeerthi/h
geass/h
gergely-ujvari/h
gitter-badger/h
gnott/h
gobengo/h
gorinovic/h
gus3000/h
hashin/h
helemaalbigt/h
hmstepanek/h
hwasiti/h
hylhero/h
hyperstudio/h
iHDeveloper/h
imeysam/h
jackspaceBerkeley/h
jarey/h
jasdeep/h
jason790/h
jasonzou/j
jazahn/h
jccr/h
jean/h
jeka57/h
jeremydean/h
jermnelson/h
jibe-b/h
jnishiyama/h
jojksd/h
jpadilla/h
jtremback/h
judell/h
juli-so/h
kabacs/h
karissa/h
kaushikvijay/h
kaydoh/h
kill4uk/h
klopiinas/h
klrkdekira/h
koulihong311/h
krassif/h
krstnkngs/h
leoqmp/h
linhua55/h
lucadealfaro/h
lyspooner/h
lyzadanger/h
m1yag1/h
magee/h
mambocab/h
manunymous/h
maraino/h
mari-ja/h
markbarratt/h
martinq/h
mbbaig/h
mcarv63/h
meawoppl/h
meflyup/h
metasj/h
mgasner/h
mgax/h
mollycr/h
mrchrisadams/h
mrienstra/h
mshavlovsky/h
muddasani/h
nagyist/hyphothesis-h
nagyistoce/hypothesis-h
nanxio/h
neozhangthe1/h
ningyifan/h
nkingsley/h
nlholdem/h
nlisgo/h
noscripter/h
nshkuro/h
odnodn/h
oliversauter/h
openbizgit/h
opengovfoundation/h
openstax/hypothesis-server
ouroboros8/h
pablomarti/h
pamo/h
philipn/h
philschatz/h
pinballwonder/h
plainspace/h
raowl/h
rickyhan/h
rmoorman/h
rmtsukuru/h
robertknight/h
rowhit/h
rsarxiv/h
saakaifoundry/h
samrose/h
scharf/h
shepazu/h
sherah/h
shofheinz/h
soapdog/h
ssin122/test-h
st-fresh/h
stuk88/h
sylvanmist/h
tetratorus/h
tilgovi/h
tomnar/h
trivenews/h
truthadjustr/h
utngz/h
voidfiles/h
wenchen/h
yargevad/h
yumatch/h
zshen777/h
Nothing to show
  • 8 commits
  • 65 files changed
  • 0 commit comments
  • 3 contributors
Commits on Feb 24, 2015
Commits on Feb 25, 2015
Add browserify config to package.json
This includes files that need to be shimmed under the "browserify-shim"
key. Annotator plugins that have no dependencies do not need to be
shimmed at the moment as they just attach themselves to the global
Annotator object.

jQuery is assigned as a global, this means that it is assumed to be
included separately and bound to the global scope.

Both jQuery and Annotator have aliases under the "browsers" key to
make them easier to reference.
Browserify the test harness
Use karma-browserify to run the tests, rather than relying on prebuilt
assets. This commit alters our test harness so that it no longer relies
(at all) on the webassets pipeline. This means:

- test isolation is improved, as each test file runs in its own module
- bringing objects into test scope is now simply a matter of requiring
  the correct module, rather than bolting more and more objects onto the
  Annotator namespace
- autoreloading of tests when either test files or their dependencies
  are modified is now possible (and enabled by default)
Showing with 1,464 additions and 1,116 deletions.
  1. +3 −0 .gitignore
  2. +7 −8 Makefile
  3. +2 −5 README.rst
  4. +1 −2 development.ini
  5. +32 −0 h/assets.py
  6. +72 −212 h/assets.yaml
  7. +47 −2 h/static/bootstrap.js
  8. +0 −2 h/static/scripts/.gitignore
  9. +5 −0 h/static/scripts/account/account.coffee
  10. +2 −0 h/static/scripts/annotator/monkey.coffee
  11. +4 −0 h/static/scripts/annotator/plugin/bucket-bar.coffee
  12. +4 −0 h/static/scripts/annotator/plugin/cross-frame.coffee
  13. +3 −1 h/static/scripts/annotator/plugin/enhancedanchoring.coffee
  14. +4 −0 h/static/scripts/annotator/plugin/texthighlights.coffee
  15. +43 −0 h/static/scripts/app.coffee
  16. +3 −0 h/static/scripts/bridge.coffee
  17. +4 −4 h/static/scripts/controllers.coffee
  18. +3 −0 h/static/scripts/filters.coffee
  19. +4 −3 h/static/scripts/guest.coffee
  20. +8 −0 h/static/scripts/helpers/helpers.coffee
  21. +3 −0 h/static/scripts/helpers/string-helpers.coffee
  22. +1 −0 h/static/scripts/helpers/time-helpers.coffee
  23. +4 −3 h/static/scripts/host.coffee
  24. +4 −0 h/static/scripts/session/session.coffee
  25. +3 −0 h/static/scripts/threading-service.coffee
  26. +0 −2 h/static/scripts/vendor/.gitignore
  27. +0 −1 h/static/scripts/vendor/polyfills/.gitignore
  28. +27 −32 karma.config.js
  29. +30 −2 package.json
  30. +13 −2 tests/js/account/account-controller-test.coffee
  31. +7 −1 tests/js/account/auth-controller-test.coffee
  32. +7 −0 tests/js/annotation-mapper-service-test.coffee
  33. +7 −0 tests/js/annotation-sync-test.coffee
  34. +7 −0 tests/js/annotation-ui-service-test.coffee
  35. +7 −0 tests/js/annotation-ui-sync-test.coffee
  36. +3 −1 tests/js/annotator/plugins/bucket-bar-test.coffee
  37. +13 −17 tests/js/annotator/plugins/cross-frame-test.coffee
  38. +7 −0 tests/js/auth-service-test.coffee
  39. +8 −0 tests/js/bridge-test.coffee
  40. +305 −235 tests/js/controllers-test.coffee
  41. +7 −0 tests/js/cross-frame-service-test.coffee
  42. +12 −128 tests/js/directives-test.coffee
  43. +57 −30 tests/js/directives/annotation-test.coffee
  44. +65 −96 tests/js/directives/privacy-test.coffee
  45. +66 −61 tests/js/directives/simple-search-test.coffee
  46. +8 −1 tests/js/directives/status-button-test.coffee
  47. +152 −140 tests/js/directives/thread-test.coffee
  48. +7 −0 tests/js/discovery-test.coffee
  49. +35 −27 tests/js/filters-test.coffee
  50. +29 −10 tests/js/guest-test.coffee
  51. +156 −0 tests/js/helpers/form-helpers-test.coffee
  52. +8 −1 tests/js/helpers/string-helpers-test.coffee
  53. +9 −2 tests/js/helpers/time-helpers-test.coffee
  54. +4 −1 tests/js/host-test.coffee
  55. +7 −1 tests/js/identity-service-test.coffee
  56. +8 −1 tests/js/permissions-service-test.coffee
  57. +11 −12 tests/js/plugin/enhancedanchoring-test.coffee
  58. +6 −9 tests/js/plugin/texthighlight-test.coffee
  59. +17 −6 tests/js/services-test.coffee
  60. +26 −11 tests/js/session-service-test.coffee
  61. +7 −0 tests/js/store-service-test.coffee
  62. +8 −1 tests/js/streamer-service-test.coffee
  63. +7 −0 tests/js/threading-service-test.coffee
  64. +0 −43 tests/js/util-test.coffee
  65. +45 −0 tools/browserify-pipe
View
@@ -20,6 +20,9 @@
/share
/src
# All minified javascript is built
*.min.js
*.pyc
*.pyo
View
@@ -7,20 +7,19 @@ default:
clean:
@rm -rf h/static/.sass-cache
@rm -rf h/static/.webassets-cache
find h/static/scripts \
-path 'h/static/scripts/vendor' -prune \
-o -iname '*.js' \
-exec rm {} \;
find h/static/styles/*.css \
-iname 'icomoon.css' -prune \
-o -exec rm {} \;
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
find h/static/scripts -mindepth 1 -name '*.min.js' \
-delete
find h/static/styles -mindepth 1 \
-name 'icomoon.css' -prune \
-o -name '*.css' -delete
test:
@echo -n "Checking to see if elasticsearch is running..."
$(eval es := $(shell wget --quiet --output-document - http://localhost:9200))
@if [ -n '${es}' ] ; then echo "yes." ; else echo "no!"; exit 1; fi
python setup.py develop test
hypothesis assets development.ini
"$$(npm bin)"/karma start karma.config.js --single-run
"$$(npm bin)"/karma start h/browser/chrome/karma.config.js --single-run
View
@@ -107,10 +107,8 @@ To run the Python suite, invoke the tests in the standard fashion::
$ ./bin/python setup.py test
To run the JavaScript suite, ensure the assets are built and then invoke the
karma test runner::
To run the JavaScript suite, run::
$ hypothesis assets development.ini
$ $(npm bin)/karma start karma.config.js --single-run
As a convenience, there is a make target which will do all of the above::
@@ -120,8 +118,7 @@ As a convenience, there is a make target which will do all of the above::
It's also possible to run a subset of the tests using ``karma run``::
$ $(npm bin)/karma start karma.config.js & # Start the server in the bg.
$ hypothesis assets development.ini && \
$(npm bin)/karma run karma.config.js -- --grep={FILTER_STRING}
$ $(npm bin)/karma run karma.config.js -- --grep={FILTER_STRING}
This will run generally be much faster than running ``karma start --single-run``
each time. The frontend tests can also be debugged by visiting
View
@@ -47,13 +47,12 @@ jinja2.extensions: h.jinja_extensions:IncludeRawExtension
webassets.base_dir: h:static
webassets.base_url: assets
webassets.coffee_no_bare: True
webassets.debug: True
webassets.manifest: False
webassets.static_view: True
webassets.uglifyjs_bin: %(here)s/node_modules/.bin/uglifyjs
webassets.cleancss_bin: %(here)s/node_modules/.bin/cleancss
webassets.coffee_bin: %(here)s/node_modules/.bin/coffee
webassets.browserify_pipe_bin: %(here)s/tools/browserify-pipe
;http://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest/#settings
debugtoolbar.show_on_exc_only: True
View
@@ -2,9 +2,41 @@
import re
from deform.field import Field
from webassets.filter import ExternalTool, register_filter
import pyramid
class Browserify(ExternalTool):
"""
An input filter for webassets that browserifies CoffeeScript or JavaScript.
The browserify command-line client has several limitations when piping
input to STDIN:
- it uses a dummy name for the piped file in sourcemaps
- because it does not know the real name of the piped file, it cannot
accept CoffeeScript, because it does not know the real extension of the
piped file
The filter uses the browserify-pipe tool, shipped in ``tools/`` in the
repository root, which circumvents these issues.
"""
name = 'browserify'
options = {'binary': 'BROWSERIFY_PIPE_BIN'}
max_debug_level = None
def input(self, in_, out, source_path, **kwargs):
args = [self.binary or 'browserify-pipe']
if self.get_config('debug'):
args.append('-d')
args.append(source_path)
self.subprocess(args, out, in_)
register_filter(Browserify)
class WebassetsResourceRegistry(object):
def __init__(self, env):
Oops, something went wrong.

No commit comments for this range