tehranjs 0.0.2.alpha → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (355) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +254 -1
  3. data/.travis.yml +2 -3
  4. data/Gemfile +4 -0
  5. data/lib/tehranjs/cli.rb +5 -2
  6. data/lib/tehranjs/cli/serve.rb +20 -15
  7. data/lib/tehranjs/identity.rb +1 -1
  8. data/lib/tehranjs/web/controller.rb +45 -17
  9. data/lib/tehranjs/web/filter.rb +24 -0
  10. data/lib/tehranjs/web/helper.rb +21 -1
  11. data/lib/tehranjs/web/servlet.rb +25 -7
  12. data/lib/tehranjs/web/views/_layouts/application.html.erb +7 -0
  13. data/lib/tehranjs/web/views/build_article.md.erb +9 -0
  14. data/lib/tehranjs/web/views/locals/en.yml +17 -1
  15. data/lib/tehranjs/web/views/locals/fa.yml +14 -1
  16. data/lib/tehranjs/web/views/new_article.html.erb +51 -32
  17. data/lib/tehranjs/web/views/public/assets/css/application.css +3 -0
  18. data/lib/tehranjs/web/views/public/assets/js/application.js +104 -0
  19. data/lib/tehranjs/web/views/public/assets/js/ckeditor.js +1135 -0
  20. data/lib/tehranjs/web/views/public/assets/js/config.js +12 -0
  21. data/lib/tehranjs/web/views/public/assets/js/contents.css +208 -0
  22. data/lib/tehranjs/web/views/public/assets/js/lang/af.js +5 -0
  23. data/lib/tehranjs/web/views/public/assets/js/lang/ar.js +5 -0
  24. data/lib/tehranjs/web/views/public/assets/js/lang/az.js +5 -0
  25. data/lib/tehranjs/web/views/public/assets/js/lang/bg.js +5 -0
  26. data/lib/tehranjs/web/views/public/assets/js/lang/bn.js +5 -0
  27. data/lib/tehranjs/web/views/public/assets/js/lang/bs.js +5 -0
  28. data/lib/tehranjs/web/views/public/assets/js/lang/ca.js +5 -0
  29. data/lib/tehranjs/web/views/public/assets/js/lang/cs.js +5 -0
  30. data/lib/tehranjs/web/views/public/assets/js/lang/cy.js +5 -0
  31. data/lib/tehranjs/web/views/public/assets/js/lang/da.js +5 -0
  32. data/lib/tehranjs/web/views/public/assets/js/lang/de-ch.js +5 -0
  33. data/lib/tehranjs/web/views/public/assets/js/lang/de.js +5 -0
  34. data/lib/tehranjs/web/views/public/assets/js/lang/el.js +5 -0
  35. data/lib/tehranjs/web/views/public/assets/js/lang/en-au.js +5 -0
  36. data/lib/tehranjs/web/views/public/assets/js/lang/en-ca.js +5 -0
  37. data/lib/tehranjs/web/views/public/assets/js/lang/en-gb.js +5 -0
  38. data/lib/tehranjs/web/views/public/assets/js/lang/en.js +5 -0
  39. data/lib/tehranjs/web/views/public/assets/js/lang/eo.js +5 -0
  40. data/lib/tehranjs/web/views/public/assets/js/lang/es.js +5 -0
  41. data/lib/tehranjs/web/views/public/assets/js/lang/et.js +5 -0
  42. data/lib/tehranjs/web/views/public/assets/js/lang/eu.js +5 -0
  43. data/lib/tehranjs/web/views/public/assets/js/lang/fa.js +5 -0
  44. data/lib/tehranjs/web/views/public/assets/js/lang/fi.js +5 -0
  45. data/lib/tehranjs/web/views/public/assets/js/lang/fo.js +5 -0
  46. data/lib/tehranjs/web/views/public/assets/js/lang/fr-ca.js +5 -0
  47. data/lib/tehranjs/web/views/public/assets/js/lang/fr.js +5 -0
  48. data/lib/tehranjs/web/views/public/assets/js/lang/gl.js +5 -0
  49. data/lib/tehranjs/web/views/public/assets/js/lang/gu.js +5 -0
  50. data/lib/tehranjs/web/views/public/assets/js/lang/he.js +5 -0
  51. data/lib/tehranjs/web/views/public/assets/js/lang/hi.js +5 -0
  52. data/lib/tehranjs/web/views/public/assets/js/lang/hr.js +5 -0
  53. data/lib/tehranjs/web/views/public/assets/js/lang/hu.js +5 -0
  54. data/lib/tehranjs/web/views/public/assets/js/lang/id.js +5 -0
  55. data/lib/tehranjs/web/views/public/assets/js/lang/is.js +5 -0
  56. data/lib/tehranjs/web/views/public/assets/js/lang/it.js +5 -0
  57. data/lib/tehranjs/web/views/public/assets/js/lang/ja.js +5 -0
  58. data/lib/tehranjs/web/views/public/assets/js/lang/ka.js +5 -0
  59. data/lib/tehranjs/web/views/public/assets/js/lang/km.js +5 -0
  60. data/lib/tehranjs/web/views/public/assets/js/lang/ko.js +5 -0
  61. data/lib/tehranjs/web/views/public/assets/js/lang/ku.js +5 -0
  62. data/lib/tehranjs/web/views/public/assets/js/lang/lt.js +5 -0
  63. data/lib/tehranjs/web/views/public/assets/js/lang/lv.js +5 -0
  64. data/lib/tehranjs/web/views/public/assets/js/lang/mk.js +5 -0
  65. data/lib/tehranjs/web/views/public/assets/js/lang/mn.js +5 -0
  66. data/lib/tehranjs/web/views/public/assets/js/lang/ms.js +5 -0
  67. data/lib/tehranjs/web/views/public/assets/js/lang/nb.js +5 -0
  68. data/lib/tehranjs/web/views/public/assets/js/lang/nl.js +5 -0
  69. data/lib/tehranjs/web/views/public/assets/js/lang/no.js +5 -0
  70. data/lib/tehranjs/web/views/public/assets/js/lang/oc.js +5 -0
  71. data/lib/tehranjs/web/views/public/assets/js/lang/pl.js +5 -0
  72. data/lib/tehranjs/web/views/public/assets/js/lang/pt-br.js +5 -0
  73. data/lib/tehranjs/web/views/public/assets/js/lang/pt.js +5 -0
  74. data/lib/tehranjs/web/views/public/assets/js/lang/ro.js +5 -0
  75. data/lib/tehranjs/web/views/public/assets/js/lang/ru.js +5 -0
  76. data/lib/tehranjs/web/views/public/assets/js/lang/si.js +5 -0
  77. data/lib/tehranjs/web/views/public/assets/js/lang/sk.js +5 -0
  78. data/lib/tehranjs/web/views/public/assets/js/lang/sl.js +5 -0
  79. data/lib/tehranjs/web/views/public/assets/js/lang/sq.js +5 -0
  80. data/lib/tehranjs/web/views/public/assets/js/lang/sr-latn.js +5 -0
  81. data/lib/tehranjs/web/views/public/assets/js/lang/sr.js +5 -0
  82. data/lib/tehranjs/web/views/public/assets/js/lang/sv.js +5 -0
  83. data/lib/tehranjs/web/views/public/assets/js/lang/th.js +5 -0
  84. data/lib/tehranjs/web/views/public/assets/js/lang/tr.js +5 -0
  85. data/lib/tehranjs/web/views/public/assets/js/lang/tt.js +5 -0
  86. data/lib/tehranjs/web/views/public/assets/js/lang/ug.js +5 -0
  87. data/lib/tehranjs/web/views/public/assets/js/lang/uk.js +5 -0
  88. data/lib/tehranjs/web/views/public/assets/js/lang/vi.js +5 -0
  89. data/lib/tehranjs/web/views/public/assets/js/lang/zh-cn.js +5 -0
  90. data/lib/tehranjs/web/views/public/assets/js/lang/zh.js +5 -0
  91. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  92. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  93. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/af.js +11 -0
  94. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ar.js +10 -0
  95. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/az.js +11 -0
  96. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/bg.js +10 -0
  97. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ca.js +12 -0
  98. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
  99. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  100. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  101. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/de-ch.js +11 -0
  102. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/de.js +11 -0
  103. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/el.js +11 -0
  104. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/en-gb.js +10 -0
  105. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/en.js +10 -0
  106. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/eo.js +12 -0
  107. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/es.js +13 -0
  108. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/et.js +10 -0
  109. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
  110. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  111. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
  112. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fo.js +10 -0
  113. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
  114. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  115. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/gl.js +11 -0
  116. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/gu.js +10 -0
  117. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/he.js +10 -0
  118. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/hi.js +10 -0
  119. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  120. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/hu.js +11 -0
  121. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  122. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/it.js +13 -0
  123. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  124. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/km.js +10 -0
  125. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
  126. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
  127. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/lt.js +10 -0
  128. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/lv.js +11 -0
  129. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  130. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/mn.js +10 -0
  131. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/nb.js +11 -0
  132. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  133. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  134. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
  135. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  136. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/pt-br.js +12 -0
  137. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  138. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ro.js +11 -0
  139. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  140. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  141. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
  142. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
  143. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sq.js +11 -0
  144. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sr-latn.js +10 -0
  145. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sr.js +10 -0
  146. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
  147. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/th.js +10 -0
  148. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  149. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  150. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ug.js +11 -0
  151. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  152. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  153. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  154. data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
  155. data/lib/tehranjs/web/views/public/assets/js/plugins/about/dialogs/about.js +8 -0
  156. data/lib/tehranjs/web/views/public/assets/js/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  157. data/lib/tehranjs/web/views/public/assets/js/plugins/about/dialogs/logo_ckeditor.png +0 -0
  158. data/lib/tehranjs/web/views/public/assets/js/plugins/clipboard/dialogs/paste.js +12 -0
  159. data/lib/tehranjs/web/views/public/assets/js/plugins/colordialog/dialogs/colordialog.css +20 -0
  160. data/lib/tehranjs/web/views/public/assets/js/plugins/colordialog/dialogs/colordialog.js +14 -0
  161. data/lib/tehranjs/web/views/public/assets/js/plugins/copyformatting/cursors/cursor-disabled.svg +25 -0
  162. data/lib/tehranjs/web/views/public/assets/js/plugins/copyformatting/cursors/cursor.svg +14 -0
  163. data/lib/tehranjs/web/views/public/assets/js/plugins/copyformatting/styles/copyformatting.css +45 -0
  164. data/lib/tehranjs/web/views/public/assets/js/plugins/dialog/dialogDefinition.js +4 -0
  165. data/lib/tehranjs/web/views/public/assets/js/plugins/div/dialogs/div.js +9 -0
  166. data/lib/tehranjs/web/views/public/assets/js/plugins/find/dialogs/find.js +25 -0
  167. data/lib/tehranjs/web/views/public/assets/js/plugins/flash/dialogs/flash.js +24 -0
  168. data/lib/tehranjs/web/views/public/assets/js/plugins/flash/images/placeholder.png +0 -0
  169. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/button.js +8 -0
  170. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/checkbox.js +9 -0
  171. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/form.js +8 -0
  172. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/hiddenfield.js +7 -0
  173. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/radio.js +9 -0
  174. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/select.js +20 -0
  175. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/textarea.js +8 -0
  176. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/textfield.js +11 -0
  177. data/lib/tehranjs/web/views/public/assets/js/plugins/forms/images/hiddenfield.gif +0 -0
  178. data/lib/tehranjs/web/views/public/assets/js/plugins/icons.png +0 -0
  179. data/lib/tehranjs/web/views/public/assets/js/plugins/icons_hidpi.png +0 -0
  180. data/lib/tehranjs/web/views/public/assets/js/plugins/iframe/dialogs/iframe.js +10 -0
  181. data/lib/tehranjs/web/views/public/assets/js/plugins/iframe/images/placeholder.png +0 -0
  182. data/lib/tehranjs/web/views/public/assets/js/plugins/image/dialogs/image.js +44 -0
  183. data/lib/tehranjs/web/views/public/assets/js/plugins/image/images/noimage.png +0 -0
  184. data/lib/tehranjs/web/views/public/assets/js/plugins/link/dialogs/anchor.js +7 -0
  185. data/lib/tehranjs/web/views/public/assets/js/plugins/link/dialogs/link.js +28 -0
  186. data/lib/tehranjs/web/views/public/assets/js/plugins/link/images/anchor.png +0 -0
  187. data/lib/tehranjs/web/views/public/assets/js/plugins/link/images/hidpi/anchor.png +0 -0
  188. data/lib/tehranjs/web/views/public/assets/js/plugins/liststyle/dialogs/liststyle.js +10 -0
  189. data/lib/tehranjs/web/views/public/assets/js/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  190. data/lib/tehranjs/web/views/public/assets/js/plugins/magicline/images/hidpi/icon.png +0 -0
  191. data/lib/tehranjs/web/views/public/assets/js/plugins/magicline/images/icon-rtl.png +0 -0
  192. data/lib/tehranjs/web/views/public/assets/js/plugins/magicline/images/icon.png +0 -0
  193. data/lib/tehranjs/web/views/public/assets/js/plugins/pagebreak/images/pagebreak.gif +0 -0
  194. data/lib/tehranjs/web/views/public/assets/js/plugins/pastefromword/filter/default.js +43 -0
  195. data/lib/tehranjs/web/views/public/assets/js/plugins/preview/preview.html +13 -0
  196. data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/CHANGELOG.md +20 -0
  197. data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/LICENSE.md +28 -0
  198. data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/README.md +25 -0
  199. data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/dialogs/options.js +19 -0
  200. data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/dialogs/toolbar.css +71 -0
  201. data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/skins/moono-lisa/scayt.css +20 -0
  202. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_address.png +0 -0
  203. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_blockquote.png +0 -0
  204. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_div.png +0 -0
  205. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h1.png +0 -0
  206. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h2.png +0 -0
  207. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h3.png +0 -0
  208. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h4.png +0 -0
  209. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h5.png +0 -0
  210. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h6.png +0 -0
  211. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_p.png +0 -0
  212. data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_pre.png +0 -0
  213. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/dialogs/smiley.js +11 -0
  214. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/angel_smile.gif +0 -0
  215. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/angel_smile.png +0 -0
  216. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/angry_smile.gif +0 -0
  217. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/angry_smile.png +0 -0
  218. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/broken_heart.gif +0 -0
  219. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/broken_heart.png +0 -0
  220. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/confused_smile.gif +0 -0
  221. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/confused_smile.png +0 -0
  222. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/cry_smile.gif +0 -0
  223. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/cry_smile.png +0 -0
  224. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/devil_smile.gif +0 -0
  225. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/devil_smile.png +0 -0
  226. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/embaressed_smile.gif +0 -0
  227. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/embarrassed_smile.gif +0 -0
  228. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/embarrassed_smile.png +0 -0
  229. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/envelope.gif +0 -0
  230. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/envelope.png +0 -0
  231. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/heart.gif +0 -0
  232. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/heart.png +0 -0
  233. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/kiss.gif +0 -0
  234. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/kiss.png +0 -0
  235. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/lightbulb.gif +0 -0
  236. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/lightbulb.png +0 -0
  237. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/omg_smile.gif +0 -0
  238. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/omg_smile.png +0 -0
  239. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/regular_smile.gif +0 -0
  240. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/regular_smile.png +0 -0
  241. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/sad_smile.gif +0 -0
  242. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/sad_smile.png +0 -0
  243. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/shades_smile.gif +0 -0
  244. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/shades_smile.png +0 -0
  245. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/teeth_smile.gif +0 -0
  246. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/teeth_smile.png +0 -0
  247. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/thumbs_down.gif +0 -0
  248. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/thumbs_down.png +0 -0
  249. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/thumbs_up.gif +0 -0
  250. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/thumbs_up.png +0 -0
  251. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/tongue_smile.gif +0 -0
  252. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/tongue_smile.png +0 -0
  253. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/tounge_smile.gif +0 -0
  254. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  255. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
  256. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/wink_smile.gif +0 -0
  257. data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/wink_smile.png +0 -0
  258. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  259. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/af.js +13 -0
  260. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ar.js +13 -0
  261. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/az.js +10 -0
  262. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/bg.js +13 -0
  263. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ca.js +14 -0
  264. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/cs.js +13 -0
  265. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/cy.js +14 -0
  266. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/da.js +11 -0
  267. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
  268. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/de.js +13 -0
  269. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/el.js +13 -0
  270. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  271. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/en.js +13 -0
  272. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/eo.js +12 -0
  273. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/es.js +13 -0
  274. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/et.js +13 -0
  275. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/eu.js +13 -0
  276. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/fa.js +12 -0
  277. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/fi.js +13 -0
  278. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  279. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/fr.js +12 -0
  280. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/gl.js +13 -0
  281. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/he.js +12 -0
  282. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/hr.js +13 -0
  283. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/hu.js +12 -0
  284. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/id.js +13 -0
  285. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/it.js +14 -0
  286. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ja.js +9 -0
  287. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/km.js +13 -0
  288. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ko.js +10 -0
  289. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ku.js +13 -0
  290. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/lt.js +13 -0
  291. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/lv.js +13 -0
  292. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/nb.js +11 -0
  293. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/nl.js +13 -0
  294. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/no.js +11 -0
  295. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/oc.js +12 -0
  296. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/pl.js +12 -0
  297. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  298. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/pt.js +13 -0
  299. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ru.js +13 -0
  300. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/si.js +13 -0
  301. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/sk.js +13 -0
  302. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/sl.js +12 -0
  303. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/sq.js +13 -0
  304. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/sv.js +11 -0
  305. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/th.js +13 -0
  306. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/tr.js +12 -0
  307. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/tt.js +13 -0
  308. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ug.js +13 -0
  309. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/uk.js +12 -0
  310. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/vi.js +14 -0
  311. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  312. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/zh.js +9 -0
  313. data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/specialchar.js +14 -0
  314. data/lib/tehranjs/web/views/public/assets/js/plugins/table/dialogs/table.js +21 -0
  315. data/lib/tehranjs/web/views/public/assets/js/plugins/tabletools/dialogs/tableCell.js +17 -0
  316. data/lib/tehranjs/web/views/public/assets/js/plugins/templates/dialogs/templates.css +84 -0
  317. data/lib/tehranjs/web/views/public/assets/js/plugins/templates/dialogs/templates.js +10 -0
  318. data/lib/tehranjs/web/views/public/assets/js/plugins/templates/templates/default.js +7 -0
  319. data/lib/tehranjs/web/views/public/assets/js/plugins/templates/templates/images/template1.gif +0 -0
  320. data/lib/tehranjs/web/views/public/assets/js/plugins/templates/templates/images/template2.gif +0 -0
  321. data/lib/tehranjs/web/views/public/assets/js/plugins/templates/templates/images/template3.gif +0 -0
  322. data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/LICENSE.md +28 -0
  323. data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/README.md +25 -0
  324. data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/ciframe.html +66 -0
  325. data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  326. data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/wsc.css +82 -0
  327. data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/wsc.js +92 -0
  328. data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/wsc_ie.js +11 -0
  329. data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
  330. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/dialog.css +5 -0
  331. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/dialog_ie.css +5 -0
  332. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/dialog_ie8.css +5 -0
  333. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/dialog_iequirks.css +5 -0
  334. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor.css +5 -0
  335. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor_gecko.css +5 -0
  336. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor_ie.css +5 -0
  337. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor_ie8.css +5 -0
  338. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor_iequirks.css +5 -0
  339. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/icons.png +0 -0
  340. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/icons_hidpi.png +0 -0
  341. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/arrow.png +0 -0
  342. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/close.png +0 -0
  343. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/hidpi/close.png +0 -0
  344. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  345. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/hidpi/lock.png +0 -0
  346. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  347. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/lock-open.png +0 -0
  348. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/lock.png +0 -0
  349. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/refresh.png +0 -0
  350. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/spinner.gif +0 -0
  351. data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/readme.md +46 -0
  352. data/lib/tehranjs/web/views/public/assets/js/styles.js +137 -0
  353. data/tehranjs.gemspec +0 -1
  354. metadata +343 -19
  355. data/.ruby-version +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14b47b5b669b900ed3b7317f3bc4917a3badfa31
