storytime 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (359) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +10 -0
  3. data/.rspec +1 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/Gemfile +17 -0
  7. data/Gemfile.lock +448 -0
  8. data/Guardfile +24 -0
  9. data/MIT-LICENSE +1 -1
  10. data/README.md +160 -0
  11. data/app/assets/{javascripts/storytime/subscriptions.js → images/storytime/.keep} +0 -0
  12. data/app/assets/images/storytime/storytime-logo-nav-light.png +0 -0
  13. data/app/assets/images/storytime/storytime-logo-nav.png +0 -0
  14. data/app/assets/images/storytime/storytime-logo.png +0 -0
  15. data/app/assets/javascripts/storytime/application.js +11 -3
  16. data/app/assets/javascripts/storytime/base.js.coffee +44 -6
  17. data/app/assets/javascripts/storytime/blog_posts.js.coffee +16 -0
  18. data/app/assets/javascripts/storytime/blogs.js.coffee +18 -0
  19. data/app/assets/javascripts/storytime/character_counter.js.coffee +26 -0
  20. data/app/assets/javascripts/storytime/contenteditable.js.coffee +15 -0
  21. data/app/assets/javascripts/storytime/custom_posts.js.coffee +16 -0
  22. data/app/assets/javascripts/storytime/editor.js.coffee +50 -134
  23. data/app/assets/javascripts/storytime/media.js.coffee +91 -22
  24. data/app/assets/javascripts/storytime/pages.js.coffee +16 -0
  25. data/app/assets/javascripts/storytime/posts.js.coffee +28 -1
  26. data/app/assets/javascripts/storytime/sites.js.coffee +1 -16
  27. data/app/assets/javascripts/storytime/snippets.js.coffee +6 -3
  28. data/app/assets/javascripts/storytime/tags.js.coffee +17 -0
  29. data/app/assets/javascripts/storytime/users.js.coffee +10 -0
  30. data/app/assets/javascripts/storytime/wysiwyg.js.coffee +183 -0
  31. data/app/assets/stylesheets/storytime/_buttons.scss +70 -0
  32. data/app/assets/stylesheets/storytime/_dropdowns.scss +5 -0
  33. data/app/assets/stylesheets/storytime/_forms.scss +3 -0
  34. data/app/assets/stylesheets/storytime/_list-group.scss +13 -0
  35. data/app/assets/stylesheets/storytime/_pagination.scss +14 -0
  36. data/app/assets/stylesheets/storytime/_panels.scss +8 -0
  37. data/app/assets/stylesheets/storytime/_tabs.scss +38 -0
  38. data/app/assets/stylesheets/storytime/_type.scss +13 -0
  39. data/app/assets/stylesheets/storytime/_wells.scss +14 -0
  40. data/app/assets/stylesheets/storytime/admin.scss +42 -0
  41. data/app/assets/stylesheets/storytime/application.scss +75 -0
  42. data/app/assets/stylesheets/storytime/{comments.css.scss → comments.scss} +0 -0
  43. data/app/assets/stylesheets/storytime/icons.scss +79 -0
  44. data/app/assets/stylesheets/storytime/layout.scss +21 -0
  45. data/app/assets/stylesheets/storytime/media.scss +65 -0
  46. data/app/assets/stylesheets/storytime/modals.scss +46 -0
  47. data/app/assets/stylesheets/storytime/navigation.scss +137 -0
  48. data/app/assets/stylesheets/storytime/posts.scss +76 -0
  49. data/app/assets/stylesheets/storytime/scroll-panels.scss +19 -0
  50. data/app/assets/stylesheets/storytime/snippets.scss +11 -0
  51. data/app/assets/stylesheets/storytime/{sites.css.scss → subscriptions.scss} +0 -0
  52. data/app/assets/stylesheets/storytime/versions.scss +21 -0
  53. data/app/controllers/storytime/application_controller.rb +36 -16
  54. data/app/controllers/storytime/blog_homepage_controller.rb +10 -0
  55. data/app/controllers/storytime/blogs_controller.rb +56 -0
  56. data/app/controllers/storytime/comments_controller.rb +5 -1
  57. data/app/controllers/storytime/dashboard/autosaves_controller.rb +7 -3
  58. data/app/controllers/storytime/dashboard/blog_posts_controller.rb +60 -0
  59. data/app/controllers/storytime/dashboard/blogs_controller.rb +66 -0
  60. data/app/controllers/storytime/dashboard/custom_posts_controller.rb +51 -0
  61. data/app/controllers/storytime/dashboard/media_controller.rb +9 -7
  62. data/app/controllers/storytime/dashboard/memberships_controller.rb +49 -0
  63. data/app/controllers/storytime/dashboard/pages_controller.rb +24 -0
  64. data/app/controllers/storytime/dashboard/posts_controller.rb +29 -38
  65. data/app/controllers/storytime/dashboard/roles_controller.rb +16 -2
  66. data/app/controllers/storytime/dashboard/sites_controller.rb +25 -11
  67. data/app/controllers/storytime/dashboard/snippets_controller.rb +19 -14
  68. data/app/controllers/storytime/dashboard/subscriptions_controller.rb +9 -5
  69. data/app/controllers/storytime/dashboard/users_controller.rb +24 -22
  70. data/app/controllers/storytime/dashboard_controller.rb +9 -3
  71. data/app/controllers/storytime/homepage_controller.rb +10 -0
  72. data/app/controllers/storytime/pages_controller.rb +30 -13
  73. data/app/controllers/storytime/posts_controller.rb +22 -53
  74. data/app/controllers/storytime/subscriptions_controller.rb +5 -4
  75. data/app/helpers/storytime/application_helper.rb +28 -7
  76. data/app/helpers/storytime/dashboard/sites_helper.rb +2 -5
  77. data/app/helpers/storytime/subscriptions_helper.rb +0 -7
  78. data/app/inputs/date_time_picker_input.rb +1 -1
  79. data/app/mailers/storytime/subscription_mailer.rb +1 -3
  80. data/app/models/concerns/storytime/post_comments.rb +17 -0
  81. data/app/models/concerns/storytime/post_excerpt.rb +14 -0
  82. data/app/models/concerns/storytime/post_featured_images.rb +8 -0
  83. data/app/models/concerns/storytime/post_partial_inheritance.rb +29 -0
  84. data/app/models/concerns/storytime/post_tags.rb +41 -0
  85. data/app/models/concerns/storytime/scoped_to_site.rb +11 -0
  86. data/app/models/storytime/action.rb +1 -0
  87. data/app/models/storytime/autosave.rb +7 -1
  88. data/app/models/storytime/blog.rb +16 -0
  89. data/app/models/storytime/blog_post.rb +12 -1
  90. data/app/models/storytime/comment.rb +4 -1
  91. data/app/models/storytime/media.rb +2 -0
  92. data/app/models/storytime/membership.rb +17 -0
  93. data/app/models/storytime/page.rb +0 -5
  94. data/app/models/storytime/permission.rb +26 -20
  95. data/app/models/storytime/post.rb +29 -82
  96. data/app/models/storytime/role.rb +12 -0
  97. data/app/models/storytime/site.rb +42 -12
  98. data/app/models/storytime/snippet.rb +3 -0
  99. data/app/models/storytime/subscription.rb +2 -1
  100. data/app/models/storytime/tag.rb +5 -1
  101. data/app/models/storytime/tagging.rb +1 -0
  102. data/app/models/storytime/version.rb +1 -0
  103. data/app/policies/admin_policy.rb +30 -0
  104. data/app/policies/storytime/comment_policy.rb +5 -1
  105. data/app/policies/storytime/membership_policy.rb +32 -0
  106. data/app/policies/storytime/post_policy.rb +6 -4
  107. data/app/policies/storytime/site_policy.rb +7 -2
  108. data/app/policies/storytime/snippet_policy.rb +3 -2
  109. data/app/policies/storytime/subscription_policy.rb +3 -2
  110. data/app/policies/user_policy.rb +2 -5
  111. data/app/views/kaminari/_first_page.html.erb +13 -0
  112. data/app/views/kaminari/_gap.html.erb +8 -0
  113. data/app/views/kaminari/_last_page.html.erb +13 -0
  114. data/app/views/kaminari/_next_page.html.erb +13 -0
  115. data/app/views/kaminari/_page.html.erb +12 -0
  116. data/app/views/kaminari/_paginator.html.erb +24 -0
  117. data/app/views/kaminari/_prev_page.html.erb +13 -0
  118. data/app/views/layouts/storytime/application.html.erb +1 -1
  119. data/app/views/layouts/storytime/dashboard.html.erb +22 -6
  120. data/app/views/storytime/application/storytime/_disqus_comment_counts.html.erb +14 -0
  121. data/app/views/storytime/application/storytime/_header.html.erb +3 -4
  122. data/app/views/storytime/application/storytime/_navigation.html.erb +14 -1
  123. data/app/views/storytime/blogs/_tags.html.erb +3 -0
  124. data/app/views/storytime/{posts/index.atom.builder → blogs/show.atom.builder} +1 -1
  125. data/app/views/storytime/{posts/index.html.erb → blogs/show.html.erb} +1 -1
  126. data/app/views/storytime/comments/_discourse.html.erb +18 -0
  127. data/app/views/storytime/comments/_disqus.html.erb +2 -2
  128. data/app/views/storytime/comments/_form.html.erb +2 -2
  129. data/app/views/storytime/dashboard/_navigation.html.erb +109 -41
  130. data/app/views/storytime/dashboard/_settings_tabs.html.erb +32 -0
  131. data/app/views/storytime/dashboard/autosaves/_autosave_info.html.erb +7 -4
  132. data/app/views/storytime/dashboard/blog_posts/_form.html.erb +157 -0
  133. data/app/views/storytime/dashboard/blog_posts/edit.html.erb +55 -0
  134. data/app/views/storytime/dashboard/blog_posts/new.html.erb +31 -0
  135. data/app/views/storytime/dashboard/blogs/_blog.html.erb +3 -0
  136. data/app/views/storytime/dashboard/blogs/_form.html.erb +25 -0
  137. data/app/views/storytime/dashboard/blogs/edit.json.jbuilder +1 -0
  138. data/app/views/storytime/dashboard/blogs/index.json.jbuilder +1 -0
  139. data/app/views/storytime/dashboard/blogs/new.json.jbuilder +1 -0
  140. data/app/views/storytime/dashboard/media/_form.html.erb +3 -3
  141. data/app/views/storytime/dashboard/media/{_gallery.html → _gallery.html.erb} +7 -4
  142. data/app/views/storytime/dashboard/media/_media.html.erb +6 -13
  143. data/app/views/storytime/dashboard/media/_modal.html.erb +3 -3
  144. data/app/views/storytime/dashboard/media/index.html.erb +15 -5
  145. data/app/views/storytime/dashboard/memberships/_form.html.erb +12 -0
  146. data/app/views/storytime/dashboard/memberships/_index.html.erb +39 -0
  147. data/app/views/storytime/dashboard/memberships/_membership.html.erb +12 -0
  148. data/app/views/storytime/dashboard/memberships/index.json.jbuilder +2 -0
  149. data/app/views/storytime/dashboard/memberships/save.json.jbuilder +1 -0
  150. data/app/views/storytime/dashboard/pages/_form.html.erb +88 -0
  151. data/app/views/storytime/dashboard/pages/_index_title.html.erb +1 -0
  152. data/app/views/storytime/dashboard/pages/_new_button.html.erb +1 -0
  153. data/app/views/storytime/dashboard/pages/edit.html.erb +49 -0
  154. data/app/views/storytime/dashboard/pages/new.html.erb +28 -0
  155. data/app/views/storytime/dashboard/posts/_form.html.erb +128 -122
  156. data/app/views/storytime/dashboard/posts/_image_toolbar.html.erb +32 -0
  157. data/app/views/storytime/dashboard/posts/_index_title.html.erb +1 -0
  158. data/app/views/storytime/dashboard/posts/_list.html.erb +23 -24
  159. data/app/views/storytime/dashboard/posts/_new_button.html.erb +10 -0
  160. data/app/views/storytime/dashboard/posts/edit.html.erb +56 -13
  161. data/app/views/storytime/dashboard/posts/index.html.erb +56 -7
  162. data/app/views/storytime/dashboard/posts/new.html.erb +29 -8
  163. data/app/views/storytime/dashboard/roles/_form.html.erb +41 -0
  164. data/app/views/storytime/dashboard/roles/edit.json.jbuilder +1 -0
  165. data/app/views/storytime/dashboard/sites/_form.html.erb +31 -15
  166. data/app/views/storytime/dashboard/sites/new.html.erb +21 -8
  167. data/app/views/storytime/dashboard/sites/site.json.jbuilder +2 -0
  168. data/app/views/storytime/dashboard/snippets/_form.html.erb +26 -12
  169. data/app/views/storytime/dashboard/snippets/_index.html.erb +17 -0
  170. data/app/views/storytime/dashboard/snippets/_snippet.html.erb +12 -0
  171. data/app/views/storytime/dashboard/snippets/edit.json.jbuilder +1 -0
  172. data/app/views/storytime/dashboard/snippets/index.json.jbuilder +4 -0
  173. data/app/views/storytime/dashboard/snippets/new.json.jbuilder +1 -0
  174. data/app/views/storytime/dashboard/subscriptions/_form.html.erb +19 -0
  175. data/app/views/storytime/dashboard/subscriptions/_index.html.erb +19 -0
  176. data/app/views/storytime/dashboard/subscriptions/_subscription.html.erb +9 -10
  177. data/app/views/storytime/dashboard/subscriptions/form.json.jbuilder +1 -0
  178. data/app/views/storytime/dashboard/subscriptions/index.json.jbuilder +1 -0
  179. data/app/views/storytime/dashboard/users/_edit.html.erb +26 -0
  180. data/app/views/storytime/dashboard/users/_new.html.erb +25 -0
  181. data/app/views/storytime/dashboard/users/edit.json.jbuilder +2 -0
  182. data/app/views/storytime/dashboard/users/new.json.jbuilder +2 -0
  183. data/app/views/storytime/dashboard/versions/_version.html.erb +14 -0
  184. data/app/views/storytime/dashboard/versions/_versions_info.html.erb +1 -16
  185. data/app/views/storytime/pages/show.html.erb +1 -1
  186. data/app/views/storytime/posts/_post.html.erb +8 -0
  187. data/app/views/storytime/posts/_tags.html.erb +1 -1
  188. data/app/views/storytime/posts/show.html.erb +1 -1
  189. data/app/views/storytime/sites/_google_analytics_code.html.erb +2 -2
  190. data/app/views/storytime/snippets/_snippet.html.erb +9 -0
  191. data/app/views/storytime/subscription_mailer/new_post_email.html.erb +2 -2
  192. data/app/views/storytime/subscription_mailer/new_post_email.text.erb +2 -2
  193. data/app/views/storytime/subscriptions/_form.html.erb +0 -1
  194. data/app/views/storytime/subscriptions/_modal.html.erb +18 -10
  195. data/bin/rails +12 -0
  196. data/bin/storytime +4 -0
  197. data/circle.yml +3 -0
  198. data/config/initializers/storytime_admin.rb +3 -0
  199. data/config/initializers/url_for_patch.rb +2 -37
  200. data/config/locales/en.yml +33 -13
  201. data/config/routes.rb +47 -19
  202. data/db/migrate/20150128185746_seed_new_actions_and_permissions.rb +9 -0
  203. data/db/migrate/20150206201847_add_site_id_to_storytime_post.rb +7 -0
  204. data/db/migrate/20150206201919_add_site_id_to_storytime_snippet.rb +7 -0
  205. data/db/migrate/20150206201931_add_site_id_to_storytime_tag.rb +7 -0
  206. data/db/migrate/20150206205256_add_notification_fields_to_storytime_post.rb +6 -0
  207. data/db/migrate/20150216211257_add_subdomain_to_storytime_sites.rb +5 -0
  208. data/db/migrate/20150216225045_add_site_to_storytime_media.rb +6 -0
  209. data/db/migrate/20150219210528_remove_root_page_content_from_storytime_sites.rb +12 -0
  210. data/db/migrate/20150220184902_add_blog_id_to_posts.rb +6 -0
  211. data/db/migrate/20150224192138_add_homepage_path_to_storytime_sites.rb +5 -0
  212. data/db/migrate/20150224193151_add_subscription_email_from_to_storytime_sites.rb +5 -0
  213. data/db/migrate/20150224193551_add_layout_to_storytime_sites.rb +5 -0
  214. data/db/migrate/20150224194559_add_disqus_forum_shortname_to_storytime_sites.rb +5 -0
  215. data/db/migrate/20150224212453_remove_homepage_path_from_storytime_sites.rb +5 -0
  216. data/db/migrate/20150225143516_add_site_id_to_storytime_autosaves.rb +6 -0
  217. data/db/migrate/20150225143826_add_site_id_to_storytime_comments.rb +6 -0
  218. data/db/migrate/20150225145119_add_site_id_to_storytime_versions.rb +6 -0
  219. data/db/migrate/20150225145316_add_site_id_to_storytime_taggings.rb +6 -0
  220. data/db/migrate/20150225145608_update_storytime_site_id_columns.rb +11 -0
  221. data/db/migrate/20150225164232_add_site_id_to_storytime_permissions.rb +6 -0
  222. data/db/migrate/20150225212917_create_storytime_memberships.rb +11 -0
  223. data/db/migrate/20150225213535_create_memberships_for_storytime_users.rb +8 -0
  224. data/db/migrate/20150226201739_add_custom_domain_to_storytime_sites.rb +5 -0
  225. data/db/migrate/20150302171500_add_site_id_to_storytime_media.rb +8 -0
  226. data/db/migrate/20150302171722_set_site_layout.rb +8 -0
  227. data/db/migrate/20150302185138_remove_storytime_role_id_from_users.rb +5 -0
  228. data/db/migrate/20150302192525_transfer_posts_to_blogs.rb +8 -0
  229. data/db/migrate/20150302192759_seed_permissions.rb +9 -0
  230. data/db/migrate/20150331162329_add_discourse_name_to_storytime_sites.rb +5 -0
  231. data/db/migrate/20150402161427_remove_subdomain_from_storytime_site.rb +5 -0
  232. data/lib/generators/storytime/install_generator.rb +17 -0
  233. data/lib/generators/storytime/views_generator.rb +21 -9
  234. data/lib/generators/templates/storytime.rb +70 -27
  235. data/lib/storytime/cli/install.rb +274 -0
  236. data/lib/storytime/cli.rb +28 -0
  237. data/lib/storytime/concerns/current_site.rb +10 -0
  238. data/lib/storytime/concerns/has_versions.rb +22 -3
  239. data/lib/storytime/concerns/storytime_user.rb +31 -7
  240. data/lib/storytime/constraints/blog_constraint.rb +11 -0
  241. data/lib/storytime/constraints/blog_homepage_constraint.rb +11 -0
  242. data/lib/storytime/constraints/page_constraint.rb +13 -0
  243. data/lib/storytime/constraints/page_homepage_constraint.rb +11 -0
  244. data/lib/storytime/engine.rb +43 -14
  245. data/lib/storytime/generators/initializer.rb +45 -0
  246. data/lib/storytime/migrators/v1.rb +122 -0
  247. data/lib/storytime/post_notifier.rb +19 -0
  248. data/lib/storytime/post_url_handler.rb +47 -0
  249. data/lib/storytime/storytime_helpers.rb +12 -0
  250. data/lib/storytime/version.rb +1 -1
  251. data/lib/storytime.rb +57 -56
  252. data/screenshots/admin.png +0 -0
  253. data/screenshots/media.png +0 -0
  254. data/screenshots/page-list.png +0 -0
  255. data/screenshots/post-editor.png +0 -0
  256. data/screenshots/site-settings.png +0 -0
  257. data/screenshots/text-snippets.png +0 -0
  258. data/screenshots/user-management.png +0 -0
  259. data/spec/controllers/dashboard_controller_spec.rb +3 -1
  260. data/{app/assets/stylesheets/storytime/subscriptions.css.scss → spec/dummy/app/assets/images/.keep} +0 -0
  261. data/spec/dummy/app/assets/javascripts/application.js +3 -0
  262. data/spec/dummy/app/controllers/application_controller.rb +5 -1
  263. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  264. data/spec/dummy/app/controllers/storytime_admin/widgets_controller.rb +5 -0
  265. data/spec/dummy/app/mailers/.keep +0 -0
  266. data/spec/dummy/app/models/.keep +0 -0
  267. data/spec/dummy/app/models/concerns/.keep +0 -0
  268. data/spec/dummy/app/models/user.rb +5 -1
  269. data/spec/dummy/app/models/video_post.rb +2 -0
  270. data/spec/dummy/app/models/widget.rb +3 -0
  271. data/spec/dummy/app/views/layouts/application.html.erb +1 -1
  272. data/spec/dummy/app/views/storytime/dashboard/posts/_video_post_fields.html.erb +1 -0
  273. data/spec/dummy/app/views/widgets/storytime/dashboard/admin/_headers.html.erb +1 -0
  274. data/spec/dummy/app/views/widgets/storytime/dashboard/admin/_row.html.erb +1 -0
  275. data/spec/dummy/config/database.yml +9 -5
  276. data/spec/dummy/config/environments/test.rb +1 -0
  277. data/spec/dummy/config/initializers/devise.rb +1 -1
  278. data/spec/dummy/config/initializers/session_store.rb +1 -1
  279. data/spec/dummy/config/initializers/storytime.rb +7 -14
  280. data/spec/dummy/db/development.sqlite3 +0 -0
  281. data/spec/dummy/db/migrate/20150127172846_create_widgets.rb +9 -0
  282. data/spec/dummy/db/migrate/20150206203824_add_video_url_to_storytime_posts.rb +5 -0
  283. data/spec/dummy/db/schema.rb +76 -21
  284. data/spec/dummy/db/test.sqlite3 +0 -0
  285. data/spec/dummy/lib/assets/.keep +0 -0
  286. data/spec/dummy/log/.keep +0 -0
  287. data/spec/factories/comment_factories.rb +1 -0
  288. data/spec/factories/membership_factories.rb +7 -0
  289. data/spec/factories/site_factories.rb +3 -2
  290. data/spec/factories/user_factories.rb +3 -3
  291. data/spec/factories/widget_factories.rb +5 -0
  292. data/spec/features/blogs_spec.rb +28 -0
  293. data/spec/features/comments_spec.rb +8 -9
  294. data/spec/features/dashboard/media_spec.rb +14 -30
  295. data/spec/features/dashboard/memberships_spec.rb +58 -0
  296. data/spec/features/dashboard/pages_spec.rb +67 -44
  297. data/spec/features/dashboard/posts_spec.rb +84 -62
  298. data/spec/features/dashboard/sites_spec.rb +28 -23
  299. data/spec/features/dashboard/snippets_spec.rb +44 -44
  300. data/spec/features/dashboard/subscription_spec.rb +36 -28
  301. data/spec/features/dashboard/users_spec.rb +48 -29
  302. data/spec/features/pages_spec.rb +2 -2
  303. data/spec/features/posts_spec.rb +2 -20
  304. data/spec/features/subscription_spec.rb +4 -4
  305. data/spec/models/post_spec.rb +26 -17
  306. data/spec/policies/comment_policy_spec.rb +22 -6
  307. data/spec/policies/post_policy_spec.rb +21 -3
  308. data/spec/requests/routings_spec.rb +27 -17
  309. data/spec/spec_helper.rb +12 -1
  310. data/spec/support/database_cleaner.rb +5 -5
  311. data/spec/support/domains.rb +18 -0
  312. data/spec/support/feature_macros.rb +18 -9
  313. data/storytime.gemspec +59 -0
  314. data/vendor/assets/javascripts/.DS_Store +0 -0
  315. data/vendor/assets/javascripts/codemirror/modes/css.js +717 -0
  316. data/vendor/assets/javascripts/codemirror/modes/htmlmixed.js +120 -0
  317. data/vendor/assets/javascripts/codemirror/modes/javascript.js +686 -0
  318. data/vendor/assets/javascripts/codemirror/modes/liquid.js +40 -0
  319. data/vendor/assets/javascripts/codemirror/modes/overlay.js +85 -0
  320. data/vendor/assets/javascripts/codemirror/{xml.js → modes/xml.js} +2 -2
  321. data/vendor/assets/javascripts/medium-editor.min.js +2450 -0
  322. data/vendor/assets/javascripts/phantom_js_bind_polyfill.js +24 -0
  323. data/vendor/assets/javascripts/tidy.js +30 -0
  324. data/vendor/assets/stylesheets/.DS_Store +0 -0
  325. data/vendor/assets/stylesheets/chosen-bootstrap-3.css +148 -0
  326. data/vendor/assets/stylesheets/{chosen.css.scss → chosen.scss} +1 -1
  327. data/vendor/assets/stylesheets/disable-transitions-for-test-env.css +7 -0
  328. data/vendor/assets/stylesheets/medium-editor-default.min.css +1 -0
  329. data/vendor/assets/stylesheets/medium-editor.min.css +1 -0
  330. metadata +297 -47
  331. data/app/assets/stylesheets/storytime/admin.css.scss +0 -121
  332. data/app/assets/stylesheets/storytime/application.css.scss +0 -22
  333. data/app/assets/stylesheets/storytime/layout.css.scss +0 -17
  334. data/app/assets/stylesheets/storytime/media.css.scss +0 -68
  335. data/app/assets/stylesheets/storytime/pagination.css.scss +0 -4
  336. data/app/assets/stylesheets/storytime/posts.css.scss +0 -30
  337. data/app/assets/stylesheets/storytime/versions.css.scss +0 -21
  338. data/app/helpers/storytime/dashboard/posts_helper.rb +0 -21
  339. data/app/views/storytime/blog_posts/_blog_post.html.erb +0 -8
  340. data/app/views/storytime/dashboard/posts/_basic_new_post_button.html.erb +0 -3
  341. data/app/views/storytime/dashboard/posts/_new_post_dropdown_button.html.erb +0 -10
  342. data/app/views/storytime/dashboard/sites/edit.html.erb +0 -25
  343. data/app/views/storytime/dashboard/snippets/_list.html.erb +0 -21
  344. data/app/views/storytime/dashboard/snippets/edit.html.erb +0 -13
  345. data/app/views/storytime/dashboard/snippets/index.html.erb +0 -13
  346. data/app/views/storytime/dashboard/snippets/new.html.erb +0 -12
  347. data/app/views/storytime/dashboard/subscriptions/edit.html.erb +0 -10
  348. data/app/views/storytime/dashboard/subscriptions/index.html.erb +0 -19
  349. data/app/views/storytime/dashboard/subscriptions/new.html.erb +0 -9
  350. data/app/views/storytime/dashboard/users/_user.html.erb +0 -11
  351. data/app/views/storytime/dashboard/users/edit.html.erb +0 -10
  352. data/app/views/storytime/dashboard/users/index.html.erb +0 -22
  353. data/app/views/storytime/dashboard/users/new.html.erb +0 -11
  354. data/spec/lib/storytime_spec.rb +0 -23
  355. data/vendor/assets/javascripts/codemirror/codemirror.js +0 -7831
  356. data/vendor/assets/javascripts/summernote.js +0 -5338
  357. data/vendor/assets/stylesheets/codemirror/codemirror.css +0 -309
  358. data/vendor/assets/stylesheets/codemirror/monokai.css +0 -31
  359. data/vendor/assets/stylesheets/summernote.css +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5763a623b7cbc3a4338fb7ad83ddc56a5dbb8e3
