card 1.20.4 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/card.gemspec +9 -9
  4. data/db/migrate_core_cards/20170515101262_add_advanced_edit_cards.rb +20 -0
  5. data/db/migrate_core_cards/20170608083819_add_full_width_layout_card.rb +23 -0
  6. data/db/migrate_core_cards/20170608200649_add_input_options_codename.rb +8 -0
  7. data/db/seed/new/card_actions.yml +783 -791
  8. data/db/seed/new/card_acts.yml +65 -47
  9. data/db/seed/new/card_changes.yml +3198 -3177
  10. data/db/seed/new/card_references.yml +604 -534
  11. data/db/seed/new/cards.yml +2355 -2256
  12. data/db/seed/test/fixtures/card_actions.yml +1795 -1803
  13. data/db/seed/test/fixtures/card_acts.yml +264 -246
  14. data/db/seed/test/fixtures/card_changes.yml +6275 -6184
  15. data/db/seed/test/fixtures/card_references.yml +1305 -1263
  16. data/db/seed/test/fixtures/cards.yml +3393 -3298
  17. data/db/seed/test/seed.rb +2 -2
  18. data/db/version_core_cards.txt +1 -1
  19. data/lib/card.rb +4 -0
  20. data/lib/card/act_manager/subdirector_array.rb +1 -0
  21. data/lib/card/auth/current.rb +7 -3
  22. data/lib/card/env.rb +5 -0
  23. data/lib/card/env/success.rb +1 -1
  24. data/lib/card/format/names.rb +3 -13
  25. data/lib/card/model/save_helper.rb +4 -6
  26. data/lib/card/query.rb +2 -1
  27. data/lib/card/query/attributes.rb +34 -14
  28. data/lib/card/query/value.rb +3 -4
  29. data/lib/card/set/format.rb +29 -4
  30. data/lib/card/set/format/haml_views.rb +25 -13
  31. data/lib/card/set/trait.rb +1 -0
  32. data/lib/card/set_pattern.rb +17 -1
  33. data/lib/card/subcards.rb +3 -2
  34. data/lib/generators/card/format/format_generator.rb +2 -0
  35. data/lib/generators/card/set/set_generator.rb +2 -0
  36. data/lib/generators/card/template/USAGE +10 -0
  37. data/lib/generators/card/template/template_generator.rb +46 -0
  38. data/lib/generators/card/template/templates/haml_template.erb +1 -0
  39. data/mod/Modfile +1 -1
  40. data/mod/account/set/all/account.rb +9 -5
  41. data/mod/account/set/right/account.rb +17 -5
  42. data/mod/account/set/self/account_links.rb +1 -2
  43. data/mod/account/set/type/signup.rb +4 -5
  44. data/mod/account/set/type/user.rb +1 -1
  45. data/mod/account/spec/set/all/account_spec.rb +2 -2
  46. data/mod/account/spec/set/right/account_spec.rb +2 -2
  47. data/mod/account/spec/set/right/email_spec.rb +1 -1
  48. data/mod/account/spec/set/right/password_spec.rb +1 -1
  49. data/mod/account/spec/set/self/signin_spec.rb +2 -2
  50. data/mod/account/spec/set/type/signup_spec.rb +4 -0
  51. data/mod/ace_editor/set/abstract/ace_editor.rb +6 -3
  52. data/mod/ace_editor/set/self/script_ace.rb +1 -0
  53. data/mod/admin/set/self/admin.rb +1 -1
  54. data/mod/admin/set/self/version.rb +1 -0
  55. data/mod/basic_formats/format/css_format.rb +1 -0
  56. data/mod/basic_formats/format/csv_format.rb +1 -0
  57. data/mod/basic_formats/format/file_format.rb +1 -0
  58. data/mod/basic_formats/format/js_format.rb +1 -0
  59. data/mod/basic_formats/format/json_format.rb +1 -0
  60. data/mod/basic_formats/format/rss_format.rb +1 -0
  61. data/mod/basic_formats/format/xml_format.rb +1 -0
  62. data/mod/basic_formats/set/all/all_csv.rb +1 -1
  63. data/mod/basic_formats/set/all/base.rb +11 -3
  64. data/mod/basic_formats/set/all/json.rb +50 -8
  65. data/mod/basic_formats/set/all/rss.rb +21 -7
  66. data/mod/basic_formats/set/self/01_head/javascript.rb +1 -1
  67. data/mod/basic_formats/set/self/head.rb +1 -1
  68. data/mod/basic_formats/spec/set/all/base_spec.rb +13 -0
  69. data/mod/basic_types/set/type/html.rb +6 -2
  70. data/mod/basic_types/set/type/plain_text.rb +2 -3
  71. data/mod/bootstrap/lib/bootstrap.rb +2 -2
  72. data/mod/bootstrap/lib/bootstrap/basic_tags.rb +1 -1
  73. data/mod/bootstrap/lib/bootstrap/component.rb +2 -3
  74. data/mod/bootstrap/lib/bootstrap/component/form.rb +6 -5
  75. data/mod/bootstrap/lib/bootstrap/component/horizontal_form.rb +1 -1
  76. data/mod/bootstrap/lib/bootstrap/component/layout.rb +3 -3
  77. data/mod/bootstrap/lib/bootstrap/component_loader.rb +0 -2
  78. data/mod/bootstrap/lib/bootstrap/delegate.rb +2 -2
  79. data/mod/bootstrap/lib/bootstrapper.rb +1 -1
  80. data/mod/bootstrap/set/all/bootstrap/accordion.rb +1 -1
  81. data/mod/bootstrap/set/all/bootstrap/form.rb +2 -2
  82. data/mod/bootstrap/set/all/bootstrap/helper.rb +1 -0
  83. data/mod/bootstrap/set/all/bootstrap/wrapper.rb +1 -1
  84. data/mod/bootstrap/set/self/bootstrap_js.rb +1 -1
  85. data/mod/bootstrap/set/self/bootswatch_shared.rb +6 -6
  86. data/mod/bootstrap/set/self/script_mods.rb +1 -1
  87. data/mod/bootstrap/spec/set/all/bootstrap/bootstrap_builder_spec.rb +7 -6
  88. data/mod/bootstrap/spec/set/all/bootstrap/bootstrap_spec.rb +2 -1
  89. data/mod/bootstrap/spec/set/all/bootstrap/form_spec.rb +6 -3
  90. data/mod/bootstrap/spec/set/all/bootstrap/layout_spec.rb +3 -2
  91. data/mod/carrierwave/set/abstract/attachment.rb +1 -3
  92. data/mod/carrierwave/set/abstract/attachment/paths.rb +1 -1
  93. data/mod/carrierwave/set/abstract/attachment/storage_type.rb +11 -1
  94. data/mod/carrierwave/set/type/file.rb +3 -3
  95. data/mod/carrierwave/spec/lib/carrier_wave/file_card_uploader_spec.rb +3 -0
  96. data/mod/carrierwave/spec/set/type/file_spec.rb +24 -6
  97. data/mod/carrierwave/spec/set/type/image_spec.rb +3 -0
  98. data/mod/core/chunk/link.rb +1 -1
  99. data/mod/core/chunk/nest.rb +2 -1
  100. data/mod/core/chunk/query_reference.rb +1 -1
  101. data/mod/core/chunk/reference.rb +1 -0
  102. data/mod/core/chunk/uri.rb +4 -3
  103. data/mod/core/set/abstract/lock.rb +26 -0
  104. data/mod/core/set/all/assign_attributes.rb +8 -4
  105. data/mod/core/set/all/collection.rb +16 -7
  106. data/mod/core/set/all/content.rb +6 -0
  107. data/mod/core/set/all/event.rb +1 -1
  108. data/mod/core/set/all/fetch.rb +2 -2
  109. data/mod/core/set/all/haml.rb +5 -15
  110. data/mod/core/set/all/initialize.rb +2 -2
  111. data/mod/core/set/all/name.rb +1 -1
  112. data/mod/core/set/all/permissions.rb +28 -16
  113. data/mod/core/set/all/rules.rb +1 -2
  114. data/mod/core/set/all/subcards.rb +3 -3
  115. data/mod/core/set/all/templating.rb +5 -1
  116. data/mod/core/set/all/trash.rb +1 -1
  117. data/mod/core/set/all/utils.rb +1 -1
  118. data/mod/core/spec/set/all/actify_spec.rb +1 -1
  119. data/mod/core/spec/set/all/assign_attributes_spec.rb +2 -2
  120. data/mod/core/spec/set/all/collection_spec.rb +6 -3
  121. data/mod/core/spec/set/all/export_spec.rb +40 -112
  122. data/mod/core/spec/set/all/name_spec.rb +1 -1
  123. data/mod/core/spec/set/all/permissions_spec.rb +7 -7
  124. data/mod/core/spec/set/all/rules2_spec.rb +25 -25
  125. data/mod/core/spec/set/all/rules_spec.rb +2 -7
  126. data/mod/developer/set/all/event_viz.rb +1 -1
  127. data/mod/developer/set/right/debug.rb +1 -1
  128. data/mod/history/lib/card/act.rb +1 -0
  129. data/mod/history/lib/card/act/act_renderer.rb +23 -20
  130. data/mod/history/lib/card/act/act_renderer/absolute_act_renderer.rb +0 -1
  131. data/mod/history/lib/card/act/act_renderer/relative_act_renderer.rb +1 -0
  132. data/mod/history/lib/card/action.rb +1 -1
  133. data/mod/history/lib/card/action/action_renderer.rb +2 -2
  134. data/mod/history/lib/card/change.rb +2 -1
  135. data/mod/history/set/all/action_view.rb +1 -1
  136. data/mod/history/set/all/content_history.rb +7 -4
  137. data/mod/history/set/all/history.rb +6 -6
  138. data/mod/machines/file/all_script_machine_output/file.js +50 -34
  139. data/mod/machines/file/all_style_machine_output/file.css +1 -1
  140. data/mod/machines/lib/javascript/wagn.js.coffee +29 -18
  141. data/mod/machines/lib/javascript/wagn_layout.js.coffee +7 -3
  142. data/mod/machines/lib/stylesheets/style_cards.scss +10 -10
  143. data/mod/machines/set/abstract/machine.rb +5 -28
  144. data/mod/machines/set/abstract/script.rb +7 -4
  145. data/mod/machines/set/all/reset_machines.rb +1 -1
  146. data/mod/machines/set/self/script_jquery_helper.rb +2 -2
  147. data/mod/machines/set/self/script_slot.rb +1 -1
  148. data/mod/machines/set/type/coffee_script.rb +3 -2
  149. data/mod/machines/set/type/css.rb +7 -3
  150. data/mod/machines/set/type/scss.rb +7 -1
  151. data/mod/machines/spec/set/type/coffeescript_spec.rb +1 -1
  152. data/mod/machines/spec/set/type/javascript_spec.rb +1 -1
  153. data/mod/machines/spec/set/type/scss_spec.rb +3 -2
  154. data/mod/machines/spec/set/type/skin_spec.rb +1 -1
  155. data/mod/machines/spec/shared_examples/machine.rb +5 -3
  156. data/mod/machines/spec/shared_examples/machine_input.rb +1 -0
  157. data/mod/notifications/format/email_html_format.rb +1 -0
  158. data/mod/notifications/set/all/follow.rb +1 -1
  159. data/mod/notifications/set/all/observer.rb +1 -1
  160. data/mod/notifications/set/all/send_notifications.rb +2 -2
  161. data/mod/notifications/set/self/follow_defaults.rb +3 -8
  162. data/mod/notifications/set/type/email_template/email_config.rb +2 -2
  163. data/mod/notifications/set/type_plus_right/user/follow.rb +2 -2
  164. data/mod/notifications/spec/set/all/follow_spec.rb +7 -0
  165. data/mod/notifications/spec/set/all/notify_spec.rb +3 -0
  166. data/mod/notifications/spec/set/all/observer_spec.rb +1 -1
  167. data/mod/notifications/spec/set/right/followers_spec.rb +1 -0
  168. data/mod/pointer/set/abstract/00_paging_params.rb +11 -0
  169. data/mod/pointer/set/abstract/{00_paging.rb → 01_paging.rb} +10 -6
  170. data/mod/pointer/set/abstract/{00_paging → 01_paging}/paging_links.rb +0 -0
  171. data/mod/pointer/set/abstract/{01_pointer.rb → 02_pointer.rb} +26 -5
  172. data/mod/pointer/set/abstract/{01_pointer → 02_pointer}/edit.rb +3 -5
  173. data/mod/pointer/set/self/input_options.rb +12 -0
  174. data/mod/pointer/spec/set/self/input_options_spec.rb +8 -0
  175. data/mod/pointer/spec/set/type/pointer_spec.rb +3 -2
  176. data/mod/prosemirror_editor/set/abstract/prosemirror_editor.rb +1 -1
  177. data/mod/prosemirror_editor/set/self/script_prosemirror.rb +1 -0
  178. data/mod/settings/lib/card/setting.rb +1 -2
  179. data/mod/settings/set/abstract/permission.rb +1 -1
  180. data/mod/settings/set/self/add_help.rb +1 -1
  181. data/mod/settings/set/self/autoname.rb +1 -1
  182. data/mod/settings/set/self/csv_structure.rb +2 -0
  183. data/mod/settings/set/self/help.rb +1 -1
  184. data/mod/settings/set/self/input.rb +1 -2
  185. data/mod/settings/set/self/options.rb +2 -2
  186. data/mod/settings/set/self/options_label.rb +2 -2
  187. data/mod/settings/set/type/setting.rb +1 -1
  188. data/mod/settings/spec/set/right/script_spec.rb +1 -1
  189. data/mod/settings/spec/set/right/style_spec.rb +1 -1
  190. data/mod/solid_cache/set/abstract/solid_cache.rb +5 -3
  191. data/mod/solid_cache/spec/set/abstract/solid_cache_spec.rb +4 -3
  192. data/mod/standard/set/abstract/01_search_params.rb +4 -3
  193. data/mod/standard/set/abstract/search.rb +2 -1
  194. data/mod/standard/set/abstract/toolbar_split_button.rb +22 -0
  195. data/mod/standard/set/all/links.rb +3 -3
  196. data/mod/standard/set/all/rich_html/classy.rb +37 -0
  197. data/mod/standard/set/all/rich_html/editing.rb +6 -2
  198. data/mod/standard/set/all/rich_html/editor.rb +50 -0
  199. data/mod/standard/set/all/rich_html/form.rb +19 -12
  200. data/mod/standard/set/all/rich_html/form_elements.rb +2 -2
  201. data/mod/standard/set/all/rich_html/formgroup.rb +2 -1
  202. data/mod/standard/set/all/rich_html/header.rb +2 -27
  203. data/mod/standard/set/all/rich_html/menu.rb +1 -1
  204. data/mod/standard/set/all/rich_html/new.rb +5 -1
  205. data/mod/standard/set/all/rich_html/toolbar.rb +15 -60
  206. data/mod/standard/set/all/rich_html/wrapper.rb +6 -3
  207. data/mod/standard/set/right/when_created.rb +2 -2
  208. data/mod/standard/set/rstar/rules_editor.rb +10 -7
  209. data/mod/standard/set/self/activity_toolbar_button.rb +14 -0
  210. data/mod/standard/set/self/recent.rb +7 -2
  211. data/mod/standard/set/self/rules_toolbar_button.rb +42 -0
  212. data/mod/standard/set/self/search.rb +19 -6
  213. data/mod/standard/set/type/basic.rb +6 -6
  214. data/mod/standard/set/type/cardtype.rb +7 -3
  215. data/mod/standard/set/type/date.rb +2 -4
  216. data/mod/standard/set/type/layout_type.rb +1 -0
  217. data/mod/standard/set/type/list.rb +1 -1
  218. data/mod/standard/set/type/listed_by.rb +1 -2
  219. data/mod/standard/set/type/number.rb +4 -2
  220. data/mod/standard/set/type/phrase.rb +4 -2
  221. data/mod/standard/set/type/search_type.rb +11 -3
  222. data/mod/standard/set/type/set.rb +8 -8
  223. data/mod/standard/set/type/toggle.rb +1 -3
  224. data/mod/standard/set/type/uri.rb +6 -2
  225. data/mod/standard/spec/chunk/include_spec.rb +3 -2
  226. data/mod/standard/spec/chunk/query_reference_spec.rb +2 -2
  227. data/mod/standard/spec/set/all/history_spec.rb +1 -0
  228. data/mod/standard/spec/set/all/links_spec.rb +1 -0
  229. data/mod/standard/spec/set/all/rich_html/toolbar_spec.rb +2 -0
  230. data/mod/standard/spec/set/self/activity_toolbar_button_spec.rb +22 -0
  231. data/mod/standard/spec/set/type/email_template/email_config_spec.rb +10 -8
  232. data/mod/standard/spec/set/type/email_template_spec.rb +1 -0
  233. data/mod/standard/spec/set/type/list_spec.rb +2 -0
  234. data/mod/standard/spec/set/type/listed_by_spec.rb +5 -0
  235. data/mod/standard/spec/set/type/search_type_spec.rb +1 -1
  236. data/mod/standard/spec/set/type/toggle_spec.rb +1 -2
  237. data/mod/standard/spec/set/type/uri_spec.rb +0 -1
  238. data/mod/tinymce_editor/db/migrate_cards/20160804112560_add_tinymce_cards.rb +3 -1
  239. data/mod/tinymce_editor/set/abstract/tinymce_editor.rb +1 -1
  240. data/mod/tinymce_editor/set/self/script_tinymce.rb +1 -0
  241. data/mod/twitter/db/migrate_cards/20170305112346_add_twitter_cards.rb +1 -1
  242. data/mod/twitter/set/type/twitter_template.rb +1 -1
  243. data/spec/lib/card/format_spec.rb +26 -7
  244. data/spec/lib/card/loader_spec.rb +96 -35
  245. data/spec/lib/card/query_spec.rb +0 -1
  246. data/spec/support/card_spec_loader.rb +1 -0
  247. data/spec/support/helper/card_helper.rb +0 -36
  248. data/spec/support/helper/set_helper.rb +80 -0
  249. data/spec/support/matchers.rb +74 -0
  250. data/tmpsets/set/mod001-core/all/actify.rb +5 -6
  251. data/tmpsets/set/mod001-core/all/fetch.rb +14 -12
  252. data/tmpsets/set/mod001-core/all/name.rb +1 -1
  253. data/tmpsets/set/mod001-core/all/permissions.rb +12 -22
  254. data/tmpsets/set/mod001-core/all/tracked_attributes.rb +76 -0
  255. data/tmpsets/set/mod001-core/all/utils.rb +40 -3
  256. data/tmpsets/set/mod002-history/all/history.rb +1 -2
  257. data/tmpsets/set/mod008-solid_cache/abstract/solid_cache.rb +1 -1
  258. data/tmpsets/set/mod013-carrierwave/abstract/attachment.rb +282 -0
  259. data/tmpsets/set/mod013-carrierwave/type/file.rb +155 -0
  260. data/tmpsets/set/mod013-carrierwave/type/image.rb +96 -0
  261. data/tmpsets/set/mod014-admin/self/admin.rb +113 -0
  262. data/tmpsets/set/mod014-admin/self/admin_info.rb +110 -0
  263. data/tmpsets/set/mod014-admin/self/version.rb +15 -0
  264. data/tmpsets/set/mod015-developer/all/event_viz.rb +59 -0
  265. data/tmpsets/set/mod015-developer/all/view_viz.rb +30 -0
  266. data/tmpsets/set/mod015-developer/right/debug.rb +96 -0
  267. metadata +52 -22
