releaf-core 1.1.21 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +0 -1
- 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/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 +420 -222
- 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 -637
- 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,60 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Responders, type: :controller do
|
4
|
-
subject{ Releaf::ActionController.new }
|
5
|
-
|
6
|
-
describe "#respond_with" do
|
7
|
-
before do
|
8
|
-
allow(subject).to receive(:active_responder).and_return(Releaf::Responders::AfterSaveResponder)
|
9
|
-
allow(subject).to receive(:request).and_return(request)
|
10
|
-
allow(subject).to receive(:content_type).and_return(:html)
|
11
|
-
end
|
12
|
-
|
13
|
-
context "when no responder defined within options" do
|
14
|
-
it "adds active responder to `responder` options" do
|
15
|
-
expect(Releaf::Responders::AfterSaveResponder).to receive(:call)
|
16
|
-
subject.respond_with(nil)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
context "when responder is defined within options" do
|
21
|
-
it "adds active responder to `responder` options" do
|
22
|
-
expect(Releaf::Responders::AfterSaveResponder).to_not receive(:call)
|
23
|
-
expect(Releaf::Responders::PageNotFoundResponder).to receive(:call)
|
24
|
-
subject.respond_with(nil, responder: Releaf::Responders::PageNotFoundResponder)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
describe "#action_responders" do
|
30
|
-
it "returns hash with action to responders matching" do
|
31
|
-
hash = {
|
32
|
-
create: Releaf::Responders::AfterSaveResponder,
|
33
|
-
update: Releaf::Responders::AfterSaveResponder,
|
34
|
-
confirm_destroy: Releaf::Responders::ConfirmDestroyResponder,
|
35
|
-
destroy: Releaf::Responders::DestroyResponder,
|
36
|
-
access_denied: Releaf::Responders::AccessDeniedResponder,
|
37
|
-
feature_disabled: Releaf::Responders::FeatureDisabledResponder,
|
38
|
-
page_not_found: Releaf::Responders::PageNotFoundResponder,
|
39
|
-
}
|
40
|
-
expect(subject.action_responders).to eq(hash)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
describe "#action_responder" do
|
45
|
-
it "returns matching responder for given action" do
|
46
|
-
allow(subject).to receive(:action_responders).and_return(a: "x")
|
47
|
-
expect(subject.action_responder(:a)).to eq("x")
|
48
|
-
allow(subject).to receive(:action_responders).and_return(b: "x")
|
49
|
-
expect(subject.action_responder(:a)).to be nil
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
describe "#active_responder" do
|
54
|
-
it "returns currect action matching responder" do
|
55
|
-
allow(subject).to receive(:action_name).and_return(:save)
|
56
|
-
allow(subject).to receive(:action_responder).with(:save).and_return("x")
|
57
|
-
expect(subject.active_responder).to eq("x")
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Root::DefaultControllerResolver do
|
4
|
-
let(:controller) { Releaf::RootController.new }
|
5
|
-
#let(:request) { instance_double(ActionDispatch::Request) }
|
6
|
-
subject { described_class.new(current_controller: controller) }
|
7
|
-
|
8
|
-
#before do
|
9
|
-
#allow( controller ).to receive(:request).and_return(request)
|
10
|
-
#end
|
11
|
-
|
12
|
-
it_behaves_like "an Releaf::Service includer"
|
13
|
-
|
14
|
-
describe "#call" do
|
15
|
-
it "returns first available controller definition path" do
|
16
|
-
controller_a_definition = Releaf::ControllerDefinition.new("a")
|
17
|
-
controller_b_definition = Releaf::ControllerDefinition.new("b")
|
18
|
-
allow(controller_a_definition).to receive(:path).and_return("aa_path")
|
19
|
-
allow(controller_b_definition).to receive(:path).and_return("bb_path")
|
20
|
-
|
21
|
-
allow(Releaf.application.config).to receive(:controllers).and_return(
|
22
|
-
"a" => controller_a_definition,
|
23
|
-
"b" => controller_b_definition,
|
24
|
-
)
|
25
|
-
allow(subject).to receive(:controllers).and_return(["a", "b"])
|
26
|
-
|
27
|
-
expect(subject.call).to eq("aa_path")
|
28
|
-
end
|
29
|
-
|
30
|
-
context "when no controller path is available" do
|
31
|
-
it "returns nil" do
|
32
|
-
allow(subject).to receive(:controllers).and_return([])
|
33
|
-
expect(subject.call).to be nil
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
describe "#controllers" do
|
39
|
-
it "returns available controllers from Releaf config" do
|
40
|
-
allow(Releaf.application.config).to receive(:available_controllers).and_return("x")
|
41
|
-
expect(subject.controllers).to eq("x")
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Root do
|
4
|
-
describe ".configure_component" do
|
5
|
-
it "adds new `Releaf::Root::Configuration` configuration with default controller resolver and assigns settings manager" do
|
6
|
-
allow(Releaf::Root::Configuration).to receive(:new)
|
7
|
-
.with(default_controller_resolver: Releaf::Root::DefaultControllerResolver).and_return("_new")
|
8
|
-
expect(Releaf.application.config).to receive(:add_configuration).with("_new")
|
9
|
-
expect(Releaf.application.config).to receive(:settings_manager=).with(Releaf::Root::SettingsManager)
|
10
|
-
described_class.configure_component
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Service do
|
4
|
-
class DummyServiceIncluder
|
5
|
-
include Releaf::Service
|
6
|
-
attribute :some, String
|
7
|
-
attribute :thing, String
|
8
|
-
|
9
|
-
def call; end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe ".call" do
|
13
|
-
it "initialize new service instance and return `#call` method value" do
|
14
|
-
subject = DummyServiceIncluder.new(some: "asd", thing: "asdasd")
|
15
|
-
allow(DummyServiceIncluder).to receive(:new).with(some: "x", thing: "y").and_return(subject)
|
16
|
-
allow(subject).to receive(:call).and_return("_x_")
|
17
|
-
expect(DummyServiceIncluder.call(some: "x", thing: "y")).to eq("_x_")
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,103 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Settings::NormalizeValue do
|
4
|
-
let(:subject){ described_class.new(value: "x", input_type: :date) }
|
5
|
-
|
6
|
-
describe "#call" do
|
7
|
-
before do
|
8
|
-
allow(subject).to receive(:normalization_method).and_return("normalize_time")
|
9
|
-
allow(described_class).to receive(:normalize_time).and_return("a")
|
10
|
-
end
|
11
|
-
|
12
|
-
context "when normalization method exists for given input type" do
|
13
|
-
it "returns value normalize with normalization method" do
|
14
|
-
expect(subject.call).to eq("a")
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
context "when normalization method does not exist for given input type" do
|
19
|
-
it "returns non-normalized value" do
|
20
|
-
allow(described_class).to receive(:respond_to?).with("normalize_time").and_return(false)
|
21
|
-
expect(subject.call).to eq("x")
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
describe "#normalization_method" do
|
27
|
-
it "returns normalization method name built from given input type" do
|
28
|
-
expect(subject.normalization_method).to eq("normalize_date")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
describe ".normalize_decimal" do
|
33
|
-
it "returns normalized decimal value" do
|
34
|
-
expect(described_class.normalize_decimal("1,12")).to eq(1.12.to_d)
|
35
|
-
expect(described_class.normalize_decimal("1.298")).to eq(1.298.to_d)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
describe ".normalize_float" do
|
40
|
-
it "returns normalized float value" do
|
41
|
-
expect(described_class.normalize_float("1,12")).to eq(1.12.to_f)
|
42
|
-
expect(described_class.normalize_float("1.298")).to eq(1.298.to_f)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe ".normalize_integer" do
|
47
|
-
it "returns normalized integer value" do
|
48
|
-
expect(described_class.normalize_integer("1,12")).to eq(1)
|
49
|
-
expect(described_class.normalize_integer("4,298")).to eq(4)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
describe ".normalize_time" do
|
54
|
-
it "returns value normalized with `Time.parse`" do
|
55
|
-
allow(Time).to receive(:parse).with("a").and_return("b")
|
56
|
-
expect(described_class.normalize_time("a")).to eq("b")
|
57
|
-
end
|
58
|
-
|
59
|
-
context "when empty value given" do
|
60
|
-
it "returns nil" do
|
61
|
-
expect(described_class.normalize_time(" ")).to be nil
|
62
|
-
expect(described_class.normalize_time("")).to be nil
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
describe ".normalize_date" do
|
68
|
-
it "returns value normalized with `Date.parse`" do
|
69
|
-
allow(Date).to receive(:parse).with("a").and_return("b")
|
70
|
-
expect(described_class.normalize_date("a")).to eq("b")
|
71
|
-
end
|
72
|
-
|
73
|
-
context "when empty value given" do
|
74
|
-
it "returns nil" do
|
75
|
-
expect(described_class.normalize_date(" ")).to be nil
|
76
|
-
expect(described_class.normalize_date("")).to be nil
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
describe ".normalize_datetime" do
|
82
|
-
it "returns value normalized with `DateTime.parse`" do
|
83
|
-
allow(DateTime).to receive(:parse).with("a").and_return("b")
|
84
|
-
expect(described_class.normalize_datetime("a")).to eq("b")
|
85
|
-
end
|
86
|
-
|
87
|
-
context "when empty value given" do
|
88
|
-
it "returns nil" do
|
89
|
-
expect(described_class.normalize_datetime(" ")).to be nil
|
90
|
-
expect(described_class.normalize_datetime("")).to be nil
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
describe ".normalize_boolean" do
|
96
|
-
it "returns value compared against string value of `1`" do
|
97
|
-
expect(described_class.normalize_boolean("1")).to be true
|
98
|
-
expect(described_class.normalize_boolean("0")).to be false
|
99
|
-
expect(described_class.normalize_boolean("ewwqe")).to be false
|
100
|
-
expect(described_class.normalize_boolean("")).to be false
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
@@ -1,135 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Settings::Register do
|
4
|
-
let(:subject){ described_class.new(settings: [{key: "a", type: "boolean"}, {key: "c", type: "text"}]) }
|
5
|
-
|
6
|
-
describe "#call" do
|
7
|
-
it "registers normalized settings items" do
|
8
|
-
allow(subject).to receive(:normalize).with(key: "a", type: "boolean").and_return("yy")
|
9
|
-
allow(subject).to receive(:normalize).with(key: "c", type: "text").and_return("zz")
|
10
|
-
expect(subject).to receive(:register).with("yy")
|
11
|
-
expect(subject).to receive(:register).with("zz")
|
12
|
-
subject.call
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "#normalize" do
|
17
|
-
before do
|
18
|
-
allow(subject.settings_class).to receive(:supported_types).and_return([:boolean, :text])
|
19
|
-
end
|
20
|
-
|
21
|
-
it "normalizes type valey to symbol" do
|
22
|
-
expect(subject.normalize(key: "x", type: "boolean")).to eq(key: "x", type: :boolean)
|
23
|
-
end
|
24
|
-
|
25
|
-
context "when no type given" do
|
26
|
-
it "sets `:text` as default type" do
|
27
|
-
expect(subject.normalize(key: "x")).to eq(key: "x", type: :text)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
context "when unsupported type given" do
|
32
|
-
it "raises `Releaf::Error`" do
|
33
|
-
allow(subject.settings_class).to receive(:supported_types).and_return([:mp3, :mp4])
|
34
|
-
expect{ subject.normalize(key: "x") }.to raise_error(Releaf::Error, "Unsupported settings type: text")
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
context "when dissallowed settings keys given" do
|
39
|
-
it "raises `Releaf::Error`" do
|
40
|
-
expect{ subject.normalize(key: "x", color: "red") }.to raise_error(Releaf::Error, "Dissallowed settings keys: [:color]")
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "#register" do
|
46
|
-
before do
|
47
|
-
allow(subject.settings_class).to receive(:[]=)
|
48
|
-
allow(subject.settings_class.registry).to receive(:update)
|
49
|
-
allow(subject).to receive(:write_default?).with(key: "x", default: "_xx").and_return(true)
|
50
|
-
end
|
51
|
-
|
52
|
-
it "assigns item to settings registry" do
|
53
|
-
expect(subject.settings_class.registry).to receive(:update).with("x" => {key: "x", default: "_xx"})
|
54
|
-
subject.register(key: "x", default: "_xx")
|
55
|
-
end
|
56
|
-
|
57
|
-
it "stores value to cache and db" do
|
58
|
-
expect(subject.settings_class).to receive(:[]=).with("x", "_xx")
|
59
|
-
subject.register(key: "x", default: "_xx")
|
60
|
-
end
|
61
|
-
|
62
|
-
context "when default write is not permitted" do
|
63
|
-
it "does not store default value to db" do
|
64
|
-
allow(subject).to receive(:write_default?).with(key: "x").and_return(false)
|
65
|
-
expect(subject).to_not receive(:[]=)
|
66
|
-
subject.register(key: "x", default: "_xx")
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
describe "#allowed_keys" do
|
72
|
-
it "returns array with `key`, `default`, `type` and `description`" do
|
73
|
-
expect(subject.allowed_keys).to eq([:key, :default, :type, :description])
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
describe "#write_default?" do
|
78
|
-
before do
|
79
|
-
allow(subject).to receive(:table_exists?).and_return(true)
|
80
|
-
allow(subject.settings_class).to receive(:find_by).with(var: "xx").and_return(nil)
|
81
|
-
end
|
82
|
-
|
83
|
-
context "when database table exists and key does not exist in database" do
|
84
|
-
it "returns true" do
|
85
|
-
expect(subject.write_default?(key: "xx")).to be true
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
context "when database table exists and key does exist in database" do
|
90
|
-
it "returns false" do
|
91
|
-
allow(subject.settings_class).to receive(:find_by).with(var: "xx").and_return(Author.new)
|
92
|
-
expect(subject.write_default?(key: "xx")).to be false
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
context "when database table does not exists and key does not exist in database" do
|
97
|
-
it "returns false" do
|
98
|
-
allow(subject).to receive(:table_exists?).and_return(false)
|
99
|
-
expect(subject.write_default?(key: "xx")).to be false
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
describe "#table_exists?" do
|
105
|
-
before do
|
106
|
-
allow(subject.settings_class).to receive(:table_exists?).and_return(true)
|
107
|
-
end
|
108
|
-
|
109
|
-
context "when `ActiveRecord::NoDatabaseError` database does not exist" do
|
110
|
-
it "returns false" do
|
111
|
-
allow(subject.settings_class).to receive(:table_exists?).and_raise(ActiveRecord::NoDatabaseError, "x")
|
112
|
-
expect(subject.table_exists?).to be false
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
context "when table does not exist" do
|
117
|
-
it "returns false" do
|
118
|
-
allow(subject.settings_class).to receive(:table_exists?).and_return(false)
|
119
|
-
expect(subject.table_exists?).to be false
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
|
-
context "when table exists" do
|
124
|
-
it "returns true" do
|
125
|
-
expect(subject.table_exists?).to be true
|
126
|
-
end
|
127
|
-
end
|
128
|
-
end
|
129
|
-
|
130
|
-
describe "#settings_class" do
|
131
|
-
it "returns `Releaf::Settings` class" do
|
132
|
-
expect(subject.settings_class).to eq(Releaf::Settings)
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Root::SettingsManager do
|
4
|
-
let(:controller){ Releaf::RootController.new }
|
5
|
-
let(:cookies){ {"asd.a" => "lalal"} }
|
6
|
-
|
7
|
-
before do
|
8
|
-
allow(controller).to receive(:send).with(:cookies).and_return(cookies)
|
9
|
-
end
|
10
|
-
|
11
|
-
describe ".read" do
|
12
|
-
it "returns cookies settings for given key" do
|
13
|
-
expect(described_class.read(controller: controller, key: "asd.a")).to eq("lalal")
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".write" do
|
18
|
-
it "writes user settings for given key and value" do
|
19
|
-
expect{ described_class.write(controller: controller, key: "asd.a", value: "op") }.to change{ cookies["asd.a"] }.to("op")
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
class DummyModel
|
4
|
-
include ActiveModel::Validations
|
5
|
-
attr_accessor :name, :surname, :age
|
6
|
-
validates :name, presence: {error_code: :no_name}
|
7
|
-
validates :surname, presence: true
|
8
|
-
end
|
9
|
-
|
10
|
-
describe "Extend ActiveModel validation error with error_code attribute" do
|
11
|
-
let(:item) do
|
12
|
-
item = DummyModel.new
|
13
|
-
item.valid?
|
14
|
-
item
|
15
|
-
end
|
16
|
-
|
17
|
-
it "adds ActiveModel::ErrorMessage as error instead of String" do
|
18
|
-
expect(item.errors.get(:name).first.class).to eq(ActiveModel::ErrorMessage)
|
19
|
-
end
|
20
|
-
|
21
|
-
it "does not owerwrite default error message behaviour" do
|
22
|
-
expect(item.errors.get(:name).first).to eq("can't be blank")
|
23
|
-
end
|
24
|
-
|
25
|
-
context "when validation have :error_code option" do
|
26
|
-
it "adds :error_code value as error_code" do
|
27
|
-
expect(item.errors.get(:name).first.error_code).to eq(:no_name)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
context "when validation message is symbol" do
|
32
|
-
it "adds message as error_code" do
|
33
|
-
expect(item.errors.get(:surname).first.error_code).to eq(:blank)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
context "when validation message is not symbol and don't have :error_code option" do
|
38
|
-
it "adds :invalid as error_code" do
|
39
|
-
item.errors.add(:age, Proc.new {"no age"})
|
40
|
-
expect(item.errors.get(:age).first.error_code).to eq(:invalid)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
context "when error with :strict option added" do
|
45
|
-
it "raises ActiveModel::StrictValidationFailed error" do
|
46
|
-
expect { item.errors.add(:age, :invalid, strict: true) }.to raise_error(ActiveModel::StrictValidationFailed)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
context "when error with :data option is added" do
|
51
|
-
it "stores data" do
|
52
|
-
item.errors.add(:age, :invalid, data: {foo: :bar})
|
53
|
-
expect( item.errors.get(:age).first.data ).to eq(foo: :bar)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|