glebtv-ckeditor 4.2.1.5 → 4.3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +37 -1
- data/README.md +286 -0
- data/Rakefile +76 -63
- data/app/assets/javascripts/ckeditor/application.js +1 -0
- data/app/assets/javascripts/ckeditor/config.js.erb +59 -20
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js → application.js.erb} +11 -2
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +300 -0
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/{uploader.css → uploader.css.erb} +6 -2
- data/app/assets/javascripts/ckeditor/init.js.erb +1 -6
- data/app/assets/javascripts/ckeditor/override.js.erb +22 -0
- data/app/assets/stylesheets/ckcontent.css +103 -0
- data/app/controllers/ckeditor/application_controller.rb +5 -4
- data/app/controllers/ckeditor/attachment_files_controller.rb +12 -10
- data/app/controllers/ckeditor/pictures_controller.rb +12 -10
- data/app/helpers/ckeditor/application_helper.rb +1 -1
- data/app/views/ckeditor/attachment_files/index.html.erb +11 -5
- data/app/views/ckeditor/pictures/index.html.erb +12 -6
- data/app/views/ckeditor/shared/_asset.html.erb +2 -2
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +3 -3
- data/app/views/layouts/ckeditor/application.html.erb +0 -1
- data/config/locales/cs.ckeditor.yml +1 -0
- data/config/locales/de.ckeditor.yml +9 -0
- data/config/locales/el-GR.cdkeditor.yml +9 -0
- data/config/locales/en.ckeditor.yml +1 -0
- data/config/locales/es.ckeditor.yml +1 -0
- data/config/locales/fr.ckeditor.yml +1 -0
- data/config/locales/hu.ckeditor.yml +9 -0
- data/config/locales/it.ckeditor.yml +1 -0
- data/config/locales/nl.ckeditor.yml +2 -1
- data/config/locales/pl.ckeditor.yml +1 -0
- data/config/locales/pt-BR.ckeditor.yml +2 -1
- data/config/locales/pt-PT.ckeditor.yml +9 -0
- data/config/locales/ru.ckeditor.yml +1 -0
- data/config/locales/sv-SE.ckeditor.yml +1 -0
- data/config/locales/uk.ckeditor.yml +1 -0
- data/config/locales/zh-CN.ckeditor.yml +1 -0
- data/lib/ckeditor.rb +63 -13
- data/lib/ckeditor/backend/carrierwave.rb +9 -9
- data/lib/ckeditor/backend/dragonfly.rb +2 -2
- data/lib/ckeditor/backend/paperclip.rb +4 -4
- data/lib/ckeditor/engine.rb +6 -6
- data/lib/ckeditor/helpers/controllers.rb +7 -7
- data/lib/ckeditor/helpers/form_builder.rb +1 -1
- data/lib/ckeditor/helpers/form_helper.rb +2 -21
- data/lib/ckeditor/helpers/view_helper.rb +2 -13
- data/lib/ckeditor/hooks/cancan.rb +2 -2
- data/lib/ckeditor/hooks/formtastic.rb +1 -1
- data/lib/ckeditor/hooks/pundit.rb +47 -0
- data/lib/ckeditor/http.rb +8 -7
- data/lib/ckeditor/orm/active_record.rb +3 -3
- data/lib/ckeditor/orm/base.rb +4 -6
- data/lib/ckeditor/orm/mongoid.rb +4 -4
- data/lib/ckeditor/paginatable.rb +56 -0
- data/lib/ckeditor/text_area.rb +52 -0
- data/lib/ckeditor/utils.rb +54 -36
- data/lib/ckeditor/version.rb +1 -4
- data/lib/generators/ckeditor/install_generator.rb +10 -10
- data/lib/generators/ckeditor/pundit_policy_generator.rb +22 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +4 -4
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +2 -2
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +1 -1
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +1 -1
- data/lib/generators/ckeditor/templates/ckeditor.rb +21 -16
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +20 -0
- data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +20 -0
- data/test/ckeditor_test.rb +54 -1
- data/test/controllers/attachment_files_controller_test.rb +15 -15
- data/test/controllers/pictures_controller_test.rb +15 -15
- data/test/dummy/app/views/posts/index.html.erb +1 -1
- data/test/dummy/config/routes.rb +1 -1
- data/test/dummy/log/test.log +301 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0ff571a66f03f4c98305b82fbc097934 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1c2a2034cd1d6490a47e1f2b22a328f3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/233a499dd1009ab5b2a8040346715629 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2a79c1fcf4595c4bfb3a1e77a732b9e9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2bb1e656d1d1c20542dd47020608ce4b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/3c088129885aa2261da0ab21707aa851 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5296ab0e7196335ed50f33e398de0470 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/62133d9323b94de8b0cd2a3e490e0374 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/70f2d021b0f59639252116032aa12a5d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/73eff3be45044b7438486d533547c02c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7869bf4c6f26bcd697a78ffd20655de5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/88d81ff5585179f4acb7ba76bdcb1244 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/990c65e42e2a681340e62644dd07782b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/aaf14684bcb6dafb17154d27c3d5a5de +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b2141ea733727ae31693b5129d431629 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c1469bfe5d5645440961cc1e8fd48120 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c479f0465142b7c9c5a9c58a256335d7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c73d53992216d52410b542dce76742ad +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c7476f60577593bf79ca5b6334b86903 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cb4a5e7fc592c6023ed2acc5953b4685 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d7e7d3b3729ff516f81682711ea8a53a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d9b8613a01ff7c7d9fe1a6b7cd5497ff +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e4513c04c145290b038978a8f471d244 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e65823156ac3891c4779224e828d4877 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f20469686afebc55828d93a978e5ff20 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f24d6c64fd96102c27c1f10e82ebf864 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f33022711bcfc1cae3955a1de79fe280 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f69b1a9a1323d97109283e5bd378c23d +0 -0
- data/test/functional/posts_controller_test.rb +4 -4
- data/test/generators/install_generator_test.rb +7 -7
- data/test/models/attachment_file_test.rb +2 -2
- data/test/models/picture_test.rb +2 -2
- data/test/models/utils_test.rb +4 -5
- data/test/support/helpers.rb +8 -8
- data/test/tmp/app/models/ckeditor/asset.rb +5 -0
- data/test/tmp/app/models/ckeditor/attachment_file.rb +12 -0
- data/test/tmp/app/models/ckeditor/picture.rb +13 -0
- data/test/tmp/config/initializers/ckeditor.rb +26 -0
- data/test/tmp/config/routes.rb +5 -0
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +414 -0
- data/{app → vendor}/assets/javascripts/ckeditor/LICENSE.md +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/README.md +1 -1
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +165 -0
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +978 -0
- data/vendor/assets/javascripts/ckeditor/config.js +10 -0
- data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/ckcss.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/lang/en.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/lang/ru.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +4 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoComplete.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoFormat.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/SearchCode.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +3 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +335 -90
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +5 -5
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +75 -75
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +28 -25
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +21 -18
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +23 -25
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +13 -10
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +30 -21
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +47 -44
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +37 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +43 -52
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +29 -28
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +12 -9
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +24 -21
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +23 -21
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +180 -207
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +26 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +28 -26
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +30 -27
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +49 -46
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +43 -43
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +5 -5
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +2 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/{app/assets/javascripts/ckeditor/skins/moono → vendor/assets/javascripts/ckeditor/plugins}/icons_hidpi.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +13 -13
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/ipsum/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/ipsum/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +8 -7
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/example_usage.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/map.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/README.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +20 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +6 -6
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +4 -4
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +11 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +72 -31
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmp.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +31 -31
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/lang/en.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/plugin.js +56 -15
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +768 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +809 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +841 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +822 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +813 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_opera.css.scss +781 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css.scss +2125 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +2134 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +2183 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +2351 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +2195 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css.scss +2243 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/{app/assets/javascripts/ckeditor/plugins → vendor/assets/javascripts/ckeditor/skins/moono}/icons_hidpi.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/readme.md +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/styles.js +2 -2
- metadata +445 -352
- data/README.rdoc +0 -12
- data/app/assets/javascripts/ckeditor/CHANGES.md +0 -233
- data/app/assets/javascripts/ckeditor/build-config.js +0 -103
- data/app/assets/javascripts/ckeditor/ckeditor.js +0 -929
- data/app/assets/javascripts/ckeditor/contents.css +0 -103
- data/app/assets/javascripts/ckeditor/lang/en.js +0 -5
- data/app/assets/javascripts/ckeditor/lang/ru.js +0 -5
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -10
- data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +0 -5637
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.modes.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.search-addons.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/font/lang/en.js +0 -14
- data/app/assets/javascripts/ckeditor/plugins/font/lang/ru.js +0 -14
- data/app/assets/javascripts/ckeditor/plugins/font/plugin.js +0 -225
- data/app/assets/javascripts/ckeditor/plugins/highslide/dialogs/hs.js +0 -73
- data/app/assets/javascripts/ckeditor/plugins/highslide/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/highslide/lang/en.js +0 -7
- data/app/assets/javascripts/ckeditor/plugins/highslide/lang/ru.js +0 -7
- data/app/assets/javascripts/ckeditor/plugins/highslide/plugin.js +0 -26
- data/app/assets/javascripts/ckeditor/plugins/highslide/readme.txt +0 -55
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/install.html +0 -93
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/styles.css +0 -59
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon1.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon2.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon3.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/icons/hidpi/iframe.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/icons/iframe.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/lang/en.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/iframe/lang/ru.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/iframe/plugin.js +0 -83
- data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -43
- data/app/assets/javascripts/ckeditor/plugins/oembed/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/images/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.js +0 -70
- data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.min.js +0 -71
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/images/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/lang/en.js +0 -23
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/lang/ru.js +0 -23
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/libs/jquery.oembed.js +0 -971
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/libs/jquery.oembed.min.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/plugin.js +0 -373
- data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -20
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +0 -70
- data/app/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +0 -82
- data/app/assets/javascripts/ckeditor/plugins/symbol/dialogs/lang/en.js +0 -181
- data/app/assets/javascripts/ckeditor/plugins/symbol/dialogs/symbol.js +0 -18
- data/app/assets/javascripts/ckeditor/plugins/symbol/icons/symbol.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/symbol/lang/en.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/symbol/plugin.js +0 -15
- data/app/assets/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -9
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -15
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -225
- data/app/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/skins/moono/dialog.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/lib/ckeditor/tasks.rake +0 -11
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Ckeditor
|
4
|
+
module Generators
|
5
|
+
class PunditPolicyGenerator < Rails::Generators::Base
|
6
|
+
|
7
|
+
desc "Generates policy files for Pundit"
|
8
|
+
|
9
|
+
def self.source_root
|
10
|
+
@source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
11
|
+
end
|
12
|
+
|
13
|
+
# copy configuration
|
14
|
+
def copy_policy_files
|
15
|
+
[:picture, :attachment_file].each do |model_name|
|
16
|
+
template "pundit_policy/#{model_name}_policy.rb", "app/policies/ckeditor/#{model_name}_policy.rb"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -4,18 +4,18 @@ class CreateCkeditorAssets < ActiveRecord::Migration
|
|
4
4
|
t.string :data_file_name, :null => false
|
5
5
|
t.string :data_content_type
|
6
6
|
t.integer :data_file_size
|
7
|
-
|
7
|
+
|
8
8
|
t.integer :assetable_id
|
9
9
|
t.string :assetable_type, :limit => 30
|
10
10
|
t.string :type, :limit => 30
|
11
|
-
|
11
|
+
|
12
12
|
# Uncomment it to save images dimensions, if your need it
|
13
13
|
t.integer :width
|
14
14
|
t.integer :height
|
15
|
-
|
15
|
+
|
16
16
|
t.timestamps
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"
|
20
20
|
add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
|
21
21
|
end
|
@@ -2,7 +2,7 @@ class Ckeditor::AttachmentFile < Ckeditor::Asset
|
|
2
2
|
has_attached_file :data,
|
3
3
|
:url => "/ckeditor_assets/attachments/:id/:filename",
|
4
4
|
:path => ":rails_root/public/ckeditor_assets/attachments/:id/:filename"
|
5
|
-
|
5
|
+
|
6
6
|
validates_attachment_size :data, :less_than => 100.megabytes
|
7
7
|
validates_attachment_presence :data
|
8
8
|
|
@@ -4,7 +4,7 @@ class CreateCkeditorAssets < ActiveRecord::Migration
|
|
4
4
|
t.string :data_file_name, :null => false
|
5
5
|
t.string :data_content_type
|
6
6
|
t.integer :data_file_size
|
7
|
-
|
7
|
+
|
8
8
|
t.integer :assetable_id
|
9
9
|
t.string :assetable_type, :limit => 30
|
10
10
|
t.string :type, :limit => 30
|
@@ -15,7 +15,7 @@ class CreateCkeditorAssets < ActiveRecord::Migration
|
|
15
15
|
|
16
16
|
t.timestamps
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"
|
20
20
|
add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
|
21
21
|
end
|
@@ -1,21 +1,26 @@
|
|
1
1
|
# Use this hook to configure ckeditor
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
require "ckeditor/orm/<%= options[:orm] %>"
|
2
|
+
Ckeditor.setup do |config|
|
3
|
+
# ==> ORM configuration
|
4
|
+
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
|
5
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
6
|
+
# available as additional gems.
|
7
|
+
require "ckeditor/orm/<%= options[:orm] %>"
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
# Allowed image file types for upload.
|
10
|
+
# Set to nil or [] (empty array) for all file types
|
11
|
+
# config.image_file_types = ["jpg", "jpeg", "png", "gif", "tiff"]
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
# Allowed attachment file types for upload.
|
14
|
+
# Set to nil or [] (empty array) for all file types
|
15
|
+
# config.attachment_file_types = ["doc", "docx", "xls", "odt", "ods", "pdf", "rar", "zip", "tar", "swf"]
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
# Setup authorization to be run as a before filter
|
18
|
+
# config.authorize_with :cancan
|
19
|
+
|
20
|
+
# Asset model classes
|
21
|
+
# config.picture_model { Ckeditor::Picture }
|
22
|
+
# config.attachment_file_model { Ckeditor::AttachmentFile }
|
23
|
+
|
24
|
+
# Paginate assets
|
25
|
+
# config.default_per_page = 24
|
21
26
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class Ckeditor::AttachmentFilePolicy
|
2
|
+
attr_reader :user, :attachment
|
3
|
+
|
4
|
+
def initialize(user, attachment)
|
5
|
+
@user = user
|
6
|
+
@attachment = attachment
|
7
|
+
end
|
8
|
+
|
9
|
+
def index?
|
10
|
+
true and ! @user.nil?
|
11
|
+
end
|
12
|
+
|
13
|
+
def create?
|
14
|
+
true and ! @user.nil?
|
15
|
+
end
|
16
|
+
|
17
|
+
def destroy?
|
18
|
+
@attachment.assetable_id == @user.id
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class Ckeditor::PicturePolicy
|
2
|
+
attr_reader :user, :picture
|
3
|
+
|
4
|
+
def initialize(user, picture)
|
5
|
+
@user = user
|
6
|
+
@picture = picture
|
7
|
+
end
|
8
|
+
|
9
|
+
def index?
|
10
|
+
true and ! @user.nil?
|
11
|
+
end
|
12
|
+
|
13
|
+
def create?
|
14
|
+
true and ! @user.nil?
|
15
|
+
end
|
16
|
+
|
17
|
+
def destroy?
|
18
|
+
@picture.assetable_id == @user.id
|
19
|
+
end
|
20
|
+
end
|
data/test/ckeditor_test.rb
CHANGED
@@ -1,13 +1,66 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class CkeditorTest < ActiveSupport::TestCase
|
4
|
+
def teardown
|
5
|
+
Ckeditor.picture_model = nil
|
6
|
+
Ckeditor.attachment_file_model = nil
|
7
|
+
end
|
8
|
+
|
4
9
|
test "truth" do
|
5
10
|
assert_kind_of Module, Ckeditor
|
6
11
|
end
|
7
|
-
|
12
|
+
|
8
13
|
test 'setup block yields self' do
|
9
14
|
Ckeditor.setup do |config|
|
10
15
|
assert_equal Ckeditor, config
|
11
16
|
end
|
12
17
|
end
|
18
|
+
|
19
|
+
test 'default picture model' do
|
20
|
+
assert_equal Ckeditor.picture_model, Ckeditor::Picture
|
21
|
+
end
|
22
|
+
|
23
|
+
test 'configuration specifying picture model' do
|
24
|
+
Ckeditor.setup do |config|
|
25
|
+
config.picture_model = CustomPicture
|
26
|
+
end
|
27
|
+
assert_equal Ckeditor.picture_model, CustomPicture
|
28
|
+
end
|
29
|
+
|
30
|
+
test 'configuration specifying picture model using block' do
|
31
|
+
Ckeditor.setup do |config|
|
32
|
+
config.picture_model { CustomPicture }
|
33
|
+
end
|
34
|
+
assert_equal Ckeditor.picture_model, CustomPicture
|
35
|
+
end
|
36
|
+
|
37
|
+
test 'picture model adapter' do
|
38
|
+
assert_equal Ckeditor.picture_adapter, Ckeditor::Picture.to_adapter
|
39
|
+
end
|
40
|
+
|
41
|
+
test 'default attachment file model' do
|
42
|
+
assert_equal Ckeditor.attachment_file_model, Ckeditor::AttachmentFile
|
43
|
+
end
|
44
|
+
|
45
|
+
test 'configuration specifying attachment file model' do
|
46
|
+
Ckeditor.setup do |config|
|
47
|
+
config.attachment_file_model = CustomAttachmentFile
|
48
|
+
end
|
49
|
+
assert_equal Ckeditor.attachment_file_model, CustomAttachmentFile
|
50
|
+
end
|
51
|
+
|
52
|
+
test 'configuration specifying attachment file model using block' do
|
53
|
+
Ckeditor.setup do |config|
|
54
|
+
config.attachment_file_model { CustomAttachmentFile }
|
55
|
+
end
|
56
|
+
assert_equal Ckeditor.attachment_file_model, CustomAttachmentFile
|
57
|
+
end
|
58
|
+
|
59
|
+
test 'attachment file model adapter' do
|
60
|
+
assert_equal Ckeditor.attachment_file_adapter,
|
61
|
+
Ckeditor::AttachmentFile.to_adapter
|
62
|
+
end
|
63
|
+
|
64
|
+
class CustomPicture; end
|
65
|
+
class CustomAttachmentFile; end
|
13
66
|
end
|
@@ -2,62 +2,62 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class AttachmentFilesControllerTest < ActionController::TestCase
|
4
4
|
tests Ckeditor::AttachmentFilesController
|
5
|
-
|
5
|
+
|
6
6
|
include RawPost
|
7
7
|
include ControllerHooks
|
8
|
-
|
8
|
+
|
9
9
|
def setup
|
10
10
|
@attachment = fixture_file_upload('files/rails.tar.gz', 'application/x-gzip')
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def teardown
|
14
14
|
Ckeditor::AttachmentFile.destroy_all
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
test "index action" do
|
18
18
|
get :index
|
19
|
-
|
19
|
+
|
20
20
|
assert_equal 200, @response.status
|
21
21
|
assert_template "ckeditor/attachment_files/index"
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
test "create action via filebrowser" do
|
25
25
|
assert_difference 'Ckeditor::AttachmentFile.count' do
|
26
26
|
post :create, :qqfile => @attachment
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
assert_equal 200, @response.status
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
test "create action via CKEditor upload form" do
|
33
33
|
assert_difference 'Ckeditor::AttachmentFile.count' do
|
34
34
|
post :create, :upload => @attachment, :CKEditor => 'ckeditor_field'
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
assert_equal 200, @response.status
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
test "create action via html5 upload" do
|
41
41
|
assert_difference 'Ckeditor::AttachmentFile.count' do
|
42
42
|
raw_post :create, { :qqfile => @attachment.original_filename }, @attachment.read
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
assert_equal 200, @response.status
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
test "invalid params for create action" do
|
49
49
|
assert_no_difference 'Ckeditor::AttachmentFile.count' do
|
50
50
|
post :create, :qqfile => nil
|
51
51
|
end
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
test "destroy action via filebrowser" do
|
55
55
|
@attachment_file = Ckeditor::AttachmentFile.create :data => @attachment
|
56
|
-
|
56
|
+
|
57
57
|
assert_difference 'Ckeditor::AttachmentFile.count', -1 do
|
58
58
|
delete :destroy, :id => @attachment_file.id
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
assert_equal 302, @response.status
|
62
62
|
end
|
63
63
|
end
|
@@ -2,63 +2,63 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class PicturesControllerTest < ActionController::TestCase
|
4
4
|
tests Ckeditor::PicturesController
|
5
|
-
|
5
|
+
|
6
6
|
include RawPost
|
7
7
|
include Ckeditor::Engine.routes.url_helpers
|
8
8
|
include ControllerHooks
|
9
|
-
|
9
|
+
|
10
10
|
def setup
|
11
11
|
@image = fixture_file_upload('files/rails.png', 'image/png')
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def teardown
|
15
15
|
Ckeditor::Picture.destroy_all
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
test "index action" do
|
19
19
|
get :index
|
20
|
-
|
20
|
+
|
21
21
|
assert_equal 200, @response.status
|
22
22
|
assert_template "ckeditor/pictures/index"
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
test "create action via filebrowser" do
|
26
26
|
assert_difference 'Ckeditor::Picture.count' do
|
27
27
|
post :create, :qqfile => @image
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
assert_equal 200, @response.status
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
test "create action via CKEditor upload form" do
|
34
34
|
assert_difference 'Ckeditor::Picture.count' do
|
35
35
|
post :create, :upload => @image, :CKEditor => 'ckeditor_field'
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
assert_equal 200, @response.status
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
test "create action via html5 upload" do
|
42
42
|
assert_difference 'Ckeditor::Picture.count' do
|
43
43
|
raw_post :create, { :qqfile => @image.original_filename }, @image.read, "image/png"
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
assert_equal 200, @response.status
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
test "invalid params for create action" do
|
50
50
|
assert_no_difference 'Ckeditor::Picture.count' do
|
51
51
|
post :create, :qqfile => nil
|
52
52
|
end
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
test "destroy action via filebrowser" do
|
56
56
|
@picture = Ckeditor::Picture.create :data => @image
|
57
|
-
|
57
|
+
|
58
58
|
assert_difference 'Ckeditor::Picture.count', -1 do
|
59
59
|
delete :destroy, :id => @picture.id
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
assert_equal 302, @response.status
|
63
63
|
end
|
64
64
|
end
|
@@ -24,4 +24,4 @@
|
|
24
24
|
<%= cktext_area_tag("test_area", "Ckeditor") %>
|
25
25
|
|
26
26
|
<h2>Text area test with options</h2>
|
27
|
-
<%= cktext_area_tag("content", "Ckeditor", :
|
27
|
+
<%= cktext_area_tag("content", "Ckeditor", :cols => 10, :rows => 20, :ckeditor => {:toolbar => 'Easy'}) %>
|
data/test/dummy/config/routes.rb
CHANGED
@@ -0,0 +1,301 @@
|
|
1
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
2
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
Migrating to CreatePosts (20110623120047)
|
5
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "info" text, "content" text, "created_at" datetime, "updated_at" datetime) [0m
|
7
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110623120047"]]
|
8
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
9
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "ckeditor_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "data_file_name" varchar(255) NOT NULL, "data_content_type" varchar(255), "data_file_size" integer, "assetable_id" integer, "assetable_type" varchar(30), "type" varchar(30), "width" integer, "height" integer, "created_at" datetime, "updated_at" datetime)
|
10
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "idx_ckeditor_assetable_type" ON "ckeditor_assets" ("assetable_type", "type", "assetable_id")[0m
|
11
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "idx_ckeditor_assetable" ON "ckeditor_assets" ("assetable_type", "assetable_id")
|
12
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
13
|
+
-------------------------------------------------------
|
14
|
+
AttachmentFileTest: test_Set_file_content_type_and_size
|
15
|
+
-------------------------------------------------------
|
16
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
17
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18
|
+
--------------------------------------------------------------------------
|
19
|
+
AttachmentFilesControllerTest: test_create_action_via_CKEditor_upload_form
|
20
|
+
--------------------------------------------------------------------------
|
21
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')
|
22
|
+
Processing by Ckeditor::AttachmentFilesController#create as HTML
|
23
|
+
Parameters: {"upload"=>#<Rack::Test::UploadedFile:0x0000000312d060 @content_type="application/x-gzip", @original_filename="rails.tar.gz", @tempfile=#<Tempfile:/tmp/rails.tar.gz20140213-30822-1dol7jh>>, "CKEditor"=>"ckeditor_field"}
|
24
|
+
Completed 500 Internal Server Error in 2ms
|
25
|
+
[1m[36mCkeditor::AttachmentFile Load (0.1ms)[0m [1mSELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')[0m
|
26
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
27
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
28
|
+
-----------------------------------------------------------------
|
29
|
+
AttachmentFilesControllerTest: test_create_action_via_filebrowser
|
30
|
+
-----------------------------------------------------------------
|
31
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')
|
32
|
+
Processing by Ckeditor::AttachmentFilesController#create as HTML
|
33
|
+
Parameters: {"qqfile"=>#<Rack::Test::UploadedFile:0x00000003179de8 @content_type="application/x-gzip", @original_filename="rails.tar.gz", @tempfile=#<Tempfile:/tmp/rails.tar.gz20140213-30822-cksxju>>}
|
34
|
+
Completed 500 Internal Server Error in 1ms
|
35
|
+
[1m[36mCkeditor::AttachmentFile Load (0.1ms)[0m [1mSELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')[0m
|
36
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
37
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
38
|
+
------------------------------------------------------------------
|
39
|
+
AttachmentFilesControllerTest: test_create_action_via_html5_upload
|
40
|
+
------------------------------------------------------------------
|
41
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')
|
42
|
+
Processing by Ckeditor::AttachmentFilesController#create as HTML
|
43
|
+
Parameters: {"qqfile"=>"rails.tar.gz"}
|
44
|
+
Completed 500 Internal Server Error in 1ms
|
45
|
+
[1m[36mCkeditor::AttachmentFile Load (0.1ms)[0m [1mSELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')[0m
|
46
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
47
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
48
|
+
------------------------------------------------------------------
|
49
|
+
AttachmentFilesControllerTest: test_destroy_action_via_filebrowser
|
50
|
+
------------------------------------------------------------------
|
51
|
+
[1m[35mCkeditor::AttachmentFile Load (0.1ms)[0m SELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')
|
52
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
53
|
+
[1m[35m (0.0ms)[0m begin transaction
|
54
|
+
------------------------------------------------
|
55
|
+
AttachmentFilesControllerTest: test_index_action
|
56
|
+
------------------------------------------------
|
57
|
+
Processing by Ckeditor::AttachmentFilesController#index as HTML
|
58
|
+
[1m[36mCkeditor::AttachmentFile Load (0.1ms)[0m [1mSELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile') ORDER BY id desc LIMIT 24 OFFSET 0[0m
|
59
|
+
Rendered /data/ckeditor/app/views/ckeditor/shared/_asset.html.erb (0.0ms)
|
60
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')
|
61
|
+
Rendered /data/ckeditor/app/views/ckeditor/shared/_asset_tmpl.html.erb (1.7ms)
|
62
|
+
Completed 200 OK in 42ms (Views: 41.2ms | ActiveRecord: 0.2ms)
|
63
|
+
[1m[36mCkeditor::AttachmentFile Load (0.1ms)[0m [1mSELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')[0m
|
64
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
65
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
66
|
+
--------------------------------------------------------------------
|
67
|
+
AttachmentFilesControllerTest: test_invalid_params_for_create_action
|
68
|
+
--------------------------------------------------------------------
|
69
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')
|
70
|
+
Processing by Ckeditor::AttachmentFilesController#create as HTML
|
71
|
+
Parameters: {"qqfile"=>nil}
|
72
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
73
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
74
|
+
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
75
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')[0m
|
76
|
+
[1m[35mCkeditor::AttachmentFile Load (0.1ms)[0m SELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::AttachmentFile')
|
77
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
78
|
+
[1m[35m (0.0ms)[0m begin transaction
|
79
|
+
------------------------------------------------
|
80
|
+
CkeditorTest: test_attachment_file_model_adapter
|
81
|
+
------------------------------------------------
|
82
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
83
|
+
[1m[35m (0.0ms)[0m begin transaction
|
84
|
+
-----------------------------------------------------------------
|
85
|
+
CkeditorTest: test_configuration_specifying_attachment_file_model
|
86
|
+
-----------------------------------------------------------------
|
87
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
88
|
+
[1m[35m (0.0ms)[0m begin transaction
|
89
|
+
-----------------------------------------------------------------------------
|
90
|
+
CkeditorTest: test_configuration_specifying_attachment_file_model_using_block
|
91
|
+
-----------------------------------------------------------------------------
|
92
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
93
|
+
[1m[35m (0.0ms)[0m begin transaction
|
94
|
+
---------------------------------------------------------
|
95
|
+
CkeditorTest: test_configuration_specifying_picture_model
|
96
|
+
---------------------------------------------------------
|
97
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
98
|
+
[1m[35m (0.0ms)[0m begin transaction
|
99
|
+
---------------------------------------------------------------------
|
100
|
+
CkeditorTest: test_configuration_specifying_picture_model_using_block
|
101
|
+
---------------------------------------------------------------------
|
102
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
103
|
+
[1m[35m (0.0ms)[0m begin transaction
|
104
|
+
------------------------------------------------
|
105
|
+
CkeditorTest: test_default_attachment_file_model
|
106
|
+
------------------------------------------------
|
107
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
108
|
+
[1m[35m (0.0ms)[0m begin transaction
|
109
|
+
----------------------------------------
|
110
|
+
CkeditorTest: test_default_picture_model
|
111
|
+
----------------------------------------
|
112
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
113
|
+
[1m[35m (0.0ms)[0m begin transaction
|
114
|
+
----------------------------------------
|
115
|
+
CkeditorTest: test_picture_model_adapter
|
116
|
+
----------------------------------------
|
117
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
118
|
+
[1m[35m (0.0ms)[0m begin transaction
|
119
|
+
------------------------------------------
|
120
|
+
CkeditorTest: test_setup_block_yields_self
|
121
|
+
------------------------------------------
|
122
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
123
|
+
[1m[35m (0.0ms)[0m begin transaction
|
124
|
+
------------------------
|
125
|
+
CkeditorTest: test_truth
|
126
|
+
------------------------
|
127
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
128
|
+
[1m[35m (0.0ms)[0m begin transaction
|
129
|
+
----------------------------------------------------------------
|
130
|
+
InstallGeneratorTest: test_Assert_all_files_are_properly_created
|
131
|
+
----------------------------------------------------------------
|
132
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
133
|
+
[1m[35m (0.0ms)[0m begin transaction
|
134
|
+
-------------------------------------------------------------------
|
135
|
+
InstallGeneratorTest: test_Assert_configurator_is_valid_for_mongoid
|
136
|
+
-------------------------------------------------------------------
|
137
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
138
|
+
[1m[35m (0.0ms)[0m begin transaction
|
139
|
+
-------------------------------------------------------------------------------------
|
140
|
+
InstallGeneratorTest: test_models_and_migration_for_active_record_orm_via_carrierwave
|
141
|
+
-------------------------------------------------------------------------------------
|
142
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
143
|
+
[1m[35m (0.0ms)[0m begin transaction
|
144
|
+
-----------------------------------------------------------------------------------
|
145
|
+
InstallGeneratorTest: test_models_and_migration_for_active_record_orm_via_dragonfly
|
146
|
+
-----------------------------------------------------------------------------------
|
147
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
148
|
+
[1m[35m (0.0ms)[0m begin transaction
|
149
|
+
-----------------------------------------------------------------------------------
|
150
|
+
InstallGeneratorTest: test_models_and_migration_for_active_record_orm_via_paperclip
|
151
|
+
-----------------------------------------------------------------------------------
|
152
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
153
|
+
[1m[35m (0.0ms)[0m begin transaction
|
154
|
+
-----------------------------------------------------------------
|
155
|
+
InstallGeneratorTest: test_models_for_mongoid_orm_via_carrierwave
|
156
|
+
-----------------------------------------------------------------
|
157
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
158
|
+
[1m[35m (0.0ms)[0m begin transaction
|
159
|
+
---------------------------------------------------------------
|
160
|
+
InstallGeneratorTest: test_models_for_mongoid_orm_via_paperclip
|
161
|
+
---------------------------------------------------------------
|
162
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
163
|
+
[1m[35m (0.0ms)[0m begin transaction
|
164
|
+
--------------------------
|
165
|
+
NavigationTest: test_truth
|
166
|
+
--------------------------
|
167
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
168
|
+
[1m[35m (0.0ms)[0m begin transaction
|
169
|
+
------------------------------------------------
|
170
|
+
PictureTest: test_Set_file_content_type_and_size
|
171
|
+
------------------------------------------------
|
172
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
173
|
+
[1m[35m (0.0ms)[0m begin transaction
|
174
|
+
-------------------------------------------------------------------
|
175
|
+
PicturesControllerTest: test_create_action_via_CKEditor_upload_form
|
176
|
+
-------------------------------------------------------------------
|
177
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')[0m
|
178
|
+
Processing by Ckeditor::PicturesController#create as HTML
|
179
|
+
Parameters: {"upload"=>#<Rack::Test::UploadedFile:0x000000034127f8 @content_type="image/png", @original_filename="rails.png", @tempfile=#<Tempfile:/tmp/rails.png20140213-30822-10jkhe2>>, "CKEditor"=>"ckeditor_field"}
|
180
|
+
Completed 500 Internal Server Error in 1ms
|
181
|
+
[1m[35mCkeditor::Picture Load (0.1ms)[0m SELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')
|
182
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
183
|
+
[1m[35m (0.0ms)[0m begin transaction
|
184
|
+
----------------------------------------------------------
|
185
|
+
PicturesControllerTest: test_create_action_via_filebrowser
|
186
|
+
----------------------------------------------------------
|
187
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')[0m
|
188
|
+
Processing by Ckeditor::PicturesController#create as HTML
|
189
|
+
Parameters: {"qqfile"=>#<Rack::Test::UploadedFile:0x000000033ee178 @content_type="image/png", @original_filename="rails.png", @tempfile=#<Tempfile:/tmp/rails.png20140213-30822-wwse69>>}
|
190
|
+
Completed 500 Internal Server Error in 1ms
|
191
|
+
[1m[35mCkeditor::Picture Load (0.1ms)[0m SELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')
|
192
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
193
|
+
[1m[35m (0.0ms)[0m begin transaction
|
194
|
+
-----------------------------------------------------------
|
195
|
+
PicturesControllerTest: test_create_action_via_html5_upload
|
196
|
+
-----------------------------------------------------------
|
197
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')[0m
|
198
|
+
Processing by Ckeditor::PicturesController#create as HTML
|
199
|
+
Parameters: {"qqfile"=>"rails.png"}
|
200
|
+
Completed 500 Internal Server Error in 1ms
|
201
|
+
[1m[35mCkeditor::Picture Load (0.1ms)[0m SELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')
|
202
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
203
|
+
[1m[35m (0.0ms)[0m begin transaction
|
204
|
+
-----------------------------------------------------------
|
205
|
+
PicturesControllerTest: test_destroy_action_via_filebrowser
|
206
|
+
-----------------------------------------------------------
|
207
|
+
[1m[36mCkeditor::Picture Load (0.1ms)[0m [1mSELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')[0m
|
208
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
209
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
210
|
+
-----------------------------------------
|
211
|
+
PicturesControllerTest: test_index_action
|
212
|
+
-----------------------------------------
|
213
|
+
Processing by Ckeditor::PicturesController#index as HTML
|
214
|
+
[1m[35mCkeditor::Picture Load (0.1ms)[0m SELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture') ORDER BY id desc LIMIT 24 OFFSET 0
|
215
|
+
Rendered /data/ckeditor/app/views/ckeditor/shared/_asset.html.erb (0.0ms)
|
216
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')[0m
|
217
|
+
Rendered /data/ckeditor/app/views/ckeditor/shared/_asset_tmpl.html.erb (0.2ms)
|
218
|
+
Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.2ms)
|
219
|
+
[1m[35mCkeditor::Picture Load (0.1ms)[0m SELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')
|
220
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
221
|
+
[1m[35m (0.0ms)[0m begin transaction
|
222
|
+
-------------------------------------------------------------
|
223
|
+
PicturesControllerTest: test_invalid_params_for_create_action
|
224
|
+
-------------------------------------------------------------
|
225
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')[0m
|
226
|
+
Processing by Ckeditor::PicturesController#create as HTML
|
227
|
+
Parameters: {"qqfile"=>nil}
|
228
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
229
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
230
|
+
Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
231
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')
|
232
|
+
[1m[36mCkeditor::Picture Load (0.1ms)[0m [1mSELECT "ckeditor_assets".* FROM "ckeditor_assets" WHERE "ckeditor_assets"."type" IN ('Ckeditor::Picture')[0m
|
233
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
234
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
235
|
+
---------------------------------------------
|
236
|
+
PostsControllerTest: test_form_builder_helper
|
237
|
+
---------------------------------------------
|
238
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
239
|
+
[1m[36mSQL (2.2ms)[0m [1mINSERT INTO "posts" ("content", "created_at", "info", "title", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["content", "content"], ["created_at", Thu, 13 Feb 2014 01:28:12 UTC +00:00], ["info", "info"], ["title", "test"], ["updated_at", Thu, 13 Feb 2014 01:28:12 UTC +00:00]]
|
240
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
241
|
+
Processing by PostsController#new as HTML
|
242
|
+
Rendered posts/_form.html.erb (5.3ms)
|
243
|
+
Completed 500 Internal Server Error in 14ms
|
244
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
245
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
|
246
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
247
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
248
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
249
|
+
---------------------------------------------
|
250
|
+
PostsControllerTest: test_include_javascripts
|
251
|
+
---------------------------------------------
|
252
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
253
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "posts" ("content", "created_at", "info", "title", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["content", "content"], ["created_at", Thu, 13 Feb 2014 01:28:12 UTC +00:00], ["info", "info"], ["title", "test"], ["updated_at", Thu, 13 Feb 2014 01:28:12 UTC +00:00]]
|
254
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
255
|
+
Processing by PostsController#index as HTML
|
256
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts"[0m
|
257
|
+
Completed 500 Internal Server Error in 5ms
|
258
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
259
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
|
260
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
261
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
262
|
+
[1m[35m (0.0ms)[0m begin transaction
|
263
|
+
-----------------------------------------------------
|
264
|
+
PostsControllerTest: test_pass_text_area_with_options
|
265
|
+
-----------------------------------------------------
|
266
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
267
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "posts" ("content", "created_at", "info", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "content"], ["created_at", Thu, 13 Feb 2014 01:28:12 UTC +00:00], ["info", "info"], ["title", "test"], ["updated_at", Thu, 13 Feb 2014 01:28:12 UTC +00:00]]
|
268
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
269
|
+
Processing by PostsController#index as HTML
|
270
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts"
|
271
|
+
Completed 500 Internal Server Error in 4ms
|
272
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
273
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
|
274
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
275
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
276
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
277
|
+
-----------------------------------------
|
278
|
+
PostsControllerTest: test_text_area_value
|
279
|
+
-----------------------------------------
|
280
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
281
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "posts" ("content", "created_at", "info", "title", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["content", "content"], ["created_at", Thu, 13 Feb 2014 01:28:12 UTC +00:00], ["info", "info"], ["title", "test"], ["updated_at", Thu, 13 Feb 2014 01:28:12 UTC +00:00]]
|
282
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
283
|
+
Processing by PostsController#edit as HTML
|
284
|
+
Parameters: {"id"=>"1"}
|
285
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1[0m [["id", "1"]]
|
286
|
+
Rendered posts/_form.html.erb (1.7ms)
|
287
|
+
Completed 500 Internal Server Error in 6ms
|
288
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
289
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
|
290
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
291
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
292
|
+
[1m[35m (0.1ms)[0m begin transaction
|
293
|
+
--------------------------------
|
294
|
+
UtilsTest: test_exists_filethumb
|
295
|
+
--------------------------------
|
296
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
297
|
+
[1m[35m (0.0ms)[0m begin transaction
|
298
|
+
-------------------------------
|
299
|
+
UtilsTest: test_wrong_filethumb
|
300
|
+
-------------------------------
|
301
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|