@@ -0,0 +1,15 @@
1
+ # -*- encoding : utf-8 -*-
2
+ class Card; module Set; class Self; module Version; extend Card::Set
3
+ # ~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/admin/set/self/version.rb ~~
4
+ # -*- encoding : utf-8 -*-
5
+ require_dependency "card/version"
6
+
7
+ view :raw do |_args|
8
+ Card::Version.release
9
+ end
10
+
11
+ view :core, :raw
12
+
13
+
14
+ # ~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/admin/set/self/version.rb ~~
15
+ end;end;end;end;
@@ -0,0 +1,59 @@
1
+ # -*- encoding : utf-8 -*-
2
+ class Card; module Set; class All; module EventViz; extend Card::Set
3
+ # ~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/developer/set/all/event_viz.rb ~~
4
+ require_dependency 'active_support/callbacks_ext'
5
+
6
+ # the events method is a developer's tool for visualizing the event order
7
+ # for a given card.
8
+ # For example, from a console you might run
9
+ #
10
+ # puts mycard.events :update
11
+ #
12
+ # to see the order of events that will be executed on mycard.
13
+ # The indention and arrows (^v) indicate event dependencies.
14
+ #
15
+ # Note: as of yet, the functionality is a bit rough. It does not display events
16
+ # that are called directly from within other events,
17
+ # and certain event requirements (like the presence of a 'current_act') may
18
+ # prevent events from showing up in the tree.
19
+ def events action
20
+ @action = action
21
+ events = Card::Stage::STAGES.map { |stage| events_tree("#{stage}_stage") }
22
+ @action = nil
23
+ puts_events events
24
+ end
25
+
26
+ # private
27
+
28
+ def puts_events events, prefix="", depth=0
29
+ r = ""
30
+ depth += 1
31
+ events.each do |e|
32
+ space = " " * (depth * 2)
33
+
34
+ # FIXME: this is not right. before and around callbacks are processed in
35
+ # declaration order regardless of kind. not all befores then all arounds
36
+ e[:before] && r += puts_events(e[:before], space + "v ", depth)
37
+ e[:around] && r += puts_events(e[:around], space + "vv ", depth)
38
+ r += "#{prefix}#{e[:name]}\n"
39
+ e[:after] && r += puts_events(e[:after].reverse, space + "^ ", depth)
40
+ end
41
+ r
42
+ end
43
+
44
+ def events_tree filt
45
+ hash = { name: filt }
46
+ if respond_to? "_#{filt}_callbacks"
47
+ send("_#{filt}_callbacks").each do |callback|
48
+ next unless callback.applies? self
49
+ hash[callback.kind] ||= []
50
+ hash[callback.kind] << events_tree(callback.filter)
51
+ end
52
+ end
53
+
54
+ hash
55
+ end
56
+
57
+
58
+ # ~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/developer/set/all/event_viz.rb ~~
59
+ end;end;end;end;
@@ -0,0 +1,30 @@
1
+ # -*- encoding : utf-8 -*-
2
+ class Card; module Set; class All; module ViewViz; extend Card::Set
3
+ # ~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/developer/set/all/view_viz.rb ~~
4
+ format :html do
5
+ view :views_by_format do
6
+ format_views =
7
+ self.class.ancestors.each_with_object({}) do |format_class, hash|
8
+ views =
9
+ format_class.instance_methods.map do |method|
10
+ next unless method.to_s =~ /^_view_(.+)$/
11
+ Regexp.last_match(1)
12
+ end.compact
13
+ next unless views.present?
14
+ format_class.name =~ /^Card(::Set)?::(.+?)$/ #::(\w+Format)
15
+ hash[Regexp.last_match(2)] = views
16
+ end
17
+ accordion_group format_views
18
+ end
19
+
20
+ view :views_by_name do
21
+ views = methods.map do |method|
22
+ Regexp.last_match(1) if method.to_s =~ /^_view_(.+)$/
23
+ end.compact.sort
24
+ list_group views
25
+ end
26
+ end
27
+
28
+
29
+ # ~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/developer/set/all/view_viz.rb ~~
30
+ end;end;end;end;
@@ -0,0 +1,96 @@
1
+ # -*- encoding : utf-8 -*-
2
+ class Card; module Set; class Right; module Debug; extend Card::Set
3
+ # ~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/developer/set/right/debug.rb ~~
4
+ def virtual?
5
+ true
6
+ end
7
+
8
+ format :html do
9
+ view :core do |_args|
10
+ subject = card.left
11
+
12
+ output [
13
+ ["Sets",
14
+ static_tabs("set modules" => set_modules_accordion(subject),
15
+ "all modules" => singleton_modules_list(subject),
16
+ "patterns" => set_patterns_breadcrumb(subject))],
17
+ ["Views",
18
+ static_tabs("by format" => subformat(subject)._render_views_by_format,
19
+ "by name" => subformat(subject)._render_views_by_name)],
20
+ ["Events",
21
+ static_tabs(create: "<pre>#{subject.events(:create)}</pre>",
22
+ update: "<pre>#{subject.events(:update)}</pre>",
23
+ delete: "<pre>#{subject.events(:delete)}</pre>")],
24
+ ["Cache/DB Comparison", cache_comparison_table(subject)]
25
+ ].map { |item| section(*item) }
26
+ end
27
+
28
+ # rubocop:disable AccessorMethodName
29
+ def set_modules_accordion subject
30
+ sets = subject.set_modules.each_with_object({}) do |sm, hash|
31
+ ans = sm.ancestors
32
+ ans.shift
33
+ hash[sm.to_s] = ans
34
+ end
35
+ accordion_group sets
36
+ end
37
+
38
+ def set_patterns_breadcrumb subject
39
+ links = subject.patterns.reverse.map { |pattern| card_link pattern.to_s }
40
+ breadcrumb(links)
41
+ end
42
+ # rubocop:enable AccessorMethodName
43
+
44
+ def singleton_modules_list subject
45
+ all_mods = subject.singleton_class.ancestors.map(&:to_s)
46
+ all_mods.shift
47
+ list_group all_mods
48
+ end
49
+
50
+ def cache_comparison_table subject
51
+ cache_card = Card.fetch(subject.key)
52
+ db_card = Card.find_by_key(subject.key)
53
+ return unless cache_card && db_card
54
+ table(
55
+ [:name, :updated_at, :updater_id, :content, :inspect].map do |field|
56
+ [field.to_s,
57
+ h(cache_card.send(field)),
58
+ h(db_card.send(field))]
59
+ end,
60
+ header: ["Field", "Cache Val", "Database Val"]
61
+ )
62
+ end
63
+
64
+ def section title, content
65
+ %(
66
+ <h2>#{title}</h2>
67
+ #{content}
68
+ )
69
+ end
70
+
71
+ def class_locations klass
72
+ methods = defined_methods(klass)
73
+ file_groups = methods.group_by { |sl| sl[0] }
74
+ file_counts = file_groups.map do |file, sls|
75
+ lines = sls.map { |sl| sl[1] }
76
+ count = lines.size
77
+ line = lines.min
78
+ { file: file, count: count, line: line }
79
+ end
80
+ file_counts.sort_by! { |fc| fc[:count] }
81
+ file_counts.map { |fc| [fc[:file], fc[:line]] }
82
+ end
83
+
84
+ def defined_methods klass
85
+ methods =
86
+ klass.methods(false).map { |m| klass.method(m) } +
87
+ klass.instance_methods(false).map { |m| klass.instance_method(m) }
88
+ methods.map!(&:source_location)
89
+ methods.compact!
90
+ methods
91
+ end
92
+ end
93
+
94
+
95
+ # ~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/developer/set/right/debug.rb ~~
96
+ end;end;end;end;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.4
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-04-15 00:00:00.000000000 Z
14
+ date: 2017-06-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: smartname
@@ -47,14 +47,14 @@ dependencies:
47
47
  requirements:
