rubber_ring 0.1.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -32
  3. data/app/assets/stylesheets/libs/{bootstrap.scss.erb → bootstrap.scss} +2 -2
  4. data/app/assets/stylesheets/rubber_ring/cms.scss +10 -0
  5. data/app/concerns/rubber_ring/build.rb +13 -25
  6. data/app/controllers/rubber_ring/attachments_controller.rb +2 -2
  7. data/app/controllers/rubber_ring/cms_controller.rb +4 -5
  8. data/app/controllers/rubber_ring/rubber_ring_controller.rb +24 -28
  9. data/app/controllers/rubber_ring/sessions_controller.rb +1 -1
  10. data/app/views/layouts/rubber_ring/sessions.html.erb +13 -0
  11. data/app/views/rubber_ring/_application.html.erb +5 -6
  12. data/app/views/rubber_ring/rubber_ring/build.html.erb +11 -0
  13. data/app/views/rubber_ring/rubber_ring/publish.html.erb +13 -0
  14. data/app/views/rubber_ring/sessions/new.html.erb +11 -6
  15. data/config/routes.rb +3 -0
  16. data/lib/generators/rubber_ring/install/USAGE +3 -0
  17. data/lib/generators/rubber_ring/install/install_generator.rb +4 -4
  18. data/lib/generators/rubber_ring/install/templates/layout.html.erb +1 -1
  19. data/lib/generators/rubber_ring/install/templates/publish_template.yml +3 -2
  20. data/lib/generators/rubber_ring/install/templates/puma_template.rb +1 -0
  21. data/lib/generators/rubber_ring/page/templates/controller.rb +0 -1
  22. data/lib/rubber_ring/engine.rb +0 -1
  23. data/lib/rubber_ring/version.rb +1 -1
  24. data/spec/controllers/attachments_controller_spec.rb +1 -0
  25. data/spec/controllers/cms_controller_spec.rb +1 -0
  26. data/spec/controllers/sessions_controller_spec.rb +9 -2
  27. data/spec/spec_helper.rb +0 -1
  28. data/test/dummy/app/controllers/example_controller.rb +0 -1
  29. data/test/dummy/config/application.rb +0 -1
  30. data/test/dummy/config/environments/development.rb +2 -2
  31. data/test/dummy/config/publish.yml +2 -2
  32. data/test/dummy/config/puma.rb +1 -0
  33. data/test/dummy/db/development.sqlite3 +0 -0
  34. data/test/dummy/db/production.sqlite3 +0 -0
  35. data/test/dummy/log/development.log +9146 -0
  36. data/test/dummy/log/production.log +2122 -0
  37. data/test/dummy/log/test.log +2917 -0
  38. data/test/dummy/public/{build/assets/application.css → assets/application-494197b919313adf1938508a6b18b757.css} +4 -3
  39. data/test/dummy/public/assets/application-494197b919313adf1938508a6b18b757.css.gz +0 -0
  40. data/test/dummy/public/assets/application-ee0f5bbb7e41117c464a29501bf88843.js +1 -0
  41. data/test/dummy/public/assets/application-ee0f5bbb7e41117c464a29501bf88843.js.gz +0 -0
  42. data/test/dummy/public/{build/assets/baws.jpg → assets/baws-c0784ed6e352b84613bc9c1f9d3d3bcd.jpg} +0 -0
  43. data/test/dummy/public/assets/glyphicons-halflings-4e5b89324f1ac987ddf6835ef51f5fe9.png +0 -0
  44. data/test/dummy/public/assets/glyphicons-halflings-white-2fa53df59ca25ee50f59f971c0c9175d.png +0 -0
  45. data/test/dummy/public/assets/manifest-349aafb4cc8354998749d187b4db125b.json +1 -0
  46. data/test/dummy/public/assets/rubber_ring/application-818c8187d7c86fc8de22b84d44855e7f.js +11 -0
  47. data/test/dummy/public/assets/rubber_ring/application-818c8187d7c86fc8de22b84d44855e7f.js.gz +0 -0
  48. data/test/dummy/public/assets/rubber_ring/application-a67e95d5aea6d4e860eb3858036b1224.css +4425 -0
  49. data/test/dummy/public/assets/rubber_ring/application-a67e95d5aea6d4e860eb3858036b1224.css.gz +0 -0
  50. data/test/dummy/public/build/assets/application-494197b919313adf1938508a6b18b757.css +23 -0
  51. data/test/dummy/public/build/assets/application-ee0f5bbb7e41117c464a29501bf88843.js +1 -0
  52. data/test/dummy/public/build/assets/baws-c0784ed6e352b84613bc9c1f9d3d3bcd.jpg +0 -0
  53. data/test/dummy/public/build/index.html +29 -0
  54. data/test/dummy/public/build/page2.html +6 -4
  55. data/test/dummy/public/upload/en/example/page2/images/app_icon.png +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sass/1c0ae3747b6397b853de99649a26cf73d192aa8a/bootstrap.scss.erbc +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sass/1c0ae3747b6397b853de99649a26cf73d192aa8a/bootstrap.scssc +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sass/6afeb0468679937dd837e6204d8c50da187b1b86/cms.scssc +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sass/8185f37c4f7dd19815b19559200f49fbf25b143a/cms.scssc +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/010d581659b8601fd73829b82e814d1a +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/033778b0e837400b5ad09915147a6865 +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/03d17cbcdf5da1d77daae00a93e1d8eb +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/04f0e1ef18acfc4a7a2f0ea28d78b709 +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/05dcb866051327677d2e3adee496181e +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/060f70ff2d45a09a52f739439933c7c8 +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/11120370c68bb1e8baef5761e806b5d5 +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/12500514d60c3ccadeada02813852775 +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/15a9fef508d1e8ee609faec34e0c766c +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/1f634c9d68d6c31855bf84ecb8e9d3a1 +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/2558b6957b25b93991193f924fc75bf8 +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/28ca5f6904ddabaace878089c3e874ed +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/29b822bb5d8335c3c7baebfd3a77185c +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/2ad7a946cdec002e0a3369606299b443 +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/2b5fa0b549eea4ea0fb8f50425990b2a +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/2eb67a7041c777c64ffabc725ac0135a +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/2f4860a169c5717c3c968d430795078c +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/33e002f0b7946cd298562302f71fdd77 +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/3699e3a1c1e5ad798ad43a8f54dde72f +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/36d1be33b3de1408b97ae6246ef47c46 +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/3746dd2fd087e8f3b1ab89b8522a8111 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/3beaa45c69e3414a2f8cdd63b39787a2 +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/3c268db1ad3cbbf864c4f3534c74ca4e +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/3c94454b9932850a6da9ac91e7ce4c5b +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/4aa2102553fbe0e3cb0b53f6dcc47746 +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/4d48e10441bb94b809c9f46253f25c2e +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/5118223687b3927074be21a3a38e77f2 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/531dee1f88580a73c72d41e95b6d93df +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/53ba99192c5668743a46c5d52532ab35 +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/5656d8ef9d043e7b3f8406799450a4f8 +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/5fd1f3692d30d62bdf60d62818da720c +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/615a9332eef337f4100ac7065bdae0c0 +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/61dbd19df4d217bd1a726ba0cee28fcc +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/68e88a76cf0ae3b9def99df2da275d32 +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/75be242df281340f13e0c1c850db31a4 +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/7647442e68634bf506ceb6529c964ff8 +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/7736698f9e23d715ba80ec4b2f3563f7 +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/79276d42bed57005564312cf1d1cc576 +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/7bc09e522e5e89e66d9d8f25553fedf5 +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/7f6c5d885262d109a007651dbcdce362 +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/80b4422222d4f878c7a0588c83f26cd1 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/827aa5463182686828d9664a20b2d4ac +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/8394c16a4541076a7958bd0949b389ec +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/85f78df9521e3901d33abade69e49b2e +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/86c5db77a82b91bbc060a99a2bf8b1d8 +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/8d530d6a4af9bd245c69c92c36870220 +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/90cc23105bddc4b07acd507ae837c55f +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/922440cce05a7d84da91e20bdf546abb +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/98b8ede709efdb319234dad74075cb05 +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/9993c347361adbac8056462899c084e5 +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/9e0522ce72f83a2d14b9040602ad671e +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/a2719663651c4c47fea4601da97f674b +0 -0
  114. data/test/dummy/tmp/cache/assets/development/sprockets/a30c5479ead2031a2e521cbfa989dca8 +0 -0
  115. data/test/dummy/tmp/cache/assets/development/sprockets/a3343c01eda98748ee37e780c9128576 +0 -0
  116. data/test/dummy/tmp/cache/assets/development/sprockets/a54698289dfb98cb1c3314d66baf5f91 +0 -0
  117. data/test/dummy/tmp/cache/assets/development/sprockets/a9fead645c2c02e002382413d89e2459 +0 -0
  118. data/test/dummy/tmp/cache/assets/development/sprockets/aea514acc26588ae761f1fce96832ef5 +0 -0
  119. data/test/dummy/tmp/cache/assets/development/sprockets/b064391743404352c0d06d1dae692bbc +0 -0
  120. data/test/dummy/tmp/cache/assets/development/sprockets/b4430b4104e8d9248c4dc9cf1e221a35 +0 -0
  121. data/test/dummy/tmp/cache/assets/development/sprockets/b4da7dedc3efa1b2420734a75da1402f +0 -0
  122. data/test/dummy/tmp/cache/assets/development/sprockets/bb5424445d77cb384674cef7984e4b80 +0 -0
  123. data/test/dummy/tmp/cache/assets/development/sprockets/bce5098f7cdd8f471f7a8edbcd97a9d0 +0 -0
  124. data/test/dummy/tmp/cache/assets/development/sprockets/bf1f8c24547868c27b950882afb48ea6 +0 -0
  125. data/test/dummy/tmp/cache/assets/development/sprockets/c0625d8a0a68787afb029146355062df +0 -0
  126. data/test/dummy/tmp/cache/assets/development/sprockets/c10a1994812cf191cd2ee4ef1f979bf0 +0 -0
  127. data/test/dummy/tmp/cache/assets/development/sprockets/c21a74093c819c60456adf9e620dd96d +0 -0
  128. data/test/dummy/tmp/cache/assets/development/sprockets/c243939bf2b921b050b5b195ebd4f091 +0 -0
  129. data/test/dummy/tmp/cache/assets/development/sprockets/c887c975279c3c47685cf7124ed6a1bd +0 -0
  130. data/test/dummy/tmp/cache/assets/development/sprockets/cb3562c12ef47f329f362aa94351a7c0 +0 -0
  131. data/test/dummy/tmp/cache/assets/development/sprockets/d601969c1e6766cd86ed348b1780fad8 +0 -0
  132. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  133. data/test/dummy/tmp/cache/assets/development/sprockets/d98380ca46f4fb596bcf06df538f7922 +0 -0
  134. data/test/dummy/tmp/cache/assets/development/sprockets/dc3d91ae1d7f973c1354a745e97076dd +0 -0
  135. data/test/dummy/tmp/cache/assets/development/sprockets/e03d2d83c3e0a1d070d202d608dc0ce3 +0 -0
  136. data/test/dummy/tmp/cache/assets/development/sprockets/e0e949e3a882294df1ac6efb53555963 +0 -0
  137. data/test/dummy/tmp/cache/assets/development/sprockets/e20d27f6974a7234201280836e0ce7f4 +0 -0
  138. data/test/dummy/tmp/cache/assets/development/sprockets/e5b45b06592237583f5384133ebdd5de +0 -0
  139. data/test/dummy/tmp/cache/assets/development/sprockets/ee3a7629e0039a00e2ea790202f2a566 +0 -0
  140. data/test/dummy/tmp/cache/assets/development/sprockets/f1234d01ba2c61bb079c44314e6751b9 +0 -0
  141. data/test/dummy/tmp/cache/assets/development/sprockets/f270587a206c85bb7163b16529b5ff69 +0 -0
  142. data/test/dummy/tmp/cache/assets/development/sprockets/f5c12cebbf6610d2ee32e2d1550bc718 +0 -0
  143. data/test/dummy/tmp/cache/assets/development/sprockets/f8ed5681d7ebd78fe08e61a98ce54772 +0 -0
  144. data/test/dummy/tmp/cache/assets/development/sprockets/fd6b4f4ad158f51359c1217abd08824e +0 -0
  145. data/test/dummy/tmp/cache/assets/production/sass/1c0ae3747b6397b853de99649a26cf73d192aa8a/bootstrap.scssc +0 -0
  146. data/test/dummy/tmp/cache/assets/production/sass/8185f37c4f7dd19815b19559200f49fbf25b143a/cms.scssc +0 -0
  147. data/test/dummy/tmp/cache/assets/production/sprockets/010d581659b8601fd73829b82e814d1a +0 -0
  148. data/test/dummy/tmp/cache/assets/production/sprockets/03d17cbcdf5da1d77daae00a93e1d8eb +0 -0
  149. data/test/dummy/tmp/cache/assets/production/sprockets/05dcb866051327677d2e3adee496181e +0 -0
  150. data/test/dummy/tmp/cache/assets/production/sprockets/11120370c68bb1e8baef5761e806b5d5 +0 -0
  151. data/test/dummy/tmp/cache/assets/production/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  152. data/test/dummy/tmp/cache/assets/production/sprockets/1f634c9d68d6c31855bf84ecb8e9d3a1 +0 -0
  153. data/test/dummy/tmp/cache/assets/production/sprockets/2b5fa0b549eea4ea0fb8f50425990b2a +0 -0
  154. data/test/dummy/tmp/cache/assets/production/sprockets/2f4860a169c5717c3c968d430795078c +0 -0
  155. data/test/dummy/tmp/cache/assets/production/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  156. data/test/dummy/tmp/cache/assets/production/sprockets/33e002f0b7946cd298562302f71fdd77 +0 -0
  157. data/test/dummy/tmp/cache/assets/production/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  158. data/test/dummy/tmp/cache/assets/production/sprockets/36d1be33b3de1408b97ae6246ef47c46 +0 -0
  159. data/test/dummy/tmp/cache/assets/production/sprockets/3beaa45c69e3414a2f8cdd63b39787a2 +0 -0
  160. data/test/dummy/tmp/cache/assets/production/sprockets/3c268db1ad3cbbf864c4f3534c74ca4e +0 -0
  161. data/test/dummy/tmp/cache/assets/production/sprockets/3c94454b9932850a6da9ac91e7ce4c5b +0 -0
  162. data/test/dummy/tmp/cache/assets/production/sprockets/4aa2102553fbe0e3cb0b53f6dcc47746 +0 -0
  163. data/test/dummy/tmp/cache/assets/production/sprockets/4d48e10441bb94b809c9f46253f25c2e +0 -0
  164. data/test/dummy/tmp/cache/assets/production/sprockets/531dee1f88580a73c72d41e95b6d93df +0 -0
  165. data/test/dummy/tmp/cache/assets/production/sprockets/53ba99192c5668743a46c5d52532ab35 +0 -0
  166. data/test/dummy/tmp/cache/assets/production/sprockets/5656d8ef9d043e7b3f8406799450a4f8 +0 -0
  167. data/test/dummy/tmp/cache/assets/production/sprockets/68e88a76cf0ae3b9def99df2da275d32 +0 -0
  168. data/test/dummy/tmp/cache/assets/production/sprockets/75be242df281340f13e0c1c850db31a4 +0 -0
  169. data/test/dummy/tmp/cache/assets/production/sprockets/7647442e68634bf506ceb6529c964ff8 +0 -0
  170. data/test/dummy/tmp/cache/assets/production/sprockets/827aa5463182686828d9664a20b2d4ac +0 -0
  171. data/test/dummy/tmp/cache/assets/production/sprockets/8d530d6a4af9bd245c69c92c36870220 +0 -0
  172. data/test/dummy/tmp/cache/assets/production/sprockets/90cc23105bddc4b07acd507ae837c55f +0 -0
  173. data/test/dummy/tmp/cache/assets/production/sprockets/922440cce05a7d84da91e20bdf546abb +0 -0
  174. data/test/dummy/tmp/cache/assets/production/sprockets/98b8ede709efdb319234dad74075cb05 +0 -0
  175. data/test/dummy/tmp/cache/assets/production/sprockets/a30c5479ead2031a2e521cbfa989dca8 +0 -0
  176. data/test/dummy/tmp/cache/assets/production/sprockets/aea514acc26588ae761f1fce96832ef5 +0 -0
  177. data/test/dummy/tmp/cache/assets/production/sprockets/b064391743404352c0d06d1dae692bbc +0 -0
  178. data/test/dummy/tmp/cache/assets/production/sprockets/b4430b4104e8d9248c4dc9cf1e221a35 +0 -0
  179. data/test/dummy/tmp/cache/assets/production/sprockets/b4da7dedc3efa1b2420734a75da1402f +0 -0
  180. data/test/dummy/tmp/cache/assets/production/sprockets/bb5424445d77cb384674cef7984e4b80 +0 -0
  181. data/test/dummy/tmp/cache/assets/production/sprockets/c0625d8a0a68787afb029146355062df +0 -0
  182. data/test/dummy/tmp/cache/assets/production/sprockets/c10a1994812cf191cd2ee4ef1f979bf0 +0 -0
  183. data/test/dummy/tmp/cache/assets/production/sprockets/c243939bf2b921b050b5b195ebd4f091 +0 -0
  184. data/test/dummy/tmp/cache/assets/production/sprockets/cb3562c12ef47f329f362aa94351a7c0 +0 -0
  185. data/test/dummy/tmp/cache/assets/production/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  186. data/test/dummy/tmp/cache/assets/production/sprockets/d601969c1e6766cd86ed348b1780fad8 +0 -0
  187. data/test/dummy/tmp/cache/assets/production/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  188. data/test/dummy/tmp/cache/assets/production/sprockets/d98380ca46f4fb596bcf06df538f7922 +0 -0
  189. data/test/dummy/tmp/cache/assets/production/sprockets/dc3d91ae1d7f973c1354a745e97076dd +0 -0
  190. data/test/dummy/tmp/cache/assets/production/sprockets/e03d2d83c3e0a1d070d202d608dc0ce3 +0 -0
  191. data/test/dummy/tmp/cache/assets/production/sprockets/e0e949e3a882294df1ac6efb53555963 +0 -0
  192. data/test/dummy/tmp/cache/assets/production/sprockets/e5b45b06592237583f5384133ebdd5de +0 -0
  193. data/test/dummy/tmp/cache/assets/production/sprockets/f1234d01ba2c61bb079c44314e6751b9 +0 -0
  194. data/test/dummy/tmp/cache/assets/production/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  195. data/test/dummy/tmp/cache/assets/production/sprockets/f8ed5681d7ebd78fe08e61a98ce54772 +0 -0
  196. data/test/dummy/tmp/cache/assets/production/sprockets/fd6b4f4ad158f51359c1217abd08824e +0 -0
  197. metadata +323 -83
  198. data/test/dummy/public/build/assets/application.js +0 -6
  199. data/test/dummy/public/build/page2.html.gz +0 -0
  200. data/test/dummy/public/build/upload/en/example/page2/images/app_icon.png +0 -0
  201. data/test/dummy/public/build/upload/en/example/page2/images/lombard-mb.jpg +0 -0
  202. data/test/dummy/script/rails +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3c64471e982f5209557aea7e349ffdc4b93d26c
