Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ISSUE-18: sync with latest couchdb changes & latest private rcouch re…

…lease.
  • Loading branch information...
commit 6a49f64e1bbf6dd31a74556c55aa468053c309c9 1 parent 2f8c3b3
@benoitc benoitc authored
Showing with 44,344 additions and 5,625 deletions.
  1. +57 −44 .gitignore
  2. +13 −6 .travis.yml
  3. +1,076 −11 LICENSE
  4. +145 −118 Makefile
  5. +28 −10 NOTICE
  6. +0 −7 attic/rcouchx.xcworkspace/contents.xcworkspacedata
  7. +0 −30 attic/rcouchx/CouchDBXApplicationController.h
  8. +0 −365 attic/rcouchx/CouchDBXApplicationController.m
  9. BIN  attic/rcouchx/English.lproj/InfoPlist.strings
  10. +0 −2,600 attic/rcouchx/English.lproj/MainMenu.nib/designable.nib
  11. BIN  attic/rcouchx/English.lproj/MainMenu.nib/keyedobjects.nib
  12. +0 −32 attic/rcouchx/Info.plist
  13. +0 −4 attic/rcouchx/README
  14. +0 −18 attic/rcouchx/Rakefile
  15. BIN  attic/rcouchx/browse.png
  16. +0 −405 attic/rcouchx/dictionary.c
  17. +0 −174 attic/rcouchx/dictionary.h
  18. +0 −43 attic/rcouchx/ensure_full_commit.sh
  19. +0 −648 attic/rcouchx/iniparser.c
  20. +0 −273 attic/rcouchx/iniparser.h
  21. +0 −14 attic/rcouchx/main.m
  22. BIN  attic/rcouchx/pause.png
  23. BIN  attic/rcouchx/rcouch.icns
  24. +0 −369 attic/rcouchx/rcouchx.xcodeproj/project.pbxproj
  25. +0 −7 attic/rcouchx/rcouchx.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  26. BIN  ...rcouchx/rcouchx.xcodeproj/project.xcworkspace/xcuserdata/benoitc.xcuserdatad/UserInterfaceState.xcuserstate
  27. +0 −24 ...c/rcouchx/rcouchx.xcodeproj/project.xcworkspace/xcuserdata/benoitc.xcuserdatad/WorkspaceSettings.xcsettings
  28. +0 −7 attic/rcouchx/rcouchx_Prefix.pch
  29. BIN  attic/rcouchx/refuge.png
  30. BIN  attic/rcouchx/refuge_logo.ico
  31. BIN  attic/rcouchx/refuge_logo.png
  32. BIN  attic/rcouchx/start.png
  33. BIN  attic/rcouchx/stop.png
  34. +0 −4 ebin/rcouch.app
  35. +39 −0 etc/rcouch/app.config
  36. +137 −4 {rel/files → etc/rcouch}/couch.ini
  37. 0  etc/rcouch/empty
  38. +23 −25 {rel/files → etc/rcouch}/local.ini
  39. 0  {rel/files → etc/rcouch}/vm.args
  40. +13 −0 etc/windows/Makefile.am
  41. +23 −12 pkg.vars.config
  42. BIN  rebar
  43. +14 −44 rebar.config
  44. +41 −0 rebar.config.script
  45. +0 −52 rel/files/app.config
  46. +173 −0 rel/files/app_epath.sh
  47. +0 −99 rel/files/couch_httpd.ini
  48. +229 −0 rel/files/env.sh
  49. +0 −36 rel/files/erica
  50. +0 −5 rel/files/erica_exec
  51. +45 −0 rel/files/erl
  52. +197 −0 rel/files/nodetool
  53. +319 −0 rel/files/runner
  54. +0 −134 rel/reltool.config
  55. +155 −0 rel/reltool.config.script
  56. +17 −1 rel/{rcouch.config → vars.config}
  57. +260 −0 share/Makefile.am
  58. +127 −0 share/doc/ext/configdomain.py
  59. +44 −0 share/doc/ext/github.py
  60. +656 −0 share/doc/ext/httpdomain.py
  61. BIN  share/doc/images/epub-icon.png
  62. BIN  share/doc/images/favicon.ico
  63. BIN  share/doc/images/futon-createdb.png
  64. BIN  share/doc/images/futon-editdoc.png
  65. BIN  share/doc/images/futon-editeddoc.png
  66. BIN  share/doc/images/futon-overview.png
  67. BIN  share/doc/images/futon-replform.png
  68. BIN  share/doc/images/intro-consistency-01.png
  69. BIN  share/doc/images/intro-consistency-02.png
  70. BIN  share/doc/images/intro-consistency-03.png
  71. BIN  share/doc/images/intro-consistency-04.png
  72. BIN  share/doc/images/intro-consistency-05.png
  73. BIN  share/doc/images/intro-consistency-06.png
  74. BIN  share/doc/images/intro-consistency-07.png
  75. BIN  share/doc/images/intro-tour-01.png
  76. BIN  share/doc/images/intro-tour-02.png
  77. BIN  share/doc/images/intro-tour-03.png
  78. BIN  share/doc/images/intro-tour-04.png
  79. BIN  share/doc/images/intro-tour-05.png
  80. BIN  share/doc/images/intro-tour-06.png
  81. BIN  share/doc/images/intro-tour-07.png
  82. BIN  share/doc/images/intro-tour-08.png
  83. BIN  share/doc/images/intro-tour-09.png
  84. BIN  share/doc/images/intro-tour-10.png
  85. BIN  share/doc/images/intro-why-01.png
  86. BIN  share/doc/images/intro-why-02.png
  87. BIN  share/doc/images/intro-why-03.png
  88. BIN  share/doc/images/logo.png
  89. BIN  share/doc/images/views-intro-01.png
  90. BIN  share/doc/images/views-intro-02.png
  91. BIN  share/doc/images/views-intro-03.png
  92. BIN  share/doc/images/views-intro-04.png
  93. +795 −0 share/doc/static/rtd.css
  94. +49 −0 share/doc/templates/couchdb/domainindex.html
  95. +13 −0 share/doc/templates/couchdb/theme.conf
  96. +33 −0 share/doc/templates/help.html
  97. +27 −0 share/doc/templates/layout.html
  98. +48 −0 share/doc/templates/pages/download.html
  99. +175 −0 share/doc/templates/pages/index.html
  100. +31 −0 share/doc/templates/searchbox.html
  101. +22 −0 share/doc/templates/utilities.html
  102. +441 −0 share/fauxton/Gruntfile.js
  103. +26 −0 share/fauxton/TODO.md
  104. +18 −0 share/fauxton/app/addons/activetasks/assets/less/activetasks.less
  105. +26 −0 share/fauxton/app/addons/activetasks/base.js
  106. +118 −0 share/fauxton/app/addons/activetasks/resources.js
  107. +58 −0 share/fauxton/app/addons/activetasks/routes.js
  108. +21 −0 share/fauxton/app/addons/activetasks/templates/detail.html
  109. +52 −0 share/fauxton/app/addons/activetasks/templates/table.html
  110. +36 −0 share/fauxton/app/addons/activetasks/templates/tabledetail.html
  111. +46 −0 share/fauxton/app/addons/activetasks/templates/tabs.html
  112. +139 −0 share/fauxton/app/addons/activetasks/tests/viewsSpec.js
  113. +181 −0 share/fauxton/app/addons/activetasks/views.js
  114. +15 −0 share/fauxton/app/addons/auth/assets/less/auth.less
  115. +69 −0 share/fauxton/app/addons/auth/base.js
  116. +364 −0 share/fauxton/app/addons/auth/resources.js
  117. +93 −0 share/fauxton/app/addons/auth/routes.js
  118. +26 −0 share/fauxton/app/addons/auth/templates/change_password.html
  119. +37 −0 share/fauxton/app/addons/auth/templates/create_admin.html
  120. +26 −0 share/fauxton/app/addons/auth/templates/login.html
  121. +26 −0 share/fauxton/app/addons/auth/templates/nav_dropdown.html
  122. +31 −0 share/fauxton/app/addons/auth/templates/nav_link_title.html
  123. +20 −0 share/fauxton/app/addons/auth/templates/noAccess.html
  124. +19 −0 share/fauxton/app/addons/compaction/assets/less/compaction.less
  125. +31 −0 share/fauxton/app/addons/compaction/base.js
  126. +48 −0 share/fauxton/app/addons/compaction/resources.js
  127. +65 −0 share/fauxton/app/addons/compaction/routes.js
  128. +14 −0 share/fauxton/app/addons/compaction/templates/compact_view.html
  129. +28 −0 share/fauxton/app/addons/compaction/templates/layout.html
  130. +140 −0 share/fauxton/app/addons/compaction/views.js
  131. +13 −0 share/fauxton/app/addons/config/assets/less/config.less
  132. +28 −0 share/fauxton/app/addons/config/base.js
  133. +176 −0 share/fauxton/app/addons/config/resources.js
  134. +59 −0 share/fauxton/app/addons/config/routes.js
  135. +52 −0 share/fauxton/app/addons/config/templates/dashboard.html
  136. +31 −0 share/fauxton/app/addons/config/templates/item.html
  137. +33 −0 share/fauxton/app/addons/contribute/base.js
  138. +59 −0 share/fauxton/app/addons/exampleAuth/base.js
  139. +19 −0 share/fauxton/app/addons/exampleAuth/templates/noAccess.html
  140. +28 −0 share/fauxton/app/addons/logs/base.js
  141. +225 −0 share/fauxton/app/addons/logs/resources.js
  142. +58 −0 share/fauxton/app/addons/logs/routes.js
  143. +46 −0 share/fauxton/app/addons/logs/templates/dashboard.html
  144. +16 −0 share/fauxton/app/addons/logs/templates/filterItem.html
  145. +27 −0 share/fauxton/app/addons/logs/templates/sidebar.html
  146. +38 −0 share/fauxton/app/addons/logs/tests/logSpec.js
  147. +44 −0 share/fauxton/app/addons/permissions/assets/less/permissions.less
  148. +25 −0 share/fauxton/app/addons/permissions/base.js
  149. +70 −0 share/fauxton/app/addons/permissions/resources.js
  150. +63 −0 share/fauxton/app/addons/permissions/routes.js
  151. +17 −0 share/fauxton/app/addons/permissions/templates/item.html
  152. +15 −0 share/fauxton/app/addons/permissions/templates/permissions.html
  153. +46 −0 share/fauxton/app/addons/permissions/templates/section.html
  154. +51 −0 share/fauxton/app/addons/permissions/tests/resourceSpec.js
  155. +159 −0 share/fauxton/app/addons/permissions/tests/viewsSpec.js
  156. +200 −0 share/fauxton/app/addons/permissions/views.js
  157. +24 −0 share/fauxton/app/addons/plugins/base.js
  158. +26 −0 share/fauxton/app/addons/plugins/resources.js
  159. +47 −0 share/fauxton/app/addons/plugins/routes.js
  160. +102 −0 share/fauxton/app/addons/plugins/templates/plugins.html
  161. +196 −0 share/fauxton/app/addons/replication/assets/less/replication.less
  162. +24 −0 share/fauxton/app/addons/replication/base.js
  163. +69 −0 share/fauxton/app/addons/replication/resources.js
  164. +50 −0 share/fauxton/app/addons/replication/route.js
  165. +74 −0 share/fauxton/app/addons/replication/templates/form.html
  166. +22 −0 share/fauxton/app/addons/replication/templates/progress.html
  167. +28 −0 share/fauxton/app/addons/replication/tests/replicationSpec.js
  168. +295 −0 share/fauxton/app/addons/replication/views.js
  169. +19 −0 share/fauxton/app/addons/stats/assets/less/stats.less
  170. +26 −0 share/fauxton/app/addons/stats/base.js
  171. +38 −0 share/fauxton/app/addons/stats/resources.js
  172. +63 −0 share/fauxton/app/addons/stats/routes.js
  173. +16 −0 share/fauxton/app/addons/stats/templates/by_method.html
  174. +54 −0 share/fauxton/app/addons/stats/templates/pie_table.html
  175. +16 −0 share/fauxton/app/addons/stats/templates/stats.html
  176. +22 −0 share/fauxton/app/addons/stats/templates/statselect.html
  177. +171 −0 share/fauxton/app/addons/stats/views.js
  178. +16 −0 share/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
  179. +31 −0 share/fauxton/app/addons/verifyinstall/base.js
  180. +181 −0 share/fauxton/app/addons/verifyinstall/resources.js
  181. +37 −0 share/fauxton/app/addons/verifyinstall/routes.js
  182. +50 −0 share/fauxton/app/addons/verifyinstall/templates/main.html
  183. +127 −0 share/fauxton/app/addons/verifyinstall/views.js
  184. +558 −0 share/fauxton/app/api.js
  185. +122 −0 share/fauxton/app/app.js
  186. +60 −0 share/fauxton/app/config.js
  187. +78 −0 share/fauxton/app/helpers.js
  188. +33 −0 share/fauxton/app/initialize.js.underscore
  189. +27 −0 share/fauxton/app/load_addons.js.underscore
  190. +48 −0 share/fauxton/app/main.js
  191. +65 −0 share/fauxton/app/mixins.js
  192. +37 −0 share/fauxton/app/modules/databases/base.js
  193. +193 −0 share/fauxton/app/modules/databases/resources.js
  194. +69 −0 share/fauxton/app/modules/databases/routes.js
  195. +255 −0 share/fauxton/app/modules/databases/views.js
  196. +24 −0 share/fauxton/app/modules/documents/base.js
  197. +638 −0 share/fauxton/app/modules/documents/resources.js
  198. +408 −0 share/fauxton/app/modules/documents/routes.js
  199. +84 −0 share/fauxton/app/modules/documents/tests/resourcesSpec.js
  200. +1,805 −0 share/fauxton/app/modules/documents/views.js
  201. +276 −0 share/fauxton/app/modules/fauxton/base.js
  202. +316 −0 share/fauxton/app/modules/fauxton/components.js
  203. +98 −0 share/fauxton/app/modules/fauxton/layout.js
  204. +47 −0 share/fauxton/app/modules/pouchdb/base.js
  205. +115 −0 share/fauxton/app/modules/pouchdb/pouch.collate.js
  206. +324 −0 share/fauxton/app/modules/pouchdb/pouchdb.mapreduce.js
  207. +87 −0 share/fauxton/app/resizeColumns.js
  208. +175 −0 share/fauxton/app/router.js
  209. +24 −0 share/fauxton/app/templates/databases/item.html
  210. +35 −0 share/fauxton/app/templates/databases/list.html
  211. +17 −0 share/fauxton/app/templates/databases/newdatabase.html
  212. +31 −0 share/fauxton/app/templates/databases/sidebar.html
  213. +97 −0 share/fauxton/app/templates/documents/advanced_options.html
  214. +26 −0 share/fauxton/app/templates/documents/all_docs_item.html
  215. +20 −0 share/fauxton/app/templates/documents/all_docs_layout.html
  216. +43 −0 share/fauxton/app/templates/documents/all_docs_list.html
  217. +21 −0 share/fauxton/app/templates/documents/all_docs_number.html
  218. +38 −0 share/fauxton/app/templates/documents/changes.html
  219. +28 −0 share/fauxton/app/templates/documents/ddoc_info.html
  220. +35 −0 share/fauxton/app/templates/documents/design_doc_selector.html
  221. +55 −0 share/fauxton/app/templates/documents/doc.html
  222. +74 −0 share/fauxton/app/templates/documents/doc_field_editor.html
  223. +19 −0 share/fauxton/app/templates/documents/doc_field_editor_tabs.html
  224. +36 −0 share/fauxton/app/templates/documents/duplicate_doc_modal.html
  225. +44 −0 share/fauxton/app/templates/documents/edit_tools.html
  226. +17 −0 share/fauxton/app/templates/documents/index_menu_item.html
  227. +26 −0 share/fauxton/app/templates/documents/index_row_docular.html
  228. +25 −0 share/fauxton/app/templates/documents/index_row_tabular.html
  229. +19 −0 share/fauxton/app/templates/documents/jumpdoc.html
  230. +15 −0 share/fauxton/app/templates/documents/search.html
  231. +67 −0 share/fauxton/app/templates/documents/sidebar.html
  232. +18 −0 share/fauxton/app/templates/documents/tabs.html
  233. +42 −0 share/fauxton/app/templates/documents/upload_modal.html
  234. +87 −0 share/fauxton/app/templates/documents/view_editor.html
  235. +30 −0 share/fauxton/app/templates/fauxton/api_bar.html
  236. +24 −0 share/fauxton/app/templates/fauxton/breadcrumbs.html
  237. +15 −0 share/fauxton/app/templates/fauxton/footer.html
  238. +24 −0 share/fauxton/app/templates/fauxton/index_pagination.html
  239. +75 −0 share/fauxton/app/templates/fauxton/nav_bar.html
  240. +18 −0 share/fauxton/app/templates/fauxton/notification.html
  241. +31 −0 share/fauxton/app/templates/fauxton/pagination.html
  242. +28 −0 share/fauxton/app/templates/layouts/one_pane.html
  243. +27 −0 share/fauxton/app/templates/layouts/one_pane_notabs.html
  244. +30 −0 share/fauxton/app/templates/layouts/two_pane.html
  245. +26 −0 share/fauxton/app/templates/layouts/with_right_sidebar.html
  246. +27 −0 share/fauxton/app/templates/layouts/with_sidebar.html
  247. +28 −0 share/fauxton/app/templates/layouts/with_tabs.html
  248. +41 −0 share/fauxton/app/templates/layouts/with_tabs_sidebar.html
  249. +656 −0 share/fauxton/assets/css/nv.d3.css
  250. BIN  share/fauxton/assets/img/FontAwesome.otf
  251. BIN  share/fauxton/assets/img/couchdb-site.png
  252. BIN  share/fauxton/assets/img/couchdblogo.png
  253. BIN  share/fauxton/assets/img/fontawesome-webfont.eot
  254. +399 −0 share/fauxton/assets/img/fontawesome-webfont.svg
  255. BIN  share/fauxton/assets/img/fontawesome-webfont.ttf
  256. BIN  share/fauxton/assets/img/fontawesome-webfont.woff
  257. BIN  share/fauxton/assets/img/fontcustom_fauxton.eot
  258. +200 −0 share/fauxton/assets/img/fontcustom_fauxton.svg
  259. BIN  share/fauxton/assets/img/fontcustom_fauxton.ttf
  260. BIN  share/fauxton/assets/img/fontcustom_fauxton.woff
  261. BIN  share/fauxton/assets/img/glyphicons-halflings-white.png
  262. BIN  share/fauxton/assets/img/glyphicons-halflings.png
  263. BIN  share/fauxton/assets/img/linen.png
  264. BIN  share/fauxton/assets/img/loader.gif
  265. BIN  share/fauxton/assets/img/minilogo.png
  266. +47 −0 share/fauxton/assets/index.underscore
  267. +16,541 −0 share/fauxton/assets/js/libs/ace/ace.js
  268. +537 −0 share/fauxton/assets/js/libs/ace/ext-chromevox.js
  269. +301 −0 share/fauxton/assets/js/libs/ace/ext-elastic_tabstops_lite.js
  270. +1,096 −0 share/fauxton/assets/js/libs/ace/ext-emmet.js
  271. +207 −0 share/fauxton/assets/js/libs/ace/ext-keybinding_menu.js
  272. +1,615 −0 share/fauxton/assets/js/libs/ace/ext-language_tools.js
  273. +166 −0 share/fauxton/assets/js/libs/ace/ext-modelist.js
  274. +499 −0 share/fauxton/assets/js/libs/ace/ext-old_ie.js
  275. +252 −0 share/fauxton/assets/js/libs/ace/ext-options.js
  276. +420 −0 share/fauxton/assets/js/libs/ace/ext-searchbox.js
  277. +634 −0 share/fauxton/assets/js/libs/ace/ext-settings_menu.js
  278. +68 −0 share/fauxton/assets/js/libs/ace/ext-spellcheck.js
  279. +271 −0 share/fauxton/assets/js/libs/ace/ext-split.js
  280. +165 −0 share/fauxton/assets/js/libs/ace/ext-static_highlight.js
  281. +47 −0 share/fauxton/assets/js/libs/ace/ext-statusbar.js
  282. +478 −0 share/fauxton/assets/js/libs/ace/ext-textarea.js
  283. +90 −0 share/fauxton/assets/js/libs/ace/ext-themelist.js
  284. +206 −0 share/fauxton/assets/js/libs/ace/ext-whitespace.js
  285. +886 −0 share/fauxton/assets/js/libs/ace/mode-javascript.js
  286. +578 −0 share/fauxton/assets/js/libs/ace/mode-json.js