48
48
  - - '='
49
49
  - !ruby/object:Gem::Version
50
- version: 1.0.0
50
+ version: 1.1.0
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - '='
56
56
  - !ruby/object:Gem::Version
57
- version: 1.0.0
57
+ version: 1.1.0
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: htmlentities
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -103,56 +103,56 @@ dependencies:
103
103
  requirements:
104
104
  - - "~>"
105
105
  - !ruby/object:Gem::Version
106
- version: '1.0'
106
+ version: '1.1'
107
107
  type: :runtime
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - "~>"
112
112
  - !ruby/object:Gem::Version
113
- version: '1.0'
113
+ version: '1.1'
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: sass
116
116
  requirement: !ruby/object:Gem::Requirement
117
117
  requirements:
118
118
  - - "~>"
119
119
  - !ruby/object:Gem::Version
120
- version: '3.2'
120
+ version: '3.4'
121
121
  type: :runtime
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - "~>"
126
126
  - !ruby/object:Gem::Version
127
- version: '3.2'
127
+ version: '3.4'
128
128
  - !ruby/object:Gem::Dependency
129
129
  name: coffee-script
130
130
  requirement: !ruby/object:Gem::Requirement
131
131
  requirements:
132
132
  - - "~>"
133
133
  - !ruby/object:Gem::Version
