wagn 1.13.0.pre2 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (325) hide show
  1. checksums.yaml +4 -4
  2. data/.simplecov +7 -2
  3. data/.tm_properties +1 -0
  4. data/CONTRIBUTING.rdoc +13 -2
  5. data/README.rdoc +3 -5
  6. data/VERSION +1 -1
  7. data/config/routes.rb +1 -5
  8. data/config/version_cards.txt +1 -1
  9. data/db/bootstrap/card_references.yml +199 -213
  10. data/db/bootstrap/card_revisions.yml +634 -656
  11. data/db/bootstrap/cards.yml +1403 -1437
  12. data/db/migrate_cards/20140307231621_user_data_to_cards.rb +1 -7
  13. data/db/migrate_cards/20140317035504_account_requests_to_signups.rb +9 -0
  14. data/db/migrate_cards/20140725180118_config_card_updates.rb +12 -0
  15. data/db/migrate_cards/data/1.13_config_text.json +32 -0
  16. data/features/setup.feature +1 -1
  17. data/lib/card/auth.rb +0 -24
  18. data/lib/card/content.rb +9 -4
  19. data/lib/card/env.rb +1 -13
  20. data/lib/card/format.rb +8 -3
  21. data/lib/card/generators/format/format_generator.rb +2 -2
  22. data/lib/card/generators/set/set_generator.rb +2 -2
  23. data/lib/card/loader.rb +11 -11
  24. data/lib/card/set.rb +3 -3
  25. data/lib/card/set_pattern.rb +1 -1
  26. data/lib/wagn/application.rb +6 -6
  27. data/lib/wagn/commands.rb +2 -2
  28. data/lib/wagn/config/environments/development.rb +1 -5
  29. data/lib/wagn/config/initializers/uuid_state_file.rb +1 -0
  30. data/lib/wagn/generators/wagn/templates/Gemfile +21 -16
  31. data/lib/wagn/generators/wagn/templates/config/application.rb +1 -1
  32. data/lib/wagn/generators/wagn/templates/config/boot.rb +7 -3
  33. data/lib/wagn/generators/wagn/wagn_generator.rb +4 -4
  34. data/lib/wagn/mods_spec_helper.rb +0 -2
  35. data/lib/wagn/tasks/test.rake +1 -1
  36. data/lib/wagn/tasks/wagn.rake +21 -26
  37. data/lib/wagn/version.rb +4 -8
  38. data/{mods/core/chunks → mod/core/chunk}/include.rb +0 -0
  39. data/{mods/core/chunks → mod/core/chunk}/link.rb +0 -0
  40. data/{mods/core/chunks → mod/core/chunk}/literal.rb +0 -0
  41. data/{mods/core/chunks → mod/core/chunk}/reference.rb +0 -0
  42. data/{mods/core/chunks → mod/core/chunk}/uri.rb +0 -0
  43. data/{mods/core/formats → mod/core/format}/data_format.rb +0 -0
  44. data/{mods/core/formats → mod/core/format}/html_format.rb +2 -2
  45. data/{mods/core/formats → mod/core/format}/text_format.rb +0 -0
  46. data/{mods/core/layouts → mod/core/layout}/blank.html +0 -0
  47. data/{mods/core/layouts → mod/core/layout}/default.html +0 -0
  48. data/{mods/core/layouts → mod/core/layout}/noside.html +0 -0
  49. data/{mods/core/layouts → mod/core/layout}/pre.html +0 -0
  50. data/{mods/core/layouts → mod/core/layout}/simple.html +0 -0
  51. data/{mods/core/sets → mod/core/set}/all/active_card.rb +0 -0
  52. data/{mods/core/sets → mod/core/set}/all/attribute_tracking.rb +0 -0
  53. data/{mods/core/sets → mod/core/set}/all/collection.rb +38 -0
  54. data/{mods/core/sets → mod/core/set}/all/content.rb +0 -0
  55. data/{mods/core/sets → mod/core/set}/all/fetch.rb +0 -0
  56. data/{mods/core/sets → mod/core/set}/all/initialize.rb +0 -0
  57. data/{mods/core/sets → mod/core/set}/all/name.rb +0 -0
  58. data/{mods/core/sets → mod/core/set}/all/pattern.rb +0 -0
  59. data/{mods/core/sets → mod/core/set}/all/permissions.rb +17 -7
  60. data/{mods/core/sets → mod/core/set}/all/phases.rb +1 -0
  61. data/{mods/core/sets → mod/core/set}/all/references.rb +0 -0
  62. data/{mods/core/sets → mod/core/set}/all/rules.rb +0 -0
  63. data/{mods/core/sets → mod/core/set}/all/states.rb +0 -0
  64. data/{mods/core/sets → mod/core/set}/all/templating.rb +0 -0
  65. data/{mods/core/sets → mod/core/set}/all/tracked_attributes.rb +0 -0
  66. data/{mods/core/sets → mod/core/set}/all/trash.rb +0 -0
  67. data/{mods/core/sets → mod/core/set}/all/type.rb +0 -0
  68. data/{mods/core/sets → mod/core/set}/all/utils.rb +4 -2
  69. data/{mods/core/sets → mod/core/set}/right/structure.rb +0 -0
  70. data/{mods/core/sets → mod/core/set}/type/plain_text.rb +0 -0
  71. data/{mods/core/set_patterns → mod/core/set_pattern}/01_all.rb +0 -0
  72. data/{mods/core/set_patterns → mod/core/set_pattern}/02_all_plus.rb +0 -0
  73. data/{mods/core/set_patterns → mod/core/set_pattern}/03_type.rb +0 -0
  74. data/{mods/core/set_patterns → mod/core/set_pattern}/04_star.rb +0 -0
  75. data/{mods/core/set_patterns → mod/core/set_pattern}/05_rstar.rb +0 -0
  76. data/{mods/core/set_patterns → mod/core/set_pattern}/06_right.rb +0 -0
  77. data/{mods/core/set_patterns → mod/core/set_pattern}/07_type_plus_right.rb +0 -0
  78. data/{mods/core/set_patterns → mod/core/set_pattern}/08_self.rb +0 -0
  79. data/{mods/standard/files → mod/standard/file}/103/icon-6566.ico +0 -0
  80. data/{mods/standard/files → mod/standard/file}/103/large-6566.ico +0 -0
  81. data/{mods/standard/files → mod/standard/file}/103/medium-6566.ico +0 -0
  82. data/{mods/standard/files → mod/standard/file}/103/original-6566.ico +0 -0
  83. data/{mods/standard/files → mod/standard/file}/103/small-6566.ico +0 -0
  84. data/{mods/standard/files → mod/standard/file}/79/icon-6556.png +0 -0
  85. data/{mods/standard/files → mod/standard/file}/79/large-6556.png +0 -0
  86. data/{mods/standard/files → mod/standard/file}/79/medium-6556.png +0 -0
  87. data/{mods/standard/files → mod/standard/file}/79/original-6556.png +0 -0
  88. data/{mods/standard/files → mod/standard/file}/79/small-6556.png +0 -0
  89. data/{mods/standard/files → mod/standard/file}/790/icon-6419.png +0 -0
  90. data/{mods/standard/files → mod/standard/file}/790/large-6419.png +0 -0
  91. data/{mods/standard/files → mod/standard/file}/790/medium-6419.png +0 -0
  92. data/{mods/standard/files → mod/standard/file}/790/original-6419.png +0 -0
  93. data/{mods/standard/files → mod/standard/file}/790/small-6419.png +0 -0
  94. data/{mods/standard/formats → mod/standard/format}/css_format.rb +0 -0
  95. data/{mods/standard/formats → mod/standard/format}/csv_format.rb +0 -0
  96. data/{mods/standard/formats → mod/standard/format}/email_html_format.rb +0 -0
  97. data/{mods/standard/formats → mod/standard/format}/file_format.rb +0 -0
  98. data/{mods/standard/formats → mod/standard/format}/js_format.rb +0 -0
  99. data/{mods/standard/formats → mod/standard/format}/json_format.rb +0 -0
  100. data/{mods/standard/formats → mod/standard/format}/rss_format.rb +0 -0
  101. data/{mods/standard/formats → mod/standard/format}/xml_format.rb +0 -0
  102. data/{mods → mod}/standard/lib/card/machine.rb +37 -9
  103. data/{mods → mod}/standard/lib/card/machine_input.rb +2 -2
  104. data/{mods → mod}/standard/lib/javascript/html5shiv-printshiv.js +0 -0
  105. data/{mods → mod}/standard/lib/javascript/jquery-ui.js +0 -0
  106. data/{mods → mod}/standard/lib/javascript/jquery.autosize.js +0 -0
  107. data/{mods → mod}/standard/lib/javascript/jquery.fileupload.js +0 -0
  108. data/{mods → mod}/standard/lib/javascript/jquery.iframe-transport.js +0 -0
  109. data/{mods → mod}/standard/lib/javascript/jquery.js +0 -0
  110. data/{mods → mod}/standard/lib/javascript/jquery.ui.autocomplete.html.js +0 -0
  111. data/{mods → mod}/standard/lib/javascript/jquery_ujs.js +0 -0
  112. data/{mods → mod}/standard/lib/javascript/jquerymobile.js +0 -0
  113. data/{mods → mod}/standard/lib/javascript/tinymce.js +0 -0
  114. data/{mods → mod}/standard/lib/javascript/wagn.js.coffee +13 -4
  115. data/{mods → mod}/standard/lib/javascript/wagn_menu.js +0 -0
  116. data/{mods → mod}/standard/lib/javascript/wagn_mod.js.coffee +0 -0
  117. data/{mods → mod}/standard/lib/stylesheets/functional.scss +0 -0
  118. data/{mods → mod}/standard/lib/stylesheets/jquery-ui-smoothness.css +0 -0
  119. data/{mods → mod}/standard/lib/stylesheets/standard.scss +0 -0
  120. data/{mods/standard/sets → mod/standard/set}/all/account.rb +0 -0
  121. data/{mods/standard/sets → mod/standard/set}/all/all_css.rb +0 -0
  122. data/{mods/standard/sets → mod/standard/set}/all/all_csv.rb +0 -0
  123. data/{mods/standard/sets → mod/standard/set}/all/attach.rb +1 -1
  124. data/{mods/standard/sets → mod/standard/set}/all/base.rb +2 -2
  125. data/{mods/standard/sets → mod/standard/set}/all/comment.rb +0 -0
  126. data/{mods/standard/sets → mod/standard/set}/all/email_html.rb +0 -0
  127. data/{mods/standard/sets → mod/standard/set}/all/event_viz.rb +0 -0
  128. data/{mods/standard/sets → mod/standard/set}/all/file.rb +0 -0
  129. data/{mods/standard/sets → mod/standard/set}/all/flexmail.rb +0 -0
  130. data/{mods/standard/sets → mod/standard/set}/all/follow.rb +0 -0
  131. data/{mods/standard/sets → mod/standard/set}/all/history.rb +1 -1
  132. data/{mods/standard/sets → mod/standard/set}/all/json.rb +2 -2
  133. data/{mods/standard/sets → mod/standard/set}/all/rich_html.rb +12 -7
  134. data/{mods/standard/sets → mod/standard/set}/all/rss.rb +0 -0
  135. data/{mods/standard/sets → mod/standard/set}/all/text.rb +0 -0
  136. data/{mods/standard/sets → mod/standard/set}/right/account.rb +27 -10
  137. data/{mods/standard/sets → mod/standard/set}/right/add_help.rb +0 -0
  138. data/{mods/standard/sets → mod/standard/set}/right/comment.rb +2 -2
  139. data/{mods/standard/sets → mod/standard/set}/right/create.rb +0 -0
  140. data/{mods/standard/sets → mod/standard/set}/right/default.rb +0 -0
  141. data/{mods/standard/sets → mod/standard/set}/right/delete.rb +0 -0
  142. data/{mods/standard/sets → mod/standard/set}/right/email.rb +0 -0
  143. data/mod/standard/set/right/help.rb +3 -0
  144. data/mod/standard/set/right/machine_output.rb +19 -0
  145. data/{mods/standard/sets → mod/standard/set}/right/password.rb +0 -0
  146. data/{mods/standard/sets → mod/standard/set}/right/read.rb +0 -0
  147. data/{mods/standard/sets → mod/standard/set}/right/salt.rb +0 -0
  148. data/{mods/standard/sets → mod/standard/set}/right/script.rb +0 -0
  149. data/{mods/standard/sets → mod/standard/set}/right/stats.rb +0 -0
  150. data/{mods/standard/sets → mod/standard/set}/right/status.rb +0 -0
  151. data/mod/standard/set/right/style.rb +9 -0
  152. data/{mods/standard/sets → mod/standard/set}/right/token.rb +0 -0
  153. data/{mods/standard/sets → mod/standard/set}/right/update.rb +0 -0
  154. data/{mods/standard/sets → mod/standard/set}/right/when_created.rb +0 -0
  155. data/{mods/standard/sets → mod/standard/set}/right/when_last_edited.rb +0 -0
  156. data/{mods/standard/sets → mod/standard/set}/rstar/rules.rb +0 -0
  157. data/{mods/standard/sets → mod/standard/set}/self/account_links.rb +3 -3
  158. data/{mods/standard/sets → mod/standard/set}/self/alerts.rb +0 -0
  159. data/{mods/standard/sets → mod/standard/set}/self/all.rb +0 -0
  160. data/{mods/standard/sets → mod/standard/set}/self/foot.rb +0 -0
  161. data/{mods/standard/sets → mod/standard/set}/self/head.rb +1 -1
  162. data/{mods/standard/sets → mod/standard/set}/self/navbox.rb +0 -0
  163. data/{mods/standard/sets → mod/standard/set}/self/now.rb +0 -0
  164. data/{mods/standard/sets → mod/standard/set}/self/recent.rb +0 -0
  165. data/{mods/standard/sets → mod/standard/set}/self/script_card_menu.rb +1 -1
  166. data/{mods/standard/sets/self/style_functional.rb → mod/standard/set/self/script_html5shiv_printshiv.rb} +1 -2
  167. data/{mods/standard/sets → mod/standard/set}/self/script_jquery.rb +1 -1
  168. data/{mods/standard/sets → mod/standard/set}/self/script_jquery_helper.rb +1 -1
  169. data/{mods/standard/sets → mod/standard/set}/self/script_slot.rb +1 -1
  170. data/{mods/standard/sets → mod/standard/set}/self/script_tinymce.rb +1 -1
  171. data/{mods/standard/sets → mod/standard/set}/self/search.rb +0 -0
  172. data/{mods/standard/sets → mod/standard/set}/self/signin.rb +9 -1
  173. data/{mods/standard/sets → mod/standard/set}/self/stats.rb +0 -0
  174. data/mod/standard/set/self/style_functional.rb +8 -0
  175. data/mod/standard/set/self/style_jquery_ui_smoothness.rb +8 -0
  176. data/{mods/standard/sets → mod/standard/set}/self/style_standard.rb +1 -1
  177. data/{mods/standard/sets → mod/standard/set}/self/version.rb +0 -0
  178. data/{mods/standard/sets → mod/standard/set}/type/basic.rb +0 -0
  179. data/{mods/standard/sets → mod/standard/set}/type/cardtype.rb +0 -0
  180. data/{mods/standard/sets → mod/standard/set}/type/coffee_script.rb +0 -0
  181. data/{mods/standard/sets → mod/standard/set}/type/css.rb +0 -0
  182. data/{mods/standard/sets → mod/standard/set}/type/date.rb +0 -0
  183. data/{mods/standard/sets → mod/standard/set}/type/file.rb +0 -0
  184. data/{mods/standard/sets → mod/standard/set}/type/html.rb +0 -0
  185. data/{mods/standard/sets → mod/standard/set}/type/image.rb +1 -1
  186. data/{mods/standard/sets → mod/standard/set}/type/java_script.rb +0 -0
  187. data/{mods/standard/sets → mod/standard/set}/type/layout_type.rb +0 -0
  188. data/{mods/standard/sets → mod/standard/set}/type/number.rb +0 -0
  189. data/{mods/standard/sets → mod/standard/set}/type/phrase.rb +0 -0
  190. data/{mods/standard/sets → mod/standard/set}/type/pointer.rb +11 -1
  191. data/{mods/standard/sets → mod/standard/set}/type/scss.rb +0 -0
  192. data/{mods/standard/sets → mod/standard/set}/type/search_type.rb +1 -35
  193. data/{mods/standard/sets → mod/standard/set}/type/set.rb +0 -0
  194. data/{mods/standard/sets → mod/standard/set}/type/setting.rb +0 -0
  195. data/mod/standard/set/type/signup.rb +146 -0
  196. data/{mods/standard/sets → mod/standard/set}/type/skin.rb +0 -0
  197. data/{mods/standard/sets → mod/standard/set}/type/toggle.rb +0 -0
  198. data/{mods/standard/sets → mod/standard/set}/type/user.rb +10 -20
  199. data/spec/controllers/card_controller_spec.rb +1 -4
  200. data/spec/{mods/core/chunks → mod/core/chunk}/literal_spec.rb +0 -0
  201. data/spec/{mods/core/chunks → mod/core/chunk}/uri_spec.rb +0 -0
  202. data/spec/{mods/core/formats → mod/core/format}/data_format_spec.rb +0 -0
  203. data/spec/{mods/core/formats → mod/core/format}/html_format_spec.rb +0 -0
  204. data/spec/{mods/core/formats → mod/core/format}/text_format_spec.rb +0 -0
  205. data/spec/{mods/core/sets → mod/core/set}/all/active_card_spec.rb +0 -0
  206. data/spec/{mods/core/sets → mod/core/set}/all/attribute_tracking_spec.rb +0 -0
  207. data/spec/{mods/core/sets → mod/core/set}/all/collection_spec.rb +0 -0
  208. data/spec/{mods/core/sets → mod/core/set}/all/content_spec.rb +0 -0
  209. data/spec/{mods/core/sets → mod/core/set}/all/fetch_spec.rb +0 -0
  210. data/spec/{mods/core/sets → mod/core/set}/all/initialize_spec.rb +0 -0
  211. data/spec/{mods/core/sets → mod/core/set}/all/name_spec.rb +0 -0
  212. data/spec/{mods/core/sets → mod/core/set}/all/pattern_spec.rb +0 -0
  213. data/spec/{mods/core/sets → mod/core/set}/all/permissions_spec.rb +0 -0
  214. data/spec/{mods/core/sets → mod/core/set}/all/phases_spec.rb +0 -0
  215. data/spec/{mods/core/sets → mod/core/set}/all/references_spec.rb +0 -0
  216. data/spec/{mods/core/sets → mod/core/set}/all/rules2_spec.rb +0 -0
  217. data/spec/{mods/core/sets → mod/core/set}/all/rules_spec.rb +0 -0
  218. data/spec/{mods/core/sets → mod/core/set}/all/states_spec.rb +0 -0
  219. data/spec/{mods/core/sets → mod/core/set}/all/templating_spec.rb +0 -0
  220. data/spec/{mods/core/sets → mod/core/set}/all/tracked_attributes_spec.rb +0 -0
  221. data/spec/{mods/core/sets → mod/core/set}/all/trash_spec.rb +0 -0
  222. data/spec/{mods/core/sets → mod/core/set}/all/type_spec.rb +0 -0
  223. data/spec/{mods/core/sets → mod/core/set}/all/utils_spec.rb +0 -0
  224. data/spec/{mods/standard/chunks → mod/standard/chunk}/include_spec.rb +0 -0
  225. data/spec/{mods/standard/chunks → mod/standard/chunk}/link_spec.rb +0 -0
  226. data/spec/{mods/standard/formats → mod/standard/format}/css_format_spec.rb +0 -0
  227. data/spec/{mods/standard/formats → mod/standard/format}/csv_format_spec.rb +0 -0
  228. data/spec/{mods/standard/formats → mod/standard/format}/email_html_format_spec.rb +0 -0
  229. data/spec/{mods/standard/formats → mod/standard/format}/file_format_spec.rb +0 -0
  230. data/spec/{mods/standard/formats → mod/standard/format}/js_format_spec.rb +0 -0
  231. data/spec/{mods/standard/formats → mod/standard/format}/json_format_spec.rb +0 -0
  232. data/spec/{mods/standard/formats → mod/standard/format}/rss_format_spec.rb +0 -0
  233. data/spec/{mods/standard/formats → mod/standard/format}/xml_format_spec.rb +0 -0
  234. data/spec/{mods → mod}/standard/lib/machine_input_spec.rb +0 -0
  235. data/spec/{mods → mod}/standard/lib/machine_spec.rb +17 -3
  236. data/spec/{mods/standard/sets → mod/standard/set}/all/account_spec.rb +0 -0
  237. data/spec/{mods/standard/sets → mod/standard/set}/all/all_css_spec.rb +0 -0
  238. data/spec/{mods/standard/sets → mod/standard/set}/all/all_csv_spec.rb +0 -0
  239. data/spec/{mods/standard/sets → mod/standard/set}/all/attach_spec.rb +0 -0
  240. data/spec/{mods/standard/sets → mod/standard/set}/all/base_spec.rb +0 -0
  241. data/spec/{mods/standard/sets → mod/standard/set}/all/comment_spec.rb +0 -0
  242. data/spec/{mods/standard/sets → mod/standard/set}/all/email_html_spec.rb +0 -0
  243. data/spec/mod/standard/set/all/event_viz_spec.rb +9 -0
  244. data/spec/{mods/standard/sets → mod/standard/set}/all/file_spec.rb +0 -0
  245. data/spec/{mods/standard/sets → mod/standard/set}/all/flexmail_spec.rb +0 -0
  246. data/spec/{mods/standard/sets → mod/standard/set}/all/follow_spec.rb +0 -0
  247. data/spec/{mods/standard/sets → mod/standard/set}/all/history_spec.rb +0 -0
  248. data/spec/{mods/standard/sets → mod/standard/set}/all/json_spec.rb +0 -0
  249. data/spec/{mods/standard/sets → mod/standard/set}/all/rich_html_spec.rb +0 -0
  250. data/spec/{mods/standard/sets → mod/standard/set}/all/rss_spec.rb +0 -0
  251. data/spec/{mods/standard/sets → mod/standard/set}/all/text_spec.rb +0 -0
  252. data/spec/{mods/standard/sets → mod/standard/set}/right/account_spec.rb +1 -1
  253. data/spec/{mods/standard/sets → mod/standard/set}/right/add_help_spec.rb +0 -0
  254. data/spec/{mods/standard/sets → mod/standard/set}/right/comment_spec.rb +0 -0
  255. data/spec/{mods/standard/sets → mod/standard/set}/right/create_spec.rb +0 -0
  256. data/spec/{mods/standard/sets → mod/standard/set}/right/default_spec.rb +0 -0
  257. data/spec/{mods/standard/sets → mod/standard/set}/right/delete_spec.rb +0 -0
  258. data/spec/{mods/standard/sets → mod/standard/set}/right/email_spec.rb +0 -0
  259. data/spec/{mods/standard/sets → mod/standard/set}/right/help_spec.rb +0 -0
  260. data/spec/{mods/standard/sets → mod/standard/set}/right/machine_output_spec.rb +0 -0
  261. data/spec/{mods/standard/sets → mod/standard/set}/right/password_spec.rb +0 -0
  262. data/spec/{mods/standard/sets → mod/standard/set}/right/read_spec.rb +0 -0
  263. data/spec/{mods/standard/sets → mod/standard/set}/right/salt_spec.rb +0 -0
  264. data/spec/{mods/standard/sets → mod/standard/set}/right/script_spec.rb +0 -0
  265. data/spec/{mods/standard/sets → mod/standard/set}/right/stats_spec.rb +0 -0
  266. data/spec/{mods/standard/sets → mod/standard/set}/right/status_spec.rb +0 -0
  267. data/spec/{mods/standard/sets → mod/standard/set}/right/structure_spec.rb +0 -0
  268. data/spec/{mods/standard/sets → mod/standard/set}/right/style_spec.rb +0 -0
  269. data/spec/{mods/standard/sets → mod/standard/set}/right/token_spec.rb +0 -0
  270. data/spec/{mods/standard/sets → mod/standard/set}/right/update_spec.rb +0 -0
  271. data/spec/{mods/standard/sets → mod/standard/set}/right/when_created_spec.rb +0 -0
  272. data/spec/{mods/standard/sets → mod/standard/set}/right/when_last_edited_spec.rb +0 -0
  273. data/spec/{mods/standard/sets → mod/standard/set}/rstar/rules_spec.rb +0 -0
  274. data/spec/{mods/standard/sets → mod/standard/set}/self/account_links_spec.rb +0 -0
  275. data/spec/{mods/standard/sets → mod/standard/set}/self/alerts_spec.rb +0 -0
  276. data/spec/{mods/standard/sets → mod/standard/set}/self/all_spec.rb +0 -0
  277. data/spec/{mods/standard/sets → mod/standard/set}/self/foot_spec.rb +0 -0
  278. data/spec/{mods/standard/sets → mod/standard/set}/self/head_spec.rb +0 -0
  279. data/spec/{mods/standard/sets → mod/standard/set}/self/navbox_spec.rb +0 -0
  280. data/spec/{mods/standard/sets → mod/standard/set}/self/now_spec.rb +0 -0
  281. data/spec/{mods/standard/sets → mod/standard/set}/self/recent_spec.rb +0 -0
  282. data/spec/{mods/standard/sets → mod/standard/set}/self/search_spec.rb +0 -0
  283. data/spec/{mods/standard/sets → mod/standard/set}/self/signin_spec.rb +0 -0
  284. data/spec/{mods/standard/sets → mod/standard/set}/self/stats_spec.rb +0 -0
  285. data/spec/{mods/standard/sets → mod/standard/set}/self/style_functional_spec.rb +0 -0
  286. data/spec/{mods/standard/sets → mod/standard/set}/self/style_jquery_ui_smoothness_spec.rb +0 -0
  287. data/spec/{mods/standard/sets → mod/standard/set}/self/style_standard_spec.rb +0 -0
  288. data/spec/{mods/standard/sets → mod/standard/set}/self/version_spec.rb +0 -0
  289. data/spec/{mods/standard/sets → mod/standard/set}/type/basic_spec.rb +0 -0
  290. data/spec/{mods/standard/sets → mod/standard/set}/type/cardtype_spec.rb +0 -0
  291. data/spec/{mods/standard/sets → mod/standard/set}/type/coffeescript_spec.rb +0 -0
  292. data/spec/{mods/standard/sets → mod/standard/set}/type/css_spec.rb +0 -0
  293. data/spec/{mods/standard/sets → mod/standard/set}/type/date_spec.rb +0 -0
  294. data/spec/{mods/standard/sets → mod/standard/set}/type/file_spec.rb +0 -0
  295. data/spec/{mods/standard/sets → mod/standard/set}/type/html_spec.rb +0 -0
  296. data/spec/{mods/standard/sets → mod/standard/set}/type/image_spec.rb +0 -0
  297. data/spec/{mods/standard/sets → mod/standard/set}/type/javascript_spec.rb +0 -0
  298. data/spec/{mods/standard/sets → mod/standard/set}/type/layout_type_spec.rb +0 -0
  299. data/spec/{mods/standard/sets → mod/standard/set}/type/number_spec.rb +0 -0
  300. data/spec/{mods/standard/sets → mod/standard/set}/type/phrase_spec.rb +0 -0
  301. data/spec/{mods/standard/sets → mod/standard/set}/type/plain_text_spec.rb +0 -0
  302. data/spec/{mods/standard/sets → mod/standard/set}/type/pointer_spec.rb +0 -0
  303. data/spec/{mods/standard/sets → mod/standard/set}/type/scss_spec.rb +0 -0
  304. data/spec/{mods/standard/sets → mod/standard/set}/type/search_type_spec.rb +0 -0
  305. data/spec/{mods/standard/sets → mod/standard/set}/type/set_spec.rb +0 -0
  306. data/spec/{mods/standard/sets → mod/standard/set}/type/setting_spec.rb +0 -0
  307. data/spec/{mods/standard/sets → mod/standard/set}/type/signup_spec.rb +44 -5
  308. data/spec/{mods/standard/sets → mod/standard/set}/type/skin_spec.rb +0 -0
  309. data/spec/{mods/standard/sets → mod/standard/set}/type/toggle_spec.rb +0 -0
  310. data/spec/{mods/standard/sets → mod/standard/set}/type/user_spec.rb +0 -0
  311. data/spec/spec_helper.rb +2 -2
  312. data/test/fixtures/card_references.yml +440 -482
  313. data/test/fixtures/card_revisions.yml +1287 -1384
  314. data/test/fixtures/cards.yml +2268 -2472
  315. metadata +389 -390
  316. data/config.ru +0 -4
  317. data/config/samples/asset_htaccess +0 -9
  318. data/config/samples/robots.txt +0 -12
  319. data/mods/standard/sets/right/help.rb +0 -3
  320. data/mods/standard/sets/right/machine_output.rb +0 -14
  321. data/mods/standard/sets/right/style.rb +0 -22
  322. data/mods/standard/sets/self/script_html5shiv_printshiv.rb +0 -7
  323. data/mods/standard/sets/self/style_jquery_ui_smoothness.rb +0 -8
  324. data/mods/standard/sets/type/signup.rb +0 -113
  325. data/spec/mods/standard/sets/all/event_viz_spec.rb +0 -7
