Permalink
Browse files

merge

  • Loading branch information...
1 parent cbc1b3f commit 42108552b7300bfb6a6e1264de68364a59066844 @sean111 sean111 committed with shoe Feb 27, 2009
Showing with 505 additions and 40,465 deletions.
  1. +10 −8 .hgignore
  2. +47 −4 README.txt
  3. +0 −45 backend/python/README.txt
  4. 0 backend/python/bespin/usertemplate/commands/{README → README.txt}
  5. 0 backend/python/bespin/usertemplate/scratchpad/{README → README.txt}
  6. +0 −87 backend/python/pavement.py
  7. +1 −1 {backend/python → }/bootstrap.py
  8. BIN {backend/python → }/ext/Paste-1.7.3dev-r7791.tar.gz
  9. +1 −0 frontend/js/bespin/bootstrap_dependencies.js
  10. +32 −23 frontend/js/bespin/cmd/commandline.js
  11. +31 −27 frontend/js/bespin/cmd/commands.js
  12. +2 −1 frontend/js/bespin/dashboard/dependencies.js
  13. +16 −14 frontend/js/bespin/dashboard/events.js
  14. +2 −2 frontend/js/bespin/editor/editor.js
  15. +146 −0 frontend/js/bespin/editor/events.js
  16. +39 −153 frontend/js/bespin/events.js
  17. +1 −1 frontend/js/bespin/syntax/javascript.js
  18. +6 −6 frontend/js/bespin/util/clipboard.js
  19. +1 −1 frontend/js/bespin/util/urlbar.js
  20. +0 −11 frontend/js/dijit/_base.js
  21. +0 −388 frontend/js/dijit/_base/focus.js
  22. +0 −268 frontend/js/dijit/_base/manager.js
  23. +0 −294 frontend/js/dijit/_base/place.js
  24. +0 −301 frontend/js/dijit/_base/popup.js
  25. +0 −223 frontend/js/dijit/_base/scroll.js
  26. +0 −70 frontend/js/dijit/_base/sniff.js
  27. +0 −168 frontend/js/dijit/_base/typematic.js
  28. +0 −174 frontend/js/dijit/_base/wai.js
  29. +0 −27 frontend/js/dijit/_base/window.js
  30. +0 −95 frontend/js/dojo/AdapterRegistry.js
  31. +0 −84 frontend/js/dojo/DeferredList.js
  32. +0 −195 frontend/js/dojo/LICENSE
  33. +0 −133 frontend/js/dojo/NodeList-fx.js
  34. +0 −38 frontend/js/dojo/NodeList-html.js
  35. +0 −194 frontend/js/dojo/OpenAjax.js
  36. +0 −9 frontend/js/dojo/_base.js
  37. +0 −193 frontend/js/dojo/_base/Color.js
  38. +0 −418 frontend/js/dojo/_base/Deferred.js
  39. +0 −578 frontend/js/dojo/_base/NodeList.js
  40. +0 −471 frontend/js/dojo/_base/_loader/bootstrap.js
  41. +0 −483 frontend/js/dojo/_base/_loader/hostenv_browser.js
  42. +0 −336 frontend/js/dojo/_base/_loader/hostenv_ff_ext.js
  43. +0 −251 frontend/js/dojo/_base/_loader/hostenv_rhino.js
  44. +0 −80 frontend/js/dojo/_base/_loader/hostenv_spidermonkey.js
  45. +0 −708 frontend/js/dojo/_base/_loader/loader.js
  46. +0 −75 frontend/js/dojo/_base/_loader/loader_debug.js
  47. +0 −696 frontend/js/dojo/_base/_loader/loader_xd.js
  48. +0 −251 frontend/js/dojo/_base/array.js
  49. +0 −18 frontend/js/dojo/_base/browser.js
  50. +0 −302 frontend/js/dojo/_base/connect.js
  51. +0 −181 frontend/js/dojo/_base/declare.js
  52. +0 −565 frontend/js/dojo/_base/event.js
  53. +0 −617 frontend/js/dojo/_base/fx.js
  54. +0 −1,735 frontend/js/dojo/_base/html.js
  55. +0 −131 frontend/js/dojo/_base/json.js
  56. +0 −285 frontend/js/dojo/_base/lang.js
  57. +0 −858 frontend/js/dojo/_base/query-sizzle.js
  58. +0 −1,582 frontend/js/dojo/_base/query.js
  59. +0 −93 frontend/js/dojo/_base/window.js
  60. +0 −748 frontend/js/dojo/_base/xhr.js
  61. +0 −37 frontend/js/dojo/_firebug/LICENSE
  62. BIN frontend/js/dojo/_firebug/errorIcon.png
  63. +0 −211 frontend/js/dojo/_firebug/firebug.css
  64. +0 −1,184 frontend/js/dojo/_firebug/firebug.js
  65. BIN frontend/js/dojo/_firebug/infoIcon.png
  66. BIN frontend/js/dojo/_firebug/tab_lft_norm.png
  67. BIN frontend/js/dojo/_firebug/tab_lft_over.png
  68. BIN frontend/js/dojo/_firebug/tab_rgt_norm.png
  69. BIN frontend/js/dojo/_firebug/tab_rgt_over.png
  70. BIN frontend/js/dojo/_firebug/warningIcon.png
  71. +0 −382 frontend/js/dojo/back.js
  72. +0 −239 frontend/js/dojo/behavior.js
  73. +0 −29 frontend/js/dojo/cldr/LICENSE
  74. +0 −18 frontend/js/dojo/cldr/README
  75. +0 −23 frontend/js/dojo/cldr/monetary.js
  76. +0 −13 frontend/js/dojo/cldr/nls/ar/currency.js
  77. +0 −230 frontend/js/dojo/cldr/nls/ar/gregorian.js
  78. +0 −10 frontend/js/dojo/cldr/nls/ar/islamic-civil.js
  79. +0 −10 frontend/js/dojo/cldr/nls/ar/islamic.js
  80. +0 −12 frontend/js/dojo/cldr/nls/ar/number.js
  81. +0 −10 frontend/js/dojo/cldr/nls/ca/currency.js
  82. +0 −229 frontend/js/dojo/cldr/nls/ca/gregorian.js
  83. +0 −19 frontend/js/dojo/cldr/nls/ca/number.js
  84. +0 −18 frontend/js/dojo/cldr/nls/cs/currency.js
  85. +0 −185 frontend/js/dojo/cldr/nls/cs/gregorian.js
  86. +0 −19 frontend/js/dojo/cldr/nls/cs/number.js
  87. +0 −12 frontend/js/dojo/cldr/nls/currency.js
  88. +0 −20 frontend/js/dojo/cldr/nls/da/currency.js
  89. +0 −235 frontend/js/dojo/cldr/nls/da/gregorian.js
  90. +0 −19 frontend/js/dojo/cldr/nls/da/number.js
  91. +0 −4 frontend/js/dojo/cldr/nls/de-de/number.js
  92. +0 −20 frontend/js/dojo/cldr/nls/de/currency.js
  93. +0 −235 frontend/js/dojo/cldr/nls/de/gregorian.js
  94. +0 −19 frontend/js/dojo/cldr/nls/de/number.js
  95. +0 −19 frontend/js/dojo/cldr/nls/el/currency.js
  96. +0 −223 frontend/js/dojo/cldr/nls/el/gregorian.js
  97. +0 −6 frontend/js/dojo/cldr/nls/el/number.js
  98. +0 −6 frontend/js/dojo/cldr/nls/en-au/currency.js
  99. +0 −12 frontend/js/dojo/cldr/nls/en-au/gregorian.js
  100. +0 −4 frontend/js/dojo/cldr/nls/en-au/number.js
  101. +0 −6 frontend/js/dojo/cldr/nls/en-ca/currency.js
  102. +0 −8 frontend/js/dojo/cldr/nls/en-ca/gregorian.js
  103. +0 −21 frontend/js/dojo/cldr/nls/en-gb/gregorian.js
  104. +0 −4 frontend/js/dojo/cldr/nls/en-gb/number.js
  105. +0 −5 frontend/js/dojo/cldr/nls/en-us/currency.js
  106. +0 −4 frontend/js/dojo/cldr/nls/en-us/number.js
  107. +0 −21 frontend/js/dojo/cldr/nls/en/currency.js
  108. +0 −219 frontend/js/dojo/cldr/nls/en/gregorian.js
  109. +0 −19 frontend/js/dojo/cldr/nls/en/number.js
  110. +0 −7 frontend/js/dojo/cldr/nls/es-es/gregorian.js
  111. +0 −4 frontend/js/dojo/cldr/nls/es-es/number.js
  112. +0 −18 frontend/js/dojo/cldr/nls/es/currency.js
  113. +0 −236 frontend/js/dojo/cldr/nls/es/gregorian.js
  114. +0 −9 frontend/js/dojo/cldr/nls/es/number.js
  115. +0 −16 frontend/js/dojo/cldr/nls/fi/currency.js
  116. +0 −234 frontend/js/dojo/cldr/nls/fi/gregorian.js
  117. +0 −19 frontend/js/dojo/cldr/nls/fi/number.js
  118. +0 −21 frontend/js/dojo/cldr/nls/fr/currency.js
  119. +0 −239 frontend/js/dojo/cldr/nls/fr/gregorian.js
  120. +0 −19 frontend/js/dojo/cldr/nls/fr/number.js
  121. +0 −241 frontend/js/dojo/cldr/nls/gregorian.js
  122. +0 −12 frontend/js/dojo/cldr/nls/he/currency.js
  123. +0 −222 frontend/js/dojo/cldr/nls/he/gregorian.js
  124. +0 −10 frontend/js/dojo/cldr/nls/he/hebrew.js
  125. +0 −19 frontend/js/dojo/cldr/nls/he/number.js
  126. +0 −90 frontend/js/dojo/cldr/nls/hebrew.js
  127. +0 −19 frontend/js/dojo/cldr/nls/hu/currency.js
  128. +0 −218 frontend/js/dojo/cldr/nls/hu/gregorian.js
  129. +0 −18 frontend/js/dojo/cldr/nls/hu/number.js
  130. +0 −93 frontend/js/dojo/cldr/nls/islamic-civil.js
  131. +0 −90 frontend/js/dojo/cldr/nls/islamic.js
  132. +0 −5 frontend/js/dojo/cldr/nls/it-it/gregorian.js
  133. +0 −14 frontend/js/dojo/cldr/nls/it/currency.js
  134. +0 −233 frontend/js/dojo/cldr/nls/it/gregorian.js
  135. +0 −9 frontend/js/dojo/cldr/nls/it/number.js
  136. +0 −4 frontend/js/dojo/cldr/nls/ja-jp/number.js
  137. +0 −15 frontend/js/dojo/cldr/nls/ja/currency.js
  138. +0 −213 frontend/js/dojo/cldr/nls/ja/gregorian.js
  139. +0 −9 frontend/js/dojo/cldr/nls/ja/number.js
  140. +0 −6 frontend/js/dojo/cldr/nls/ko-kr/gregorian.js
  141. +0 −4 frontend/js/dojo/cldr/nls/ko-kr/number.js
  142. +0 −18 frontend/js/dojo/cldr/nls/ko/currency.js
  143. +0 −234 frontend/js/dojo/cldr/nls/ko/gregorian.js
  144. +0 −19 frontend/js/dojo/cldr/nls/ko/number.js
  145. +0 −17 frontend/js/dojo/cldr/nls/nb/currency.js
  146. +0 −232 frontend/js/dojo/cldr/nls/nb/gregorian.js
  147. +0 −19 frontend/js/dojo/cldr/nls/nb/number.js
  148. +0 −20 frontend/js/dojo/cldr/nls/nl/currency.js
  149. +0 −231 frontend/js/dojo/cldr/nls/nl/gregorian.js
  150. +0 −19 frontend/js/dojo/cldr/nls/nl/number.js
  151. +0 −25 frontend/js/dojo/cldr/nls/number.js
  152. +0 −21 frontend/js/dojo/cldr/nls/pl/currency.js
  153. +0 −233 frontend/js/dojo/cldr/nls/pl/gregorian.js
  154. +0 −19 frontend/js/dojo/cldr/nls/pl/number.js
  155. +0 −18 frontend/js/dojo/cldr/nls/pt-br/gregorian.js
  156. +0 −98 frontend/js/dojo/cldr/nls/pt-pt/gregorian.js
  157. +0 −5 frontend/js/dojo/cldr/nls/pt-pt/number.js
  158. +0 −20 frontend/js/dojo/cldr/nls/pt/currency.js
  159. +0 −234 frontend/js/dojo/cldr/nls/pt/gregorian.js
  160. +0 −19 frontend/js/dojo/cldr/nls/pt/number.js
  161. +0 −21 frontend/js/dojo/cldr/nls/ru/currency.js
  162. +0 −238 frontend/js/dojo/cldr/nls/ru/gregorian.js
  163. +0 −18 frontend/js/dojo/cldr/nls/ru/number.js
  164. +0 −18 frontend/js/dojo/cldr/nls/sk/currency.js
  165. +0 −195 frontend/js/dojo/cldr/nls/sk/gregorian.js
  166. +0 −6 frontend/js/dojo/cldr/nls/sk/number.js
  167. +0 −9 frontend/js/dojo/cldr/nls/sl/currency.js
  168. +0 −162 frontend/js/dojo/cldr/nls/sl/gregorian.js
  169. +0 −15 frontend/js/dojo/cldr/nls/sl/number.js
  170. +0 −18 frontend/js/dojo/cldr/nls/sv/currency.js
  171. +0 −237 frontend/js/dojo/cldr/nls/sv/gregorian.js
  172. +0 −18 frontend/js/dojo/cldr/nls/sv/number.js
  173. +0 −21 frontend/js/dojo/cldr/nls/th/currency.js
  174. +0 −224 frontend/js/dojo/cldr/nls/th/gregorian.js
  175. +0 −19 frontend/js/dojo/cldr/nls/th/number.js
  176. +0 −21 frontend/js/dojo/cldr/nls/tr/currency.js
  177. +0 −233 frontend/js/dojo/cldr/nls/tr/gregorian.js
  178. +0 −19 frontend/js/dojo/cldr/nls/tr/number.js
  179. +0 −12 frontend/js/dojo/cldr/nls/zh-cn/gregorian.js
  180. +0 −4 frontend/js/dojo/cldr/nls/zh-cn/number.js
  181. +0 −345 frontend/js/dojo/cldr/nls/zh-tw/currency.js
  182. +0 −161 frontend/js/dojo/cldr/nls/zh-tw/gregorian.js
  183. +0 −6 frontend/js/dojo/cldr/nls/zh-tw/number.js
  184. +0 −15 frontend/js/dojo/cldr/nls/zh/currency.js
  185. +0 −237 frontend/js/dojo/cldr/nls/zh/gregorian.js
  186. +0 −9 frontend/js/dojo/cldr/nls/zh/number.js
  187. +0 −70 frontend/js/dojo/cldr/supplemental.js
  188. +0 −225 frontend/js/dojo/colors.js
  189. +0 −91 frontend/js/dojo/cookie.js
  190. +0 −93 frontend/js/dojo/currency.js
  191. +0 −828 frontend/js/dojo/data/ItemFileReadStore.js
  192. +0 −820 frontend/js/dojo/data/ItemFileWriteStore.js
  193. +0 −103 frontend/js/dojo/data/api/Identity.js
  194. +0 −115 frontend/js/dojo/data/api/Notification.js
  195. +0 −502 frontend/js/dojo/data/api/Read.js
  196. +0 −28 frontend/js/dojo/data/api/Request.js
  197. +0 −222 frontend/js/dojo/data/api/Write.js
  198. +0 −65 frontend/js/dojo/data/util/filter.js
  199. +0 −86 frontend/js/dojo/data/util/simpleFetch.js
  200. +0 −88 frontend/js/dojo/data/util/sorter.js
  201. +0 −339 frontend/js/dojo/date.js
  202. +0 −652 frontend/js/dojo/date/locale.js
  203. +0 −137 frontend/js/dojo/date/stamp.js
  204. +0 −81 frontend/js/dojo/dnd/Avatar.js
  205. +0 −333 frontend/js/dojo/dnd/Container.js
  206. +0 −186 frontend/js/dojo/dnd/Manager.js
  207. +0 −135 frontend/js/dojo/dnd/Moveable.js
  208. +0 −97 frontend/js/dojo/dnd/Mover.js
  209. +0 −282 frontend/js/dojo/dnd/Selector.js
  210. +0 −483 frontend/js/dojo/dnd/Source.js
  211. +0 −62 frontend/js/dojo/dnd/TimedMoveable.js
  212. +0 −102 frontend/js/dojo/dnd/autoscroll.js
  213. +0 −32 frontend/js/dojo/dnd/common.js
  214. +0 −198 frontend/js/dojo/dnd/move.js
  215. +0 −218 frontend/js/dojo/dojo.js
  216. +0 −350 frontend/js/dojo/fx.js
  217. +0 −84 frontend/js/dojo/fx/Toggler.js
  218. +0 −223 frontend/js/dojo/fx/easing.js
  219. +0 −52 frontend/js/dojo/gears.js
  220. +0 −347 frontend/js/dojo/html.js
  221. +0 −247 frontend/js/dojo/i18n.js
  222. +0 −388 frontend/js/dojo/io/iframe.js
  223. +0 −232 frontend/js/dojo/io/script.js
  224. +0 −11 frontend/js/dojo/jaxer.js
  225. +0 −154 frontend/js/dojo/nls/ar/colors.js
  226. +0 −155 frontend/js/dojo/nls/ca/colors.js
  227. +0 −154 frontend/js/dojo/nls/colors.js
  228. +0 −154 frontend/js/dojo/nls/cs/colors.js
  229. +0 −154 frontend/js/dojo/nls/da/colors.js
  230. +0 −154 frontend/js/dojo/nls/de/colors.js
  231. +0 −154 frontend/js/dojo/nls/el/colors.js
  232. +0 −154 frontend/js/dojo/nls/es/colors.js
  233. +0 −154 frontend/js/dojo/nls/fi/colors.js
  234. +0 −154 frontend/js/dojo/nls/fr/colors.js
  235. +0 −154 frontend/js/dojo/nls/he/colors.js
  236. +0 −154 frontend/js/dojo/nls/hu/colors.js
  237. +0 −154 frontend/js/dojo/nls/it/colors.js
  238. +0 −154 frontend/js/dojo/nls/ja/colors.js
  239. +0 −154 frontend/js/dojo/nls/ko/colors.js
  240. +0 −154 frontend/js/dojo/nls/nb/colors.js
  241. +0 −154 frontend/js/dojo/nls/nl/colors.js
  242. +0 −154 frontend/js/dojo/nls/pl/colors.js
  243. +0 −154 frontend/js/dojo/nls/pt-pt/colors.js
  244. +0 −154 frontend/js/dojo/nls/pt/colors.js
  245. +0 −154 frontend/js/dojo/nls/ru/colors.js
  246. +0 −155 frontend/js/dojo/nls/sk/colors.js
  247. +0 −155 frontend/js/dojo/nls/sl/colors.js
  248. +0 −154 frontend/js/dojo/nls/sv/colors.js
  249. +0 −155 frontend/js/dojo/nls/th/colors.js
  250. +0 −154 frontend/js/dojo/nls/tr/colors.js
  251. +0 −154 frontend/js/dojo/nls/zh-tw/colors.js
  252. +0 −154 frontend/js/dojo/nls/zh/colors.js
  253. +0 −580 frontend/js/dojo/number.js
  254. +0 −279 frontend/js/dojo/parser.js
  255. +0 −64 frontend/js/dojo/regexp.js
  256. +0 −30 frontend/js/dojo/resources/LICENSE
  257. +0 −36 frontend/js/dojo/resources/_modules.js
  258. BIN frontend/js/dojo/resources/blank.gif
  259. +0 −1 frontend/js/dojo/resources/blank.html
  260. +0 −9 frontend/js/dojo/resources/dnd.css
  261. +0 −197 frontend/js/dojo/resources/dojo.css
  262. +0 −79 frontend/js/dojo/resources/iframe_history.html
  263. BIN frontend/js/dojo/resources/images/dndCopy.png
  264. BIN frontend/js/dojo/resources/images/dndMove.png
  265. BIN frontend/js/dojo/resources/images/dndNoCopy.png
  266. BIN frontend/js/dojo/resources/images/dndNoMove.png
  267. +0 −99 frontend/js/dojo/robot.js
  268. +0 −121 frontend/js/dojo/robotx.js
  269. +0 −79 frontend/js/dojo/rpc/JsonService.js
  270. +0 −61 frontend/js/dojo/rpc/JsonpService.js
  271. +0 −168 frontend/js/dojo/rpc/RpcService.js
  272. +0 −149 frontend/js/dojo/string.js
  273. +0 −158 frontend/js/dojox/data/CssClassStore.js
  274. +0 −463 frontend/js/dojox/data/CssRuleStore.js
  275. +0 −95 frontend/js/dojox/data/css.js
  276. +170 −7 pavement.py
  277. 0 {backend/python → }/requirements.txt