Sorry, we could not display the entire diff because too many files (827) changed.
View
101 .gitignore
@@ -1,53 +1,66 @@
+!.gitignore
+!.mailmap
*.beam
+*.diff
*.gz
-*.tpl
-*.o
-*.lo
*.la
-*.m4
-*.in
-*~
+*.lo
+*.o
*.orig
+*.pyc
*.rej
-erl_crash.dump
-configure
-autom4te.cache
-build-aux
-*.diff
-.DS_Store
-*.dSYM
+*.stamp
*.sw*
-*.gz
+*.tpl
+*~
+.*
+INSTALL
+Makefile.in
+THANKS
-#doc
+__pycache__
+b
+src
+rel/rcouch
-docs/build
+# rebar
+support/rebar/rebar
+support/rebar/inttest/rt.work
+rt.work
+\rebar
+support/rebar/.test
-# relase
-rel/rcouch
-dev
-rcouchx.app
-contrib/rcouchx/build/
-contrib/rcouchx/DerivedData
-rcouchx-build
-contrib/DerivedData
-contrib/rcouchx/rcouchx.xcodeproj/xcuserdata
-contrib/rcouchx.xcworkspace/xcuserdata
-contrib/rcouchx-build
-support/rebar
-support
-
-# couch
-apps/couch/couchjs
-
-apps/couch/c_src/obj/*.so
-apps/couch/priv/*.so
-apps/couch/priv/couchspawnkillable
-apps/couch/libs
-apps/couch/share/server/main.js
-apps/couch/share/server/main-coffee.js
-
-# other
-deps
-distdir
-package
+# couch_collate
+src/couch_collate/ebin
+src/couch_collate/priv
+src/couch_collate/c_src/*.o
+src/couch_collate/.libs
+src/couch_collate/.dists
+
+src/couch/ebin
+src/couch_replicator/ebin
+src/couch_mrview/ebin
+src/couch_index/ebin
+src/couch_dbupdates/ebin
+src/couch_plugins/ebin
+src/couch_rel/ebin/*.beam
+
+# couchjs
+src/couch/c_src/couch_js/*.o
+src/couch/c_src/couch_js/config.h
+src/couch/priv/couchjs
+src/couch/c_src/spawnkillable/*.o
+src/couch/priv/couchspawnkillable
+src/couch/.libs
+src/couch/.dists
+
+share/server/main-coffee.js
+share/server/main.js
+
+test/etap/test_cfg_register
+test/out
+test/etap/*.beam
+test/etap/*.o
+test/etap/temp.*
+
+share/doc/build
View
19 .travis.yml
@@ -1,13 +1,20 @@
before_install:
- sudo apt-get update
- - sudo apt-get install curl libcurl4-openssl-dev libcurl3
-script: make rel USE_STATIC_ICU=1
+ - sudo apt-get -y install libicu-dev libmozjs-dev pkg-config help2man
+ - sudo apt-get -y install libtool automake autoconf autoconf-archive
+ - sudo apt-get -y install texlive-latex-base texlive-latex-recommended
+ - sudo apt-get -y install texlive-latex-extra texlive-fonts-recommended texinfo
+ - sudo apt-get -y install python-pygments python-docutils python-sphinx
+before_script: make
+script: make check
language: erlang
otp_release:
+ - R16B03
+ - R16B02
+ - R16B01
+ - R16B
+ - R15B03
- R15B02
- R15B01
- R15B
-branches:
- only:
- - develop
- - master
+ - R14B04
View
1,087 LICENSE
@@ -1,15 +1,1080 @@
-2011 (c) Benoît Chesneau <benoitc@e-engura.org>
-2011 (c) Nicolas R Dufour <nrdufour@gmail.com>
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
- http://www.apache.org/licenses/LICENSE-2.0
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+ 1. Definitions.
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+Apache CouchDB Subcomponents
+
+The Apache CouchDB project includes a number of subcomponents with separate
+copyright notices and license terms. Your use of the code for the these
+subcomponents is subject to the terms and conditions of the following licenses.
+
+For the share/doc/build/html/_static components:
+
+ Copyright (c) 2007-2011 by the Sphinx team (see AUTHORS file).
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For the share/doc/build/html/_static/jquery.js component:
+
+ Copyright 2010, John Resig
+
+ Copyright 2010, The Dojo Foundation
+
+ Copyright 2012 jQuery Foundation and other contributors
+ http://jquery.com/
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For the share/doc/build/html/_static/underscore.js component:
+
+ Copyright (c) 2009-2012 Jeremy Ashkenas, DocumentCloud
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+For the share/doc/static/rtd.css component:
+
+ Copyright (c) 2007-2011 by the Sphinx team (see AUTHORS file).
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For the share/www/script/jquery.js component:
+
+ Copyright 2012 jQuery Foundation and other contributors
+ http://jquery.com/
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For the share/www/script/jquery-ui-* components:
+
+ Copyright (c) 2011 Paul Bakaus, http://jqueryui.com/
+
+ This software consists of voluntary contributions made by many
+ individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
+ contribution history, see the revision history and logs, available
+ at http://jquery-ui.googlecode.com/svn/
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For the share/www/script/jquery.form.js component:
+For the src/fauxton/assets/js/plugins/jquery.form.js component:
+
+ http://malsup.com/jquery/form/
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For the share/www/script/json2.js component:
+
+ Public Domain
+
+ No warranty expressed or implied. Use at your own risk.
+
+For the src/mochiweb component:
+
+ Copyright (c) 2007 Mochi Media, Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For the src/ibrowse component:
+
+ Copyright (c) 2006, Chandrashekhar Mullaparthi
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of the T-Mobile nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For the src/erlang-oauth component:
+
+ Copyright the authors and contributors. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+For the src/etap component:
+
+ Copyright (c) 2008-2009 Nick Gerakines <nick@gerakines.net>
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+For the src/ejson/yajl component
+
+Copyright 2010, Lloyd Hilaiel.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ 3. Neither the name of Lloyd Hilaiel nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+For the src/ejson/erl_nif_compat.h file
+
+ Copyright (c) 2010-2011 Basho Technologies, Inc.
+ With some minor modifications for Apache CouchDB.
+
+ This file is provided to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file
+ except in compliance with the License. You may obtain
+ a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+For the src/snappy/google-snappy component
+
+ Copyright 2005 and onwards Google Inc.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Google Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For the share/server/coffee-script.js file
+
+ Copyright (c) 2011 Jeremy Ashkenas
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+For src/fauxton/apps/modules/pouchdb
+
+ Copyright (c) 2012 Dale Harvey et al
+
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ use this file except in compliance with the License. You may obtain a copy of
+ the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ License for the specific language governing permissions and limitations under
+ the License.
+
+For src/fauxton/assets/js/libs/almond.js
+
+ Copyright (c) 2010-2011, The Dojo Foundation
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of the Dojo Foundation nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For src/fauxton/assets/js/libs/backbone.js
+
+ Copyright (c) 2010-2013 Jeremy Ashkenas, DocumentCloud
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+For src/fauxton/assets/js/libs/bootstrap.js
+And for src/fauxton/assets/less/bootstrap
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+For src/fauxton/assets/less/bootstrap
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+For src/fauxton/assets/js/libs/d3.js
+
+ Copyright (c) 2012, Michael Bostock
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * The name Michael Bostock may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For src/fauxton/assets/js/libs/lodash.js
+
+ Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
+ Based on Underscore.js 1.4.3, copyright 2009-2013 Jeremy Ashkenas,
+ DocumentCloud Inc. <http://underscorejs.org/>
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For src/fauxton/assets/js/libs/nv.d3.js
+
+ Copyright (c) 2011, 2012 [Novus Partners, Inc.][novus]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ [novus]: https://www.novus.com/
+
+For src/fauxton/assets/js/libs/require.js
+
+ Copyright (c) 2010-2011, The Dojo Foundation
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of the Dojo Foundation nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For src/fauxton/assets/js/plugins/backbone.layoutmanager.js
+
+ Copyright (c) 2013 Tim Branyen
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+For src/fauxton/assets/js/plugins/prettify.js
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+For the src/couch_dbupdates component
+
+ 2009-2012 (c) Benoît Chesneau <benoitc@e-engura.org>
+
+ Apache 2 License, see above.
+
+If not otherwise noted, the extensions in this package are licensed
+under the following license.
+
+For src/fauxton/test/mocha/mocha.js and src/fauxton/test/mocha/mocha.js
+
+ Copyright (c) 2011-2013 TJ Holowaychuk <tj@vision-media.ca>
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ 'Software'), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For src/fauxton/test/mocha/chai.js
+
+ Copyright (c) 2011-2013 Jake Luer jake@alogicalparadox.com
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ 'Software'), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+for src/fauxton/test/mocha/sinon-chai.js
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright © 2012–2013 Domenic Denicola <domenic@domenicdenicola.com>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
+for src/fauxton/js/libs/spin.js
+ The MIT License
+
+ Copyright (c) 2011 Felix Gnass [fgnass at neteye dot de]
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+for src/fauxton/assets/img/font-awesome.*
+
+SIL OPEN FONT LICENSE
+
+Version 1.1 - 26 February 2007
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting — in part or in whole — any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+
+for src/fauxton/assets/less/bootstrap/font-awesome/*
+
+The MIT License (MIT)
+
+Copyright (c) 2013 Dave Gandy
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+For share/doc/ext/httpdomain.py
+
+Copyright (c) 2010 by the contributors Hong Minhee <minhee@dahlia.kr>.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+for src/fauxton/assets/js/lib/ace/*
+
+Copyright (c) 2010, Ajax.org B.V.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Ajax.org B.V. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
263 Makefile
@@ -1,142 +1,169 @@
-BASE_DIR = $(shell pwd)
-REBAR ?= $(BASE_DIR)/rebar
-OVERLAY_VARS ?=
-ERLANG_BIN = $(shell dirname $(shell which erl))
-WITHOUT_CURL?=1
+BASE_DIR = $(shell pwd)
+SUPPORT_DIR=$(BASE_DIR)/support
+ERLC ?= $(shell which erlc)
+ESCRIPT ?= $(shell which escript)
+OVERLAY_VARS ?=
+PACKAGE_NAME=rcouch
+RELDIR=$(BASE_DIR)/rel/$(PACKAGE_NAME)
-REPO ?= rcouch
-PKG_REVISION ?= $(shell git describe ==tags)
-PKG_BUILD = 1
-$(if $(ERLANG_BIN),,$(warning "Warning: No Erlang found in your path, this will probably not work"))
+$(if $(ERLC),,$(warning "Warning: No Erlang found in your path, this will probably not work"))
+$(if $(ESCRIPT),,$(warning "Warning: No escript found in your path, this will probably not work"))
-.PHONY: rel deps
+.PHONY: rel deps rebar
+
+COUCHDB_STATIC=1
+ifeq ($(libs), shared)
+ COUCHDB_STATIC=0
+endif
+export COUCHDB_STATIC
+
+USE_STATIC_ICU=0
+ifeq ($(icu), static)
+ USE_STATIC_ICU=1
+endif
+export USE_STATIC_ICU
all: deps compile
compile:
- @WITHOUT_CURL=$(WITHOUT_CURL) $(REBAR) compile
+ @$(BASE_DIR)/rebar compile
-deps:
- @$(REBAR) get-deps
+deps: rebar
+ @$(BASE_DIR)/rebar get-deps
-clean:
- @$(REBAR) clean
+clean: docclean
+ @$(BASE_DIR)/rebar clean
-distclean: clean relclean
- @$(REBAR) delete-deps
+distclean: clean rebarclean relclean
generate:
- @WITHOUT_CURL=$(WITHOUT_CURL) $(REBAR) generate $(OVERLAY_VARS)
+ @$(BASE_DIR)/rebar generate $(OVERLAY_VARS)
-rel: relclean compile generate
+rel: generate
-relclean:
+relclean: reldocclean
@rm -rf rel/rcouch
+check: test testjs
-ARCH= $(shell uname -m)
-
-
-# Tag from git with style <tagname>-<commits_since_tag>-<current_commit_hash>
-# Ex: When on a tag: riak-1.0.3 (no commits since tag)
-# For most normal Commits: riak-1.1.0pre1-27-g1170096
-# Last tag: riak-1.1.0pre1
-# Commits since tag: 27
-# Hash of commit: g1170096
#
-REPO_TAG := $(shell git describe --tags)
-
-# Split off repo name
-# Changes to 1.0.3 or 1.1.0pre1-27-g1170096 from example above
-REVISION = $(shell echo $(REPO_TAG) | sed -e 's/^$(REPO)-//')
-
-# Primary version identifier, strip off commmit information
-# Changes to 1.0.3 or 1.1.0pre1 from example above
-MAJOR_VERSION ?= $(shell echo $(REVISION) | sed -e 's/\([0-9.]*\)-.*/\1/')
-
-##
-## release tarballs
-##
-
-# Use git archive to copy a repository at a current revision to a new directory
-archive_git = git archive --format=tar --prefix=$(1)/ HEAD | (cd $(2) && tar xf -)
-
-# Checkout tag, fetch deps (so we don't have to do it multiple times) and collect
-# the version of all the dependencies into the MANIFEST_FILE
-CLONEDIR ?= rcouch-clone
-MANIFEST_FILE ?= dependency_manifest.git
-get_dist_deps = mkdir distdir && \
- git clone . distdir/$(CLONEDIR) && \
- cd distdir/$(CLONEDIR) && \
- git checkout $(REPO_TAG) && \
- $(MAKE) deps && \
- echo "- Dependencies and their tags at build time of $(REPO) at $(REPO_TAG)" > $(MANIFEST_FILE) && \
- for dep in deps/*; do \
- cd $${dep} && \
- printf "$${dep} version `git describe --long --tags 2>/dev/null || git rev-parse HEAD`\n" >> ../../$(MANIFEST_FILE) && \
- cd ../..; done && \
- LC_ALL=POSIX && export LC_ALL && sort $(MANIFEST_FILE) > $(MANIFEST_FILE).tmp && mv $(MANIFEST_FILE).tmp $(MANIFEST_FILE);
-
-# Name resulting directory & tar file based on current status of the git tag
-# If it is a tagged release (PKG_VERSION == MAJOR_VERSION), use the toplevel
-# tag as the package name, otherwise generate a unique hash of all the
-# dependencies revisions to make the package name unique.
-# This enables the toplevel repository package to change names
-# when underlying dependencies change.
-NAME_HASH = $(shell git hash-object distdir/$(CLONEDIR)/$(MANIFEST_FILE) 2>/dev/null | cut -c 1-8)
-ifeq ($(REVISION), $(MAJOR_VERSION))
-PKG_ID := $(REPO_TAG)
-else
-PKG_ID = $(REPO)-$(MAJOR_VERSION)-$(NAME_HASH)
-endif
-
-# To ensure a clean build, copy the CLONEDIR at a specific tag to a new directory
-# which will be the basis of the src tar file (and packages)
-# The vsn.git file is required by rebar to be able to build from the resulting
-# tar file
-build_clean_dir = cd distdir/$(CLONEDIR) && \
- $(call archive_git,$(PKG_ID),..) && \
- cp $(MANIFEST_FILE) ../$(PKG_ID)/ && \
- mkdir ../$(PKG_ID)/deps && \
- for dep in deps/*; do \
- cd $${dep} && \
- $(call archive_git,$${dep},../../../$(PKG_ID)) && \
- mkdir -p ../../../$(PKG_ID)/$${dep}/priv && \
- printf "`git describe --long --tags 2>/dev/null || git rev-parse HEAD`" > ../../../$(PKG_ID)/$${dep}/priv/vsn.git && \
- cd ../..; done
-
-
-distdir/$(CLONEDIR)/$(MANIFEST_FILE):
- $(if $(REPO_TAG), $(call get_dist_deps), $(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
-
-distdir/$(PKG_ID): distdir/$(CLONEDIR)/$(MANIFEST_FILE)
- $(call build_clean_dir)
-
-distdir/$(PKG_ID).tar.gz: distdir/$(PKG_ID)
- tar -C distdir -czf distdir/$(PKG_ID).tar.gz $(PKG_ID)
-
-dist: distdir/$(PKG_ID).tar.gz
- cp distdir/$(PKG_ID).tar.gz .
-
-ballclean:
- rm -rf $(PKG_ID).tar.gz distdir
+# rebar
+#
-pkgclean: ballclean
- rm -rf package
+rebar:
+ @(test ! -e $(BASE_DIR)/support/rebar/rebar && \
+ echo "==> build rebar" && \
+ cd $(BASE_DIR)/support/rebar && \
+ $(ESCRIPT) bootstrap || true)
+ @cp $(BASE_DIR)/support/rebar/rebar $(BASE_DIR)/rebar
-##
-## Packaging targets
-##
+rebarclean:
+ @(cd $(BASE_DIR)/support/rebar && \
+ rm -rf rebar ebin/*.beam inttest/rt.work rt.work .test)
-# Yes another variable, this one is repo-<generatedhash
-# which differs from $REVISION that is repo-<commitcount>-<commitsha>
-PKG_VERSION = $(shell echo $(PKG_ID) | sed -e 's/^$(REPO)-//')
+#
+# DOCS
+#
-package: distdir/$(PKG_ID).tar.gz
- ln -s distdir package
- $(MAKE) -C package -f $(PKG_ID)/deps/node_package/Makefile
+DOC_SRCDIR=$(BASE_DIR)/share/doc/src
+DOC_BUILDDIR=$(BASE_DIR)/share/doc/build
+DOC_RELDIR=$(RELDIR)/share/doc
+SPHINXOPTS = -n -c $(DOC_SRCDIR) \
+ -A local=1 \
+ $(DOC_SRCDIR)
+
+reldoc: reldocclean doc
+ mkdir -p $(DOC_RELDIR)
+ cp -r $(DOC_BUILDDIR)/html $(DOC_RELDIR)
+ cp -r $(DOC_BUILDDIR)/latex/CouchDB.pdf $(DOC_RELDIR)
+ cp -r $(DOC_BUILDDIR)/texinfo/CouchDB.info $(DOC_RELDIR)
+
+doc: html pdf texinfo
+
+html:
+ @mkdir -p $(DOC_BUILDDIR)
+ $(SUPPORT_DIR)/doc/sphinx-build \
+ -b html $(SPHINXOPTS) $(DOC_BUILDDIR)/html
+
+pdf:
+ @mkdir -p $(DOC_BUILDDIR)
+ $(SUPPORT_DIR)/doc/sphinx-build \
+ -b latex $(SPHINXOPTS) $(DOC_BUILDDIR)/latex
+ $(MAKE) -C $(DOC_BUILDDIR)/latex all-pdf
+
+texinfo:
+ @mkdir -p $(DOC_BUILDDIR)
+ $(SUPPORT_DIR)/doc/sphinx-build \
+ -b texinfo $(SPHINXOPTS) $(DOC_BUILDDIR)/texinfo
+ $(MAKE) -C $(DOC_BUILDDIR)/texinfo info
+
+docclean:
+ rm -rf $(DOC_BUILDDIR)/textinfo
+ rm -rf $(DOC_BUILDDIR)/latex
+ rm -rf $(DOC_BUILDDIR)/html
+ rm -rf $(DOC_BUILDDIR)/doctrees
+
+reldocclean:
+ rm -rf $(DOC_RELDIR)
-.PHONY: package
-export PKG_VERSION PKG_ID PKG_BUILD BASE_DIR ERLANG_BIN REBAR OVERLAY_VARS RELEASE
+#
+# TESTS
+#
+COUCHDB_ETAP_DIR=$(BASE_DIR)/test/etap
+export COUCHDB_ETAP_DIR
+
+
+ERL_FLAGS=-pa $(BASE_DIR)/src/*/ebin -pa $(COUCHDB_ETAP_DIR)
+export ERL_FLAGS
+
+test: testbuild
+ @echo "==> test couch_collate"
+ @cd $(BASE_DIR)/src/couch_collate && \
+ prove $(BASE_DIR)/src/couch_collate/t/*.t
+ @echo "==> test couch core"
+ @prove $(COUCHDB_ETAP_DIR)/*.t
+ @echo "==> test couch_mrview"
+ @prove $(BASE_DIR)/src/couch_mrview/test/*.t
+ @echo "==> test couch_replicator"
+ @prove $(BASE_DIR)/src/couch_replicator/test/*.t
+
+verbose-test: testbuild
+ @echo "==> test couch_collate"
+ @cd $(BASE_DIR)/src/couch_collate && \
+ prove -v $(BASE_DIR)/src/couch_collate/t/*.t
+ @echo "==> test couch core"
+ @prove -v $(COUCHDB_ETAP_DIR)/*.t
+ @echo "==> test couch_mrview"
+ @prove -v $(BASE_DIR)/src/couch_mrview/test/*.t
+ @echo "==> test couch_replicator"
+ @prove -v $(BASE_DIR)/src/couch_replicator/test/*.t
+
+testjs: testbuild
+ @$(ESCRIPT) $(BASE_DIR)/test/javascript/test_js.escript
+
+testbuild: testclean
+ @echo "==> init test environement"
+ @$(ERLC) -v -o $(COUCHDB_ETAP_DIR) $(COUCHDB_ETAP_DIR)/etap.erl
+ @$(ERLC) -v -o $(COUCHDB_ETAP_DIR) $(COUCHDB_ETAP_DIR)/test_web.erl
+ @$(ERLC) -v -o $(COUCHDB_ETAP_DIR) $(COUCHDB_ETAP_DIR)/test_util.erl
+ @$(ERLC) -v -o $(COUCHDB_ETAP_DIR) $(COUCHDB_ETAP_DIR)/mustache.erl
+ @cc -DBSD_SOURCE $(COUCHDB_ETAP_DIR)/test_cfg_register.c \
+ -o $(COUCHDB_ETAP_DIR)/test_cfg_register
+ @mkdir -p $(BASE_DIR)/test/out/data
+ @mkdir -p $(BASE_DIR)/test/out/bin
+ @mkdir -p $(BASE_DIR)/test/out/share
+ @mkdir -p $(BASE_DIR)/test/out/log
+ @cp $(BASE_DIR)/src/couch/priv/couchjs $(BASE_DIR)/test/out/bin/
+ @cp -r $(BASE_DIR)/share/server $(BASE_DIR)/test/out/share
+ @cp -r $(BASE_DIR)/share/www $(BASE_DIR)/test/out/share
+ @cp $(BASE_DIR)/etc/rcouch/local.ini $(BASE_DIR)/test/out/
+
+testclean:
+ @rm -rf $(COUCHDB_ETAP_DIR)/*.beam
+ @rm -rf $(BASE_DIR)/test/out
+ @rm -rf $(COUCHDB_ETAP_DIR)/test_cfg_register
+ @rm -rf $(COUCHDB_ETAP_DIR)/*.o
+
+.PHONY: rebar
View
38 NOTICE
@@ -1,20 +1,38 @@
-refuge
+rcouch
------
-2011 (c) Benoît Chesneau <benoitc@e-engura.org>
-2011 (c) Nicolas R Dufour <nrdufour@gmail.com>
+2011-2014 (c) Benoît Chesneau <benoitc@e-engura.org>
+2011-2014 (c) Nicolas R Dufour <nrdufour@gmail.com>
-refuge is released under the Apache 2 license. See the LICENSE file for
+rcouch is released under the Apache 2 license. See the LICENSE file for
the complete license.
third parties attributions
--------------------------
+
+ * Apache CouchDB http://couchdb.apache.org
+ Copyright 2009-2014 The Apache Software Foundation
-- packages/*
- under Apache 2 license
- 2010 (c) Basho Technologies
+ * rebar https://github.com/rebar/rebar
-- packages/osx/makedmg.sh
- under BSD license
- 2011 (c) Coucbase
+ Copyright (c) 2009 Dave Smith (dizzyd@dizzyd.com)
+ * rel/files/app_epath.sh https://github.com/basho/node_package
+
+ Copyright 2014 Basho - Apache License 2
+
+ * rel/files/env.sh https://github.com/basho/node_package
+
+ Copyright 2014 Basho - Apache License 2
+
+ * rel/files/erl https://github.com/basho/node_package
+
+ Copyright 2014 Basho - Apache License 2
+
+ * rel/files/nodetool https://github.com/basho/node_package
+
+ Copyright 2014 Basho - Apache License 2
+
+ * rel/files/runner https://github.com/basho/node_package
+
+ Copyright 2014 Basho - Apache License 2
View
7 attic/rcouchx.xcworkspace/contents.xcworkspacedata
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
- version = "1.0">
- <FileRef
- location = "container:rcouchx/rcouchx.xcodeproj">
- </FileRef>
-</Workspace>
View
30 attic/rcouchx/CouchDBXApplicationController.h
@@ -1,30 +0,0 @@
-/*
- Author: Jan Lehnardt <jan@apache.org>
- This is Apache 2.0 licensed free software
-*/
-#import <Cocoa/Cocoa.h>
-#import <WebKit/WebKit.h>
-
-@interface CouchDBXApplicationController : NSObject{
- IBOutlet NSToolbarItem *start;
- IBOutlet NSToolbarItem *browse;
- IBOutlet NSTextView *outputView;
- IBOutlet WebView *webView;
-
- NSTask *task;
- NSPipe *in, *out;
-}
-
--(IBAction)start:(id)sender;
--(IBAction)browse:(id)sender;
-
--(void)launchCouchDB;
--(void)stop;
--(void)taskTerminated:(NSNotification *)note;
--(void)cleanup;
--(void)openFuton;
--(void)openChooseFileDialogWithListener: (id < WebOpenPanelResultListener >)resultListener allowMultipleFiles: (BOOL)multipleSelection;
--(void)ensureFullCommit;
--(NSString *)applicationSupportFolder;
-
-@end
View
365 attic/rcouchx/CouchDBXApplicationController.m
@@ -1,365 +0,0 @@
-/*
- * Author: Jan Lehnardt <jan@apache.org>
- * This is Apache 2.0 licensed free software
- */
-#import "CouchDBXApplicationController.h"
-
-#import "iniparser.h"
-
-@implementation CouchDBXApplicationController
-
--(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)app
-{
- return YES;
-}
-
--(void)applicationWillTerminate:(NSNotification *)notification
-{
- [self ensureFullCommit];
-
-}
-
-- (void)windowWillClose:(NSNotification *)aNotification
-{
- [self stop];
-}
-
--(void)applicationWillFinishLaunching:(NSNotification *)notification
-{
-
-}
-
-/* found at http://www.cocoadev.com/index.pl?ApplicationSupportFolder */
-- (NSString *)applicationSupportFolder:(NSString*)appName {
- NSString *applicationSupportFolder = nil;
- FSRef foundRef;
- OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType, kDontCreateFolder, &foundRef);
- if (err == noErr) {
- unsigned char path[PATH_MAX];
- OSStatus validPath = FSRefMakePath(&foundRef, path, sizeof(path));
- if (validPath == noErr) {
- applicationSupportFolder = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:(const char *)path
- length:(NSUInteger)strlen((char*)path)];
- }
- }
- applicationSupportFolder = [applicationSupportFolder stringByAppendingPathComponent:appName];
- return applicationSupportFolder;
-}
-
-- (NSString *)applicationSupportFolder {
- return [self applicationSupportFolder:@"rcouchx"];
-}
-
--(NSMutableString *)uriFile
-{
- NSMutableString *urifile = [[NSMutableString alloc] init];
-
- [urifile appendString:[self applicationSupportFolder]];
- [urifile appendString:@"/couch.uri"];
- return urifile;
-}
-
--(NSMutableString *) finalConfigPath
-{
- NSMutableString *iniFile = [[NSMutableString alloc] init];;
- [iniFile appendString:[[NSBundle mainBundle] resourcePath]];
- [iniFile appendString:@"/rcouch/etc/local.ini"];
- return iniFile;
-}
-
--(void)ensureFullCommit
-{
- // get couch uri
- NSString *uri = [NSString stringWithContentsOfFile:[self uriFile] encoding:NSUTF8StringEncoding error:NULL];
- uri = [uri substringToIndex:[uri length] - 1];
-
- // TODO: maybe parse out \n
-
- // get database dir
- NSString *databaseDir = [self applicationSupportFolder];
-
- // get ensure_full_commit.sh
- NSMutableString *ensure_full_commit_script = [[NSMutableString alloc] init];
- [ensure_full_commit_script appendString: [[NSBundle mainBundle] resourcePath]];
- [ensure_full_commit_script appendString: @"/ensure_full_commit.sh"];
-
- // exec ensure_full_commit.sh database_dir couch.uri
- NSArray *args = [[NSArray alloc] initWithObjects:databaseDir, uri, nil];
- NSTask *commitTask = [[NSTask alloc] init];
- [commitTask setArguments: args];
- [commitTask launch];
- [commitTask waitUntilExit];
-
-}
-
-
--(void)awakeFromNib
-{
- [browse setEnabled:NO];
-
- NSLayoutManager *lm;
-
- lm = [outputView layoutManager];
- [lm setDelegate:(id < NSLayoutManagerDelegate >) self];
-
- [webView setUIDelegate:self];
-
- [self launchCouchDB];
-}
-
--(IBAction)start:(id)sender
-{
- if([task isRunning]) {
- [self stop];
- return;
- }
-
- [self launchCouchDB];
-}
-
--(void)deleteUri
-{
- [[NSFileManager defaultManager] removeItemAtPath:[self uriFile] error:NULL];
-}
-
--(void)stop
-{
- NSFileHandle *writer;
- writer = [in fileHandleForWriting];
- [writer writeData:[@"q().\n" dataUsingEncoding:NSASCIIStringEncoding]];
- [writer closeFile];
-
- [browse setEnabled:NO];
- [start setImage:[NSImage imageNamed:@"start.png"]];
- [start setLabel:@"start"];
-
- [self deleteUri];
-
-}
-
--(void)waitStartup
-{
- while(1) {
- if(![[NSFileManager defaultManager] fileExistsAtPath:[self uriFile]]) {
- sleep(1);
- } else {
- break;
- }
- }
-}
-
--(void)setInitParams
-{
-
- // determine data dir
- NSString *dataDir = [self applicationSupportFolder];
-
- // create if it doesn't exist
- if(![[NSFileManager defaultManager] fileExistsAtPath:dataDir]) {
- [[NSFileManager defaultManager] createDirectoryAtPath:dataDir withIntermediateDirectories:YES attributes:nil error:NULL];
- }
-
- // delete uri file if needed
- [self deleteUri];
-
- dictionary* iniDict = iniparser_load([[self finalConfigPath] UTF8String]);
- if (iniDict == NULL) {
- iniDict = dictionary_new(0);
- assert(iniDict);
- }
-
- dictionary_set(iniDict, "couchdb", NULL);
- if (iniparser_getstring(iniDict, "couchdb:database_dir", NULL) == NULL) {
- dictionary_set(iniDict, "couchdb:database_dir", [dataDir UTF8String]);
- }
- if (iniparser_getstring(iniDict, "couchdb:view_index_dir", NULL) == NULL) {
- dictionary_set(iniDict, "couchdb:view_index_dir", [dataDir UTF8String]);
- }
-
- if (iniparser_getstring(iniDict, "couchdb:uri_file", NULL) == NULL) {
- dictionary_set(iniDict, "couchdb:uri_file", [[self uriFile] UTF8String]);
- }
-
- NSString *tmpfile = [NSString stringWithFormat:@"%@.tmp", [self finalConfigPath]];
- FILE *f = fopen([tmpfile UTF8String], "w");
- if (f) {
- iniparser_dump_ini(iniDict, f);
- fclose(f);
- rename([tmpfile UTF8String], [[self finalConfigPath] UTF8String]);
- } else {
- NSLog(@"Can't write to temporary config file: %@: %s\n", tmpfile, strerror(errno));
- }
-
- iniparser_freedict(iniDict);
-}
-
--(void)launchCouchDB
-{
- [self setInitParams];
- [browse setEnabled:YES];
- [start setImage:[NSImage imageNamed:@"stop.png"]];
- [start setLabel:@"stop"];
-
-
- in = [[NSPipe alloc] init];
- out = [[NSPipe alloc] init];
- task = [[NSTask alloc] init];
-
- NSMutableString *launchPath = [[NSMutableString alloc] init];
- [launchPath appendString:[[NSBundle mainBundle] resourcePath]];
- [launchPath appendString:@"/rcouch"];
- [task setCurrentDirectoryPath:launchPath];
-
- [launchPath appendString:@"/bin/rcouch"];
- [task setLaunchPath:launchPath];
- NSArray *args = [[NSArray alloc] initWithObjects:@"console", nil];
- [task setArguments:args];
- [task setStandardInput:in];
- [task setStandardOutput:out];
-
- NSFileHandle *fh = [out fileHandleForReading];
- NSNotificationCenter *nc;
- nc = [NSNotificationCenter defaultCenter];
-
- [nc addObserver:self
- selector:@selector(dataReady:)
- name:NSFileHandleReadCompletionNotification
- object:fh];
-
- [nc addObserver:self
- selector:@selector(taskTerminated:)
- name:NSTaskDidTerminateNotification
- object:task];
-
- [task launch];
- [outputView setString:@"Starting rcouch...\n"];
- [fh readInBackgroundAndNotify];
-
- [self waitStartup];
- [self openFuton];
-
-}
-
--(void)taskTerminated:(NSNotification *)note
-{
- [self cleanup];
-}
-
--(void)cleanup
-{
- [task release];
- task = nil;
-
- [in release];
- in = nil;
- [out release];
- out = nil;
-
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-
- [self deleteUri];
-}
-
--(void)openFuton
-{
- // get couch uri
- NSString *uri = [NSString stringWithContentsOfFile:[self uriFile] encoding:NSUTF8StringEncoding error:NULL];
- uri = [uri substringToIndex:[uri length] - 1];
-
- NSMutableString *futonUri = [[NSMutableString alloc] init];
- [futonUri appendString:uri];
- [futonUri appendString:@"_utils/"];
-
- [webView setTextSizeMultiplier:1.3];
- [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:futonUri]]];
-
-}
-
--(IBAction)browse:(id)sender
-{
- [self openFuton];
-}
-
-- (void)appendData:(NSData *)d
-{
- NSString *s = [[NSString alloc] initWithData: d
- encoding: NSUTF8StringEncoding];
- NSTextStorage *ts = [outputView textStorage];
- [ts replaceCharactersInRange:NSMakeRange([ts length], 0) withString:s];
- [s release];
-}
-
-- (void)dataReady:(NSNotification *)n
-{
- NSData *d;
- d = [[n userInfo] valueForKey:NSFileHandleNotificationDataItem];
- if ([d length]) {
- [self appendData:d];
- }
- if (task)
- [[out fileHandleForReading] readInBackgroundAndNotify];
-
-
-}
-
-- (void)layoutManager:(NSLayoutManager *)aLayoutManager didCompleteLayoutForTextContainer:(NSTextContainer *)aTextContainer atEnd:(BOOL)flag
-{
- if (flag) {
- NSTextStorage *ts = [outputView textStorage];
- [outputView scrollRangeToVisible:NSMakeRange([ts length], 0)];
- }
-}
-
-- (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id < WebOpenPanelResultListener >)resultListener
-{
- [self openChooseFileDialogWithListener: resultListener
- allowMultipleFiles: FALSE];
-}
-- (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id < WebOpenPanelResultListener >)resultListener allowMultipleFiles:(BOOL)allowMultipleFiles
-{
- [self openChooseFileDialogWithListener: resultListener
- allowMultipleFiles: allowMultipleFiles];
-}
-
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
- #define MULTIPLE_SELECTION_POSSIBLE TRUE
-#else
- #define MULTIPLE_SELECTION_POSSIBLE FALSE
-#endif
-- (void)openChooseFileDialogWithListener: (id < WebOpenPanelResultListener >)resultListener allowMultipleFiles: (BOOL)multipleSelection
-{
- NSOpenPanel* openDlg = [NSOpenPanel openPanel];
- [openDlg setCanChooseFiles:YES];
- [openDlg setCanChooseDirectories:NO];
- [openDlg setAllowsMultipleSelection: (multipleSelection && MULTIPLE_SELECTION_POSSIBLE)];
- NSInteger result = [openDlg runModal];
- if (result == NSFileHandlingPanelOKButton) {
- NSArray* files = [openDlg URLs];
-#if MULTIPLE_SELECTION_POSSIBLE
- NSInteger filesNumber = [files count];
- if (filesNumber == 1) {
-#endif
- NSURL* fileURL = [files objectAtIndex:0];
- NSString* path = [fileURL path];
- [resultListener chooseFilename:path ];
-#if MULTIPLE_SELECTION_POSSIBLE
- } else {
- NSMutableArray* fileNames = [NSMutableArray arrayWithCapacity:filesNumber];
- for (NSURL* fileURL in files) {
- NSString* path = [fileURL path];
- [fileNames addObject:path];
- }
- [resultListener chooseFilenames: fileNames];
- }
-#endif
- } else {
- [resultListener cancel];
- }
-}
-
-- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
-{
- NSRunInformationalAlertPanel(nil, message, nil, nil, nil);
-}
-
-@end
View
BIN  attic/rcouchx/English.lproj/InfoPlist.strings
Binary file not shown
View
2,600 attic/rcouchx/English.lproj/MainMenu.nib/designable.nib
0 additions, 2,600 deletions not shown
View
BIN  attic/rcouchx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown
View
32 attic/rcouchx/Info.plist
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string>rcouch.icns</string>
- <key>CFBundleIdentifier</key>
- <string>com.refuge.rcouchx</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>jlcd</string>
- <key>CFBundleVersion</key>
- <string>0.5.1</string>
- <key>HomePage</key>
- <string>http://127.0.0.1:5984/_utils/</string>
- <key>LSApplicationCategoryType</key>
- <string>public.app-category.developer-tools</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
View
4 attic/rcouchx/README
@@ -1,4 +0,0 @@
-# CouchDBX Application Wrapper
-
-Get http://github.com/janl/couchdbx-core/ and compile it. Copy the resulting `couchdbx-core` folder into the top level dir of this project. Launch Xcode and build the app.
-
View
18 attic/rcouchx/Rakefile
@@ -1,18 +0,0 @@
-# Ruby task file
-#
-# Run with
-#
-# rake copy_couch_db_binary