@@ -4,25 +4,6 @@ include Basic
4
4
  attr_accessor :email
5
5
 
6
6
  format :html do
7
- #FIXME - should perms check permission to create account?
8
- view :new do |args|
9
- args.merge!(
10
- :title=>'Invite',
11
- :optional_help=>:show,
12
- :optional_menu=>:never
13
- )
14
- args[:hidden].merge! :card => { :type_id => card.type_id }
15
- frame_and_form :create, args do
16
- %{
17
- #{ _render_name_fieldset :help=>'usually first and last name' }
18
- #{# _render_email_fieldset
19
- }
20
- #{# _render_invitation_field
21
- }
22
- }
23
- end
24
- end
25
-
26
7
 
27
8
  view :setup, :tags=>:unknown_ok, :perms=>lambda { |r| Auth.needs_setup? } do |args|
28
9
  args.merge!( {
@@ -30,7 +11,7 @@ format :html do
30
11
  :optional_help=>:show,
31
12
  :optional_menu=>:never,
32
13
  :help_text=>'To get started, set up an account.',
33
- :buttons => button_tag( 'Submit' ),
14
+ :buttons => button_tag( 'Set up', :disable_with=>'Setting up' ),
34
15
  :hidden => {
35
16
  :success => "REDIRECT: #{ Card.path_setting '/' }",
36
17
  'card[type_id]' => Card.default_accounted_type_id,
@@ -52,7 +33,16 @@ format :html do
52
33
  end
53
34
  end
54
35
 
36
+ =begin
37
+ def ok_to_create
38
+ unless Auth.needs_setup?
39
+ deny_because "You cannot create a #{type_name} directly; you must create a #{Card[:signup].name} first"
40
+ end
41
+ end
42
+ =end
43
+
55
44
  event :setup_as_bot, :before=>:check_permissions, :on=>:create, :when=>proc{ |c| Card::Env.params[:setup] } do
45
+ # is this still needed, even with the #ok_to_create call?
56
46
  abort :failure unless Auth.needs_setup?
57
47
  Auth.as_bot
58
48
  end
@@ -239,10 +239,7 @@ describe CardController do
239
239
  context 'css' do
240
240
  before do
241
241
  @all_style = Card[ "#{ Card[:all].name }+#{ Card[:style].name }" ]
242
- @all_style.update_machine_output
243
- Card::Auth.as_bot do
244
- @all_style.fetch(:trait => :machine_output).delete!
245
- end
242
+ @all_style.reset_machine_output!
246
243
  end
247
244
 
248
245
  it 'should create missing machine output file' do
@@ -14,12 +14,16 @@ end
14
14
 
15
15
 
16
16
  shared_examples_for 'machine' do |filetype|
17
- context "when created" do
17
+ context "machine is run" do
18
+ before do
19
+ machine.update_machine_output
20
+ end
21
+
18
22
  it 'has +machine_input card' do
19
- machine.machine_input_card.should_not be_nil
23
+ machine.machine_input_card.real?.should be_true
20
24
  end
21
25
  it 'has +machine_output card' do
22
- machine.machine_output_card.should_not be_nil
26
+ machine.machine_output_card.real?.should be_true
23
27
  end
24
28
  it "generates #{filetype} file" do
25
29
  expect(machine.machine_output_path).to match(/\.#{filetype}$/)
@@ -32,8 +36,12 @@ shared_examples_for 'content machine' do |filetype|
32
36
  let(:machine) { machine_card }
33
37
  end
34
38
 
39
+
35
40
  context '+machine_input card' do
36
41
  it "points to self" do
42
+ Card::Auth.as_bot do
43
+ machine_card.update_input_card
44
+ end
37
45
  expect(machine_card.input_item_cards).to eq([machine_card])
38
46
  end
39
47
  end
@@ -112,6 +120,12 @@ We build the following structure:
112
120
  end
113
121
 
114
122
  describe '+machine_input card' do
123
+ before do
124
+ Card::Auth.as_bot do
125
+ subject.update_input_card
126
+ end
127
+ end
128
+
115
129
  it "contains items of all levels" do
116
130
  subject.machine_input_card.item_cards.map(&:id).sort.should == @expected_items.map(&:id).sort
117
131
  end
@@ -0,0 +1,9 @@
1
+ # -*- encoding : utf-8 -*-
2
+
3
+ describe Card::Set::All::EventViz do
4
+ describe '#events' do
5
+ it "should have at least twenty events" do
6
+ Card['A'].events( :update ).split("\n").length.should > 20
7
+ end
8
+ end
9
+ end
@@ -81,7 +81,7 @@ describe Card::Set::Right::Account do
81
81
  it 'should not work if token is wrong' do
82
82
  Card::Env.params[:reset_token] = @token + 'xxx'
83
83
  @account.save
84
- @account.errors[:abort].first.should =~ /token_not_found/
84
+ @account.errors[:abort].first.should =~ /incorrect_token/
85
85
  end
86
86
 
87
87
  end
@@ -51,7 +51,9 @@ describe Card::Set::Type::Signup do
51
51
  end
52
52
 
53
53
  it 'should create an authenticable token' do
54
- Card::Auth.authenticate_by_token(@token).should == @signup.id
54
+ @account.token.should == @token
55
+ @account.authenticate_by_token(@token).should == @signup.id
56
+ @account.fetch(:trait=> :token).should_not be_present
55
57
  end
56
58
 
57
59
  it 'should notify someone' do
@@ -112,19 +114,56 @@ describe Card::Set::Type::Signup do
112
114
  ActionMailer::Base.deliveries.last.to.should == ['signups@wagn.org']
113
115
  end
114
116
 
115
- context 'approval' do
116
- before do
117
- Card::Env.params[:approve] = true
117
+
118
+ context 'approval with token' do
119
+
120
+ it 'should create token' do
121
+ Card::Env.params[:approve_token] = true
118
122
  Card::Auth.as :joe_admin
123
+
124
+ @signup = Card.fetch @signup.id
125
+ @signup.save!
126
+ @signup.account.token.should be_present
119
127
  end
120
128
 
129
+ end
130
+
131
+ context 'approval without token' do
132
+
121
133
  it 'should create token' do
134
+ Card::Env.params[:approve_without_token] = true
135
+ Card::Auth.as :joe_admin
136
+
122
137
  @signup = Card.fetch @signup.id
123
138
  @signup.save!
124
- @signup.account.token.should be_present
139
+ @signup.account.token.should_not be_present
140
+ @signup.type_id.should == Card::UserID
141
+ @signup.account.status.should == 'active'
125
142
  end
126
143
  end
127
144
 
128
145
  end
146
+
147
+
148
+ context 'invitation' do
149
+ before do
150
+ # NOTE: by default Anonymous does not have permission to create User cards.
151
+ Card::Auth.as_bot do
152
+ Card.create! :name=>'*request+*to', :content=>'signups@wagn.org'
153
+ @signup = Card.create! :name=>'Big Bad Wolf', :type_id=>Card::SignupID, '+*account'=>{ '+*email'=>'wolf@wagn.org'}
154
+ end
155
+ @account = @signup.account
156
+ end
157
+
158
+ it 'should create all the necessary cards, but no password' do
159
+ @signup.type_id.should == Card::SignupID
160
+ @account.email.should == 'wolf@wagn.org'
161
+ @account.status.should == 'pending'
162
+ @account.salt.should_not == ''
163
+ @account.token.should be_present
164
+ @account.password.should_not be_present
165
+ end
166
+
167
+ end
129
168
 
130
169
  end