4
- data.tar.gz: 68c6eb68ec03e9ea759e583482aff529ab3e47ed
3
+ metadata.gz: 3ba02256bce61e8e841829dd649ebc6ddaa86954
4
+ data.tar.gz: b476101f0795d8c09cefad4c0d4d58a88ca2c395
5
5
  SHA512:
6
- metadata.gz: 7eba0ac10946a9d3865536ac717cc4efd810a01238cc140b99ba81c7be812f694ceca1152a520b4f1daad2e3a29cda5beddf1b3173f1c55f41560fa255fd8aba
7
- data.tar.gz: a1ab5da44948b027bf52b0fa646ab0d24c35307c37e4b343f26c7d0c13e220a989a544a3c2def805c92a50bd0d581feba264dda78e5a8412317bc8563664599f
6
+ metadata.gz: 9171d56cd55b83cd857c9097dcb1f760fbcda3966d73e530ff758a64b8ff9141d923be27381585e0d23b74f33166b3ab363375675d3387e48da1ec77f423d410
7
+ data.tar.gz: f6cecd8a90493e34f680181e35148ad8de4cb308919e6d5b615b32bc1da401903daf56b81d29772f623fcbdad59350b6937cb23bd2f7d1c65079a9e18496b525
data/.gitignore CHANGED
@@ -10,4 +10,257 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
- *.gem
13
+ *.gem
14
+ ### OSX ###
15
+ *.DS_Store
16
+ .AppleDouble
17
+ .LSOverride
18
+
19
+ # Icon must end with two \r
20
+ Icon
21
+ # Thumbnails
22
+ ._*
23
+ # Files that might appear in the root of a volume
24
+ .DocumentRevisions-V100
25
+ .fseventsd
26
+ .Spotlight-V100
27
+ .TemporaryItems
28
+ .Trashes
29
+ .VolumeIcon.icns
30
+ .com.apple.timemachine.donotpresent
31
+ # Directories potentially created on remote AFP share
32
+ .AppleDB
33
+ .AppleDesktop
34
+ Network Trash Folder
35
+ Temporary Items
36
+ .apdisk
37
+
38
+ ### Gemfile ###
39
+ Gemfile.lock
40
+
41
+ ### Bower ###
42
+ bower_components
43
+ .bower-cache
44
+ .bower-registry
45
+ .bower-tmp
46
+
47
+
48
+ ### Linux ###
49
+ *~
50
+
51
+ # temporary files which can be created if a process still has a handle open of a deleted file
52
+ .fuse_hidden*
53
+
54
+ # KDE directory preferences
55
+ .directory
56
+
57
+ # Linux trash folder which might appear on any partition or disk
58
+ .Trash-*
59
+
60
+ # .nfs files are created when an open file is removed but is still being accessed
61
+ .nfs*
62
+
63
+
64
+ ### macOS ###
65
+ # Icon must end with two \r
66
+ # Thumbnails
67
+ # Files that might appear in the root of a volume
68
+ # Directories potentially created on remote AFP share
69
+
70
+
71
+ ### Node ###
72
+ # Logs
73
+ logs
74
+ *.log
75
+ npm-debug.log*
76
+
77
+ # Runtime data
78
+ pids
79
+ *.pid
80
+ *.seed
81
+ *.pid.lock
82
+
83
+ # Directory for instrumented libs generated by jscoverage/JSCover
84
+ lib-cov
85
+
86
+ # Coverage directory used by tools like istanbul
87
+ coverage
88
+
89
+ # nyc test coverage
90
+ .nyc_output
91
+
92
+ # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
93
+ .grunt
94
+
95
+ # node-waf configuration
96
+ .lock-wscript
97
+
98
+ # Compiled binary addons (http://nodejs.org/api/addons.html)
99
+ build/Release
100
+
101
+ # Dependency directories
102
+ node_modules
103
+ jspm_packages
104
+
105
+ # Optional npm cache directory
106
+ .npm
107
+
108
+ # Optional eslint cache
109
+ .eslintcache
110
+
111
+ # Optional REPL history
112
+ .node_repl_history
113
+
114
+ # Output of 'npm pack'
115
+ *.tgz
116
+
117
+
118
+ ### Intellij ###
119
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
120
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
121
+
122
+ # User-specific stuff:
123
+ .idea/workspace.xml
124
+ .idea/tasks.xml
125
+
126
+ # Sensitive or high-churn files:
127
+ .idea/dataSources.ids
128
+ .idea/dataSources.xml
129
+ .idea/dataSources.local.xml
130
+ .idea/sqlDataSources.xml
131
+ .idea/dynamic.xml
132
+ .idea/uiDesigner.xml
133
+
134
+ # Gradle:
135
+ .idea/gradle.xml
136
+ .idea/libraries
137
+
138
+ # Mongo Explorer plugin:
139
+ .idea/mongoSettings.xml
140
+
141
+ ## File-based project format:
142
+ *.iws
143
+
144
+ ## Plugin-specific files:
145
+
146
+ # IntelliJ
147
+ /out/
148
+
149
+ # VSCode
150
+ .vscode/
151
+
152
+ # mpeltonen/sbt-idea plugin
153
+ .idea_modules/
154
+
155
+ # JIRA plugin
156
+ atlassian-ide-plugin.xml
157
+
158
+ # Crashlytics plugin (for Android Studio and IntelliJ)
159
+ com_crashlytics_export_strings.xml
160
+ crashlytics.properties
161
+ crashlytics-build.properties
162
+ fabric.properties
163
+
164
+ ### Intellij Patch ###
165
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
166
+
167
+ # *.iml
168
+ # modules.xml
169
+ # .idea/misc.xml
170
+ # *.ipr
171
+
172
+
173
+ ### Sass ###
174
+ .sass-cache/
175
+ *.css.map
176
+
177
+
178
+ ### SublimeText ###
179
+ # cache files for sublime text
180
+ *.tmlanguage.cache
181
+ *.tmPreferences.cache
182
+ *.stTheme.cache
183
+
184
+ # workspace files are user-specific
185
+ *.sublime-workspace
186
+
187
+ # project files should be checked into the repository, unless a significant
188
+ # proportion of contributors will probably not be using SublimeText
189
+ # *.sublime-project
190
+
191
+ # sftp configuration file
192
+ sftp-config.json
193
+
194
+ # Package control specific files
195
+ Package Control.last-run
196
+ Package Control.ca-list
197
+ Package Control.ca-bundle
198
+ Package Control.system-ca-bundle
199
+ Package Control.cache/
200
+ Package Control.ca-certs/
201
+ bh_unicode_properties.cache
202
+
203
+ # Sublime-github package stores a github token in this file
204
+ # https://packagecontrol.io/packages/sublime-github
205
+ GitHub.sublime-settings
206
+
207
+
208
+ ### VisualStudioCode ###
209
+ .vscode/*
210
+ !.vscode/settings.json
211
+ !.vscode/tasks.json
212
+ !.vscode/launch.json
213
+
214
+
215
+ ### WebStorm ###
216
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
217
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
218
+
219
+ # User-specific stuff:
220
+
221
+ # Sensitive or high-churn files:
222
+
223
+ # Gradle:
224
+
225
+ # Mongo Explorer plugin:
226
+
227
+ ## File-based project format:
228
+
229
+ ## Plugin-specific files:
230
+
231
+ # IntelliJ
232
+
233
+ # mpeltonen/sbt-idea plugin
234
+
235
+ # JIRA plugin
236
+
237
+ # Crashlytics plugin (for Android Studio and IntelliJ)
238
+
239
+ ### WebStorm Patch ###
240
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
241
+
242
+ # *.iml
243
+ # modules.xml
244
+ # .idea/misc.xml
245
+ # *.ipr
246
+
247
+
248
+ ### Windows ###
249
+ # Windows image file caches
250
+ Thumbs.db
251
+ ehthumbs.db
252
+
253
+ # Folder config file
254
+ Desktop.ini
255
+
256
+ # Recycle Bin used on file shares
257
+ $RECYCLE.BIN/
258
+
259
+ # Windows Installer files
260
+ *.cab
261
+ *.msi
262
+ *.msm
263
+ *.msp
264
+
265
+ # Windows shortcuts
266
+ *.lnk
@@ -1,5 +1,4 @@
1
1
  sudo: false
2
2
  language: ruby
3
- rvm:
4
- - 2.3.0
5
- before_install: gem install bundler -v 1.14.6
3
+ before_install: gem update --system
4
+ before_install: gem install bundler -v 1.14.6
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in tehranjs.gemspec
4
4
  gemspec
5
+
6
+ group :development do
7
+ gem "pry"
8
+ end
@@ -8,8 +8,6 @@ module Tehranjs
8
8
  # The Command Line Interface (CLI) for the gem.
9
9
  class CLI < Thor
10
10
  include Thor::Actions
11
- include ThorPlus::Actions
12
-
13
11
  package_name Identity.version_label
14
12
  namespace :default
15
13
 
@@ -21,6 +19,11 @@ module Tehranjs
21
19
  )
22
20
 
23
21
 
22
+ class_option 'verbose', :type => :boolean, :default => false
23
+ def self.exit_on_failure?
24
+ true
25
+ end
26
+
24
27
  def initialize args = [], options = {}, config = {}
25
28
  super args, options, config
26
29
  end
@@ -1,12 +1,11 @@
1
1
  require "webrick"
2
+ require 'i18n'
2
3
  require "tehranjs/web/controller"
3
4
  require "tehranjs/web/servlet"
4
-
5
-
6
5
  module Tehranjs
7
6
  class CLI < Thor
8
7
  class Serve < Thor::Group
9
-
8
+ check_unknown_options!
10
9
 
11
10
 
12
11
  desc "Serve start server"
@@ -18,19 +17,25 @@ module Tehranjs
18
17
  desc: "Server Port",
19
18
  type: :numeric, default: 2525
20
19
 
21
- def Serve
22
-
23
- server = WEBrick::HTTPServer.new(:Port => options[:port])
24
-
25
- server.mount '/public', WEBrick::HTTPServlet::FileHandler,::File.join(::File.dirname(__FILE__),"..", 'web','views','public')
26
- server.mount "/", Tehranjs::Web::Servlet
27
-
28
- trap("INT") {
29
- server.shutdown
30
- }
31
-
32
- server.start
20
+ class_option :lang,
21
+ aliases: "-l",
22
+ desc: "Server lang",
23
+ type: :string, default: 'en'
33
24
 
25
+ def Serve
26
+ I18n.load_path = Dir[::File.join(::File.dirname(__FILE__),"..","web","views", 'locals','*.yml')]
27
+ I18n.default_locale = options[:lang].to_sym
28
+ say("#{options[:lang].to_sym} localiziation")
29
+ say("Server run at http://127.0.0.1:#{options[:port]}")
30
+ server = WEBrick::HTTPServer.new(:Port => options[:port])
31
+ server.mount '/public', WEBrick::HTTPServlet::FileHandler,::File.join(::File.dirname(__FILE__),"..", 'web','views','public')
32
+ server.mount "/", Tehranjs::Web::Servlet
33
+
34
+ trap("INT") {
35
+ server.shutdown
36
+ }
37
+
38
+ server.start
34
39
 
35
40
  end
36
41
 
@@ -10,7 +10,7 @@ module Tehranjs
10
10
  end
11
11
 
12
12
  def self.version
13
- "0.0.2.alpha"
13
+ "0.1.0"
14
14
  end
15
15
 
16
16
  def self.version_label
@@ -1,38 +1,66 @@
1
1
  require 'erb'
2
2
  require_relative 'helper.rb'
3
- require 'i18n'
4
-
5
- I18n.load_path = Dir[::File.join(::File.dirname(__FILE__),"views", 'locals','*.yml')]
6
- I18n.backend.load_translations
7
- I18n.config.available_locales = :en
8
-
3
+ require 'tehranjs/web/filter'
9
4
 
10
5
  module Tehranjs
11
6
  module Web
12
7
  class Controller
13
8
 
14
- def self.index
15
- self.render 'index.html.erb'
9
+ def initialize flash=nil
10
+ @flash=flash
11
+ end
12
+ def index
13
+ render 'index.html.erb'
16
14
  end
17
- def self.about
18
- self.render 'about.html.erb'
15
+
16
+ def about
17
+ render 'about.html.erb'
19
18
  end
20
19
 
21
- def self.new_article
22
- self.render 'new_article.html.erb'
20
+ def new_article
21
+ render 'new_article.html.erb'
22
+ end
23
+
24
+ def build_article response, params
25
+ @params = params.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
26
+ filename = parameterize([@params[:date],@params[:permalink]].join(' '),'-')
27
+ if @params[:rw] == 'dl'
28
+ response.content_type = "application/octet-stream"
29
+ response.[]=('Content-Disposition',"attachment; filename='#{filename}.md'")
30
+ render 'build_article.md.erb',false
31
+ else
32
+ article=render 'build_article.md.erb',false
33
+ begin
34
+ File.open("#{Dir.pwd}/_posts/#{filename}.md", 'w') { |file| file.write(article) }
35
+ response.set_redirect(WEBrick::HTTPStatus::MovedPermanently, "/new_article?message=#{I18n.t('flash.successfull')}")
36
+
37
+ rescue
38
+ response.set_redirect(WEBrick::HTTPStatus::MovedPermanently, "/new_article?message=#{I18n.t('flash.faile_to_write')}")
39
+
40
+ end
41
+ end
23
42
  end
24
43
 
25
- def self.render template
26
-
27
- @layout = File.read(::File.join(::File.dirname(__FILE__),"views", '_layouts','application.html.erb'))
44
+
45
+ def version_label
46
+ return Tehranjs::Identity.version_label
47
+ end
48
+
49
+ def not_found
50
+
51
+ end
52
+
53
+ def render template , layout=true
28
54
  @template = File.read(::File.join(::File.dirname(__FILE__),"views", template))
55
+ @layout = File.read(::File.join(::File.dirname(__FILE__),"views", '_layouts','application.html.erb'))
56
+ return ERB.new(@template).result(binding) unless layout
29
57
  templates = [@template, @layout]
30
58
  templates.inject(nil) do | prev, temp |
31
- self._render(temp) { prev }
59
+ _render(temp) { prev }
32
60
  end
33
61
  end
34
62
 
35
- def self._render temp
63
+ def _render temp
36
64
  ERB.new(temp).result( binding )
37
65
  end
38
66