4
- data.tar.gz: dc51e884bd9e91cf0cc466edbdc5a54ce1a74abc
3
+ metadata.gz: ec2aec2be59fbd8cd2d335a05247a435e7cfdaa1
4
+ data.tar.gz: 22b6263486819b91f04018bb356ec8fe4261db0c
5
5
  SHA512:
6
- metadata.gz: 0614230034de10544be38ed69510228d33c0655ed48b02bcaf9f975626aac957204ecbf5541848c6ad3fb79b7175314dfc0656b2b0d26df2e4c121e88ed1f132
7
- data.tar.gz: ce87e3b715e67c59f8254143f4fff0a7f5baecfc026cee4f895bc409c01dcad268c8d2b66b855eeb8149dd572d8c6d8172afd54285d926e9110872c708908688
6
+ metadata.gz: 627f896a83fc4e81a535e804417c48ea1b15c7f82f4463b17d770b67be97ce62be45478c013f9e27a6765f841890fbe181f6f463afd5dd16a5a17e3c2f56e6e2
7
+ data.tar.gz: 3f1a4a0b03f2bc80e39546a1a0a8fd1e4ac70e2c2bb603f37b89ea2ba4931461fc3606433001bfe6c0760f35ec1e1f5880b2a66efeb2efd839ab786bc2968225
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ spec/dummy/db/*.sqlite3
5
+ spec/dummy/db/*.sqlite3-journal
6
+ spec/dummy/log/*.log
7
+ spec/dummy/tmp/
8
+ spec/dummy/public/uploads/
9
+ spec/dummy/.sass-cache
10
+ *.gem
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ storytime
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.1.0
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in storytime.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # Declare any dependencies that are still in development here instead of in
9
+ # your gemspec. These might include edge Rails or gems from your path or
10
+ # Git. Remember to move these dependencies to your gemspec before releasing
11
+ # your gem to rubygems.org.
12
+
13
+ # To use debugger
14
+ # gem 'debugger'
15
+
16
+ gem 'devise'
17
+ gem "storytime-admin", github: "flyoverworks/storytime-admin", branch: "master"
data/Gemfile.lock ADDED
@@ -0,0 +1,448 @@
1
+ GIT
2
+ remote: git://github.com/flyoverworks/storytime-admin.git
3
+ revision: 0cf165b4e5f7ba19a07ad6ae4ffe2253be9230ed
4
+ branch: master
5
+ specs:
6
+ storytime-admin (0.1.0)
7
+ bootstrap-kaminari-views
8
+ coffee-rails (>= 4.0)
9
+ font-awesome-sass
10
+ haml-rails
11
+ jquery-rails (>= 3.0)
12
+ kaminari
13
+ leather
14
+ rails (~> 4.0)
15
+ sass-rails (>= 4.0)
16
+ simple_form
17
+
18
+ PATH
19
+ remote: .
20
+ specs:
21
+ storytime (2.0.0)
22
+ bootstrap-sass (>= 3.1)
23
+ carrierwave (>= 0.9)
24
+ codemirror-rails (~> 4.8)
25
+ coffee-rails (>= 4.0)
26
+ devise (>= 3.2)
27
+ fog (>= 1.18)
28
+ font-awesome-sass (>= 4.0.3)
29
+ friendly_id (>= 5.0)
30
+ jbuilder (>= 1.5)
31
+ jquery-rails (>= 3.0)
32
+ jquery-ui-rails (~> 5.0)
33
+ kaminari (>= 0.15)
34
+ leather (~> 3.3.3.2)
35
+ mini_magick (>= 3.7)
36
+ nokogiri (>= 1.6)
37
+ pundit (>= 0.2)
38
+ rails (>= 4.0)
39
+ sass-rails (>= 4.0)
40
+ simple_form (>= 3.0)
41
+ storytime-admin (~> 0.1.0)
42
+ thor (~> 0.19.1)
43
+
44
+ GEM
45
+ remote: https://rubygems.org/
46
+ specs:
47
+ CFPropertyList (2.3.1)
48
+ actionmailer (4.2.0)
49
+ actionpack (= 4.2.0)
50
+ actionview (= 4.2.0)
51
+ activejob (= 4.2.0)
52
+ mail (~> 2.5, >= 2.5.4)
53
+ rails-dom-testing (~> 1.0, >= 1.0.5)
54
+ actionpack (4.2.0)
55
+ actionview (= 4.2.0)
56
+ activesupport (= 4.2.0)
57
+ rack (~> 1.6.0)
58
+ rack-test (~> 0.6.2)
59
+ rails-dom-testing (~> 1.0, >= 1.0.5)
60
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
61
+ actionview (4.2.0)
62
+ activesupport (= 4.2.0)
63
+ builder (~> 3.1)
64
+ erubis (~> 2.7.0)
65
+ rails-dom-testing (~> 1.0, >= 1.0.5)
66
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
67
+ activejob (4.2.0)
68
+ activesupport (= 4.2.0)
69
+ globalid (>= 0.3.0)
70
+ activemodel (4.2.0)
71
+ activesupport (= 4.2.0)
72
+ builder (~> 3.1)
73
+ activerecord (4.2.0)
74
+ activemodel (= 4.2.0)
75
+ activesupport (= 4.2.0)
76
+ arel (~> 6.0)
77
+ activesupport (4.2.0)
78
+ i18n (~> 0.7)
79
+ json (~> 1.7, >= 1.7.7)
80
+ minitest (~> 5.1)
81
+ thread_safe (~> 0.3, >= 0.3.4)
82
+ tzinfo (~> 1.1)
83
+ addressable (2.3.6)
84
+ arel (6.0.0)
85
+ autoprefixer-rails (5.1.8)
86
+ execjs
87
+ json
88
+ bcrypt (3.1.10)
89
+ better_errors (1.1.0)
90
+ coderay (>= 1.0.0)
91
+ erubis (>= 2.6.6)
92
+ binding_of_caller (0.7.2)
93
+ debug_inspector (>= 0.0.1)
94
+ bootstrap-kaminari-views (0.0.5)
95
+ kaminari (>= 0.13)
96
+ rails (>= 3.1)
97
+ bootstrap-sass (3.3.4.1)
98
+ autoprefixer-rails (>= 5.0.0.1)
99
+ sass (>= 3.2.19)
100
+ builder (3.2.2)
101
+ capybara (2.4.1)
102
+ mime-types (>= 1.16)
103
+ nokogiri (>= 1.3.3)
104
+ rack (>= 1.0.0)
105
+ rack-test (>= 0.5.4)
106
+ xpath (~> 2.0)
107
+ carrierwave (0.10.0)
108
+ activemodel (>= 3.2.0)
109
+ activesupport (>= 3.2.0)
110
+ json (>= 1.7)
111
+ mime-types (>= 1.16)
112
+ celluloid (0.15.2)
113
+ timers (~> 1.1.0)
114
+ celluloid-io (0.15.0)
115
+ celluloid (>= 0.15.0)
116
+ nio4r (>= 0.5.0)
117
+ cliver (0.3.2)
118
+ codemirror-rails (4.13)
119
+ railties (>= 3.0, < 5)
120
+ coderay (1.1.0)
121
+ coffee-rails (4.1.0)
122
+ coffee-script (>= 2.2.0)
123
+ railties (>= 4.0.0, < 5.0)
124
+ coffee-script (2.3.0)
125
+ coffee-script-source
126
+ execjs
127
+ coffee-script-source (1.9.1)
128
+ daemons (1.1.9)
129
+ database_cleaner (1.3.0)
130
+ debug_inspector (0.0.2)
131
+ devise (3.4.1)
132
+ bcrypt (~> 3.0)
133
+ orm_adapter (~> 0.1)
134
+ railties (>= 3.2.6, < 5)
135
+ responders
136
+ thread_safe (~> 0.1)
137
+ warden (~> 1.2.3)
138
+ diff-lcs (1.2.5)
139
+ erubis (2.7.0)
140
+ eventmachine (1.0.4)
141
+ excon (0.45.1)
142
+ execjs (2.4.0)
143
+ factory_girl (4.4.0)
144
+ activesupport (>= 3.0.0)
145
+ factory_girl_rails (4.4.1)
146
+ factory_girl (~> 4.4.0)
147
+ railties (>= 3.0.0)
148
+ ffi (1.9.3)
149
+ fission (0.5.0)
150
+ CFPropertyList (~> 2.2)
151
+ fog (1.29.0)
152
+ fog-atmos
153
+ fog-aws (~> 0.0)
154
+ fog-brightbox (~> 0.4)
155
+ fog-core (~> 1.27, >= 1.27.4)
156
+ fog-ecloud
157
+ fog-json
158
+ fog-local
159
+ fog-powerdns (>= 0.1.1)
160
+ fog-profitbricks
161
+ fog-radosgw (>= 0.0.2)
162
+ fog-riakcs
163
+ fog-sakuracloud (>= 0.0.4)
164
+ fog-serverlove
165
+ fog-softlayer
166
+ fog-storm_on_demand
167
+ fog-terremark
168
+ fog-vmfusion
169
+ fog-voxel
170
+ fog-xml (~> 0.1.1)
171
+ ipaddress (~> 0.5)
172
+ nokogiri (~> 1.5, >= 1.5.11)
173
+ fog-atmos (0.1.0)
174
+ fog-core
175
+ fog-xml
176
+ fog-aws (0.1.2)
177
+ fog-core (~> 1.27)
178
+ fog-json (~> 1.0)
179
+ fog-xml (~> 0.1)
180
+ ipaddress (~> 0.8)
181
+ fog-brightbox (0.7.1)
182
+ fog-core (~> 1.22)
183
+ fog-json
184
+ inflecto (~> 0.0.2)
185
+ fog-core (1.30.0)
186
+ builder
187
+ excon (~> 0.45)
188
+ formatador (~> 0.2)
189
+ mime-types
190
+ net-scp (~> 1.1)
191
+ net-ssh (>= 2.1.3)
192
+ fog-ecloud (0.1.1)
193
+ fog-core
194
+ fog-xml
195
+ fog-json (1.0.1)
196
+ fog-core (~> 1.0)
197
+ multi_json (~> 1.0)
198
+ fog-local (0.2.0)
199
+ fog-core (~> 1.27)
200
+ fog-powerdns (0.1.1)
201
+ fog-core (~> 1.27)
202
+ fog-json (~> 1.0)
203
+ fog-xml (~> 0.1)
204
+ fog-profitbricks (0.0.2)
205
+ fog-core
206
+ fog-xml
207
+ nokogiri
208
+ fog-radosgw (0.0.4)
209
+ fog-core (>= 1.21.0)
210
+ fog-json
211
+ fog-xml (>= 0.0.1)
212
+ fog-riakcs (0.1.0)
213
+ fog-core
214
+ fog-json
215
+ fog-xml
216
+ fog-sakuracloud (1.0.1)
217
+ fog-core
218
+ fog-json
219
+ fog-serverlove (0.1.2)
220
+ fog-core
221
+ fog-json
222
+ fog-softlayer (0.4.2)
223
+ fog-core
224
+ fog-json
225
+ fog-storm_on_demand (0.1.1)
226
+ fog-core
227
+ fog-json
228
+ fog-terremark (0.1.0)
229
+ fog-core
230
+ fog-xml
231
+ fog-vmfusion (0.1.0)
232
+ fission
233
+ fog-core
234
+ fog-voxel (0.1.0)
235
+ fog-core
236
+ fog-xml
237
+ fog-xml (0.1.2)
238
+ fog-core
239
+ nokogiri (~> 1.5, >= 1.5.11)
240
+ font-awesome-sass (4.3.2.1)
241
+ sass (~> 3.2)
242
+ formatador (0.2.4)
243
+ friendly_id (5.1.0)
244
+ activerecord (>= 4.0.0)
245
+ globalid (0.3.3)
246
+ activesupport (>= 4.1.0)
247
+ guard (2.6.0)
248
+ formatador (>= 0.2.4)
249
+ listen (~> 2.7)
250
+ lumberjack (~> 1.0)
251
+ pry (>= 0.9.12)
252
+ thor (>= 0.18.1)
253
+ guard-rspec (4.2.8)
254
+ guard (~> 2.1)
255
+ rspec (>= 2.14, < 4.0)
256
+ haml (4.0.6)
257
+ tilt
258
+ haml-rails (0.9.0)
259
+ actionpack (>= 4.0.1)
260
+ activesupport (>= 4.0.1)
261
+ haml (>= 4.0.6, < 5.0)
262
+ html2haml (>= 1.0.1)
263
+ railties (>= 4.0.1)
264
+ high_voltage (2.2.1)
265
+ hike (1.2.3)
266
+ html2haml (2.0.0)
267
+ erubis (~> 2.7.0)
268
+ haml (~> 4.0.0)
269
+ nokogiri (~> 1.6.0)
270
+ ruby_parser (~> 3.5)
271
+ i18n (0.7.0)
272
+ inflecto (0.0.2)
273
+ ipaddress (0.8.0)
274
+ jbuilder (2.2.12)
275
+ activesupport (>= 3.0.0, < 5)
276
+ multi_json (~> 1.2)
277
+ jquery-rails (4.0.3)
278
+ rails-dom-testing (~> 1.0)
279
+ railties (>= 4.2.0)
280
+ thor (>= 0.14, < 2.0)
281
+ jquery-ui-rails (5.0.3)
282
+ railties (>= 3.2.16)
283
+ json (1.8.2)
284
+ kaminari (0.16.3)
285
+ actionpack (>= 3.0.0)
286
+ activesupport (>= 3.0.0)
287
+ launchy (2.4.2)
288
+ addressable (~> 2.3)
289
+ leather (3.3.3.3)
290
+ bootstrap-sass (~> 3.3.3)
291
+ devise
292
+ haml-rails
293
+ high_voltage
294
+ rails (>= 4.0)
295
+ listen (2.7.3)
296
+ celluloid (>= 0.15.2)
297
+ celluloid-io (>= 0.15.0)
298
+ rb-fsevent (>= 0.9.3)
299
+ rb-inotify (>= 0.9)
300
+ loofah (2.0.1)
301
+ nokogiri (>= 1.5.9)
302
+ lumberjack (1.0.5)
303
+ mail (2.6.3)
304
+ mime-types (>= 1.16, < 3)
305
+ method_source (0.8.2)
306
+ mime-types (2.4.3)
307
+ mini_magick (4.2.1)
308
+ mini_portile (0.6.2)
309
+ minitest (5.5.1)
310
+ multi_json (1.11.0)
311
+ net-scp (1.2.1)
312
+ net-ssh (>= 2.6.5)
313
+ net-ssh (2.9.2)
314
+ nio4r (1.0.0)
315
+ nokogiri (1.6.6.2)
316
+ mini_portile (~> 0.6.0)
317
+ orm_adapter (0.5.0)
318
+ pg (0.18.1)
319
+ poltergeist (1.5.1)
320
+ capybara (~> 2.1)
321
+ cliver (~> 0.3.1)
322
+ multi_json (~> 1.0)
323
+ websocket-driver (>= 0.2.0)
324
+ pry (0.9.12.6)
325
+ coderay (~> 1.0)
326
+ method_source (~> 0.8)
327
+ slop (~> 3.4)
328
+ pry-nav (0.2.3)
329
+ pry (~> 0.9.10)
330
+ pry-stack_explorer (0.4.9.1)
331
+ binding_of_caller (>= 0.7)
332
+ pry (>= 0.9.11)
333
+ pundit (0.3.0)
334
+ activesupport (>= 3.0.0)
335
+ rack (1.6.0)
336
+ rack-test (0.6.3)
337
+ rack (>= 1.0)
338
+ rails (4.2.0)
339
+ actionmailer (= 4.2.0)
340
+ actionpack (= 4.2.0)
341
+ actionview (= 4.2.0)
342
+ activejob (= 4.2.0)
343
+ activemodel (= 4.2.0)
344
+ activerecord (= 4.2.0)
345
+ activesupport (= 4.2.0)
346
+ bundler (>= 1.3.0, < 2.0)
347
+ railties (= 4.2.0)
348
+ sprockets-rails
349
+ rails-deprecated_sanitizer (1.0.3)
350
+ activesupport (>= 4.2.0.alpha)
351
+ rails-dom-testing (1.0.5)
352
+ activesupport (>= 4.2.0.beta, < 5.0)
353
+ nokogiri (~> 1.6.0)
354
+ rails-deprecated_sanitizer (>= 1.0.1)
355
+ rails-html-sanitizer (1.0.1)
356
+ loofah (~> 2.0)
357
+ railties (4.2.0)
358
+ actionpack (= 4.2.0)
359
+ activesupport (= 4.2.0)
360
+ rake (>= 0.8.7)
361
+ thor (>= 0.18.1, < 2.0)
362
+ rake (10.4.2)
363
+ rb-fsevent (0.9.4)
364
+ rb-inotify (0.9.4)
365
+ ffi (>= 0.5.0)
366
+ responders (2.1.0)
367
+ railties (>= 4.2.0, < 5)
368
+ rspec (2.14.1)
369
+ rspec-core (~> 2.14.0)
370
+ rspec-expectations (~> 2.14.0)
371
+ rspec-mocks (~> 2.14.0)
372
+ rspec-core (2.14.8)
373
+ rspec-expectations (2.14.5)
374
+ diff-lcs (>= 1.1.3, < 2.0)
375
+ rspec-mocks (2.14.6)
376
+ rspec-rails (2.14.2)
377
+ actionpack (>= 3.0)
378
+ activemodel (>= 3.0)
379
+ activesupport (>= 3.0)
380
+ railties (>= 3.0)
381
+ rspec-core (~> 2.14.0)
382
+ rspec-expectations (~> 2.14.0)
383
+ rspec-mocks (~> 2.14.0)
384
+ ruby_parser (3.6.5)
385
+ sexp_processor (~> 4.1)
386
+ sass (3.4.13)
387
+ sass-rails (5.0.3)
388
+ railties (>= 4.0.0, < 5.0)
389
+ sass (~> 3.1)
390
+ sprockets (>= 2.8, < 4.0)
391
+ sprockets-rails (>= 2.0, < 4.0)
392
+ tilt (~> 1.1)
393
+ sexp_processor (4.5.0)
394
+ simple_form (3.1.0)
395
+ actionpack (~> 4.0)
396
+ activemodel (~> 4.0)
397
+ slop (3.5.0)
398
+ spring (1.1.3)
399
+ spring-commands-rspec (1.0.2)
400
+ spring (>= 0.9.1)
401
+ sprockets (2.12.3)
402
+ hike (~> 1.2)
403
+ multi_json (~> 1.0)
404
+ rack (~> 1.0)
405
+ tilt (~> 1.1, != 1.3.0)
406
+ sprockets-rails (2.2.4)
407
+ actionpack (>= 3.0)
408
+ activesupport (>= 3.0)
409
+ sprockets (>= 2.8, < 4.0)
410
+ thin (1.6.3)
411
+ daemons (~> 1.0, >= 1.0.9)
412
+ eventmachine (~> 1.0)
413
+ rack (~> 1.0)
414
+ thor (0.19.1)
415
+ thread_safe (0.3.4)
416
+ tilt (1.4.1)
417
+ timers (1.1.0)
418
+ tzinfo (1.2.2)
419
+ thread_safe (~> 0.1)
420
+ warden (1.2.3)
421
+ rack (>= 1.0)
422
+ websocket-driver (0.3.4)
423
+ xpath (2.0.0)
424
+ nokogiri (~> 1.3)
425
+
426
+ PLATFORMS
427
+ ruby
428
+
429
+ DEPENDENCIES
430
+ better_errors
431
+ binding_of_caller
432
+ capybara
433
+ database_cleaner
434
+ devise
435
+ factory_girl_rails
436
+ guard-rspec (~> 4.2.8)
437
+ launchy
438
+ pg
439
+ poltergeist (~> 1.5)
440
+ pry-nav
441
+ pry-stack_explorer
442
+ rb-fsevent
443
+ rspec-rails
444
+ spring (= 1.1.3)
445
+ spring-commands-rspec
446
+ storytime!
447
+ storytime-admin!
448
+ thin
data/Guardfile ADDED
@@ -0,0 +1,24 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard :rspec, cmd: 'bundle exec spring rspec', failed_mode: :none do
5
+ watch(%r{^spec/.+_spec\.rb$})
6
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
+ watch('spec/spec_helper.rb') { "spec" }
8
+
9
+ # Rails example
10
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
11
+ watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
12
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
13
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
14
+ watch('config/routes.rb') { "spec/routing" }
15
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
16
+
17
+ # Capybara features specs
18
+ watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
19
+
20
+ # Turnip features and steps
21
+ watch(%r{^spec/acceptance/(.+)\.feature$})
22
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
23
+ end
24
+
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 YOURNAME
1
+ Copyright 2014-2015 FlyoverWorks Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md ADDED
@@ -0,0 +1,160 @@
1
+ ![Storytime](https://flyoverworks-com.s3.amazonaws.com/uploads/storytime/media/file/125/final-st-logo-02_thumb.png)
2
+
3
+ [![Circle CI](https://circleci.com/gh/FlyoverWorks/storytime/tree/master.svg?style=svg)](https://circleci.com/gh/FlyoverWorks/storytime/tree/master)
4
+
5
+ Storytime is a Rails 4+ CMS and blogging engine, with a core focus on content. It is built and maintained by [FlyoverWorks](http://www.flyoverworks.com) / [@flyoverworks](http://twitter.com/flyoverworks)
6
+
7
+ ## Features
8
+
9
+ * [Simple integration with Rails 4+ apps](https://github.com/FlyoverWorks/storytime/wiki/Setup) - Quickly get set up using a guided, automated, or manual setup experience, whatever suits your fancy.
10
+ * [Quick access dashboard](https://github.com/FlyoverWorks/storytime/wiki/Using-the-Quick-Access-Menu) - Access Storytime's dashboard from anywhere on your site with our quick access menu.
11
+ * [Multi-site support](https://github.com/FlyoverWorks/storytime/wiki/Multi-site-Support) - Manage multiple sites with one Storytime deployment.
12
+ * [Inline text snippet editing](https://github.com/FlyoverWorks/storytime/wiki/Text-Snippets) - Create and edit snippets of content that can be re-used throughout your Storytime site.
13
+ * [Admin of other Rails models](https://github.com/FlyoverWorks/storytime/wiki/Admin-of-Rails-Models) - Manage your models from the Storytime dashboard.
14
+ * [Custom Post Types](https://github.com/FlyoverWorks/storytime/wiki/Using-Custom-Post-Types) - Add custom post types to alter functionality or appearance of posts.
15
+ * [Email list building](https://github.com/FlyoverWorks/storytime/wiki/Email-Subscriptions) - Collect and manage emails using a simple view helper.
16
+ * [New post notifications](https://github.com/FlyoverWorks/storytime/wiki/Working-with-New-Post-Notifications) - Send notifications to your site's subscribers whenever you publish a post.
17
+ * [Built-in search](https://github.com/FlyoverWorks/storytime/wiki/Using-Storytime%27s-Post-Search) - Easily search through Storytime's posts using built-in search adapters or request parameters.
18
+
19
+ ## Separation of Concerns
20
+
21
+ Storytime is built around several opinions regarding the responsibilities and concerns of the CMS and the host app.
22
+
23
+ Storytime is responsible for:
24
+ * Editing **content**, **copy**, and very **basic formatting** (basic formatting roughly = things you could do in markdown)
25
+ * Enabling customization, extension, and theming
26
+ * Basic CRUD administration of other Rails models
27
+
28
+ Host app is responsible for:
29
+ * Complex page structure (HTML), styling (CSS), and interactions (JavaScript)
30
+ * App-specific details or customizations (e.g. Storytime tells the host app to send a post notification email, host app decides how to send the email, whether it should be in a background job, etc.)
31
+ * Presentation details -- we like to think of the host app as providing the "theme" for the Storytime site.
32
+
33
+ This separation is intended to provide several benefits and/or solve several problems:
34
+ * *Problem:* Building complex page structure and styling inside the CMS prevents the code from going into version control
35
+ * *Problem:* If complex page structure is in the CMS, it becomes much easier to break on production sites.
36
+
37
+ * *Benefit:* If complex page structure stays in the host app and CMS users just edit content/copy, code goes into version control and pages are much less likely to break.
38
+ * *Benefit:* Combining admin and CMS/blog features in one place gives site administrators **a single place to edit content** (rather than requiring both a CMS/blog and something like ActiveAdmin or RailsAdmin).
39
+
40
+ ## Sample App
41
+
42
+ [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/flyoverworks/storytime-example)
43
+
44
+ ## Installation
45
+
46
+ Add Storytime to your Gemfile:
47
+
48
+ ```ruby
49
+ gem "storytime"
50
+ ```
51
+
52
+ Run the bundle command to install it.
53
+
54
+ After you install Storytime and add it to your Gemfile, you can either setup Storytime through a [guided command line interface](#guided-setup), a speedy [automated setup](#automated-setup), or [manually](#manual-setup).
55
+
56
+ **Note:** To use the image upload feature, Storytime requires you to have Imagemagick installed on your system.
57
+
58
+ ### Guided Setup
59
+
60
+ Storytime can set up your routes file, initializer, user model, copy migrations, migrate your database, and copy views into your app through a simple command line interface (CLI). In order to use the CLI, first create a binstub of Storytime by running the following command:
61
+
62
+ ```terminal
63
+ $ bundle binstub storytime
64
+ ```
65
+
66
+ After creating the binstub just run the following command to get started with the guided setup:
67
+
68
+ ```terminal
69
+ $ storytime install
70
+ ```
71
+
72
+ After answering the prompts, fire up your Rails server and access the Storytime dashboard, by default located at `http://localhost:3000/storytime`.
73
+
74
+ ### Automated Setup
75
+
76
+ The automated setup goes through all of the steps in the [Guided Setup](#guided-setup), but instead of prompting you for values it just uses all the defaults, allowing you to setup Storytime in seconds.
77
+
78
+ In order to use the automated setup, first create a binstub of Storytime (see [Guided Setup](#guided-setup)). Next, run the install command with the -d option:
79
+
80
+ ```terminal
81
+ $ storytime install -d
82
+ ```
83
+
84
+ After the setup is complete, fire up your Rails server and access the Storytime dashboard, by default located at `http://localhost:3000/storytime`.
85
+
86
+ ### Manual Setup
87
+
88
+ Manual setup of Storytime assumes that your host app has an authentication system, like [Devise](https://github.com/plataformatec/devise), already installed. *Before proceeding make sure you have properly set up Devise.*
89
+
90
+ After you install Storytime and add it to your Gemfile, you should run the install generator:
91
+
92
+ ```terminal
93
+ $ rails generate storytime:install
94
+ ```
95
+
96
+ The install generator will create a Storytime initializer containing various configuration options. Be sure to review and update the generated initializer file as necessary.
97
+
98
+ Running the install generator will also insert a line into your routes file responsible for mounting the Storytime engine.
99
+
100
+ By default, Storytime is mounted at `/`. If you want to keep that mount point make sure that the Storytime mount is the **last** entry in your routes file:
101
+
102
+ ```ruby
103
+ mount Storytime::Engine => "/"
104
+ ```
105
+
106
+ Install migrations:
107
+
108
+ ```ruby
109
+ rake storytime:install:migrations
110
+ rake db:migrate
111
+ ```
112
+
113
+ Add `storytime_user` to your user class:
114
+
115
+ ```ruby
116
+ class User < ActiveRecord::Base
117
+ devise :database_authenticatable, :registerable,
118
+ :recoverable, :rememberable, :trackable, :validatable
119
+
120
+ storytime_user
121
+ end
122
+ ```
123
+
124
+ Finally, fire up your Rails server and access the Storytime dashboard, by default located at `http://localhost:3000/storytime`.
125
+
126
+ *Optional:* While not necessary, you may want to copy over the non-dashboard Storytime views to your app for customization:
127
+
128
+ ```console
129
+ $ rails generate storytime:views
130
+ ```
131
+
132
+ ## Getting Started
133
+
134
+ See the [Storytime Wiki](https://github.com/FlyoverWorks/storytime/wiki) for more documentation and information on using Storytime's various features.
135
+
136
+ ## Screen Shots
137
+
138
+ Page List:
139
+ ![Page List](https://raw.githubusercontent.com/FlyoverWorks/storytime/master/screenshots/page-list.png "Page List")
140
+
141
+ Post Editor:
142
+ ![Post Editor](https://raw.githubusercontent.com/FlyoverWorks/storytime/master/screenshots/post-editor.png "Post Editor")
143
+
144
+ Admin of Custom Rails Models:
145
+ ![Admin of Custom Rails Models](https://raw.githubusercontent.com/FlyoverWorks/storytime/master/screenshots/admin.png "Admin of Custom Rails Models")
146
+
147
+ Text Snippets:
148
+ ![Text Snippets](https://raw.githubusercontent.com/FlyoverWorks/storytime/master/screenshots/text-snippets.png "Text Snippets")
149
+
150
+ User Management:
151
+ ![User Management](https://raw.githubusercontent.com/FlyoverWorks/storytime/master/screenshots/user-management.png "User Management")
152
+
153
+ Site Settings:
154
+ ![Site Settings](https://raw.githubusercontent.com/FlyoverWorks/storytime/master/screenshots/site-settings.png "Site Settings")
155
+
156
+ Media Uploads:
157
+ ![Media Uploads](https://raw.githubusercontent.com/FlyoverWorks/storytime/master/screenshots/media.png "Media Uploads")
158
+
159
+ ## Copyright
160
+ Copyright © 2014-2015 FlyoverWorks Inc. Storytime is released under the [MIT-LICENSE](MIT-LICENSE).