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,12 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::ResourceFields do
|
4
|
-
subject{ described_class.new(Book) }
|
5
|
-
|
6
|
-
describe "#excluded_attributes" do
|
7
|
-
it "returns array with excluded attributes" do
|
8
|
-
expect(subject.excluded_attributes)
|
9
|
-
.to eq(%w(id created_at updated_at password password_confirmation encrypted_password))
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,115 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::ResourceParams do
|
4
|
-
subject{ described_class.new(Book) }
|
5
|
-
|
6
|
-
describe "#file_attributes" do
|
7
|
-
it "returns list with file attributes" do
|
8
|
-
expect(subject.file_attributes).to eq(["cover_image_uid"])
|
9
|
-
|
10
|
-
subject.resource_class = Node
|
11
|
-
expect(subject.file_attributes).to eq([])
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
describe "#file_attribute?" do
|
16
|
-
context "when given attribute exists within file attributes" do
|
17
|
-
it "returns true" do
|
18
|
-
allow(subject).to receive(:file_attributes).and_return(["color"])
|
19
|
-
expect(subject.file_attribute?("color")).to be true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
context "when given attribute does not exist within file attributes" do
|
24
|
-
it "returns false" do
|
25
|
-
allow(subject).to receive(:file_attributes).and_return(["size"])
|
26
|
-
expect(subject.file_attribute?("color")).to be false
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe "#file_attribute_params" do
|
32
|
-
it "returns array with dragonfly specific attributes" do
|
33
|
-
expect(subject.file_attribute_params("cover_image_uid"))
|
34
|
-
.to eq(["cover_image", "retained_cover_image", "remove_cover_image"])
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
describe "#localized_attributes" do
|
39
|
-
it "returns array of all localized attributes params" do
|
40
|
-
allow(subject.resource_class).to receive(:translated_attribute_names).and_return(["title", "summary"])
|
41
|
-
allow(subject).to receive(:localized_attribute_params).with("title").and_return(["t1", "t2"])
|
42
|
-
allow(subject).to receive(:localized_attribute_params).with("summary").and_return(["s1", "s2"])
|
43
|
-
expect(subject.localized_attributes).to eq(["t1", "t2", "s1", "s2"])
|
44
|
-
|
45
|
-
allow(subject.resource_class).to receive(:translated_attribute_names).and_return([])
|
46
|
-
subject.instance_variable_set("@localized_attributes", nil) # reset cached values
|
47
|
-
expect(subject.localized_attributes).to eq([])
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
describe "#localized_attribute_params" do
|
52
|
-
it "returns array with localized attribute within all specified locales" do
|
53
|
-
expect(subject.localized_attribute_params(:description)).to eq(["description_en", "description_lv"])
|
54
|
-
|
55
|
-
allow(subject.resource_class).to receive(:globalize_locales).and_return(["de"])
|
56
|
-
expect(subject.localized_attribute_params(:description)).to eq(["description_de"])
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
describe "#base_attributes" do
|
61
|
-
it "returns array with base and file attributes" do
|
62
|
-
allow(subject.resource_class).to receive(:column_names).and_return(["a", "b", "c"])
|
63
|
-
allow(subject).to receive(:file_attribute?).and_return(false)
|
64
|
-
expect(subject.base_attributes).to eq(["a", "b", "c"])
|
65
|
-
|
66
|
-
allow(subject).to receive(:file_attribute?).with("b").and_return(true)
|
67
|
-
allow(subject).to receive(:file_attribute_params).with("b").and_return(["b1", "b2"])
|
68
|
-
expect(subject.base_attributes).to eq(["a", "b1", "b2", "c"])
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
describe "#values" do
|
73
|
-
before do
|
74
|
-
allow(subject).to receive(:associations_attributes).and_return(["x", "y"])
|
75
|
-
end
|
76
|
-
|
77
|
-
it "returns resource params array alongside associations params" do
|
78
|
-
allow(subject).to receive(:base_attributes).and_return(["a", "b"])
|
79
|
-
allow(subject).to receive(:localized_attributes?).and_return(false)
|
80
|
-
expect(subject.values).to eq(["a", "b", "x", "y"])
|
81
|
-
end
|
82
|
-
|
83
|
-
context "when resource has localized attributes" do
|
84
|
-
it "returns resource params array alongside localized attributes" do
|
85
|
-
allow(subject).to receive(:base_attributes).and_return(["a", "b"])
|
86
|
-
allow(subject).to receive(:localized_attributes?).and_return(true)
|
87
|
-
allow(subject).to receive(:localized_attributes).and_return(["c", "d"])
|
88
|
-
expect(subject.values).to eq(["a", "b", "c", "d", "x", "y"])
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
describe "#associations_attributes" do
|
94
|
-
it "returns array with associations params within hashes" do
|
95
|
-
association_1 = subject.resource_class.reflections["chapters"]
|
96
|
-
association_2 = subject.resource_class.reflections["sequels"]
|
97
|
-
|
98
|
-
allow(subject).to receive(:associations).and_return([association_1, association_2])
|
99
|
-
allow(subject).to receive(:association_attributes).with(association_1).and_return(["a", "b"])
|
100
|
-
allow(subject).to receive(:association_attributes).with(association_2).and_return(["c", "d"])
|
101
|
-
|
102
|
-
expect(subject.associations_attributes).to eq([{"chapters_attributes"=>["a", "b"]}, {"sequels_attributes"=>["c", "d"]}])
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
describe "#association_attributes" do
|
107
|
-
it "returns association params with `id` and `_destroy` params and without `foreign_key` param" do
|
108
|
-
association = subject.resource_class.reflections["chapters"]
|
109
|
-
allow(association).to receive(:foreign_key).and_return("b")
|
110
|
-
allow(described_class).to receive(:new).with(association.klass).and_call_original
|
111
|
-
allow_any_instance_of(described_class).to receive(:values).and_return(["a", "b", "c"])
|
112
|
-
expect(subject.association_attributes(association)).to eq(["a", "c", "id", "_destroy"])
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::ResourceTableFields do
|
4
|
-
subject{ described_class.new(Book) }
|
5
|
-
|
6
|
-
describe "#excluded_attributes" do
|
7
|
-
it "returns attributes to exclude from table alongside parent method list" do
|
8
|
-
allow(subject).to receive(:table_excluded_attributes).and_return(%w(xxx yyy))
|
9
|
-
expect(subject.excluded_attributes).to include("id", "created_at", "xxx", "yyy")
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "#table_excluded_attributes" do
|
14
|
-
it "returns array with all base and localized attributes matching *_html and *_uid pattern" do
|
15
|
-
allow(subject).to receive(:localized_attributes).and_return(["color", "body_html", "some_uid"])
|
16
|
-
allow(subject).to receive(:base_attributes).and_return(["image_uid", "title", "price", "description_html"])
|
17
|
-
expect(subject.table_excluded_attributes).to eq(%w(image_uid description_html body_html some_uid))
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,87 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::ResourceUtilities do
|
4
|
-
let(:resource){ Releaf::Permissions::Role.new }
|
5
|
-
let(:users_association){ resource.class.reflect_on_association(:users) }
|
6
|
-
let(:permissions_association){ resource.class.reflect_on_association(:permissions) }
|
7
|
-
|
8
|
-
describe ".restricted_associations" do
|
9
|
-
it "returns hash with restricted association objects and controller" do
|
10
|
-
allow(described_class).to receive(:restricted_associations).with(resource).and_return([permissions_association, users_association])
|
11
|
-
allow(described_class).to receive(:association_controller).with(users_association).and_return("aa")
|
12
|
-
allow(described_class).to receive(:association_controller).with(permissions_association).and_return("bb")
|
13
|
-
resource.users.build
|
14
|
-
resource.permissions.build
|
15
|
-
|
16
|
-
expect(described_class.restricted_relations(resource)).to eq(
|
17
|
-
users: {objects: resource.users, controller: "aa"},
|
18
|
-
permissions: {objects: resource.permissions, controller: "bb"},
|
19
|
-
)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
describe ".association_controller" do
|
24
|
-
it "returns guessed controller from given association name" do
|
25
|
-
expect(described_class.association_controller(users_association)).to eq("users")
|
26
|
-
end
|
27
|
-
|
28
|
-
context "when no controller guessed" do
|
29
|
-
it "returns nil" do
|
30
|
-
expect(described_class.association_controller(permissions_association)).to be nil
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
describe ".restricted_associations" do
|
36
|
-
it "returns array with restricted associations" do
|
37
|
-
allow(described_class).to receive(:restricted_association?).with(resource, users_association).and_return(false)
|
38
|
-
allow(described_class).to receive(:restricted_association?).with(resource, permissions_association).and_return(true)
|
39
|
-
expect(described_class.restricted_associations(resource)).to eq([permissions_association])
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
describe ".restricted_association?" do
|
44
|
-
context "when associations with dependent option `restrict_with_exception` given" do
|
45
|
-
let(:association){ resource.class.reflect_on_association(:users) }
|
46
|
-
|
47
|
-
context "when association object(-s) exists" do
|
48
|
-
it "returns true" do
|
49
|
-
resource.users.build
|
50
|
-
users = resource.users
|
51
|
-
allow(resource).to receive(:users).and_return(users)
|
52
|
-
allow(users).to receive(:exists?).and_return(true)
|
53
|
-
expect(described_class.restricted_association?(resource, association)).to be true
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
context "when association object(-s) does not exist" do
|
58
|
-
it "returns false" do
|
59
|
-
expect(described_class.restricted_association?(resource, association)).to be false
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
context "when associations with dependent option other than `restrict_with_exception` given" do
|
65
|
-
it "returns false" do
|
66
|
-
association = resource.class.reflect_on_association(:permissions)
|
67
|
-
expect(described_class.restricted_association?(resource, association)).to be false
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
describe ".destroyable?" do
|
73
|
-
context "when no restricted association" do
|
74
|
-
it "returns true" do
|
75
|
-
allow(described_class).to receive(:restricted_associations).with(resource).and_return([])
|
76
|
-
expect(described_class.destroyable?(resource)).to be true
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
context "when restricted association exist" do
|
81
|
-
it "returns false" do
|
82
|
-
allow(described_class).to receive(:restricted_associations).with(resource).and_return([:a])
|
83
|
-
expect(described_class.destroyable?(resource)).to be false
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Responders::AccessDeniedResponder, type: :controller do
|
4
|
-
controller{}
|
5
|
-
subject{ described_class.new(controller, []) }
|
6
|
-
|
7
|
-
describe "#status_code" do
|
8
|
-
it "returns 404" do
|
9
|
-
expect(subject.status_code).to eq(403)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,88 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Responders::AfterSaveResponder, type: :controller do
|
4
|
-
let(:controller){ Releaf::ActionController.new }
|
5
|
-
let(:resource){ Book.new}
|
6
|
-
subject{ described_class.new(controller, [resource]) }
|
7
|
-
|
8
|
-
describe "#json_resource_errors" do
|
9
|
-
it "returns resource errors hash built with `Releaf::BuildErrorsHash`" do
|
10
|
-
allow(Releaf::BuildErrorsHash).to receive(:call).with(resource: resource, field_name_prefix: :resource)
|
11
|
-
.and_return(a: "b")
|
12
|
-
expect(subject.json_resource_errors).to eq(errors: {a: "b"})
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "#render_notification?" do
|
17
|
-
before do
|
18
|
-
allow(subject).to receive(:has_errors?).and_return(true)
|
19
|
-
allow(subject).to receive(:format).and_return(:json)
|
20
|
-
end
|
21
|
-
|
22
|
-
context "when request format is other json" do
|
23
|
-
it "returns true" do
|
24
|
-
allow(subject).to receive(:format).and_return(:html)
|
25
|
-
expect(subject.render_notification?).to be true
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
context "when object has no errors" do
|
30
|
-
it "returns true" do
|
31
|
-
allow(subject).to receive(:has_errors?).and_return(false)
|
32
|
-
expect(subject.render_notification?).to be true
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
context "when request format is json and object has errors" do
|
37
|
-
it "returns false" do
|
38
|
-
expect(subject.render_notification?).to be false
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
describe "#respond" do
|
44
|
-
before do
|
45
|
-
allow(subject).to receive(:to_html)
|
46
|
-
end
|
47
|
-
|
48
|
-
context "when render notifications return `true`" do
|
49
|
-
it "renders notification with success value true/false whether resource has errors" do
|
50
|
-
allow(subject).to receive(:render_notification?).and_return(true)
|
51
|
-
allow(subject).to receive(:has_errors?).and_return(true)
|
52
|
-
expect(subject.controller).to receive(:render_notification).with(false)
|
53
|
-
subject.respond
|
54
|
-
|
55
|
-
allow(subject).to receive(:has_errors?).and_return(false)
|
56
|
-
expect(subject.controller).to receive(:render_notification).with(true)
|
57
|
-
subject.respond
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
context "when render notifications return `false`" do
|
62
|
-
it "does not render notification" do
|
63
|
-
allow(subject).to receive(:render_notification?).and_return(false)
|
64
|
-
expect(subject.controller).to_not receive(:render_notification)
|
65
|
-
subject.respond
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
describe "#to_json" do
|
71
|
-
context "when resource has errors" do
|
72
|
-
it "calls `display_errors`" do
|
73
|
-
allow(subject).to receive(:has_errors?).and_return(true)
|
74
|
-
expect(subject).to receive(:display_errors)
|
75
|
-
subject.to_json
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
context "when resource has no errors" do
|
80
|
-
it "redirects to resource location with status code `303`" do
|
81
|
-
allow(subject).to receive(:resource_location).and_return("some_url")
|
82
|
-
allow(subject).to receive(:has_errors?).and_return(false)
|
83
|
-
expect(subject).to receive(:redirect_to).with("some_url", status: 303, turbolinks: false)
|
84
|
-
subject.to_json
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Responders::ConfirmDestroyResponder, type: :controller do
|
4
|
-
let(:controller){ Releaf::ActionController.new }
|
5
|
-
let(:resource){ Book.new}
|
6
|
-
subject{ described_class.new(controller, [resource]) }
|
7
|
-
|
8
|
-
describe "#to_html" do
|
9
|
-
context "when options has key :destroyable with `true` value" do
|
10
|
-
it "renders default view" do
|
11
|
-
allow(subject).to receive(:options).and_return(destroyable: true)
|
12
|
-
expect(subject).to receive(:default_render)
|
13
|
-
subject.to_html
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
context "when options has key :destroyable with `false` value" do
|
18
|
-
it "renders `refused_destroy` template" do
|
19
|
-
allow(subject).to receive(:options).and_return(destroyable: false)
|
20
|
-
expect(subject).to receive(:render).with("refused_destroy")
|
21
|
-
subject.to_html
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
@@ -1,30 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Responders::DestroyResponder, type: :controller do
|
4
|
-
let(:controller){ Releaf::ActionController.new }
|
5
|
-
let(:resource){ Book.new}
|
6
|
-
subject{ described_class.new(controller, [resource]) }
|
7
|
-
|
8
|
-
describe "#to_html" do
|
9
|
-
before do
|
10
|
-
allow(controller).to receive(:request).and_return(request)
|
11
|
-
allow(controller).to receive(:formats).and_return([:html])
|
12
|
-
allow(subject).to receive(:default_render)
|
13
|
-
end
|
14
|
-
|
15
|
-
context "when resource has been successfully destroyed" do
|
16
|
-
it "renders success notification" do
|
17
|
-
resource.destroy
|
18
|
-
expect(subject.controller).to receive(:render_notification).with(true, failure_message_key: "cant destroy, because relations exists")
|
19
|
-
subject.to_html
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
context "when resource has not been destroyed" do
|
24
|
-
it "renders failure notification" do
|
25
|
-
expect(subject.controller).to receive(:render_notification).with(false, failure_message_key: "cant destroy, because relations exists")
|
26
|
-
subject.to_html
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Responders::ErrorResponder, type: :controller do
|
4
|
-
class Releaf::Responders::DummyErrorResponder < ActionController::Responder
|
5
|
-
include Releaf::Responders::ErrorResponder
|
6
|
-
def status_code
|
7
|
-
401
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
controller{}
|
12
|
-
subject{ Releaf::Responders::DummyErrorResponder.new(controller, []) }
|
13
|
-
|
14
|
-
describe "#template" do
|
15
|
-
it "returns template based on class name" do
|
16
|
-
expect(subject.template).to eq("dummy_error")
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "#to_html" do
|
21
|
-
it "renders error template with class status code" do
|
22
|
-
expect(subject).to receive(:render).with("releaf/error_pages/dummy_error", status: 401)
|
23
|
-
subject.to_html
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Responders::FeatureDisabledResponder, type: :controller do
|
4
|
-
controller{}
|
5
|
-
subject{ described_class.new(controller, []) }
|
6
|
-
|
7
|
-
describe "#status_code" do
|
8
|
-
it "returns 404" do
|
9
|
-
expect(subject.status_code).to eq(403)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Responders::PageNotFoundResponder, type: :controller do
|
4
|
-
controller{}
|
5
|
-
subject{ described_class.new(controller, []) }
|
6
|
-
|
7
|
-
describe "#status_code" do
|
8
|
-
it "returns 404" do
|
9
|
-
expect(subject.status_code).to eq(404)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|