4
- data.tar.gz: a3e1c09b8a1c4a11bc3a36807238705d2f0981aa
3
+ metadata.gz: e375d094f6ea3db88ea287d9a9fd3ee07298910c
4
+ data.tar.gz: 0250e2d3135d8c55e885054a9db5147120f7854d
5
5
  SHA512:
6
- metadata.gz: e755bb6188026a4a4ea6a52a9e72aa1d12c776f160b4b423b909f6f757887c97543ba26671e9961254337744d1ee1af3020036337649b1f92b2d4e72cd5fc0d3
7
- data.tar.gz: 0dcd630fdb4b198703941b3ca76e8a1ba3d080dd7721dc7c38e060ff86e28e491ad3e3f267c82aa220ae1b4c5186cbe90795cc9db6caba1fe0a3a76bd9ea772d
6
+ metadata.gz: 528f3abcbd1fe5b1244a9edd7b33f529b3bd28e5e3409a9df603709769f0e4313d7e05c95ed36512b28ec30b9c8f9658eb066a6cbd92f26a65630fb99be8ceef
7
+ data.tar.gz: ae5ce9b1a95e00cf407aa4549ac4cd9c1edcb39557fed50045c697d4844fca135d741bd61764f50ce4149358158a6e0388c8ab2c9fd062a04725e43b59c660b8
data/README.md CHANGED
@@ -3,11 +3,11 @@
3
3
 