134
- version: '2.2'
134
+ version: '2.4'
135
135
  type: :runtime
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
138
138
  requirements:
139
139
  - - "~>"
140
140
  - !ruby/object:Gem::Version
141
- version: '2.2'
141
+ version: '2.4'
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: uglifier
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - "~>"
147
147
  - !ruby/object:Gem::Version
148
- version: '3.0'
148
+ version: '3.2'
149
149
  type: :runtime
150
150
  prerelease: false
151
151
  version_requirements: !ruby/object:Gem::Requirement
152
152
  requirements:
153
153
  - - "~>"
154
154
  - !ruby/object:Gem::Version
155
- version: '3.0'
155
+ version: '3.2'
156
156
  - !ruby/object:Gem::Dependency
157
157
  name: nokogiri
158
158
  requirement: !ruby/object:Gem::Requirement
@@ -173,14 +173,14 @@ dependencies:
173
173
  requirements:
174
174
  - - "~>"
175
175
  - !ruby/object:Gem::Version
176
- version: '4.0'
176
+ version: '5.0'
177
177
  type: :runtime
178
178
  prerelease: false
179
179
  version_requirements: !ruby/object:Gem::Requirement
180
180
  requirements:
181
181
  - - "~>"
182
182
  - !ruby/object:Gem::Version
