releaf-core 1.1.20 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/assets/config/releaf_core_manifest.js +3 -0
- data/app/assets/images/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/app/assets/images/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/app/assets/images/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/app/assets/images/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/app/assets/images/ckeditor/plugins/icons.png +0 -0
- data/app/assets/images/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/app/assets/images/ckeditor/plugins/image/images/noimage.png +0 -0
- data/app/assets/images/ckeditor/plugins/link/images/anchor.png +0 -0
- data/app/assets/images/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/app/assets/images/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/app/assets/images/ckeditor/plugins/widget/images/handle.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/icons.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/close.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- data/app/assets/javascripts/ckeditor-jquery.js +3 -0
- data/app/assets/javascripts/ckeditor/CHANGES.md +1637 -0
- data/app/assets/javascripts/ckeditor/LICENSE.md +1420 -0
- data/app/assets/javascripts/ckeditor/README.md +39 -0
- data/app/assets/javascripts/ckeditor/basepath.js.erb +6 -0
- data/app/assets/javascripts/ckeditor/build-config.js +190 -0
- data/app/assets/javascripts/ckeditor/ckeditor.js +1331 -0
- data/app/assets/javascripts/ckeditor/config.js +10 -0
- data/app/assets/javascripts/ckeditor/jquery.js +10 -0
- data/app/assets/javascripts/ckeditor/lang/af.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ar.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/az.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bg.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bs.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/cs.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/cy.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/da.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/de-ch.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/de.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/el.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-au.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/eo.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/es-mx.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/es.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/et.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/eu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fa.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fo.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/gl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/gu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/he.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/id.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/is.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/it.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ja.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ka.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/km.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ko.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ku.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/lt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/lv.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/mk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/mn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ms.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/nb.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/nl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/no.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/oc.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ro.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ru.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/si.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sq.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sv.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/th.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/tr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/tt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ug.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/uk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/vi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/zh.js +5 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/app/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +25 -0
- data/app/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +24 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +44 -0
- data/app/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +30 -0
- data/app/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +55 -0
- data/app/assets/javascripts/ckeditor/plugins/preview/preview.html +13 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
- data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/templates/templates/default.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +91 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
- data/app/assets/javascripts/ckeditor/styles.js +137 -0
- data/app/assets/javascripts/releaf/include/remote_validator.js +1 -1
- data/app/assets/javascripts/releaf/include/store_settings.js +2 -2
- data/app/assets/javascripts/releaf/include/url_builder.js +130 -130
- data/app/assets/stylesheets/ckeditor/contents.css +208 -0
- data/app/assets/stylesheets/ckeditor/plugins/colordialog/dialogs/colordialog.css +20 -0
- data/app/assets/stylesheets/ckeditor/plugins/copyformatting/styles/copyformatting.css +45 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
- data/app/assets/stylesheets/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
- data/app/assets/stylesheets/ckeditor/plugins/templates/dialogs/templates.css +84 -0
- data/app/assets/stylesheets/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- data/app/assets/stylesheets/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
- data/app/builders/releaf/builders.rb +4 -1
- data/app/builders/releaf/builders/base.rb +1 -1
- data/app/builders/releaf/builders/form_builder/associations.rb +1 -1
- data/app/builders/releaf/builders/page/layout_builder.rb +1 -1
- data/app/builders/releaf/builders/pagination_builder.rb +1 -1
- data/app/builders/releaf/builders/table_builder.rb +7 -0
- data/app/controllers/releaf/action_controller.rb +2 -2
- data/app/controllers/releaf/root_controller.rb +9 -7
- data/app/helpers/releaf/application_helper.rb +2 -2
- data/app/lib/releaf/action_controller/features.rb +1 -6
- data/app/lib/releaf/build_errors_hash.rb +12 -12
- data/app/lib/releaf/responders.rb +0 -1
- data/app/lib/releaf/search.rb +5 -18
- data/app/models/releaf/settings.rb +1 -1
- data/app/views/releaf/action/create_releaf_richtext_attachment.haml +2 -1
- data/app/views/releaf/error_pages/access_denied.html.haml +1 -1
- data/lib/generators/dummy/install_generator.rb +2 -1
- data/lib/generators/dummy/templates/assets/config/manifest.js +3 -0
- data/lib/generators/dummy/templates/controllers/application_controller.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_authors.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_banner_groups.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_banner_pages.rb +2 -2
- data/lib/generators/dummy/templates/migrations/create_banners.rb +2 -2
- data/lib/generators/dummy/templates/migrations/create_book_sequels.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_books.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_bundles.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_chapters.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_home_pages.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_node_extra_fields.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_other_nodes.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_publishers.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_text_pages.rb +1 -1
- data/lib/generators/dummy/templates/models/author.rb +1 -1
- data/lib/generators/dummy/templates/models/banner.rb +1 -1
- data/lib/generators/dummy/templates/models/banner_group.rb +1 -1
- data/lib/generators/dummy/templates/models/book.rb +1 -1
- data/lib/generators/releaf/templates/initializers/releaf.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_permissions.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_richtext_attachments.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_settings.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_users.rb +1 -1
- data/lib/releaf-core.rb +1 -2
- data/lib/releaf/engine.rb +2 -3
- data/lib/releaf/rails_ext/globalize-accessors.rb +64 -0
- data/lib/releaf/rails_ext/validation_error_codes.rb +0 -36
- metadata +418 -221
- data/app/lib/releaf/responders/feature_disabled_responder.rb +0 -9
- data/app/views/releaf/error_pages/feature_disabled.html.haml +0 -1
- data/spec/builders/releaf/builders/association_reflector_spec.rb +0 -138
- data/spec/builders/releaf/builders/base_spec.rb +0 -272
- data/spec/builders/releaf/builders/collection_spec.rb +0 -18
- data/spec/builders/releaf/builders/confirm_destroy_dialog_builder_spec.rb +0 -71
- data/spec/builders/releaf/builders/confirm_dialog_builder_spec.rb +0 -107
- data/spec/builders/releaf/builders/edit_builder_spec.rb +0 -322
- data/spec/builders/releaf/builders/form_builder/associations_spec.rb +0 -129
- data/spec/builders/releaf/builders/form_builder/date_fields_spec.rb +0 -86
- data/spec/builders/releaf/builders/form_builder/i18n_fields_spec.rb +0 -48
- data/spec/builders/releaf/builders/form_builder/label_spec.rb +0 -106
- data/spec/builders/releaf/builders/form_builder/number_fields_spec.rb +0 -37
- data/spec/builders/releaf/builders/form_builder_spec.rb +0 -228
- data/spec/builders/releaf/builders/index_builder_spec.rb +0 -364
- data/spec/builders/releaf/builders/page/header_builder_spec.rb +0 -65
- data/spec/builders/releaf/builders/page/layout_builder_spec.rb +0 -237
- data/spec/builders/releaf/builders/page/menu_builder_spec.rb +0 -345
- data/spec/builders/releaf/builders/pagination_builder_spec.rb +0 -330
- data/spec/builders/releaf/builders/resource_dialog_spec.rb +0 -21
- data/spec/builders/releaf/builders/resource_view_spec.rb +0 -158
- data/spec/builders/releaf/builders/show_builder_spec.rb +0 -7
- data/spec/builders/releaf/builders/table_builder_spec.rb +0 -624
- data/spec/builders/releaf/builders/template_spec.rb +0 -12
- data/spec/builders/releaf/builders/toolbox_builder_spec.rb +0 -67
- data/spec/builders/releaf/builders/toolbox_spec.rb +0 -48
- data/spec/builders/releaf/builders/utilities/date_fields_spec.rb +0 -125
- data/spec/builders/releaf/builders/utilities/resolve_attribute_field_method_name_spec.rb +0 -318
- data/spec/builders/releaf/builders/view_spec.rb +0 -281
- data/spec/builders/releaf/builders_spec.rb +0 -134
- data/spec/builders/releaf/settings/form_builder_spec.rb +0 -48
- data/spec/builders/releaf/settings/table_builder_spec.rb +0 -23
- data/spec/controllers/concerns/releaf/richtext_attachments_spec.rb +0 -51
- data/spec/controllers/releaf/action_controller_spec.rb +0 -423
- data/spec/controllers/releaf/root_controller_spec.rb +0 -45
- data/spec/controllers/releaf/settings_controller_spec.rb +0 -52
- data/spec/error_hash_builder_spec.rb +0 -83
- data/spec/ext/array_reorder_spec.rb +0 -12
- data/spec/features/ajaxbox_spec.rb +0 -111
- data/spec/features/authorization_spec.rb +0 -50
- data/spec/features/breadcrumbs_spec.rb +0 -16
- data/spec/features/dragonfly_integration_spec.rb +0 -24
- data/spec/features/edit_actions_spec.rb +0 -186
- data/spec/features/errors_spec.rb +0 -47
- data/spec/features/index_actions_spec.rb +0 -85
- data/spec/features/index_table_spec.rb +0 -35
- data/spec/features/menu_spec.rb +0 -71
- data/spec/features/richtext_attachments_spec.rb +0 -64
- data/spec/features/richtext_custom_config_spec.rb +0 -28
- data/spec/features/richtext_embed_spec.rb +0 -29
- data/spec/features/richtext_spec.rb +0 -31
- data/spec/features/search_spec.rb +0 -825
- data/spec/features/settings_spec.rb +0 -70
- data/spec/features/title_spec.rb +0 -13
- data/spec/fixtures/common_fields.yml +0 -17
- data/spec/fixtures/cs.png +0 -0
- data/spec/fixtures/time.formats.xlsx +0 -0
- data/spec/fixtures/unicorn.jpg +0 -0
- data/spec/helpers/application_helper_spec.rb +0 -73
- data/spec/helpers/button_helper_spec.rb +0 -146
- data/spec/lib/releaf/action_controller/features_spec.rb +0 -171
- data/spec/lib/releaf/action_controller/search_spec.rb +0 -84
- data/spec/lib/releaf/application_spec.rb +0 -43
- data/spec/lib/releaf/assets_resolver_spec.rb +0 -130
- data/spec/lib/releaf/build_errors_hash_spec.rb +0 -141
- data/spec/lib/releaf/configuration_spec.rb +0 -205
- data/spec/lib/releaf/controller_definition_spec.rb +0 -78
- data/spec/lib/releaf/controller_group_definition_spec.rb +0 -33
- data/spec/lib/releaf/default_searchable_fields_spec.rb +0 -161
- data/spec/lib/releaf/instance_cache_spec.rb +0 -98
- data/spec/lib/releaf/resource_base_spec.rb +0 -212
- data/spec/lib/releaf/resource_fields_spec.rb +0 -12
- data/spec/lib/releaf/resource_params_spec.rb +0 -115
- data/spec/lib/releaf/resource_table_fields_spec.rb +0 -20
- data/spec/lib/releaf/resource_utilities_spec.rb +0 -87
- data/spec/lib/releaf/responders/access_denied_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders/after_save_responder_spec.rb +0 -88
- data/spec/lib/releaf/responders/confirm_destroy_responder_spec.rb +0 -26
- data/spec/lib/releaf/responders/destroy_responder_spec.rb +0 -30
- data/spec/lib/releaf/responders/error_responder_spec.rb +0 -26
- data/spec/lib/releaf/responders/feature_disabled_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders/page_not_found_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders_spec.rb +0 -60
- data/spec/lib/releaf/root/configuration_spec.rb +0 -9
- data/spec/lib/releaf/root/default_controller_resolver_spec.rb +0 -44
- data/spec/lib/releaf/root_spec.rb +0 -13
- data/spec/lib/releaf/service_spec.rb +0 -20
- data/spec/lib/releaf/settings/normalize_value_spec.rb +0 -103
- data/spec/lib/releaf/settings/register_spec.rb +0 -135
- data/spec/lib/releaf/settings_manager_spec.rb +0 -22
- data/spec/lib/validation_error_codes_spec.rb +0 -56
- data/spec/misc/factories_spec.rb +0 -31
- data/spec/models/settings_spec.rb +0 -100
- data/spec/routing/route_mapper_spec.rb +0 -185
- data/spec/rspec_helpers/test_helpers_spec.rb +0 -20
- data/spec/rspec_helpers/test_spec.rb +0 -14
- data/spec/services/array/reorder_spec.rb +0 -121
@@ -1,23 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Settings::TableBuilder, type: :class do
|
4
|
-
class TableBuilderTestHelper < ActionView::Base; end
|
5
|
-
let(:template){ TableBuilderTestHelper.new }
|
6
|
-
let(:resource_class){ Releaf::Settings }
|
7
|
-
let(:subject){ described_class.new([], resource_class, template, {}) }
|
8
|
-
|
9
|
-
describe "#column_names" do
|
10
|
-
it "returns var, value and updated_at as column names array" do
|
11
|
-
expect(subject.column_names).to eq([:var, :value, :updated_at])
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
describe "#value_content" do
|
16
|
-
it "return value processed with corresponding type content format method" do
|
17
|
-
resource = Releaf::Settings.new(value: :x)
|
18
|
-
allow(resource).to receive(:input_type).and_return(:date)
|
19
|
-
allow(subject).to receive(:format_date_content).with(resource, :value).and_return(:y)
|
20
|
-
expect(subject.value_content(resource)).to eq(:y)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe Admin::NodesController, type: :controller do
|
4
|
-
before do
|
5
|
-
sign_in create(:user)
|
6
|
-
end
|
7
|
-
|
8
|
-
describe "#create_releaf_richtext_attachment" do
|
9
|
-
let(:file) { Rack::Test::UploadedFile.new(File.expand_path('../../../fixtures/cs.png', __dir__), "image/png") }
|
10
|
-
|
11
|
-
context "when file is uploaded" do
|
12
|
-
it "renders 'create_releaf_richtext_attachment'" do
|
13
|
-
post :create_releaf_richtext_attachment, upload: file
|
14
|
-
expect( response ).to be_successful
|
15
|
-
expect( response ).to render_template('create_releaf_richtext_attachment')
|
16
|
-
end
|
17
|
-
|
18
|
-
it "creates attachment" do
|
19
|
-
expect do
|
20
|
-
post :create_releaf_richtext_attachment, upload: file
|
21
|
-
end.to change { Releaf::RichtextAttachment.count }.by(1)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
context "when no file is uploaded" do
|
26
|
-
it "responds with success" do
|
27
|
-
post :create_releaf_richtext_attachment
|
28
|
-
expect( response ).to be_successful
|
29
|
-
end
|
30
|
-
|
31
|
-
it "doesn't create attachment" do
|
32
|
-
expect do
|
33
|
-
post :create_releaf_richtext_attachment
|
34
|
-
end.to_not change { Releaf::RichtextAttachment.count }
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
describe "#releaf_richtext_attachment_upload_url" do
|
40
|
-
it "returns upload url" do
|
41
|
-
allow(subject).to receive(:url_for).with(action: :create_releaf_richtext_attachment).and_return("a")
|
42
|
-
expect(subject.releaf_richtext_attachment_upload_url).to eq("a")
|
43
|
-
end
|
44
|
-
|
45
|
-
context "when no route exists for controller" do
|
46
|
-
it "returns nil" do
|
47
|
-
expect(subject.releaf_richtext_attachment_upload_url).to be nil
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,423 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe Releaf::ActionController do
|
4
|
-
let(:new_resource){ Author.new }
|
5
|
-
let(:resource){ create(:author) }
|
6
|
-
let(:subject){ DummyController.new }
|
7
|
-
|
8
|
-
module DummyControllerModule; end;
|
9
|
-
|
10
|
-
class DummyController < Releaf::ActionController
|
11
|
-
include DummyControllerModule
|
12
|
-
def resource_class
|
13
|
-
Author
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
class Dummy::ChildDummyController < DummyController; end;
|
18
|
-
class Dummy::GrandChildDummyController < Dummy::ChildDummyController; end;
|
19
|
-
|
20
|
-
class FooFormBuilder; end
|
21
|
-
|
22
|
-
describe "#action_views" do
|
23
|
-
it "returns action > view translation hash" do
|
24
|
-
hash = {
|
25
|
-
new: :edit,
|
26
|
-
update: :edit,
|
27
|
-
create: :edit,
|
28
|
-
}
|
29
|
-
expect(subject.action_views).to eq(hash)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe "#action_view" do
|
34
|
-
context "when given view does not exists within action views hash" do
|
35
|
-
it "returns given action" do
|
36
|
-
expect(subject.action_view("a")).to eq("a")
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
context "when given view does not exists within action views hash" do
|
41
|
-
it "returns given action" do
|
42
|
-
expect(subject.action_view(:update)).to eq(:edit)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
it "lookup given action as symbol to within action views hash" do
|
47
|
-
expect(subject.action_view("new")).to eq(:edit)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
describe "#active_view" do
|
52
|
-
it "returns generic view name for current action" do
|
53
|
-
allow(subject).to receive(:action_name).and_return("a")
|
54
|
-
allow(subject).to receive(:action_view).with("a").and_return("b")
|
55
|
-
expect(subject.active_view).to eq("b")
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
describe "#page_title" do
|
60
|
-
before do
|
61
|
-
allow(Rails.application.class).to receive(:parent_name).and_return("DummyApp")
|
62
|
-
end
|
63
|
-
|
64
|
-
context "when controller definition exists" do
|
65
|
-
it "returns localized controller name from definitioned followed by application name" do
|
66
|
-
definition = Releaf::ControllerDefinition.new("xx")
|
67
|
-
allow(definition).to receive(:localized_name).and_return("Books")
|
68
|
-
allow(subject).to receive(:definition).and_return(definition)
|
69
|
-
expect(subject.page_title).to eq("Books - DummyApp")
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
context "when controller definition does not exist" do
|
74
|
-
it "returns only application name" do
|
75
|
-
allow(subject).to receive(:definition).and_return(nil)
|
76
|
-
expect(subject.page_title).to eq("DummyApp")
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
describe "#builder_class" do
|
82
|
-
it "returns controller class scoped builder for given builder type" do
|
83
|
-
allow(subject).to receive(:builder_scopes).and_return(["a", "b"])
|
84
|
-
allow(Releaf::Builders).to receive(:builder_class).with(["a", "b"], :form).and_return("x")
|
85
|
-
expect(subject.builder_class(:form)).to eq("x")
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
describe "#short_name" do
|
90
|
-
it "returns undercored class name with Controller suffix removed" do
|
91
|
-
allow(subject).to receive(:class).and_return(Admin::BooksController)
|
92
|
-
expect(subject.short_name).to eq("admin/books")
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
describe "#definition" do
|
97
|
-
it "returns controller definition for controller short name" do
|
98
|
-
allow(Releaf::ControllerDefinition).to receive(:for).with("xxx").and_return("yyy")
|
99
|
-
allow(subject).to receive(:short_name).and_return("xxx")
|
100
|
-
expect(subject.definition).to eq("yyy")
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
describe "#builder_scopes" do
|
105
|
-
context "when controller is a direct child of Releaf::ActionController" do
|
106
|
-
it "returns an array with own and application builder scopes" do
|
107
|
-
allow(subject).to receive(:application_scope).and_return("xxx")
|
108
|
-
expect(subject.builder_scopes).to eq(["Dummy", "xxx"])
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
it "excludes nil values from returned array" do
|
113
|
-
allow(subject).to receive(:application_scope).and_return(nil)
|
114
|
-
expect(subject.builder_scopes).to eq(["Dummy"])
|
115
|
-
end
|
116
|
-
|
117
|
-
context "when controller is a deeper descendant of Releaf::ActionController" do
|
118
|
-
let(:subject) { Dummy::GrandChildDummyController.new }
|
119
|
-
it "includes ancestor scopes up to but not including Releaf::ActionController" do
|
120
|
-
allow(subject).to receive(:application_scope).and_return("xxx")
|
121
|
-
expect(subject.class).to receive(:ancestor_controllers).and_call_original
|
122
|
-
expect(subject.builder_scopes).to eq(["Dummy::GrandChildDummy", "Dummy::ChildDummy", "Dummy", "xxx"])
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
describe ".own_builder_scope" do
|
128
|
-
it "returns controller class name without 'Controller'" do
|
129
|
-
expect(DummyController.own_builder_scope).to eq "Dummy"
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
describe ".ancestor_controllers" do
|
134
|
-
it "return all ancestor controllers up to but not including Releaf::ActionController" do
|
135
|
-
expect(DummyController.ancestor_controllers).to eq []
|
136
|
-
expect(Dummy::GrandChildDummyController.ancestor_controllers).to eq([Dummy::ChildDummyController, DummyController])
|
137
|
-
end
|
138
|
-
end
|
139
|
-
|
140
|
-
describe ".ancestor_builder_scopes" do
|
141
|
-
it "return builder scopes for all ancestor controllers" do
|
142
|
-
allow(Dummy::ChildDummyController).to receive(:own_builder_scope).and_call_original
|
143
|
-
allow(DummyController).to receive(:own_builder_scope).and_call_original
|
144
|
-
|
145
|
-
expect(Dummy::GrandChildDummyController.ancestor_builder_scopes).to eq(['Dummy::ChildDummy', 'Dummy'])
|
146
|
-
end
|
147
|
-
end
|
148
|
-
|
149
|
-
describe "#application_scope" do
|
150
|
-
it "returns node builder scope within releaf mount location scope" do
|
151
|
-
allow(Releaf::Builders).to receive(:constant_defined_at_scope?).and_call_original
|
152
|
-
allow(Releaf.application.config).to receive(:mount_location).and_return("admin")
|
153
|
-
|
154
|
-
allow(Releaf::Builders).to receive(:constant_defined_at_scope?)
|
155
|
-
.with("Admin", Object).and_return(true)
|
156
|
-
expect(subject.application_scope).to eq("Admin")
|
157
|
-
|
158
|
-
allow(Releaf::Builders).to receive(:constant_defined_at_scope?)
|
159
|
-
.with("Admin", Object).and_return(false)
|
160
|
-
expect(subject.application_scope).to eq(nil)
|
161
|
-
|
162
|
-
allow(Releaf.application.config).to receive(:mount_location).and_return("")
|
163
|
-
expect(subject.application_scope).to eq(nil)
|
164
|
-
end
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
|
-
# use Admin::BooksController / Admin::AuthorsController as it inherit Releaf::ActionController and
|
169
|
-
# have no extra methods or overrides
|
170
|
-
describe Admin::AuthorsController do
|
171
|
-
before do
|
172
|
-
sign_in FactoryGirl.create(:user)
|
173
|
-
end
|
174
|
-
|
175
|
-
describe "#index_path" do
|
176
|
-
context "when action is other than :index" do
|
177
|
-
context "when params have valid `index_path` value" do
|
178
|
-
it "returns params 'index_path'" do
|
179
|
-
get :new, index_path: "xxxxxxxx"
|
180
|
-
allow(subject).to receive(:valid_index_path?).with("xxxxxxxx").and_return(true)
|
181
|
-
expect(subject.index_path).to eq("xxxxxxxx")
|
182
|
-
end
|
183
|
-
end
|
184
|
-
|
185
|
-
context "when params have invalid `index_path` value" do
|
186
|
-
it "returns index action path" do
|
187
|
-
get :new, index_path: "xxxxxxxx"
|
188
|
-
allow(subject).to receive(:valid_index_path?).with("xxxxxxxx").and_return(false)
|
189
|
-
expect(subject.index_path).to eq("/admin/authors")
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
193
|
-
|
194
|
-
context "when action is :index" do
|
195
|
-
it "returns #current_path value" do
|
196
|
-
get :index
|
197
|
-
allow(subject).to receive(:current_path).and_return("random_string")
|
198
|
-
expect(subject.index_path).to eq("random_string")
|
199
|
-
end
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
|
-
describe "#valid_index_path?" do
|
204
|
-
context "when given value is string that starts with `/`" do
|
205
|
-
it "returns true" do
|
206
|
-
expect(subject.valid_index_path?("/admin/something?a=1&b=2")).to be true
|
207
|
-
end
|
208
|
-
end
|
209
|
-
|
210
|
-
context "when given value is string that starts with other char than `/`" do
|
211
|
-
it "returns false" do
|
212
|
-
expect(subject.valid_index_path?("http:///admin/something?a=1&b=2")).to be false
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
|
-
context "when given value is not string" do
|
217
|
-
it "returns false" do
|
218
|
-
expect(subject.valid_index_path?(123)).to be false
|
219
|
-
end
|
220
|
-
end
|
221
|
-
|
222
|
-
context "when given value is blank" do
|
223
|
-
it "returns false" do
|
224
|
-
expect(subject.valid_index_path?(nil)).to be false
|
225
|
-
end
|
226
|
-
end
|
227
|
-
end
|
228
|
-
|
229
|
-
describe "#current_path" do
|
230
|
-
it "returns current url without `ajax` param" do
|
231
|
-
get :index, ajax: 1, search: "something", page: 1
|
232
|
-
expect(subject.current_path).to eq("/admin/authors?page=1&search=something")
|
233
|
-
end
|
234
|
-
|
235
|
-
context "when no query parameters exists" do
|
236
|
-
it "returns only request path" do
|
237
|
-
get :index
|
238
|
-
expect(subject.current_path).to eq("/admin/authors")
|
239
|
-
end
|
240
|
-
end
|
241
|
-
|
242
|
-
it "caches current url value" do
|
243
|
-
get :index
|
244
|
-
expect(subject).to receive(:request).twice.and_call_original
|
245
|
-
subject.current_path
|
246
|
-
subject.current_path
|
247
|
-
subject.current_path
|
248
|
-
subject.current_path
|
249
|
-
end
|
250
|
-
end
|
251
|
-
|
252
|
-
describe "#ajax?" do
|
253
|
-
it "returns @_ajax instance variable value" do
|
254
|
-
subject.instance_variable_set("@_ajax", "ll")
|
255
|
-
expect(subject.ajax?).to eq("ll")
|
256
|
-
end
|
257
|
-
|
258
|
-
context "when @_ajax instance variable has not been set" do
|
259
|
-
it "returns false" do
|
260
|
-
expect(subject.ajax?).to be false
|
261
|
-
end
|
262
|
-
end
|
263
|
-
end
|
264
|
-
|
265
|
-
describe "#manage_ajax" do
|
266
|
-
context "when `ajax` params does not exists within params" do
|
267
|
-
it "assigns `false` to @_ajax instance variable" do
|
268
|
-
expect{ get :index }.to change{ subject.instance_variable_get("@_ajax") }.from(nil).to(false)
|
269
|
-
end
|
270
|
-
end
|
271
|
-
|
272
|
-
context "when `ajax` params exists within params" do
|
273
|
-
it "assigns `true` to @_ajax instance variable" do
|
274
|
-
expect{ get :index, ajax: 1 }.to change{ subject.instance_variable_get("@_ajax") }.from(nil).to(true)
|
275
|
-
end
|
276
|
-
|
277
|
-
it "removes ajax from `params`" do
|
278
|
-
expect{ get :index, ajax: 1 }.to_not change{ subject.params[:ajax] }.from(nil)
|
279
|
-
end
|
280
|
-
|
281
|
-
it "removes ajax from `request.query_parameters`" do
|
282
|
-
expect{ get :index, ajax: 1 }.to_not change{ subject.request.query_parameters[:ajax] }.from(nil)
|
283
|
-
end
|
284
|
-
end
|
285
|
-
end
|
286
|
-
|
287
|
-
describe "GET show" do
|
288
|
-
let(:author){ create(:author) }
|
289
|
-
|
290
|
-
context "when show feature is available" do
|
291
|
-
it "assigns all resources to @collection" do
|
292
|
-
allow(subject).to receive(:feature_available?).with(:show).and_return(true)
|
293
|
-
get :show, id: author
|
294
|
-
expect(assigns(:resource)).to eq(author)
|
295
|
-
end
|
296
|
-
end
|
297
|
-
|
298
|
-
context "when show feature is not available" do
|
299
|
-
it "does assign resource" do
|
300
|
-
allow(subject).to receive(:feature_available?).and_call_original
|
301
|
-
allow(subject).to receive(:feature_available?).with(:show).and_return(false)
|
302
|
-
get :show, id: author
|
303
|
-
expect(assigns(:resource)).to be nil
|
304
|
-
end
|
305
|
-
end
|
306
|
-
end
|
307
|
-
|
308
|
-
describe "GET index" do
|
309
|
-
before do
|
310
|
-
21.times do |i|
|
311
|
-
FactoryGirl.create(:author)
|
312
|
-
end
|
313
|
-
end
|
314
|
-
|
315
|
-
context "when resources_per_page is nil" do
|
316
|
-
it "assigns all resources to @collection" do
|
317
|
-
get :index, show_all: 1
|
318
|
-
expect(assigns(:collection).is_a?(ActiveRecord::Relation)).to be true
|
319
|
-
expect(assigns(:collection).size).to eq(21)
|
320
|
-
end
|
321
|
-
end
|
322
|
-
|
323
|
-
context "when resources_per_page is not nil" do
|
324
|
-
it "assigns maximum 20 resources to @collection" do
|
325
|
-
get :index
|
326
|
-
expect(assigns(:collection).is_a?(ActiveRecord::Relation)).to be true
|
327
|
-
expect(assigns(:collection).size).to eq(20)
|
328
|
-
end
|
329
|
-
end
|
330
|
-
end
|
331
|
-
|
332
|
-
describe "DELETE #destroy" do
|
333
|
-
before do
|
334
|
-
@author = FactoryGirl.create(:author)
|
335
|
-
FactoryGirl.create(:book, title: "The book", author: @author)
|
336
|
-
FactoryGirl.create(:book, title: "Almost the book", author: @author)
|
337
|
-
end
|
338
|
-
|
339
|
-
it "creates flash error with message" do
|
340
|
-
delete :destroy, id: @author
|
341
|
-
expect(flash["error"]).to eq({"id" => "resource_status", "message" => "Cant destroy, because relations exists"})
|
342
|
-
end
|
343
|
-
end
|
344
|
-
end
|
345
|
-
|
346
|
-
describe Admin::BooksController do
|
347
|
-
before do
|
348
|
-
sign_in FactoryGirl.create(:user)
|
349
|
-
@breadcrumbs_base = [
|
350
|
-
{name: I18n.t('admin/books'), url: admin_books_path}
|
351
|
-
]
|
352
|
-
end
|
353
|
-
|
354
|
-
describe "GET #index" do
|
355
|
-
before do
|
356
|
-
FactoryGirl.create(:book, title: "great one")
|
357
|
-
FactoryGirl.create(:book, title: "bad one")
|
358
|
-
FactoryGirl.create(:book, title: "average third")
|
359
|
-
end
|
360
|
-
|
361
|
-
context "when empty search string given" do
|
362
|
-
it "shows all records" do
|
363
|
-
get :index, search: ""
|
364
|
-
expect(assigns(:collection).count).to eq(3)
|
365
|
-
end
|
366
|
-
end
|
367
|
-
|
368
|
-
context "when search string with multiple words given" do
|
369
|
-
it "searches by given string" do
|
370
|
-
get :index, search: "one grea"
|
371
|
-
expect(assigns(:collection).count).to eq(1)
|
372
|
-
end
|
373
|
-
end
|
374
|
-
|
375
|
-
context "when search string given" do
|
376
|
-
it "searches by given string" do
|
377
|
-
get :index, search: "great"
|
378
|
-
expect(assigns(:collection).count).to eq(1)
|
379
|
-
end
|
380
|
-
end
|
381
|
-
|
382
|
-
context "when no search given" do
|
383
|
-
it "shows all records" do
|
384
|
-
get :index
|
385
|
-
expect(assigns(:collection).count).to eq(3)
|
386
|
-
end
|
387
|
-
end
|
388
|
-
end
|
389
|
-
|
390
|
-
describe "GET #new" do
|
391
|
-
it "assigns the requested record to @resource" do
|
392
|
-
get :new
|
393
|
-
expect(assigns(:resource).new_record?).to be true
|
394
|
-
end
|
395
|
-
|
396
|
-
it "assigns special breadcrumb part for new record" do
|
397
|
-
get :new
|
398
|
-
breadcrumbs = @breadcrumbs_base + [{name: "New record", url: new_admin_book_path}]
|
399
|
-
|
400
|
-
expect(assigns(:breadcrumbs)).to eq(breadcrumbs)
|
401
|
-
end
|
402
|
-
end
|
403
|
-
|
404
|
-
describe "GET #edit" do
|
405
|
-
before do
|
406
|
-
@resource = create(:book)
|
407
|
-
end
|
408
|
-
|
409
|
-
it "assigns the requested record to @resource" do
|
410
|
-
get :edit, id: @resource
|
411
|
-
|
412
|
-
expect(assigns(:resource)).to eq(@resource)
|
413
|
-
end
|
414
|
-
|
415
|
-
it "assigns breadcrumb for resource" do
|
416
|
-
allow(Releaf::ResourceBase).to receive(:title).with(@resource).and_return("xxx")
|
417
|
-
get :edit, id: @resource
|
418
|
-
breadcrumbs = @breadcrumbs_base + [{name: "xxx", url: edit_admin_book_path(@resource.id)}]
|
419
|
-
|
420
|
-
expect(assigns(:breadcrumbs)).to eq(breadcrumbs)
|
421
|
-
end
|
422
|
-
end
|
423
|
-
end
|