tr8n_client_sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (350) hide show
  1. data/MIT-LICENSE +22 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +38 -0
  4. data/app/assets/images/tr8n/tr8n_logo.png +0 -0
  5. data/app/views/tr8n_client_sdk/tags/_language_strip.html.erb +20 -0
  6. data/app/views/tr8n_client_sdk/tags/_powered_by_tr8n.html.erb +6 -0
  7. data/app/views/tr8n_client_sdk/tags/_scripts.html.erb +20 -0
  8. data/config/routes.rb +2 -0
  9. data/lib/generators/tr8n_client_sdk/templates/config/tr8n/config.yml +53 -0
  10. data/lib/generators/tr8n_client_sdk/templates/config/tr8n/tokens/data.yml +45 -0
  11. data/lib/generators/tr8n_client_sdk/templates/config/tr8n/tokens/decorations.yml +37 -0
  12. data/lib/generators/tr8n_client_sdk/tr8n_client_sdk_generator.rb +37 -0
  13. data/lib/tasks/tr8n_client_sdk_tasks.rake +30 -0
  14. data/lib/tr8n_client_sdk.rb +28 -0
  15. data/lib/tr8n_client_sdk/config.rb +197 -0
  16. data/lib/tr8n_client_sdk/engine.rb +31 -0
  17. data/lib/tr8n_client_sdk/extensions/action_common_methods.rb +122 -0
  18. data/lib/tr8n_client_sdk/extensions/action_controller_extension.rb +123 -0
  19. data/lib/tr8n_client_sdk/extensions/action_view_extension.rb +218 -0
  20. data/lib/tr8n_client_sdk/railtie.rb +54 -0
  21. data/lib/tr8n_client_sdk/version.rb +27 -0
  22. data/test/dummy/README.rdoc +261 -0
  23. data/test/dummy/Rakefile +7 -0
  24. data/test/dummy/app/assets/images/bg-pattern.png +0 -0
  25. data/test/dummy/app/assets/images/facebook.png +0 -0
  26. data/test/dummy/app/assets/images/github.png +0 -0
  27. data/test/dummy/app/assets/images/glyphicons-halflings-white.png +0 -0
  28. data/test/dummy/app/assets/images/glyphicons-halflings.png +0 -0
  29. data/test/dummy/app/assets/images/how_it_works_1.gif +0 -0
  30. data/test/dummy/app/assets/images/how_it_works_2.gif +0 -0
  31. data/test/dummy/app/assets/images/how_it_works_3.gif +0 -0
  32. data/test/dummy/app/assets/images/hr.png +0 -0
  33. data/test/dummy/app/assets/images/linkedin.png +0 -0
  34. data/test/dummy/app/assets/images/silhouette.gif +0 -0
  35. data/test/dummy/app/assets/images/twitter.png +0 -0
  36. data/test/dummy/app/assets/images/wordpress.png +0 -0
  37. data/test/dummy/app/assets/images/youtube.png +0 -0
  38. data/test/dummy/app/assets/javascripts/ace/ace.js +11 -0
  39. data/test/dummy/app/assets/javascripts/ace/ext-static_highlight.js +1 -0
  40. data/test/dummy/app/assets/javascripts/ace/ext-textarea.js +1 -0
  41. data/test/dummy/app/assets/javascripts/ace/keybinding-emacs.js +1 -0
  42. data/test/dummy/app/assets/javascripts/ace/keybinding-vim.js +1 -0
  43. data/test/dummy/app/assets/javascripts/ace/mode-abap.js +1 -0
  44. data/test/dummy/app/assets/javascripts/ace/mode-asciidoc.js +1 -0
  45. data/test/dummy/app/assets/javascripts/ace/mode-c9search.js +1 -0
  46. data/test/dummy/app/assets/javascripts/ace/mode-c_cpp.js +1 -0
  47. data/test/dummy/app/assets/javascripts/ace/mode-clojure.js +1 -0
  48. data/test/dummy/app/assets/javascripts/ace/mode-coffee.js +1 -0
  49. data/test/dummy/app/assets/javascripts/ace/mode-coldfusion.js +1 -0
  50. data/test/dummy/app/assets/javascripts/ace/mode-csharp.js +1 -0
  51. data/test/dummy/app/assets/javascripts/ace/mode-css.js +1 -0
  52. data/test/dummy/app/assets/javascripts/ace/mode-dart.js +1 -0
  53. data/test/dummy/app/assets/javascripts/ace/mode-diff.js +1 -0
  54. data/test/dummy/app/assets/javascripts/ace/mode-dot.js +1 -0
  55. data/test/dummy/app/assets/javascripts/ace/mode-glsl.js +1 -0
  56. data/test/dummy/app/assets/javascripts/ace/mode-golang.js +1 -0
  57. data/test/dummy/app/assets/javascripts/ace/mode-groovy.js +1 -0
  58. data/test/dummy/app/assets/javascripts/ace/mode-haml.js +1 -0
  59. data/test/dummy/app/assets/javascripts/ace/mode-haxe.js +1 -0
  60. data/test/dummy/app/assets/javascripts/ace/mode-html.js +1 -0
  61. data/test/dummy/app/assets/javascripts/ace/mode-jade.js +1 -0
  62. data/test/dummy/app/assets/javascripts/ace/mode-java.js +1 -0
  63. data/test/dummy/app/assets/javascripts/ace/mode-javascript.js +1 -0
  64. data/test/dummy/app/assets/javascripts/ace/mode-json.js +1 -0
  65. data/test/dummy/app/assets/javascripts/ace/mode-jsp.js +1 -0
  66. data/test/dummy/app/assets/javascripts/ace/mode-jsx.js +1 -0
  67. data/test/dummy/app/assets/javascripts/ace/mode-latex.js +1 -0
  68. data/test/dummy/app/assets/javascripts/ace/mode-less.js +1 -0
  69. data/test/dummy/app/assets/javascripts/ace/mode-liquid.js +1 -0
  70. data/test/dummy/app/assets/javascripts/ace/mode-lisp.js +1 -0
  71. data/test/dummy/app/assets/javascripts/ace/mode-lua.js +1 -0
  72. data/test/dummy/app/assets/javascripts/ace/mode-luapage.js +1 -0
  73. data/test/dummy/app/assets/javascripts/ace/mode-lucene.js +1 -0
  74. data/test/dummy/app/assets/javascripts/ace/mode-makefile.js +1 -0
  75. data/test/dummy/app/assets/javascripts/ace/mode-markdown.js +1 -0
  76. data/test/dummy/app/assets/javascripts/ace/mode-objectivec.js +1 -0
  77. data/test/dummy/app/assets/javascripts/ace/mode-ocaml.js +1 -0
  78. data/test/dummy/app/assets/javascripts/ace/mode-perl.js +1 -0
  79. data/test/dummy/app/assets/javascripts/ace/mode-pgsql.js +1 -0
  80. data/test/dummy/app/assets/javascripts/ace/mode-php.js +1 -0
  81. data/test/dummy/app/assets/javascripts/ace/mode-powershell.js +1 -0
  82. data/test/dummy/app/assets/javascripts/ace/mode-python.js +1 -0
  83. data/test/dummy/app/assets/javascripts/ace/mode-r.js +1 -0
  84. data/test/dummy/app/assets/javascripts/ace/mode-rdoc.js +1 -0
  85. data/test/dummy/app/assets/javascripts/ace/mode-rhtml.js +1 -0
  86. data/test/dummy/app/assets/javascripts/ace/mode-ruby.js +1 -0
  87. data/test/dummy/app/assets/javascripts/ace/mode-scad.js +1 -0
  88. data/test/dummy/app/assets/javascripts/ace/mode-scala.js +1 -0
  89. data/test/dummy/app/assets/javascripts/ace/mode-scss.js +1 -0
  90. data/test/dummy/app/assets/javascripts/ace/mode-sh.js +1 -0
  91. data/test/dummy/app/assets/javascripts/ace/mode-sql.js +1 -0
  92. data/test/dummy/app/assets/javascripts/ace/mode-stylus.js +1 -0
  93. data/test/dummy/app/assets/javascripts/ace/mode-svg.js +1 -0
  94. data/test/dummy/app/assets/javascripts/ace/mode-tcl.js +1 -0
  95. data/test/dummy/app/assets/javascripts/ace/mode-tex.js +1 -0
  96. data/test/dummy/app/assets/javascripts/ace/mode-text.js +0 -0
  97. data/test/dummy/app/assets/javascripts/ace/mode-textile.js +1 -0
  98. data/test/dummy/app/assets/javascripts/ace/mode-typescript.js +1 -0
  99. data/test/dummy/app/assets/javascripts/ace/mode-xml.js +1 -0
  100. data/test/dummy/app/assets/javascripts/ace/mode-xquery.js +1 -0
  101. data/test/dummy/app/assets/javascripts/ace/mode-yaml.js +1 -0
  102. data/test/dummy/app/assets/javascripts/ace/theme-ambiance.js +1 -0
  103. data/test/dummy/app/assets/javascripts/ace/theme-chaos.js +1 -0
  104. data/test/dummy/app/assets/javascripts/ace/theme-chrome.js +1 -0
  105. data/test/dummy/app/assets/javascripts/ace/theme-clouds.js +1 -0
  106. data/test/dummy/app/assets/javascripts/ace/theme-clouds_midnight.js +1 -0
  107. data/test/dummy/app/assets/javascripts/ace/theme-cobalt.js +1 -0
  108. data/test/dummy/app/assets/javascripts/ace/theme-crimson_editor.js +1 -0
  109. data/test/dummy/app/assets/javascripts/ace/theme-dawn.js +1 -0
  110. data/test/dummy/app/assets/javascripts/ace/theme-dreamweaver.js +1 -0
  111. data/test/dummy/app/assets/javascripts/ace/theme-eclipse.js +1 -0
  112. data/test/dummy/app/assets/javascripts/ace/theme-github.js +1 -0
  113. data/test/dummy/app/assets/javascripts/ace/theme-idle_fingers.js +1 -0
  114. data/test/dummy/app/assets/javascripts/ace/theme-kr.js +1 -0
  115. data/test/dummy/app/assets/javascripts/ace/theme-merbivore.js +1 -0
  116. data/test/dummy/app/assets/javascripts/ace/theme-merbivore_soft.js +1 -0
  117. data/test/dummy/app/assets/javascripts/ace/theme-mono_industrial.js +1 -0
  118. data/test/dummy/app/assets/javascripts/ace/theme-monokai.js +1 -0
  119. data/test/dummy/app/assets/javascripts/ace/theme-pastel_on_dark.js +1 -0
  120. data/test/dummy/app/assets/javascripts/ace/theme-solarized_dark.js +1 -0
  121. data/test/dummy/app/assets/javascripts/ace/theme-solarized_light.js +1 -0
  122. data/test/dummy/app/assets/javascripts/ace/theme-textmate.js +1 -0
  123. data/test/dummy/app/assets/javascripts/ace/theme-tomorrow.js +1 -0
  124. data/test/dummy/app/assets/javascripts/ace/theme-tomorrow_night.js +1 -0
  125. data/test/dummy/app/assets/javascripts/ace/theme-tomorrow_night_blue.js +1 -0
  126. data/test/dummy/app/assets/javascripts/ace/theme-tomorrow_night_bright.js +1 -0
  127. data/test/dummy/app/assets/javascripts/ace/theme-tomorrow_night_eighties.js +1 -0
  128. data/test/dummy/app/assets/javascripts/ace/theme-twilight.js +1 -0
  129. data/test/dummy/app/assets/javascripts/ace/theme-vibrant_ink.js +1 -0
  130. data/test/dummy/app/assets/javascripts/ace/theme-xcode.js +1 -0
  131. data/test/dummy/app/assets/javascripts/ace/worker-coffee.js +1 -0
  132. data/test/dummy/app/assets/javascripts/ace/worker-css.js +1 -0
  133. data/test/dummy/app/assets/javascripts/ace/worker-javascript.js +1 -0
  134. data/test/dummy/app/assets/javascripts/ace/worker-json.js +1 -0
  135. data/test/dummy/app/assets/javascripts/ace/worker-xquery.js +1 -0
  136. data/test/dummy/app/assets/javascripts/application.js +15 -0
  137. data/test/dummy/app/assets/javascripts/bootstrap.js +2291 -0
  138. data/test/dummy/app/assets/javascripts/bootstrap.min.js +7 -0
  139. data/test/dummy/app/assets/javascripts/jquery-ace.js +195 -0
  140. data/test/dummy/app/assets/javascripts/jquery-ui-1.10.3.custom.min.js +7 -0
  141. data/test/dummy/app/assets/javascripts/jquery.tocify.min.js +4 -0
  142. data/test/dummy/app/assets/javascripts/jquery191.js +16 -0
  143. data/test/dummy/app/assets/javascripts/prism.js +20 -0
  144. data/test/dummy/app/assets/javascripts/prism_rails.js +49 -0
  145. data/test/dummy/app/assets/javascripts/sh.js +573 -0
  146. data/test/dummy/app/assets/stylesheets/application.css +8 -0
  147. data/test/dummy/app/assets/stylesheets/bootstrap/bootstrap.css +6315 -0
  148. data/test/dummy/app/assets/stylesheets/bootstrap/bootstrap.min.css +874 -0
  149. data/test/dummy/app/assets/stylesheets/bootstrap/bootstrap_and_overrides.css.scss +16 -0
  150. data/test/dummy/app/assets/stylesheets/jquery.tocify.css +62 -0
  151. data/test/dummy/app/assets/stylesheets/prism.css +108 -0
  152. data/test/dummy/app/assets/stylesheets/prism_rails.css.scss +42 -0
  153. data/test/dummy/app/assets/stylesheets/sh.css +193 -0
  154. data/test/dummy/app/controllers/application_controller.rb +82 -0
  155. data/test/dummy/app/controllers/docs_controller.rb +42 -0
  156. data/test/dummy/app/controllers/home_controller.rb +29 -0
  157. data/test/dummy/app/controllers/login_controller.rb +55 -0
  158. data/test/dummy/app/controllers/signup_controller.rb +58 -0
  159. data/test/dummy/app/controllers/welcome_controller.rb +30 -0
  160. data/test/dummy/app/helpers/application_helper.rb +26 -0
  161. data/test/dummy/app/mailers/request_mailer.rb +38 -0
  162. data/test/dummy/app/models/user.rb +48 -0
  163. data/test/dummy/app/views/docs/index.html.erb +591 -0
  164. data/test/dummy/app/views/docs/installation.html.erb +59 -0
  165. data/test/dummy/app/views/docs/test.html.erb +17 -0
  166. data/test/dummy/app/views/docs/tml.html.erb +176 -0
  167. data/test/dummy/app/views/docs/tml_content.html.erb +33 -0
  168. data/test/dummy/app/views/home/index.html.erb +107 -0
  169. data/test/dummy/app/views/layouts/_flashes.html.erb +35 -0
  170. data/test/dummy/app/views/layouts/_footer.html.erb +31 -0
  171. data/test/dummy/app/views/layouts/_head.html.erb +8 -0
  172. data/test/dummy/app/views/layouts/_header.html.erb +70 -0
  173. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  174. data/test/dummy/app/views/login/_common.html.erb +29 -0
  175. data/test/dummy/app/views/login/cookies.html.erb +20 -0
  176. data/test/dummy/app/views/login/index.html.erb +1 -0
  177. data/test/dummy/app/views/login/out.html.erb +1 -0
  178. data/test/dummy/app/views/signup/index.html.erb +22 -0
  179. data/test/dummy/config.ru +4 -0
  180. data/test/dummy/config/application.rb +59 -0
  181. data/test/dummy/config/boot.rb +10 -0
  182. data/test/dummy/config/database.yml +25 -0
  183. data/test/dummy/config/environment.rb +5 -0
  184. data/test/dummy/config/environments/development.rb +37 -0
  185. data/test/dummy/config/environments/production.rb +67 -0
  186. data/test/dummy/config/environments/test.rb +37 -0
  187. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  188. data/test/dummy/config/initializers/inflections.rb +15 -0
  189. data/test/dummy/config/initializers/mail.rb +14 -0
  190. data/test/dummy/config/initializers/mime_types.rb +5 -0
  191. data/test/dummy/config/initializers/secret_token.rb +7 -0
  192. data/test/dummy/config/initializers/session_store.rb +8 -0
  193. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  194. data/test/dummy/config/locales/en.yml +5 -0
  195. data/test/dummy/config/routes.rb +8 -0
  196. data/test/dummy/config/tr8n/config.yml +53 -0
  197. data/test/dummy/config/tr8n/tokens/data.yml +45 -0
  198. data/test/dummy/config/tr8n/tokens/decorations.yml +37 -0
  199. data/test/dummy/db/development.sqlite3 +0 -0
  200. data/test/dummy/db/migrate/20130506202619_create_users.rb +16 -0
  201. data/test/dummy/db/schema.rb +29 -0
  202. data/test/dummy/log/development.log +40036 -0
  203. data/test/dummy/log/tr8n.log +14602 -0
  204. data/test/dummy/public/404.html +26 -0
  205. data/test/dummy/public/422.html +26 -0
  206. data/test/dummy/public/500.html +25 -0
  207. data/test/dummy/public/favicon.ico +0 -0
  208. data/test/dummy/script/rails +6 -0
  209. data/test/dummy/spec/models/request_spec.rb +5 -0
  210. data/test/dummy/spec/models/user_spec.rb +5 -0
  211. data/test/dummy/tmp/cache/assets/BCA/680/sprockets%2F0e766e5046b2556242937265334a7776 +0 -0
  212. data/test/dummy/tmp/cache/assets/C41/5A0/sprockets%2Ff3979161c897640872293fb74f7e4185 +0 -0
  213. data/test/dummy/tmp/cache/assets/C69/980/sprockets%2F1289412d200b47c7f5ba1714da031188 +0 -0
  214. data/test/dummy/tmp/cache/assets/C80/840/sprockets%2F562c2d168da585f80579347d10790a0a +0 -0
  215. data/test/dummy/tmp/cache/assets/C85/8C0/sprockets%2F262c6124c54467ed84e71473a5748a2f +0 -0
  216. data/test/dummy/tmp/cache/assets/C9B/B70/sprockets%2F3c5f068b5a07f9215020042ed660bb45 +0 -0
  217. data/test/dummy/tmp/cache/assets/CAC/8A0/sprockets%2Fb3da0b5a24a9277687d1b973d1638126 +0 -0
  218. data/test/dummy/tmp/cache/assets/CB0/D20/sprockets%2F0850d836310c2fc600217ce3f894f9c8 +0 -0
  219. data/test/dummy/tmp/cache/assets/CB1/E50/sprockets%2Fea7a0c10450c627f752b87495d915b66 +0 -0
  220. data/test/dummy/tmp/cache/assets/CBF/A00/sprockets%2F82c0bd0c273938e78e80698057bf165e +0 -0
  221. data/test/dummy/tmp/cache/assets/CC3/730/sprockets%2F730877507dec32fd7d2e038899bb8067 +0 -0
  222. data/test/dummy/tmp/cache/assets/CC6/350/sprockets%2F7486d25d54ef6d9548205d5a17ff3468 +0 -0
  223. data/test/dummy/tmp/cache/assets/CC7/620/sprockets%2F395359137b16e965efa7fa58db855904 +0 -0
  224. data/test/dummy/tmp/cache/assets/CC7/A90/sprockets%2F77713cc98a179981d615f84f952add24 +0 -0
  225. data/test/dummy/tmp/cache/assets/CD5/2C0/sprockets%2F166c056119ebdfb8b7104c97b424b423 +0 -0
  226. data/test/dummy/tmp/cache/assets/CD6/450/sprockets%2Ff0c4fb28a62f912b5542965358a10a1f +0 -0
  227. data/test/dummy/tmp/cache/assets/CD6/C30/sprockets%2Fe15182011d74255aa67fde5a783dd612 +0 -0
  228. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  229. data/test/dummy/tmp/cache/assets/CD8/F00/sprockets%2F2344b925523c2c28a3fd1e73ad5f9181 +0 -0
  230. data/test/dummy/tmp/cache/assets/CD9/BA0/sprockets%2Fb9fa8aa2057e7d8702f10317694a8c10 +0 -0
  231. data/test/dummy/tmp/cache/assets/CE2/720/sprockets%2F922b15b49871931e5df1d0a2be4826f8 +0 -0
  232. data/test/dummy/tmp/cache/assets/CE3/EB0/sprockets%2F28ee30e42c7c583083e76a377df3035d +0 -0
  233. data/test/dummy/tmp/cache/assets/CE5/650/sprockets%2F8ab512c9b33ac90e699b73469d71f061 +0 -0
  234. data/test/dummy/tmp/cache/assets/CE8/2F0/sprockets%2Fb74ee6e80ba2911167d148d791d6728c +0 -0
  235. data/test/dummy/tmp/cache/assets/CEE/D60/sprockets%2F7b699b03f091fe228759da88a323a56f +0 -0
  236. data/test/dummy/tmp/cache/assets/CF0/450/sprockets%2F65704938b67ef6b06e386cea3c1848b6 +0 -0
  237. data/test/dummy/tmp/cache/assets/CF1/5A0/sprockets%2Fec49552e4a6b67bee359e0485610d887 +0 -0
  238. data/test/dummy/tmp/cache/assets/CFC/880/sprockets%2Fd89c211d7a3dc2a94a7625d7155000ab +0 -0
  239. data/test/dummy/tmp/cache/assets/D05/210/sprockets%2F5d0d1d45d694d6d4f803a9a1340b741c +0 -0
  240. data/test/dummy/tmp/cache/assets/D05/820/sprockets%2Fee427231dd340c1b50573f187a8a6d5d +0 -0
  241. data/test/dummy/tmp/cache/assets/D09/6F0/sprockets%2F0f69fe87b4b574153bdc60711a6ca208 +0 -0
  242. data/test/dummy/tmp/cache/assets/D0A/C20/sprockets%2Fd177dbfcd8235d07a0072c4d9c307385 +0 -0
  243. data/test/dummy/tmp/cache/assets/D0C/820/sprockets%2F1002e68d7cf06571cb63a864f93bb4e3 +0 -0
  244. data/test/dummy/tmp/cache/assets/D0E/A30/sprockets%2F71398e105f60c431f86d78e3abbbf125 +0 -0
  245. data/test/dummy/tmp/cache/assets/D0E/FF0/sprockets%2F2c4cc11f6c24fbb41d97713864854d1f +0 -0
  246. data/test/dummy/tmp/cache/assets/D18/E00/sprockets%2Ff017e80af40be5c829882bd1885a38f4 +0 -0
  247. data/test/dummy/tmp/cache/assets/D19/120/sprockets%2F69f0907662f738cd217edca24ef2328d +0 -0
  248. data/test/dummy/tmp/cache/assets/D25/FD0/sprockets%2F03006f6bba722ebc14ceac8221b81917 +0 -0
  249. data/test/dummy/tmp/cache/assets/D26/7C0/sprockets%2F771cba4a2e4f22141377c4eccc1065c0 +0 -0
  250. data/test/dummy/tmp/cache/assets/D28/B20/sprockets%2Fbd19c0bc42912a8ba7c5c3b100f71592 +0 -0
  251. data/test/dummy/tmp/cache/assets/D29/280/sprockets%2F04fd073ef39e04ced71111a204cb70e6 +0 -0
  252. data/test/dummy/tmp/cache/assets/D29/320/sprockets%2Feb3792401fd26ebf610c8531b0a4bd32 +0 -0
  253. data/test/dummy/tmp/cache/assets/D29/AF0/sprockets%2F841d8c0c4ba32a5e25aa41b7069ba581 +0 -0
  254. data/test/dummy/tmp/cache/assets/D32/4F0/sprockets%2Fb8023435d8d01feca8fd3a1ce9144181 +0 -0
  255. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  256. data/test/dummy/tmp/cache/assets/D38/DB0/sprockets%2Fe848eed2f10d359a60040b50d486b3fd +0 -0
  257. data/test/dummy/tmp/cache/assets/D39/6E0/sprockets%2F4d3170e44fdaa2f62cc266b62e5925e4 +0 -0
  258. data/test/dummy/tmp/cache/assets/D3C/2C0/sprockets%2F9c4d26aabdb46cc90d0228c79344950e +0 -0
  259. data/test/dummy/tmp/cache/assets/D3D/2D0/sprockets%2Fc83c38e1374d350196211ce9ffed3aa6 +0 -0
  260. data/test/dummy/tmp/cache/assets/D3D/970/sprockets%2F23fb0067086af38f593481abd034deff +0 -0
  261. data/test/dummy/tmp/cache/assets/D41/C20/sprockets%2F5b768ca318275843ae6b901bb9cca29e +0 -0
  262. data/test/dummy/tmp/cache/assets/D42/030/sprockets%2Ff991fbde306579de4c94d611ced13023 +0 -0
  263. data/test/dummy/tmp/cache/assets/D47/A20/sprockets%2F9f6654abeaa85f117a98806392ac2a8d +0 -0
  264. data/test/dummy/tmp/cache/assets/D47/D00/sprockets%2Fd76fe4489f3b7f2cd62450204cef631f +0 -0
  265. data/test/dummy/tmp/cache/assets/D4A/640/sprockets%2F94ec7bb9872d4b005d267d56cb80f7e4 +0 -0
  266. data/test/dummy/tmp/cache/assets/D4C/020/sprockets%2F2c26fac647b394d5f49b2743950aefe9 +0 -0
  267. data/test/dummy/tmp/cache/assets/D4D/A20/sprockets%2F0de50df58d85f5cce135f460979bd472 +0 -0
  268. data/test/dummy/tmp/cache/assets/D4D/E30/sprockets%2F828b744b9a72d6b05ace77264f878bdb +0 -0
  269. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  270. data/test/dummy/tmp/cache/assets/D53/1E0/sprockets%2F6d4776ffd4fc7486550b6508cb2dd57e +0 -0
  271. data/test/dummy/tmp/cache/assets/D5A/B70/sprockets%2F7b76786736bb5e9eeb4887dd32c83ec2 +0 -0
  272. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  273. data/test/dummy/tmp/cache/assets/D62/720/sprockets%2F34a95b2bb07a4fbd408c81f1c37bd860 +0 -0
  274. data/test/dummy/tmp/cache/assets/D69/B50/sprockets%2F1c7aa58ab12825ccfb465ca5e7c77551 +0 -0
  275. data/test/dummy/tmp/cache/assets/D6F/220/sprockets%2F99d4cd656c271484bee1a14ac84e5ad2 +0 -0
  276. data/test/dummy/tmp/cache/assets/D74/280/sprockets%2F049b078c38d43fbe7e6b1eb49da1b775 +0 -0
  277. data/test/dummy/tmp/cache/assets/D74/9A0/sprockets%2F049cf32cc869e7138b76f1bb04ae78ad +0 -0
  278. data/test/dummy/tmp/cache/assets/D77/770/sprockets%2F67b869074d0a5b5bb8698e55ccca47aa +0 -0
  279. data/test/dummy/tmp/cache/assets/D7A/290/sprockets%2F5acdbbb05bd53866c8225e95f8e805e8 +0 -0
  280. data/test/dummy/tmp/cache/assets/D7A/2A0/sprockets%2F91a461699d36fdd71c4cec0a8d737cf4 +0 -0
  281. data/test/dummy/tmp/cache/assets/D7C/5B0/sprockets%2F2b864c6eb9b8d679b2716db1a1e93c8f +0 -0
  282. data/test/dummy/tmp/cache/assets/D82/930/sprockets%2Fecdc4c7caa1aa683b13d14a91234b452 +0 -0
  283. data/test/dummy/tmp/cache/assets/D8D/610/sprockets%2Ffb7e1b81f737cb510ac8166a241bbc4c +0 -0
  284. data/test/dummy/tmp/cache/assets/D91/080/sprockets%2Fbcca522c6302f184f12fe0e8a7d7e71a +0 -0
  285. data/test/dummy/tmp/cache/assets/D91/2B0/sprockets%2F354460cd2db93ca02614a4bb76ffde3e +0 -0
  286. data/test/dummy/tmp/cache/assets/D96/DA0/sprockets%2F55af2375310fff6b9706cbacfb2ec540 +0 -0
  287. data/test/dummy/tmp/cache/assets/D9E/F30/sprockets%2Fc32ceef2bde9f93b4c5b866c8200371c +0 -0
  288. data/test/dummy/tmp/cache/assets/D9F/300/sprockets%2Fc13fc73ceafa45876a901b3e775b83ae +0 -0
  289. data/test/dummy/tmp/cache/assets/D9F/390/sprockets%2Fe2fc3cc13d4d3677be6574e0fd2732cf +0 -0
  290. data/test/dummy/tmp/cache/assets/DAA/A50/sprockets%2F231c56d70690f8b4f8f6fea2cea9d39b +0 -0
  291. data/test/dummy/tmp/cache/assets/DB5/350/sprockets%2F3b5ebcf21def6fff9868a18e239495f1 +0 -0
  292. data/test/dummy/tmp/cache/assets/DB9/150/sprockets%2Fdaff6d12c8afc96d0c91d77e91d79966 +0 -0
  293. data/test/dummy/tmp/cache/assets/DC9/DB0/sprockets%2F43a2aed943cbb05dcc84468c73ddea55 +0 -0
  294. data/test/dummy/tmp/cache/assets/DCE/310/sprockets%2F2f221a6c5ffcaf07ef30f4ee9a793b44 +0 -0
  295. data/test/dummy/tmp/cache/assets/DD2/750/sprockets%2Ff70dee8c3d675153ad76abe3f730dc4f +0 -0
  296. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  297. data/test/dummy/tmp/cache/assets/DFF/270/sprockets%2Fb84f2daecc65ed711132bff2d8f5fe08 +0 -0
  298. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  299. data/test/dummy/tmp/cache/assets/E13/010/sprockets%2Feecfc58398a4d26289a5e0fe9ecd09ec +0 -0
  300. data/test/dummy/tmp/cache/assets/E23/880/sprockets%2F436adfe0b6333bf5af1eaaf3ea4e919b +0 -0
  301. data/test/dummy/tmp/cache/assets/E25/4F0/sprockets%2Fa24db6eec8d3a80f7fe3a50b4cdd243f +0 -0
  302. data/test/dummy/tmp/cache/assets/E2C/210/sprockets%2Fdd7b14fc1e5b2b7dcdac381cc7f9c267 +0 -0
  303. data/test/dummy/tmp/cache/assets/E3A/950/sprockets%2F8a6c7c212feec8ae888ad7e7fa50a3ff +0 -0
  304. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_accordion.scssc +0 -0
  305. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_alerts.scssc +0 -0
  306. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_breadcrumbs.scssc +0 -0
  307. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_button-groups.scssc +0 -0
  308. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_buttons.scssc +0 -0
  309. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_carousel.scssc +0 -0
  310. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_close.scssc +0 -0
  311. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_code.scssc +0 -0
  312. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_component-animations.scssc +0 -0
  313. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_dropdowns.scssc +0 -0
  314. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_forms.scssc +0 -0
  315. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_grid.scssc +0 -0
  316. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_hero-unit.scssc +0 -0
  317. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_labels-badges.scssc +0 -0
  318. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_layouts.scssc +0 -0
  319. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_media.scssc +0 -0
  320. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_mixins.scssc +0 -0
  321. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_modals.scssc +0 -0
  322. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_navbar.scssc +0 -0
  323. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_navs.scssc +0 -0
  324. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_pager.scssc +0 -0
  325. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_pagination.scssc +0 -0
  326. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_popovers.scssc +0 -0
  327. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_progress-bars.scssc +0 -0
  328. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_reset.scssc +0 -0
  329. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-1200px-min.scssc +0 -0
  330. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-767px-max.scssc +0 -0
  331. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-768px-979px.scssc +0 -0
  332. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-navbar.scssc +0 -0
  333. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-utilities.scssc +0 -0
  334. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_scaffolding.scssc +0 -0
  335. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_sprites.scssc +0 -0
  336. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_tables.scssc +0 -0
  337. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_thumbnails.scssc +0 -0
  338. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_tooltip.scssc +0 -0
  339. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_type.scssc +0 -0
  340. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_utilities.scssc +0 -0
  341. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_variables.scssc +0 -0
  342. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_wells.scssc +0 -0
  343. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/bootstrap.scssc +0 -0
  344. data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/responsive.scssc +0 -0
  345. data/test/dummy/tmp/cache/sass/2a9f8d893763e4aeafa77aedd38023c2d92257b4/bootstrap-responsive.scssc +0 -0
  346. data/test/dummy/tmp/cache/sass/2bca5584fcb1177ad07e4f21325c39e4eda592bf/bootstrap_and_overrides.css.scssc +0 -0
  347. data/test/integration/navigation_test.rb +10 -0
  348. data/test/test_helper.rb +15 -0
  349. data/test/tr8n_client_sdk_test.rb +7 -0
  350. metadata +771 -0