4
4
  ## About
5
5
 
6
- This CMS helps you build editable pages fast. You define which content
7
- (`text`, `image`, `attachment`, ...) should be editable for your users.
8
- Limitation, that only developer sets what page parts are editable is good for
6
+ This CMS helps you build editable pages fast. You define which content
7
+ (`text`, `image`, `attachment`, ...) should be editable for your users.
8
+ Limitation, that only developer sets what page parts are editable is good for
9
9
  keeping the design intact. It is basically backend for saving `contenteditable` content.
10
- When done editing, only static assets will be published to production server
10
+ When done editing, only static assets will be published to production server
11
11
  where you only need a web server like Apache or Nginx.
12
12
 
13
13
  Named by The Smiths [song](http://www.youtube.com/watch?v=Cpf6gJU3520).
@@ -19,14 +19,24 @@ Named by The Smiths [song](http://www.youtube.com/watch?v=Cpf6gJU3520).
19
19
  - customer doesn't need application server and/or database. Only plain web server for static HTML serving will do
20
20
 
21
21
  ### This CMS is not good for
22
- sites, where **editor** wants to create new pages and control each part of every page,
22
+ sites, where **editor** wants to create new pages and control each part of every page,
23
23
  change fonts and text style
24
24
 
25
25
  ## Software prerequisites
26
26
 
27
27
  * Ruby 2
28
28
  * Rails 4
29
+ * ruby web server running at least 2 processes (puma, unicorn, thin) - I only tested with puma for now
29
30
  * imagemagick
31
+ * wget
32
+
33
+ ## Versions
34
+
35
+ Use `gem 'rubber_ring', '~> 0.1.2'` if you don't want to run multiple processes. Instead you will need to publish each
36
+ change of any page separately.
37
+
38
+ Use `gem 'rubber_ring', '~> 1.0.0'` if you can have two or more processes of web server. In this version whole site
39
+ will be built in one step.
30
40
 
31
41
  ### Browser support
32
42
 
@@ -36,7 +46,7 @@ Firefox, Chrome and Safari.
36
46
 
37
47
  ### Dependencies
38
48
  To install `imagemagick` and `sqlite3` on `Ubuntu`
39
-
49
+
40
50
  sudo apt-get install imagemagick
41
51
  sudo apt-get install libsqlite3-dev
42
52
 
@@ -51,9 +61,11 @@ Create and migrate database
51
61
  rake rubber_ring:install:migrations
52
62
  rake db:create db:migrate
53
63
 
54
- Update `development.rb` to enable caching
64
+ Update `development.rb` to enable build for development mode. This will disable rails to add `body=1` to every asset link.
55
65
 
56
- config.action_controller.perform_caching = true
66
+ ```ruby
67
+ config.assets.debug = false
68
+ ```
57
69
 
58
70
  ### Generate config files
59
71
 
@@ -66,25 +78,37 @@ This will generate
66
78
  3. app/views/layouts/rubber_ring/layout.html.erb
67
79
  4. app/assets/javascripts/application.js
68
80
  5. public/.htaccess
81
+ 6. app/puma.rb
69
82
 
70
- 1. Set your production server name and path. You will need SSH access and your public key
83
+ 1. Set your production server name and path. You will need SSH access and your public key
71
84
  on server. If you tend to use Rubber Ring as part of web application, or you don't want/need to publish only static HTML files, you can ignore this file.
72
85
  2. Set admin password and application type in `app/config/initializers/rubber_ring.rb`.
73
- 3. `app/views/layouts/rubber_ring/layout.html.erb` is here for you to override it,
86
+ 3. `app/views/layouts/rubber_ring/layout.html.erb` is here for you to override it,
74
87
  so you have complete control over your markup.
75
- 4. This is copied because default Rails `application.js` includes `jquery` which is
88
+ 4. This is copied because default Rails `application.js` includes `jquery` which is
76
89
  already included for you by Rubber Ring (avoiding clashes).
77
- 5. Apaches access config. Including rules so you can access all published pages. It will
78
- look for `.html` files first and enter sub directories later. Example: we have page with
79
- route `/en` and `/en/example`. When published, `en.html` and `en/example.html` will be
90
+ 5. Apaches access config. Including rules so you can access all published pages. It will
91
+ look for `.html` files first and enter sub directories later. Example: we have page with
92
+ route `/en` and `/en/example`. When published, `en.html` and `en/example.html` will be
80
93
  generated and synced with production server. To serve them both we need this `.htaccess` file.
94
+ 6. We need to run `Rubber Ring` as `Rails Application` with at least two workers. This is
95
+ because when doing a request to `/rubber_ring/build` there will also run a `wget` program
96
+ which will download all `html` files and save them into `public/build` directory. Without
97
+ more workers we need to must use threads, but with threads we can not accurately tell
98
+ user when `wget` program finishes its job.
99
+
100
+ ### Run
101
+
102
+ ```bash
103
+ puma -p 3000 -C config/puma.rb
104
+ ```
81
105
 
82
106
  ### Static pages or Rails application?
83
107
 
84
108
  If you only want to use Rubber Ring to generate static pages, leave
85
109
  `RubberRing.static_only = true` inside `app/config/initializers/rubber_ring.rb` intact.
86
- This will leave you with options to `preview` and `publish` html pages and other
87
- assets to production server. Otherwise set
110
+ This will leave you with options to `preview` and `publish` html pages and other
111
+ assets to production server. Otherwise set
88
112
  this option to false.
89
113
 
90
114
  # Usage
@@ -93,17 +117,22 @@ this option to false.
93
117
 
94
118
  Login at URL `/rubber_ring` with password which was set by developer in the install stage.
95
119
 
96
- Just edit content inside green boxes.
120
+ Just edit content inside green boxes.
97
121
  Developer sets what content is editable/repeatable/link/multi line...
98
122
 
99
- For changing images click on `Image manager` in the upper menu.
100
- Drag and drop the image(s) you need to drop zone. After uploading the
101
- image(s) you can drag and drop them on the image you wanted to change.
123
+ For changing images click on `Image manager` in the upper menu.
124
+ Drag and drop the image(s) you need to drop zone. After uploading the
125
+ image(s) you can drag and drop them on the image you wanted to change.
102
126
  Image will be automatically re-sized to the size that was set by developer/designer.
103
127
 
128
+ ### Preview
129
+
130
+ The easiest way to preview your current work is to log out or even better, open it in
131
+ a new browser where you are not logged in.
132
+
104
133
  ### Build and publish your pages
105
134
 
106
- `Preview` option in the menu will output entire page to `public/build` directory. `Publish` will upload current page to your production server, set in `publish.yml` file.
135
+ `Build & Publish` option in the menu will first output entire page to `public/build` directory. `Publish` will upload/copy whole site to your production server, set in `publish.yml` file.
107
136
 
108
137
  ## As a developer I want to quickly setup editable pages
109
138
 
@@ -131,7 +160,7 @@ Examples
131
160
  <% end %>
132
161
 
133
162
  <%= editable_field(:div, {key: 'first_content', class: 'multi-line'}, @page) do %>
134
- I'm editable content in
163
+ I'm editable content in
135
164
  multi lines...
136
165
  <% end %>
137
166
 
@@ -155,7 +184,7 @@ Allows you to set up repeating and sortable templates. Example
155
184
  %>
156
185
  ```
157
186
 
158
- This means, that you need to create new view for each template in
187
+ This means, that you need to create new view for each template in
159
188
  `app/views/templates/`. Example
160
189
 
161
190
  app/views/templates/_article.html.erb
@@ -170,8 +199,8 @@ means that you need a view, saved in a file
170
199
 
171
200
  app/views/templates/_article.html.erb
172
201
 
173
- **Inside templates** you can use all other helpers. **BUT**, you need to
174
- assemble your key correctly or otherwise you will be overwriting your own content.
202
+ **Inside templates** you can use all other helpers. **BUT**, you need to
203
+ assemble your key correctly or otherwise you will be overwriting your own content.
175
204
  You can use `key_prefix`, which is assembled the way which will help you to prevent key overwites. Example:
176
205
 
177
206
  ```erb
@@ -182,8 +211,8 @@ You can use `key_prefix`, which is assembled the way which will help you to prev
182
211
 
183
212
  ### Helper options
184
213
 
185
- Each helper needs to specify unique `key`. These are holding values in the database.
186
- Also each helper needs to include `@page` object as their last parameter.
214
+ Each helper needs to specify unique `key`. These are holding values in the database.
215
+ Also each helper needs to include `@page` object as their last parameter.
187
216
  This object holds all the editable content of the page in a hash data structure.
188
217
 
189
218
  #### reserved key(s) - don't use them
@@ -210,11 +239,11 @@ This object holds all the editable content of the page in a hash data structure.
210
239
 
211
240
  ### Assets (stylesheets and javascripts)
212
241
 
213
- You can use, like in any other Rails application,
214
- [sprockets directives](https://github.com/sstephenson/sprockets#the-directive-processor)
215
- to include assets to your app.
216
- Please don't use `//= require jquery` and `//= require jquery-ui`
217
- in your `application.js` file, because rubber ring is already including `jquery`
242
+ You can use, like in any other Rails application,
243
+ [sprockets directives](https://github.com/sstephenson/sprockets#the-directive-processor)
244
+ to include assets to your app.
245
+ Please don't use `//= require jquery` and `//= require jquery-ui`
246
+ in your `application.js` file, because rubber ring is already including `jquery`
218
247
  which you can reuse in your pages as well.
219
248
 
220
249
  ## Philosophy
@@ -2285,7 +2285,7 @@ table th[class*="span"],
2285
2285
  *margin-right: .3em;
2286
2286
  line-height: 14px;
2287
2287
  vertical-align: text-top;
2288
- background-image: url("<%= image_path('glyphicons-halflings.png') %>");
2288
+ background-image: image-url('glyphicons-halflings.png');
2289
2289
  background-position: 14px 14px;
2290
2290
  background-repeat: no-repeat;
2291
2291
  }
@@ -2309,7 +2309,7 @@ table th[class*="span"],
2309
2309
  .dropdown-submenu:focus > a > [class^="icon-"],
2310
2310
  .dropdown-submenu:hover > a > [class*=" icon-"],
2311
2311
  .dropdown-submenu:focus > a > [class*=" icon-"] {
2312
- background-image: url("<%= image_path('glyphicons-halflings-white.png') %>");
2312
+ background-image: image-url('glyphicons-halflings-white.png');
2313
2313
  }
2314
2314
 
2315
2315
  .icon-glass {
@@ -198,3 +198,13 @@
198
198
  .tbs [class^="icon-"], .tbs [class*=" icon-"] {
199
199
  margin: 3px 0 0 5px;
200
200
  }
201
+
202
+ .tbs .brand a {
203
+ color: #777777;
204
+
205
+ &:hover {
206
+ color: #333333;
207
+ text-decoration: none;
208
+ background-color: transparent;
209
+ }
210
+ }
@@ -1,33 +1,21 @@
1
1
  module RubberRing
2
2
  module Build
3
3
 
4
- def Build.assets!
5
- # clear old assets and copy new ones
6
- build_assets_dir = "#{Rails.root.to_s}/public/build/assets"
7
- if File.directory?(build_assets_dir)
8
- FileUtils.rm_rf("#{build_assets_dir}/*")
9
- else
10
- FileUtils.mkdir_p(build_assets_dir)
11
- end
4
+ def Build.run!(request)
5
+ # wget -m -p -E -k -np http://localhost:3000 -P build -nH
6
+ # -nH: no host directories
7
+ # -p: prefix with directory
8
+ # -E: adjust extension, save as .html
9
+ # -k: convert links suitable for local viewing
12
10
 
13
- # if running on production copy assets from precompiled files from public directory
14
- prod_assets_dir = "#{Rails.root.to_s}/public/assets"
15
- if Rails.env.production? and File.directory?(prod_assets_dir)
16
- FileUtils.cp_r("#{prod_assets_dir}/.", build_assets_dir)
17
- else
18
- %w(images javascripts stylesheets fonts).each do |asset_dir|
19
- dir = "#{Rails.root.to_s}/app/assets/#{asset_dir}"
20
- if File.directory?(dir)
21
- FileUtils.cp_r("#{dir}/.", build_assets_dir)
22
- end
23
- end
24
- end
11
+ root_url = request.protocol + request.host_with_port
12
+ build_dir = "#{Rails.root.to_s}/public/build"
25
13
 
26
- # copy attachments
27
- upload_dir = "#{Rails.root.to_s}/public/upload"
28
- if File.directory?(upload_dir)
29
- FileUtils.cp_r(upload_dir, "#{Rails.root.to_s}/public/build")
30
- end
14
+ # clear previous build
15
+ FileUtils.rm_rf(build_dir)
16
+
17
+ cmd = "wget -m -p -E -k -np #{root_url} -P #{build_dir} -nH"
18
+ system(cmd)
31
19
  end
32
20
 
33
21
  end
@@ -12,7 +12,7 @@ module RubberRing
12
12
  convert_image(path, width, height) if File.exist?(path)
13
13
  end
14
14
 
15
- expire_and_respond(page)
15
+ respond(page)
16
16
  end
17
17
 
18
18
  def convert_image(path, width, height)
@@ -22,7 +22,7 @@ module RubberRing
22
22
 
23
23
  def save_attachment
24
24
  page = Util.save_page_content(params)
25
- expire_and_respond(page)
25
+ respond(page)
26
26
  end
27
27
 
28
28
  def add
@@ -9,17 +9,17 @@ module RubberRing
9
9
 
10
10
  def save
11
11
  page = Util.save_page_content(params)
12
- expire_and_respond(page)
12
+ respond(page)
13
13
  end
14
14
 
15
15
  def remove
16
16
  page = Page.remove(@options, params[:key])
17
- expire_and_respond(page)
17
+ respond(page)
18
18
  end
19
19
 
20
20
  def save_template
21
21
  page = Page.save_or_update_templates(@options)
22
- expire_and_respond(page)
22
+ respond(page)
23
23
  end
24
24
 
25
25
  def add_template
@@ -38,13 +38,12 @@ module RubberRing
38
38
 
39
39
  response = view_context.content_tag(new_pt.element, view_context.raw(template), content_tag_options)
40
40
 
41
- expire_page(params[:page_path])
42
41
  render :json => {new_template: response}
43
42
  end
44
43
 
45
44
  def remove_template
46
45
  page = Page.remove_template(@options)
47
- expire_and_respond(page)
46
+ respond(page)
48
47
  end
49
48
 
50
49
  private
@@ -3,7 +3,7 @@ module RubberRing
3
3
  layout 'rubber_ring/layout'
4
4
 
5
5
  before_action :load_page_content, :set_locale
6
- before_filter :admin?, :cache?, :publish? # check if admin before cache
6
+ before_filter :admin?
7
7
 
8
8
  def load_page_content
9
9
  page = Page.where(
@@ -17,13 +17,34 @@ module RubberRing
17
17
  @images, @attachments = Util.load_attachments_page(params)
18
18
  end
19
19
 
20
+ def build
21
+ # when running with puma and multiple workers this is the best option
22
+ Build.run!(request)
23
+
24
+ # when running with single process server, new thread needs to be spawn
25
+ # downside of this option is, that we can not know when build is completed
26
+
27
+ #Thread::new{
28
+ # Build.run!(request)
29
+ #}
30
+ end
31
+
32
+ def publish
33
+ begin
34
+ Publish.assets!
35
+ rescue Errno::EACCES
36
+ flash.now[:error] =
37
+ 'Rubber Ring is trying to copy files on to path which is not writable.
38
+ Please tell developers to check publish.yml file.'
39
+ end
40
+ end
41
+
20
42
  def set_locale
21
43
  I18n.locale = params[:locale] || I18n.default_locale
22
44
  @locale = I18n.locale.to_s
23
45
  end
24
46
 
25
- def expire_and_respond(page)
26
- expire_page(params[:page_path])
47
+ def respond(page)
27
48
  render :json => {controller: page.controller, action: page.action, content: page.content}
28
49
  end
29
50
 
@@ -38,30 +59,5 @@ module RubberRing
38
59
  @page.edit_mode = false
39
60
  end
40
61
  end
41
-
42
- def cache?
43
- if params[:cache] == '1' and params[:publish].nil?
44
- disable_edit_mode
45
- Thread::new{
46
- Build.assets!
47
- }
48
- end
49
- end
50
-
51
- def publish?
52
- if params[:publish] == '1' and params[:cache] == '1'
53
- disable_edit_mode
54
- Thread::new{
55
- Build.assets!
56
- Publish.assets!
57
- }
58
- end
59
- end
60
-
61
- def disable_edit_mode
62
- @page_caching = true
63
- @page.edit_mode = false
64
- end
65
-
66
62
  end
67
63
  end
@@ -13,7 +13,7 @@ module RubberRing
13
13
  session[:password] = params[:password]
14
14
  redirect_to main_app.root_path
15
15
  else
16
- flash[:wrong_password] = 'Wrong password'
16
+ flash.now[:error] = 'Wrong password'
17
17
  render :new
18
18
  end
19
19
  end
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Rubber Ring Login</title>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <%= stylesheet_link_tag 'rubber_ring/application', media: 'all' %>
7
+ </head>
8
+ <body>
9
+ <div class="tbs">
10
+ <%= yield %>
11
+ </div>
12
+ </body>
13
+ </html>
@@ -2,7 +2,9 @@
2
2
  <div class="tbs" id="rubber-ring-application">
3
3
  <div class="navbar">
4
4
  <div class="navbar-inner">
5
- <span class="brand">Rubber Ring</span>
5
+ <span class="brand">
6
+ <a href="/">Rubber Ring</a>
7
+ </span>
6
8
  <ul class="nav">
7
9
  <li>
8
10
  <a class="dropdown" id="attachment-manager" href="javascript:void(0);">Attachments</a>
@@ -12,10 +14,7 @@
12
14
  </li>
13
15
  <% if RubberRing.static_only %>
14
16
  <li>
15
- <a href="?cache=1" target="_blank">Preview</a>
16
- </li>
17
- <li>
18
- <a href="?cache=1&publish=1" target="_blank">Publish</a>
17
+ <%= link_to 'Build & Publish', rubber_ring.build_path %>
19
18
  </li>
20
19
  <% end %>
21
20
  <li class="alert-saved">
@@ -24,7 +23,7 @@
24
23
  </ul>
25
24
  <ul class="nav pull-right">
26
25
  <li>
27
- <a href="<%= rubber_ring.logout_path %>">Logout</a>
26
+ <%= link_to 'Logout', rubber_ring.logout_path %>
28
27
  </li>
29
28
  </ul>
30
29
  </div>