183
- version: '4.0'
183
+ version: '5.0'
184
184
  - !ruby/object:Gem::Dependency
185
185
  name: kaminari
186
186
  requirement: !ruby/object:Gem::Requirement
@@ -215,14 +215,14 @@ dependencies:
215
215
  requirements:
216
216
  - - "~>"
217
217
  - !ruby/object:Gem::Version
218
- version: '1.2'
218
+ version: '1.3'
219
219
  type: :runtime
220
220
  prerelease: false
221
221
  version_requirements: !ruby/object:Gem::Requirement
222
222
  requirements:
223
223
  - - "~>"
224
224
  - !ruby/object:Gem::Version
225
- version: '1.2'
225
+ version: '1.3'
226
226
  - !ruby/object:Gem::Dependency
227
227
  name: mime-types
228
228
  requirement: !ruby/object:Gem::Requirement
@@ -257,14 +257,14 @@ dependencies:
257
257
  requirements:
258
258
  - - '='
259
259
  - !ruby/object:Gem::Version
260
- version: 0.8.1
260
+ version: '0.8'
261
261
  type: :runtime
262
262
  prerelease: false
263
263
  version_requirements: !ruby/object:Gem::Requirement
264
264
  requirements:
265
265
  - - '='
266
266
  - !ruby/object:Gem::Version
