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.
- checksums.yaml +4 -4
- data/.gitignore +254 -1
- data/.travis.yml +2 -3
- data/Gemfile +4 -0
- data/lib/tehranjs/cli.rb +5 -2
- data/lib/tehranjs/cli/serve.rb +20 -15
- data/lib/tehranjs/identity.rb +1 -1
- data/lib/tehranjs/web/controller.rb +45 -17
- data/lib/tehranjs/web/filter.rb +24 -0
- data/lib/tehranjs/web/helper.rb +21 -1
- data/lib/tehranjs/web/servlet.rb +25 -7
- data/lib/tehranjs/web/views/_layouts/application.html.erb +7 -0
- data/lib/tehranjs/web/views/build_article.md.erb +9 -0
- data/lib/tehranjs/web/views/locals/en.yml +17 -1
- data/lib/tehranjs/web/views/locals/fa.yml +14 -1
- data/lib/tehranjs/web/views/new_article.html.erb +51 -32
- data/lib/tehranjs/web/views/public/assets/css/application.css +3 -0
- data/lib/tehranjs/web/views/public/assets/js/application.js +104 -0
- data/lib/tehranjs/web/views/public/assets/js/ckeditor.js +1135 -0
- data/lib/tehranjs/web/views/public/assets/js/config.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/contents.css +208 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/af.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ar.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/az.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/bg.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/bn.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/bs.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ca.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/cs.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/cy.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/da.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/de-ch.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/de.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/el.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/en-au.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/en-ca.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/en-gb.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/en.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/eo.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/es.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/et.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/eu.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/fa.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/fi.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/fo.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/fr-ca.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/fr.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/gl.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/gu.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/he.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/hi.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/hr.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/hu.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/id.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/is.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/it.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ja.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ka.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/km.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ko.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ku.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/lt.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/lv.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/mk.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/mn.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ms.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/nb.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/nl.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/no.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/oc.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/pl.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/pt-br.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/pt.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ro.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ru.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/si.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/sk.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/sl.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/sq.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/sr-latn.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/sr.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/sv.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/th.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/tr.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/tt.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/ug.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/uk.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/vi.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/zh-cn.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/lang/zh.js +5 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/af.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ar.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/az.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/bg.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ca.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/de-ch.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/de.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/el.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/en-gb.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/en.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/eo.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/es.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/et.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fo.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/gl.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/gu.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/he.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/hi.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/hu.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/it.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/km.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/lt.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/lv.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/mn.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/nb.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/no.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/pt-br.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ro.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sq.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sr-latn.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sr.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/th.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/ug.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/about/dialogs/about.js +8 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/clipboard/dialogs/paste.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/colordialog/dialogs/colordialog.css +20 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/colordialog/dialogs/colordialog.js +14 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/copyformatting/cursors/cursor-disabled.svg +25 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/copyformatting/cursors/cursor.svg +14 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/copyformatting/styles/copyformatting.css +45 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/dialog/dialogDefinition.js +4 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/div/dialogs/div.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/find/dialogs/find.js +25 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/flash/dialogs/flash.js +24 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/flash/images/placeholder.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/button.js +8 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/checkbox.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/form.js +8 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/hiddenfield.js +7 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/radio.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/select.js +20 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/textarea.js +8 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/dialogs/textfield.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/forms/images/hiddenfield.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/icons.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/icons_hidpi.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/iframe/dialogs/iframe.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/iframe/images/placeholder.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/image/dialogs/image.js +44 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/image/images/noimage.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/link/dialogs/anchor.js +7 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/link/dialogs/link.js +28 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/link/images/anchor.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/link/images/hidpi/anchor.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/liststyle/dialogs/liststyle.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/magicline/images/hidpi/icon.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/magicline/images/icon-rtl.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/magicline/images/icon.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/pastefromword/filter/default.js +43 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/preview/preview.html +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/CHANGELOG.md +20 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/LICENSE.md +28 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/README.md +25 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/dialogs/options.js +19 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/dialogs/toolbar.css +71 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/scayt/skins/moono-lisa/scayt.css +20 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_address.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_blockquote.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_div.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h1.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h2.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h3.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h4.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h5.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_h6.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_p.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/showblocks/images/block_pre.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/dialogs/smiley.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/angel_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/angel_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/angry_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/angry_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/broken_heart.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/broken_heart.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/confused_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/confused_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/cry_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/cry_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/devil_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/devil_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/envelope.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/envelope.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/heart.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/heart.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/kiss.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/kiss.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/lightbulb.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/lightbulb.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/omg_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/omg_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/regular_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/regular_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/sad_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/sad_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/shades_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/shades_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/teeth_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/teeth_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/thumbs_down.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/thumbs_down.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/thumbs_up.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/thumbs_up.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/tongue_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/tongue_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/tounge_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/wink_smile.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/smiley/images/wink_smile.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/af.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/az.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ca.js +14 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/da.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/eu.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/fa.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/fr.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/he.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ko.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ku.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/lt.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/oc.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/pl.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/th.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/tt.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/vi.js +14 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/lang/zh.js +9 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/table/dialogs/table.js +21 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/tabletools/dialogs/tableCell.js +17 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/templates/dialogs/templates.css +84 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/templates/dialogs/templates.js +10 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/templates/templates/default.js +7 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/templates/templates/images/template1.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/templates/templates/images/template2.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/templates/templates/images/template3.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/LICENSE.md +28 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/README.md +25 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/ciframe.html +66 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/wsc.css +82 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/wsc.js +92 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/dialogs/wsc_ie.js +11 -0
- data/lib/tehranjs/web/views/public/assets/js/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/dialog.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/dialog_ie.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/dialog_ie8.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/dialog_iequirks.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor_gecko.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor_ie.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor_ie8.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/editor_iequirks.css +5 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/icons.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/icons_hidpi.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/arrow.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/close.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/hidpi/close.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/hidpi/lock.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/lock-open.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/lock.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/refresh.png +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/images/spinner.gif +0 -0
- data/lib/tehranjs/web/views/public/assets/js/skins/moono-lisa/readme.md +46 -0
- data/lib/tehranjs/web/views/public/assets/js/styles.js +137 -0
- data/tehranjs.gemspec +0 -1
- metadata +343 -19
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ba02256bce61e8e841829dd649ebc6ddaa86954
|
4
|
+
data.tar.gz: b476101f0795d8c09cefad4c0d4d58a88ca2c395
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/lib/tehranjs/cli.rb
CHANGED
@@ -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
|
data/lib/tehranjs/cli/serve.rb
CHANGED
@@ -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
|
-
|
22
|
-
|
23
|
-
|
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
|
|
data/lib/tehranjs/identity.rb
CHANGED
@@ -1,38 +1,66 @@
|
|
1
1
|
require 'erb'
|
2
2
|
require_relative 'helper.rb'
|
3
|
-
require '
|
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
|
15
|
-
|
9
|
+
def initialize flash=nil
|
10
|
+
@flash=flash
|
11
|
+
end
|
12
|
+
def index
|
13
|
+
render 'index.html.erb'
|
16
14
|
end
|
17
|
-
|
18
|
-
|
15
|
+
|
16
|
+
def about
|
17
|
+
render 'about.html.erb'
|
19
18
|
end
|
20
19
|
|
21
|
-
def
|
22
|
-
|
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
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
59
|
+
_render(temp) { prev }
|
32
60
|
end
|
33
61
|
end
|
34
62
|
|
35
|
-
def
|
63
|
+
def _render temp
|
36
64
|
ERB.new(temp).result( binding )
|
37
65
|
end
|
38
66
|
|