@@ -0,0 +1,16 @@
1
+ @import "bootstrap.css";
2
+
3
+ body {
4
+ padding-top: 60px;
5
+ padding-bottom: 40px;
6
+ }
7
+
8
+ .hr {
9
+ background: url(/assets/hr.png) center center no-repeat;
10
+ text-align: center;
11
+ }
12
+
13
+ .text-center {
14
+ text-align: center;
15
+ }
16
+
@@ -0,0 +1,62 @@
1
+ /*
2
+ * jquery.tocify.css 1.7.0
3
+ * Author: @gregfranko
4
+ */
5
+
6
+ /* The Table of Contents container element */
7
+ .tocify {
8
+ width: 20%;
9
+ max-height: 90%;
10
+ overflow: auto;
11
+ margin-left: 2%;
12
+ position: fixed;
13
+ border: 1px solid #ccc;
14
+ webkit-border-radius: 6px;
15
+ moz-border-radius: 6px;
16
+ border-radius: 6px;
17
+ }
18
+
19
+ /* The Table of Contents is composed of multiple nested unordered lists. These styles remove the default styling of an unordered list because it is ugly. */
20
+ .tocify ul, .tocify li {
21
+ list-style: none;
22
+ margin: 0;
23
+ padding: 0;
24
+ border: none;
25
+ line-height: 30px;
26
+ }
27
+
28
+ /* Top level header elements */
29
+ .tocify-header {
30
+ text-indent: 10px;
31
+ }
32
+
33
+ /* Top level subheader elements. These are the first nested items underneath a header element. */
34
+ .tocify-subheader {
35
+ text-indent: 20px;
36
+ display: none;
37
+ }
38
+
39
+ /* Makes the font smaller for all subheader elements. */
40
+ .tocify-subheader li {
41
+ font-size: 12px;
42
+ }
43
+
44
+ /* Further indents second level subheader elements. */
45
+ .tocify-subheader .tocify-subheader {
46
+ text-indent: 30px;
47
+ }
48
+
49
+ /* Further indents third level subheader elements. You can continue this pattern if you have more nested elements. */
50
+ .tocify-subheader .tocify-subheader .tocify-subheader {
51
+ text-indent: 40px;
52
+ }
53
+
54
+ /* Twitter Bootstrap Override Style */
55
+ .nav-list > li > a, .nav-list .nav-header {
56
+ margin: 0px;
57
+ }
58
+
59
+ /* Twitter Bootstrap Override Style */
60
+ .nav-list > li > a {
61
+ padding: 5px;
62
+ }
@@ -0,0 +1,108 @@
1
+ /**
2
+ * okaidia theme for JavaScript, CSS and HTML
3
+ * Loosely based on Monokai textmate theme by http://www.monokai.nl/
4
+ * @author ocodia
5
+ */
6
+
7
+ code[class*="language-"],
8
+ pre[class*="language-"] {
9
+ color: #f8f8f2;
10
+ text-shadow: 0 1px rgba(0,0,0,0.3);
11
+ font-family: Consolas, Monaco, 'Andale Mono', monospace;
12
+ direction: ltr;
13
+ text-align: left;
14
+ white-space: pre;
15
+ word-spacing: normal;
16
+
17
+ -moz-tab-size: 4;
18
+ -o-tab-size: 4;
19
+ tab-size: 4;
20
+
21
+ -webkit-hyphens: none;
22
+ -moz-hyphens: none;
23
+ -ms-hyphens: none;
24
+ hyphens: none;
25
+ }
26
+
27
+ /* Code blocks */
28
+ pre[class*="language-"] {
29
+ padding: 1em;
30
+ margin: .5em 0;
31
+ overflow: auto;
32
+ border-radius: 0.3em;
33
+ }
34
+
35
+ :not(pre) > code[class*="language-"],
36
+ pre[class*="language-"] {
37
+ background: #272822;
38
+ }
39
+
40
+ /* Inline code */
41
+ :not(pre) > code[class*="language-"] {
42
+ padding: .1em;
43
+ border-radius: .3em;
44
+ }
45
+
46
+ .token.comment,
47
+ .token.prolog,
48
+ .token.doctype,
49
+ .token.cdata {
50
+ color: slategray;
51
+ }
52
+
53
+ .token.punctuation {
54
+ color: #f8f8f2;
55
+ }
56
+
57
+ .namespace {
58
+ opacity: .7;
59
+ }
60
+
61
+ .token.property,
62
+ .token.tag {
63
+ color: #f92672;
64
+ }
65
+
66
+ .token.boolean,
67
+ .token.number{
68
+ color: #ae81ff;
69
+ }
70
+
71
+ .token.selector,
72
+ .token.attr-name,
73
+ .token.string {
74
+ color: #a6e22e;
75
+ }
76
+
77
+
78
+ .token.operator,
79
+ .token.entity,
80
+ .token.url,
81
+ .language-css .token.string,
82
+ .style .token.string {
83
+ color: #f8f8f2;
84
+ }
85
+
86
+ .token.atrule,
87
+ .token.attr-value
88
+ {
89
+ color: #e6db74;
90
+ }
91
+
92
+
93
+ .token.keyword{
94
+ color: #66d9ef;
95
+ }
96
+
97
+ .token.regex,
98
+ .token.important {
99
+ color: #fd971f;
100
+ }
101
+
102
+ .token.important {
103
+ font-weight: bold;
104
+ }
105
+
106
+ .token.entity {
107
+ cursor: help;
108
+ }
@@ -0,0 +1,42 @@
1
+ pre {
2
+ margin-bottom: 30px;
3
+ border-radius: 3px;
4
+ overflow: auto;
5
+ font: 13px/1.3 Monaco, monospace;
6
+ text-shadow: 0 1px 1px rgba(#000, .7);
7
+ background: #333;
8
+ color: #fff;
9
+ padding: 20px;
10
+ .comment { color: #aeaeae }
11
+ }
12
+
13
+ .language-html {
14
+ .attr-value { color: #a0ffe1 }
15
+ .punctuation, .doctype, .tag { color: #a0cbff }
16
+ }
17
+
18
+ .language-css {
19
+ color: #a0ffe1;
20
+ .punctuation, .selector { color: #fff }
21
+ .property { color: #a0cbff }
22
+ }
23
+
24
+ .language-javascript, .language-coffee {
25
+ .string, .number { color: #a0ffe1 }
26
+ .keyword, .type, .class, .var { color: #a0cbff }
27
+ }
28
+
29
+ .language-ruby {
30
+ .string, .symbol { color: #a0ffe1 }
31
+ .namespace, .const { color: #a0cbff }
32
+ }
33
+
34
+ .language-haml {
35
+ .string, .symbol { color: #a0ffe1 }
36
+ .tag, .rails, .var { color: #a0cbff }
37
+ }
38
+
39
+ .language-shell {
40
+ background: #191919;
41
+ color: #84ff95;
42
+ }
@@ -0,0 +1,193 @@
1
+ code[class*="language-"],
2
+ pre[class*="language-"] {
3
+ color: #fff;
4
+ text-shadow: 0 1px 1px #000;
5
+ font-family: Menlo, Monaco, "Courier New", monospace;
6
+ direction: ltr;
7
+ text-align: left;
8
+ word-spacing: normal;
9
+ white-space: pre;
10
+ word-wrap: normal;
11
+ line-height: 1.4;
12
+ background: none;
13
+ border: 0;
14
+
15
+ -moz-tab-size: 4;
16
+ -o-tab-size: 4;
17
+ tab-size: 4;
18
+
19
+ -webkit-hyphens: none;
20
+ -moz-hyphens: none;
21
+ -ms-hyphens: none;
22
+ hyphens: none;
23
+ }
24
+
25
+ pre[class*="language-"] code {
26
+ float: left;
27
+ padding: 0 15px 0 0;
28
+ }
29
+
30
+ pre[class*="language-"],
31
+ :not(pre) > code[class*="language-"] {
32
+ background: #222;
33
+ }
34
+
35
+ .syntax-highlighter[rel] {
36
+ position: relative;
37
+ }
38
+
39
+ .syntax-highlighter[rel] pre[class*="language-"] {
40
+ padding-top: 44px;
41
+ }
42
+
43
+ .syntax-highlighter[rel]:before {
44
+ content: attr(rel);
45
+ text-align: center;
46
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
47
+ position: absolute;
48
+ top: -1px;
49
+ background: #3A87AD;
50
+ padding: 5px 10px;
51
+ left: 0;
52
+ right: 0;
53
+ font: bold 16px/20px "myriad-pro-1","myriad-pro-2","Lucida Grande",Sans-Serif;
54
+ color: #fff;
55
+ -moz-border-radius: 7px 7px 0 0;
56
+ -webkit-border-radius: 7px 7px 0 0;
57
+ border-radius: 7px 7px 0 0;
58
+ }
59
+
60
+ /* Code blocks */
61
+ pre[class*="language-"] {
62
+ padding: 15px;
63
+ margin: 1em 0;
64
+ overflow: auto;
65
+ -moz-border-radius: 8px;
66
+ -webkit-border-radius: 8px;
67
+ border-radius: 8px;
68
+ }
69
+
70
+ /* Inline code */
71
+ :not(pre) > code[class*="language-"] {
72
+ padding: 5px 10px;
73
+ line-height: 1;
74
+ -moz-border-radius: 3px;
75
+ -webkit-border-radius: 3px;
76
+ border-radius: 3px;
77
+ }
78
+
79
+ .token.comment,
80
+ .token.line-comment,
81
+ .token.prolog,
82
+ .token.doctype,
83
+ .token.cdata {
84
+ color: #797979;
85
+ }
86
+
87
+ .token.selector,
88
+ .token.operator,
89
+ .token.punctuation {
90
+ color: #fff;
91
+ }
92
+
93
+ .namespace {
94
+ opacity: .7;
95
+ }
96
+
97
+ .token.tag,
98
+ .token.boolean {
99
+ color: #ffd893;
100
+ }
101
+
102
+ .token.atrule,
103
+ .token.attr-value,
104
+ .token.hex,
105
+ .token.string {
106
+ color: #B0C975;
107
+ }
108
+
109
+ .token.property,
110
+ .token.entity,
111
+ .token.url,
112
+ .token.attr-name,
113
+ .token.keyword {
114
+ color: #c27628;
115
+ }
116
+
117
+ .token.regex {
118
+ color: #9B71C6;
119
+ }
120
+
121
+ .token.entity {
122
+ cursor: help;
123
+ }
124
+
125
+ .token.function,
126
+ .token.constant {
127
+ color: #e5a638;
128
+ }
129
+
130
+ .token.variable {
131
+ color: #fdfba8;
132
+ }
133
+
134
+ .token.number {
135
+ color: #8799B0;
136
+ }
137
+
138
+ .token.important,
139
+ .token.deliminator {
140
+ color: #E45734;
141
+ }
142
+
143
+ pre[data-line] {
144
+ position: relative;
145
+ padding: 1em 0 1em 3em;
146
+ }
147
+
148
+ .line-highlight {
149
+ position: absolute;
150
+ left: 0;
151
+ right: 0;
152
+ padding: inherit 0;
153
+ margin-top: 1em; /* Same as .prism’s padding-top */
154
+ background: rgba(255,255,255,.2);
155
+ pointer-events: none;
156
+ line-height: inherit;
157
+ white-space: pre;
158
+ }
159
+
160
+ .line-highlight:before,
161
+ .line-highlight[data-end]:after {
162
+ content: attr(data-start);
163
+ position: absolute;
164
+ top: .3em;
165
+ left: .6em;
166
+ min-width: 1em;
167
+ padding: 0 .5em;
168
+ background-color: rgba(255,255,255,.3);
169
+ color: #fff;
170
+ font: bold 65%/1.5 sans-serif;
171
+ text-align: center;
172
+ -moz-border-radius: 8px;
173
+ -webkit-border-radius: 8px;
174
+ border-radius: 8px;
175
+ text-shadow: none;
176
+ }
177
+
178
+ .line-highlight[data-end]:after {
179
+ content: attr(data-end);
180
+ top: auto;
181
+ bottom: .4em;
182
+ }
183
+
184
+ /* for line numbers */
185
+ ol.linenums {
186
+ margin: 0;
187
+ padding: 0 0 0 35px;
188
+ }
189
+
190
+ .linenums li {
191
+ padding-left: 10px;
192
+ border-left: 3px #d9d336 solid;
193
+ }
@@ -0,0 +1,82 @@
1
+ #--
2
+ # Copyright (c) 2013 Michael Berkovich, tr8nhub.com
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ #++
23
+
24
+
25
+ class ApplicationController < ActionController::Base
26
+ protect_from_forgery
27
+
28
+ rescue_from StandardError do |e|
29
+ pp e, e.backtrace
30
+ raise e
31
+ end
32
+
33
+ private
34
+
35
+ def current_user
36
+ @current_user ||= User.find_by_id(session[:user_id]) if session[:user_id]
37
+ end
38
+ helper_method :current_user
39
+
40
+ def current_locale
41
+ @current_locale ||= begin
42
+ if params[:locale]
43
+ session[:locale] = params[:locale]
44
+ save_locale = true
45
+ elsif current_user and current_user.locale != nil
46
+ session[:locale] = current_user.locale
47
+ elsif session[:locale] == nil
48
+ session[:locale] = tr8n_user_preferred_locale
49
+ save_locale = (session[:locale] != Tr8n::Config.default_locale)
50
+ end
51
+
52
+ if save_locale and current_user
53
+ current_user.update_attributes(:locale => session[:locale])
54
+ Tr8n::LanguageUser.find_or_create(current_user, Tr8n::Language.by_locale(session[:locale]))
55
+ end
56
+
57
+ session[:locale]
58
+ end
59
+ end
60
+ helper_method :current_locale
61
+
62
+ def login(email, password, opts = {})
63
+ user = User.authenticate(email, password)
64
+ login!(user) if user
65
+ user
66
+ end
67
+
68
+ def login!(user)
69
+ session[:user_id] = user.id
70
+ end
71
+
72
+ def logout!
73
+ session[:user_id] = nil
74
+ @current_user = nil
75
+ # Tr8n::Config.reset!
76
+ end
77
+
78
+ def redirect_if_not_logged_in
79
+ redirect_to("/home") unless current_user
80
+ end
81
+
82
+ end