267
- version: 0.8.1
267
+ version: '0.8'
268
268
  description: Cards are wiki-inspired data atoms."Cardists" use links, nests, types,
269
269
  patterned names, queries, views, events, and rules to create rich structures.
270
270
  email:
@@ -373,6 +373,9 @@ files:
373
373
  - db/migrate_core_cards/20161103154836_update_keys.rb
374
374
  - db/migrate_core_cards/20170209132834_email_test_context.rb
375
375
  - db/migrate_core_cards/20170314175313_add_notification_event_card.rb
376
+ - db/migrate_core_cards/20170515101262_add_advanced_edit_cards.rb
377
+ - db/migrate_core_cards/20170608083819_add_full_width_layout_card.rb
378
+ - db/migrate_core_cards/20170608200649_add_input_options_codename.rb
376
379
  - db/migrate_core_cards/data/1.11_help_text.json
377
380
  - db/migrate_core_cards/data/1.12_stylesheets/classic_cards.scss
378
381
  - db/migrate_core_cards/data/1.12_stylesheets/common.scss
@@ -553,6 +556,9 @@ files:
553
556
  - lib/generators/card/set/set_generator.rb
554
557
  - lib/generators/card/set/templates/set_spec_template.erb
555
558
  - lib/generators/card/set/templates/set_template.erb