View
@@ -1,19 +1,21 @@
syntax: glob
-backend/python/lib
-backend/python/include
-backend/python/bin
-backend/python/devdata
+lib
+include
+bin
+frontend/js/dijit
+frontend/js/dojo
+frontend/js/dojox
backend/python/dist
backend/python/production/libs
backend/python/production/requirements.txt
backend/python/production/bootstrap.py
backend/python/error.txt
-backend/python/pip-log.txt
-backend/python/devserver.log*
-backend/python/setuptools-*
+pip-log.txt
+devserver.log*
+setuptools-*
backend/java/out
*.pyc
-backend/python/.Python
+.Python
backend/python/BespinServer.egg-info
.DS_Store
*.iws
View
@@ -9,11 +9,54 @@ Live system: https://bespin.mozilla.com/
Thanks for downloading the code to the Bespin project. You can easily get
-Bespin running on your local Mac or Linux machine (see note about Windows
-below).
+Bespin's Python server running on your local Mac or Linux machine (see note
+about Windows below).
+
+Getting Started
+---------------
+
+*** NOTE FOR LINUX USERS: If you are running on a Linux system, you will
+likely need a "python-dev" (on Ubuntu, possibly python-devel elsewhere)
+package installed, if you do not already have it.
+
+Run::
+
+ python bootstrap.py --no-site-packages
+
+to get the environment set up. This is built around virtualenv. All of the
+required packages will automatically be installed. Once this is set up,
+you can run::
+
+ source bin/activate
+
+to enter the virtualenv. Alternatively, you can just prefix the commands you
+run with "bin/". If you wish to restore your command line environment,
+you can type "deactivate".
+
+The first time around, you'll need to download Dojo and create the database::
+
+ paver dojo create_db
+
+You can start up the development server (runs on localhost:8080) by running::
+
+ paver start
+
+You can run the unit tests by running::
+
+ py.test bespin
+
+Updating the Required Files
+---------------------------
+
+If the "requirements.txt" file changes, you can re-install the required packages
+by running::
+
+ paver required
+
+You can also force upgrade all of the packages like so::
+
+ pip install -U -r requirements.txt
-To run Bespin locally, go to backend/python and take a look at the
-README.txt file there.
Contributing to Bespin
----------------------
View
@@ -5,51 +5,6 @@ This program provides the server side functionality for Bespin. Though there
is nothing Mac or Unix specific to the Bespin server, at the moment it
has only been tested on Unix-like platforms.
-Getting Started
----------------
-
-*** NOTE FOR LINUX USERS: If you are running on a Linux system, you will
-likely need a "python-dev" (on Ubuntu, possibly python-devel elsewhere)
-package installed, if you do not already have it.
-
-Run::
-
- python bootstrap.py
-
-to get the environment set up. This is built around virtualenv. All of the
-required packages will automatically be installed. Once this is set up,
-you can run::
-
- source bin/activate
-
-to enter the virtualenv. Alternatively, you can just prefix the commands you
-run with "bin/". If you wish to restore your command line environment,
-you can type "deactivate".
-
-The first time around, you'll need to create the database::
-
- paver create_db
-
-You can start up the development server (runs on localhost:8080) by running::
-
- paver start
-
-You can run the unit tests by running::
-
- py.test bespin
-
-Updating the Required Files
----------------------------
-
-If the "requirements.txt" file changes, you can re-install the required packages
-by running::
-
- paver required
-
-You can also force upgrade all of the packages like so::
-
- pip install -U -r requirements.txt
-
Understanding the Code
----------------------
View
@@ -34,8 +34,6 @@
from paver.defaults import *
-import paver.virtual
-
execfile(os.path.join('bespin', '__init__.py'))
options(
@@ -45,17 +43,6 @@
packages=find_packages(),
package_data=find_package_data('bespin', 'bespin',
only_in_packages=False)
- ),
- virtualenv=Bunch(
- packages_to_install=['pip'],
- paver_command_line="required"
- ),
- server=Bunch(
- # set to true to allow connections from other machines
- open=False,
- port=8080,
- try_build=False,
- dburl=None
)
)
@@ -70,80 +57,6 @@ def required():
path("README").unlink()
path("include").rmtree()
-@task
-def start():
- """Starts the BespinServer on localhost port 8080 for development.
-
- You can change the port and allow remote connections by setting
- server.port or server.open on the command line.
-
- paver server.open=1 server.port=8000 start
-
- will allow remote connections (assuming you don't have a firewall
- blocking the connection) and start the server on port 8000.
- """
- from bespin import config, controllers
- from wsgiref.simple_server import make_server
-
- options.order('server')
-
- config.set_profile('dev')
-
- if options.server.try_build:
- config.c.static_dir = os.path.abspath("%s/../../build/BespinServer/frontend" % os.getcwd())
-
- if options.server.dburl:
- config.c.dburl = options.server.dburl
-
- config.activate_profile()
- port = int(options.port)
- if options.open in ["True", "true", "yes", "1"]:
- listen_on = ""
- else:
- listen_on = "localhost"
- info("Server starting on %s:%s" % (listen_on, port))
- make_server(listen_on, port, controllers.make_app()).serve_forever()
-
-@task
-def try_build():
- """Starts the server using the compressed JavaScript."""
- options.server.try_build=True
- start()
-
-@task
-def clean_data():
- """Deletes the development data and recreates the database."""
- data_path = path("devdata.db")
- data_path.unlink()
- create_db()
-
-@task
-def create_db():
- """Creates the development database"""
- from bespin import config, model, db_versions
- from migrate.versioning.shell import main
-
- if path("devdata.db").exists():
- raise BuildFailure("Development database already exists")
- config.set_profile('dev')
- config.activate_profile()
- dry("Create database tables", model.Base.metadata.create_all, bind=config.c.dbengine)
-
- repository = str(path(db_versions.__file__).dirname())
- dburl = config.c.dburl
- dry("Turn on migrate versioning", main, ["version_control", dburl, repository])
-
-@task
-def upgrade():
- """Upgrade your database."""
- from bespin import config, model, db_versions
- from migrate.versioning.shell import main
- config.set_profile('dev')
- config.activate_profile()
- repository = str(path(db_versions.__file__).dirname())
- dburl = config.c.dburl
- dry("Run the database upgrade", main, ["upgrade", dburl, repository])
-
@task
@needs(['sdist'])
@@ -955,7 +955,7 @@ def after_install(options, home_dir):
bin_dir = join(home_dir, 'Scripts')
else:
bin_dir = join(home_dir, 'bin')
- subprocess.call([join(bin_dir, 'easy_install'), 'paver==0.8.1'])
+ subprocess.call([join(bin_dir, 'easy_install'), 'paver>=1.0a2'])
subprocess.call([join(bin_dir, 'easy_install'), 'pip'])
subprocess.call([join(bin_dir, 'paver'),'required'])
@@ -46,6 +46,7 @@ dojo.require("bespin.client.session");
dojo.require("bespin.editor.actions");
dojo.require("bespin.editor.editor");
+dojo.require("bespin.editor.events");
dojo.require("bespin.editor.model");
dojo.require("bespin.editor.toolbar");
dojo.require("bespin.editor.themes");
@@ -62,19 +62,25 @@ dojo.declare("bespin.cmd.commandline.Interface", null, {
var commandname = data.shift();
var command;
+ var argstr = data.join(' ');
if (this.commands[commandname]) {
command = this.commands[commandname];
} else if (this.aliases[commandname]) {
- command = this.commands[this.aliases[commandname]];
+ var alias = this.aliases[commandname].split(' ');
+ var aliascmd = alias.shift();
+ if (alias.length > 0) {
+ argstr = alias.join(' ') + ' ' + argstr;
+ }
+ command = this.commands[aliascmd];
} else {
this.showInfo("Sorry, no command '" + commandname + "'. Maybe try to run » help", true);
return;
}
- bespin.publish("bespin:cmdline:executed", [{ command: command, args: data.join(' ') }]);
+ bespin.publish("bespin:cmdline:executed", { command: command, args: argstr });
- command.execute(this, this.getArgs(data, command));
+ command.execute(this, this.getArgs(argstr.split(' '), command));
this.commandLine.value = ''; // clear after the command
},
@@ -89,7 +95,7 @@ dojo.declare("bespin.cmd.commandline.Interface", null, {
var args = bespin.util.keys.fillArguments(command.withKey);
args.action = "bespin:cmdline:execute;name=" + command.name;
- bespin.publish("bespin:editor:bindkey", [args]);
+ bespin.publish("bespin:editor:bindkey", args);
}
this.commands[command.name] = command;
@@ -164,17 +170,15 @@ dojo.declare("bespin.cmd.commandline.Interface", null, {
var matches = [];
if (value.length > 0) {
- for (command in this.commands) {
+ for (var command in this.commands) {
if (command.indexOf(value) == 0) {
matches.push(command);
}
-
- if (this.commands[command]['aliases']) {
- dojo.forEach(this.commands[command]['aliases'], function(alias) {
- if (alias.indexOf(value) == 0) {
- matches.push(alias);
- }
- });
+ }
+
+ for (var alias in this.aliases) {
+ if (alias.indexOf(value) == 0) {
+ matches.push(alias);
}
}
}
@@ -185,22 +189,27 @@ dojo.declare("bespin.cmd.commandline.Interface", null, {
complete: function(value) {
var matches = this.findCompletions(value);
if (matches.length == 1) {
- var command = this.commands[matches[0]] || this.commands[this.aliases[matches[0]]];
-
var commandLineValue = matches[0];
+
+ var command = this.commands[matches[0]];
- if (this.commandTakesArgs(command)) {
- commandLineValue += ' ';
- }
- this.commandLine.value = commandLineValue;
+ if (command) {
+ if (this.commandTakesArgs(command)) {
+ commandLineValue += ' ';
+ }
- if (command['completeText']) {
- this.showInfo(command['completeText']);
- }
+ if (command['completeText']) {
+ this.showInfo(command['completeText']);
+ }
- if (command['complete']) {
- this.showInfo(command.complete(this, value));
+ if (command['complete']) {
+ this.showInfo(command.complete(this, value));
+ }
+ } else { // an alias
+ this.showInfo(commandLineValue + " is an alias for: " + this.aliases[commandLineValue]);
+ commandLineValue += ' ';
}
+ this.commandLine.value = commandLineValue;
}
},
Oops, something went wrong.

0 comments on commit 4210855

Please sign in to comment.