559
+ - lib/generators/card/template/USAGE
560
+ - lib/generators/card/template/template_generator.rb
561
+ - lib/generators/card/template/templates/haml_template.erb
556
562
  - mod/Modfile
557
563
  - mod/account/set/all/account.rb
558
564
  - mod/account/set/right/account.rb
@@ -833,6 +839,7 @@ files:
833
839
  - mod/core/layout/pre.html
834
840
  - mod/core/layout/simple.html
835
841
  - mod/core/set/abstract/code_file.rb
842
+ - mod/core/set/abstract/lock.rb
836
843
  - mod/core/set/all/actify.rb
837
844
  - mod/core/set/all/active_card.rb
838
845
  - mod/core/set/all/assign_attributes.rb
@@ -1008,16 +1015,19 @@ files:
1008
1015
  - mod/notifications/spec/set/type/notification_template_spec.rb
1009
1016
  - mod/pointer/db/migrate_cards/20160804112340_add_pointer_cards.rb
1010
1017
  - mod/pointer/lib/javascript/script_pointer_config.js.coffee
1011
- - mod/pointer/set/abstract/00_paging.rb
1012
- - mod/pointer/set/abstract/00_paging/paging_links.rb
1013
- - mod/pointer/set/abstract/01_pointer.rb
1014
- - mod/pointer/set/abstract/01_pointer/edit.rb
1018
+ - mod/pointer/set/abstract/00_paging_params.rb
1019
+ - mod/pointer/set/abstract/01_paging.rb
1020
+ - mod/pointer/set/abstract/01_paging/paging_links.rb
1021
+ - mod/pointer/set/abstract/02_pointer.rb
1022
+ - mod/pointer/set/abstract/02_pointer/edit.rb
1015
1023
  - mod/pointer/set/abstract/code_pointer.rb
1016
1024
  - mod/pointer/set/right/options.rb
1025
+ - mod/pointer/set/self/input_options.rb
1017
1026
  - mod/pointer/set/self/script_editors.rb
1018
1027
  - mod/pointer/set/self/script_mods.rb
1019
1028
  - mod/pointer/set/self/script_pointer_config.rb
1020
1029
  - mod/pointer/set/type/pointer.rb
1030
+ - mod/pointer/spec/set/self/input_options_spec.rb
1021
1031
  - mod/pointer/spec/set/type/pointer_spec.rb
1022
1032
  - mod/prosemirror_editor/db/migrate_cards/20160804112547_add_prosemirror_cards.rb
1023
1033
  - mod/prosemirror_editor/lib/javascript/script_prosemirror.js
@@ -1043,6 +1053,7 @@ files:
1043
1053
  - mod/settings/set/self/autoname.rb
1044
1054
  - mod/settings/set/self/captcha.rb
1045
1055
  - mod/settings/set/self/create.rb
1056
+ - mod/settings/set/self/csv_structure.rb
1046
1057
  - mod/settings/set/self/default.rb
1047
1058
  - mod/settings/set/self/default_html_view.rb
1048
1059
  - mod/settings/set/self/delete.rb
@@ -1098,13 +1109,16 @@ files:
1098
1109
  - mod/standard/file/logo/image-small.png
1099
1110
  - mod/standard/set/abstract/01_search_params.rb
1100
1111
  - mod/standard/set/abstract/search.rb
1112
+ - mod/standard/set/abstract/toolbar_split_button.rb
1101
1113
  - mod/standard/set/abstract/wql_search.rb
1102
1114
  - mod/standard/set/all/comment.rb
1103
1115
  - mod/standard/set/all/error.rb
1104
1116
  - mod/standard/set/all/links.rb
1105
1117
  - mod/standard/set/all/list_changes.rb
1118
+ - mod/standard/set/all/rich_html/classy.rb
1106
1119
  - mod/standard/set/all/rich_html/content.rb
1107
1120
  - mod/standard/set/all/rich_html/editing.rb
1121
+ - mod/standard/set/all/rich_html/editor.rb
1108
1122
  - mod/standard/set/all/rich_html/form.rb
1109
1123
  - mod/standard/set/all/rich_html/form_elements.rb
1110
1124
  - mod/standard/set/all/rich_html/formgroup.rb
@@ -1119,12 +1133,14 @@ files:
1119
1133
  - mod/standard/set/right/when_last_edited.rb
1120
1134
  - mod/standard/set/rstar/rules.rb
1121
1135
  - mod/standard/set/rstar/rules_editor.rb
1136
+ - mod/standard/set/self/activity_toolbar_button.rb
1122
1137
  - mod/standard/set/self/alerts.rb
1123
1138
  - mod/standard/set/self/codenames.rb
1124
1139
  - mod/standard/set/self/foot.rb
1125
1140
  - mod/standard/set/self/navbox.rb
1126
1141
  - mod/standard/set/self/now.rb
1127
1142
  - mod/standard/set/self/recent.rb
1143
+ - mod/standard/set/self/rules_toolbar_button.rb
1128
1144
  - mod/standard/set/self/search.rb
1129
1145
  - mod/standard/set/type/basic.rb
1130
1146
  - mod/standard/set/type/cardtype.rb
@@ -1161,6 +1177,7 @@ files:
1161
1177
  - mod/standard/spec/set/right/when_created_spec.rb
1162
1178
  - mod/standard/spec/set/right/when_last_edited_spec.rb
1163
1179
  - mod/standard/spec/set/rstar/rules_spec.rb
1180
+ - mod/standard/spec/set/self/activity_toolbar_button_spec.rb
1164
1181
  - mod/standard/spec/set/self/alerts_spec.rb
1165
1182
  - mod/standard/spec/set/self/foot_spec.rb
1166
1183
  - mod/standard/spec/set/self/head_spec.rb
@@ -1233,6 +1250,8 @@ files:
1233
1250
  - spec/support/helper/event_helper.rb
1234
1251
  - spec/support/helper/render_helper.rb
1235
1252
  - spec/support/helper/save_helper.rb
1253
+ - spec/support/helper/set_helper.rb
1254
+ - spec/support/matchers.rb
1236
1255
  - spec/support/simplecov_helper.rb
1237
1256
  - tmpsets/set/mod001-core/abstract/code_file.rb
1238
1257
  - tmpsets/set/mod001-core/all/actify.rb
@@ -1371,6 +1390,15 @@ files:
1371
1390
  - tmpsets/set/mod012-email/self/never.rb
1372
1391
  - tmpsets/set/mod012-email/type/email_template.rb
1373
1392
  - tmpsets/set/mod012-email/type_plus_right/user/follow.rb
1393
+ - tmpsets/set/mod013-carrierwave/abstract/attachment.rb
1394
+ - tmpsets/set/mod013-carrierwave/type/file.rb
1395
+ - tmpsets/set/mod013-carrierwave/type/image.rb
1396
+ - tmpsets/set/mod014-admin/self/admin.rb
1397
+ - tmpsets/set/mod014-admin/self/admin_info.rb
1398
+ - tmpsets/set/mod014-admin/self/version.rb
1399
+ - tmpsets/set/mod015-developer/all/event_viz.rb
1400
+ - tmpsets/set/mod015-developer/all/view_viz.rb
1401
+ - tmpsets/set/mod015-developer/right/debug.rb
1374
1402
  - tmpsets/set/mod016-standard/all/comment.rb
1375
1403
  - tmpsets/set/mod016-standard/all/error.rb
1376
1404
  - tmpsets/set/mod016-standard/all/links.rb
@@ -1506,4 +1534,6 @@ test_files:
1506
1534
  - spec/support/helper/event_helper.rb
1507
1535
  - spec/support/helper/render_helper.rb
1508
1536
  - spec/support/helper/save_helper.rb
1537
+ - spec/support/helper/set_helper.rb
1538
+ - spec/support/matchers.rb
1509
1539
  - spec/support/simplecov_helper.rb