glebtv-ckeditor 4.7.3 → 4.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +13 -12
- data/README.md +358 -2
- data/Rakefile +17 -17
- data/app/assets/javascripts/ckeditor/config.js.erb +3 -3
- data/app/controllers/ckeditor/application_controller.rb +3 -0
- data/app/controllers/ckeditor/attachment_files_controller.rb +2 -0
- data/app/controllers/ckeditor/pictures_controller.rb +2 -0
- data/app/helpers/ckeditor/application_helper.rb +2 -0
- data/config/locales/bg.ckeditor.yml +9 -0
- data/config/locales/cs.ckeditor.yml +9 -0
- data/config/locales/da.ckeditor.yml +9 -0
- data/config/locales/de.ckeditor.yml +9 -0
- data/config/locales/el-GR.cdkeditor.yml +9 -0
- data/config/locales/es.ckeditor.yml +9 -0
- data/config/locales/fr.ckeditor.yml +9 -0
- data/config/locales/hu.ckeditor.yml +9 -0
- data/config/locales/it.ckeditor.yml +9 -0
- data/config/locales/ja.ckeditor.yml +9 -0
- data/config/locales/nb.ckeditor.yml +9 -0
- data/config/locales/nl.ckeditor.yml +9 -0
- data/config/locales/pl.ckeditor.yml +9 -0
- data/config/locales/pt-BR.ckeditor.yml +9 -0
- data/config/locales/pt-PT.ckeditor.yml +9 -0
- data/config/locales/pt.ckeditor.yml +9 -0
- data/config/locales/sq.ckeditor.yml +9 -0
- data/config/locales/sv-SE.ckeditor.yml +9 -0
- data/config/locales/tr.ckeditor.yml +9 -0
- data/config/locales/uk.ckeditor.yml +9 -0
- data/config/locales/zh-CN.ckeditor.yml +9 -0
- data/config/locales/zh-TW.ckeditor.yml +9 -0
- data/config/routes.rb +2 -0
- data/lib/ckeditor.rb +13 -16
- data/lib/ckeditor/asset_response.rb +15 -4
- data/lib/ckeditor/backend/active_storage.rb +68 -0
- data/lib/ckeditor/backend/carrierwave.rb +2 -12
- data/lib/ckeditor/backend/dragonfly.rb +2 -0
- data/lib/ckeditor/backend/paperclip.rb +2 -15
- data/lib/ckeditor/backend/shrine.rb +29 -0
- data/lib/ckeditor/helpers/controllers.rb +2 -0
- data/lib/ckeditor/helpers/form_builder.rb +2 -0
- data/lib/ckeditor/helpers/form_helper.rb +2 -0
- data/lib/ckeditor/helpers/view_helper.rb +2 -0
- data/lib/ckeditor/hooks/cancan.rb +4 -1
- data/lib/ckeditor/hooks/formtastic.rb +2 -0
- data/lib/ckeditor/hooks/pundit.rb +2 -0
- data/lib/ckeditor/hooks/simple_form.rb +2 -0
- data/lib/ckeditor/http.rb +8 -5
- data/lib/ckeditor/orm/active_record.rb +2 -0
- data/lib/ckeditor/orm/base.rb +11 -2
- data/lib/ckeditor/orm/mongoid.rb +2 -0
- data/lib/ckeditor/paginatable.rb +2 -0
- data/lib/ckeditor/rails.rb +2 -0
- data/lib/ckeditor/rails_admin/field.rb +16 -3
- data/lib/ckeditor/text_area.rb +2 -0
- data/lib/ckeditor/utils.rb +3 -16
- data/lib/ckeditor/utils/javascript_code.rb +1 -1
- data/lib/ckeditor/version.rb +4 -2
- data/lib/generators/ckeditor/install_generator.rb +16 -19
- data/lib/generators/ckeditor/pundit_policy_generator.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/active_storage/ckeditor/asset.rb +10 -0
- data/lib/generators/ckeditor/templates/active_record/{refile → active_storage}/ckeditor/attachment_file.rb +3 -1
- data/lib/generators/ckeditor/templates/active_record/active_storage/ckeditor/picture.rb +13 -0
- data/lib/generators/ckeditor/templates/active_record/{carrierwave/migration_versioned.rb → active_storage/migration.rb} +8 -5
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +7 -5
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +7 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +2 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +8 -6
- data/lib/generators/ckeditor/templates/active_record/{refile → shrine}/ckeditor/asset.rb +3 -1
- data/lib/generators/ckeditor/templates/active_record/shrine/ckeditor/attachment_file.rb +21 -0
- data/lib/generators/ckeditor/templates/active_record/shrine/ckeditor/picture.rb +49 -0
- data/lib/generators/ckeditor/templates/active_record/shrine/migration.rb +22 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +2 -1
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +2 -3
- data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +2 -0
- data/lib/generators/ckeditor/templates/base/shrine/initializer.rb +25 -0
- data/lib/generators/ckeditor/templates/ckeditor.rb +3 -6
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +2 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +2 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +2 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +2 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +2 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +2 -0
- data/lib/generators/ckeditor/templates/mongoid/shrine/ckeditor/asset.rb +8 -0
- data/lib/generators/ckeditor/templates/mongoid/shrine/ckeditor/attachment_file.rb +21 -0
- data/lib/generators/ckeditor/templates/mongoid/shrine/ckeditor/picture.rb +47 -0
- data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +2 -0
- data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +2 -0
- data/lib/tasks/ckeditor.rake +2 -0
- data/test/controllers/attachment_files_controller_test.rb +17 -15
- data/test/controllers/pictures_controller_test.rb +17 -15
- data/test/dummy/Rakefile +2 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -2
- data/test/dummy/app/controllers/application_controller.rb +2 -0
- data/test/dummy/app/controllers/posts_controller.rb +2 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/posts_helper.rb +2 -0
- data/test/dummy/app/models/post.rb +2 -0
- data/test/dummy/app/views/posts/index.html.erb +0 -3
- data/test/dummy/app/views/posts/show.html.erb +3 -0
- data/test/dummy/config.ru +2 -0
- data/test/dummy/config/application.rb +5 -1
- data/test/dummy/config/boot.rb +2 -0
- data/test/dummy/config/environment.rb +2 -0
- data/test/dummy/config/environments/development.rb +2 -0
- data/test/dummy/config/environments/production.rb +2 -0
- data/test/dummy/config/environments/test.rb +5 -3
- data/test/dummy/config/initializers/assets.rb +2 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +2 -0
- data/test/dummy/config/initializers/ckeditor.rb +2 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +2 -0
- data/test/dummy/config/initializers/inflections.rb +2 -0
- data/test/dummy/config/initializers/mime_types.rb +2 -0
- data/test/dummy/config/initializers/paperclip.rb +2 -0
- data/test/dummy/config/initializers/session_store.rb +2 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +2 -0
- data/test/dummy/config/routes.rb +2 -0
- data/test/dummy/config/storage.yml +3 -0
- data/test/dummy/db/migrate/20110623120047_create_posts.rb +5 -3
- data/test/dummy/db/migrate/20170806125915_create_active_storage_tables.rb +26 -0
- data/test/dummy/script/rails +2 -0
- data/test/functional/posts_controller_test.rb +18 -16
- data/test/generators/install_generator_test.rb +58 -56
- data/test/integration/navigation_test.rb +2 -0
- data/test/models/attachment_file_test.rb +4 -4
- data/test/models/ckeditor_test.rb +3 -21
- data/test/models/picture_test.rb +12 -10
- data/test/models/utils_test.rb +2 -0
- data/test/orm/active_record.rb +11 -1
- data/test/orm/mongoid.rb +2 -0
- data/test/support/helpers.rb +2 -0
- data/test/support/integration_case.rb +2 -0
- data/test/test_helper.rb +15 -9
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +1404 -859
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +8 -7
- data/vendor/assets/javascripts/ckeditor/README.md +5 -5
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +7 -7
- data/vendor/assets/javascripts/ckeditor/build-config.js +12 -6
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +1090 -907
- data/vendor/assets/javascripts/ckeditor/config.js +2 -2
- data/vendor/assets/javascripts/ckeditor/contents.css +7 -7
- data/vendor/assets/javascripts/ckeditor/lang/en.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/autocomplete.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/autoformat.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/commentselectedrange.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/searchcode.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/uncommentselectedrange.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -6
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.handlebars.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +236 -218
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/darcula.css +51 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/gruvbox-dark.css +37 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/idea.css +42 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lucario.css +37 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/nord.css +42 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/oceanic-next.css +44 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/shadowfox.css +52 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ssms.css +16 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/yonce.css +59 -0
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.css +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/styles/dialog.css +18 -0
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +23 -23
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +17 -17
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +17 -16
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +7 -6
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +1271 -44
- data/vendor/assets/javascripts/ckeditor/plugins/image/icons/hidpi/image.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/icons/image.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/lang/en.js +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/lang/ru.js +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/plugin.js +184 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/contents.css +35 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/image2.html +339 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/dialogs/image2.js +553 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/icons/image.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/lang/en.js +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/lang/ru.js +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/plugin.js +1783 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/image2.html +69 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +27 -25
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +8 -8
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/fr.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +41 -51
- data/vendor/assets/javascripts/ckeditor/plugins/pastetools/filter/common.js +22 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastetools/filter/image.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/preview/images/pagebreak.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/preview/styles/screen.css +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +1 -17
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +63 -7
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -33
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +10 -10
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +8 -7
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +20 -19
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -15
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/widget/images/handle.png +0 -0
- data/vendor/assets/javascripts/ckeditor/{samples/toolbarconfigurator/lib/codemirror/LICENSE → plugins/wordcount/LICENSE.md} +21 -19
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/README.md +106 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +475 -378
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/maxParagraphs.html +26 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +62 -7
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +82 -82
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +15 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/README.md +156 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +8 -7
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_gecko.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_iequirks.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie8.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_iequirks.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_gecko.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie8.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_iequirks.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/readme.md +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/skin.js +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +3 -3
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +5 -5
- data/vendor/assets/javascripts/ckeditor/skins/moono/skin.js +2 -2
- data/vendor/assets/javascripts/ckeditor/styles.js +4 -4
- data/vendor/assets/javascripts/ckeditor/vendor/promise.js +13 -0
- metadata +143 -138
- data/lib/ckeditor/backend/refile.rb +0 -39
- data/lib/ckeditor/utils/content_type_detector.rb +0 -38
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration_versioned.rb +0 -23
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration_versioned.rb +0 -23
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +0 -11
- data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +0 -23
- data/lib/generators/ckeditor/templates/active_record/refile/migration_versioned.rb +0 -23
- data/test/support/raw_post.rb +0 -9
- data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -169
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +0 -3
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +0 -8
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +0 -7
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +0 -7
- data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +0 -929
- data/vendor/assets/javascripts/ckeditor/samples/css/samples.css +0 -1632
- data/vendor/assets/javascripts/ckeditor/samples/img/github-top.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/header-bg.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/header-separator.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/navigation-tip.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/index.html +0 -128
- data/vendor/assets/javascripts/ckeditor/samples/js/sample.js +0 -53
- data/vendor/assets/javascripts/ckeditor/samples/js/sf.js +0 -17
- data/vendor/assets/javascripts/ckeditor/samples/old/ajax.html +0 -85
- data/vendor/assets/javascripts/ckeditor/samples/old/api.html +0 -210
- data/vendor/assets/javascripts/ckeditor/samples/old/appendto.html +0 -59
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +0 -204
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/posteddata.php +0 -59
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/sample.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +0 -7
- data/vendor/assets/javascripts/ckeditor/samples/old/datafiltering.html +0 -508
- data/vendor/assets/javascripts/ckeditor/samples/old/dialog/assets/my_dialog.js +0 -48
- data/vendor/assets/javascripts/ckeditor/samples/old/dialog/dialog.html +0 -190
- data/vendor/assets/javascripts/ckeditor/samples/old/divreplace.html +0 -144
- data/vendor/assets/javascripts/ckeditor/samples/old/enterkey/enterkey.html +0 -106
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/swfobject.js +0 -19
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputforflash.html +0 -283
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputhtml.html +0 -224
- data/vendor/assets/javascripts/ckeditor/samples/old/index.html +0 -131
- data/vendor/assets/javascripts/ckeditor/samples/old/inlineall.html +0 -314
- data/vendor/assets/javascripts/ckeditor/samples/old/inlinebycode.html +0 -124
- data/vendor/assets/javascripts/ckeditor/samples/old/inlinetextarea.html +0 -113
- data/vendor/assets/javascripts/ckeditor/samples/old/jquery.html +0 -103
- data/vendor/assets/javascripts/ckeditor/samples/old/magicline/magicline.html +0 -209
- data/vendor/assets/javascripts/ckeditor/samples/old/readonly.html +0 -76
- data/vendor/assets/javascripts/ckeditor/samples/old/replacebyclass.html +0 -60
- data/vendor/assets/javascripts/ckeditor/samples/old/replacebycode.html +0 -59
- data/vendor/assets/javascripts/ckeditor/samples/old/sample.css +0 -357
- data/vendor/assets/javascripts/ckeditor/samples/old/sample.js +0 -50
- data/vendor/assets/javascripts/ckeditor/samples/old/sample_posteddata.php +0 -16
- data/vendor/assets/javascripts/ckeditor/samples/old/tabindex.html +0 -78
- data/vendor/assets/javascripts/ckeditor/samples/old/toolbar/toolbar.html +0 -235
- data/vendor/assets/javascripts/ckeditor/samples/old/uicolor.html +0 -72
- data/vendor/assets/javascripts/ckeditor/samples/old/uilanguages.html +0 -122
- data/vendor/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +0 -80
- data/vendor/assets/javascripts/ckeditor/samples/old/xhtmlstyle.html +0 -234
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/css/fontello.css +0 -55
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +0 -10
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/config.json +0 -28
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.svg +0 -14
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +0 -446
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +0 -13
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +0 -9
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +0 -33
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +0 -14
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.css +0 -325
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +0 -288
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +0 -25
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +0 -36
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css +0 -38
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +0 -16
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'mini_magick'
|
2
4
|
|
3
5
|
module Ckeditor
|
@@ -11,7 +13,6 @@ module Ckeditor
|
|
11
13
|
module ClassMethods
|
12
14
|
def self.extended(base)
|
13
15
|
base.class_eval do
|
14
|
-
process :extract_content_type
|
15
16
|
process :extract_size
|
16
17
|
end
|
17
18
|
end
|
@@ -36,21 +37,10 @@ module Ckeditor
|
|
36
37
|
end
|
37
38
|
end
|
38
39
|
|
39
|
-
def extract_content_type
|
40
|
-
model.data_content_type = Utils::ContentTypeDetector.new(file.path).detect
|
41
|
-
end
|
42
|
-
|
43
40
|
def extract_size
|
44
41
|
model.data_file_size = file.size
|
45
42
|
end
|
46
43
|
|
47
|
-
def extract_dimensions
|
48
|
-
if model.image? && model.has_dimensions?
|
49
|
-
model.width = magick[:width]
|
50
|
-
model.height = magick[:height]
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
44
|
def magick
|
55
45
|
@magick ||= ::MiniMagick::Image.new(current_path)
|
56
46
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Ckeditor
|
2
4
|
module Backend
|
3
5
|
module Paperclip
|
@@ -9,9 +11,6 @@ module Ckeditor
|
|
9
11
|
module ClassMethods
|
10
12
|
def self.extended(base)
|
11
13
|
base.class_eval do
|
12
|
-
before_validation :extract_content_type
|
13
|
-
before_create :extract_dimensions
|
14
|
-
|
15
14
|
delegate :url, :path, :styles, :content_type, to: :data
|
16
15
|
end
|
17
16
|
end
|
@@ -27,18 +26,6 @@ module Ckeditor
|
|
27
26
|
def file
|
28
27
|
@file ||= data.respond_to?(:queued_for_write) ? data.queued_for_write[:original] : data.to_file
|
29
28
|
end
|
30
|
-
|
31
|
-
def extract_dimensions
|
32
|
-
if image? && has_dimensions?
|
33
|
-
self.width = geometry.width
|
34
|
-
self.height = geometry.height
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def extract_content_type
|
39
|
-
path = file.nil? ? nil : file.path
|
40
|
-
self.data_content_type = Utils::ContentTypeDetector.new(path).detect
|
41
|
-
end
|
42
29
|
end
|
43
30
|
end
|
44
31
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ckeditor
|
4
|
+
module Backend
|
5
|
+
module Shrine
|
6
|
+
def self.included(base)
|
7
|
+
base.send(:include, InstanceMethods)
|
8
|
+
end
|
9
|
+
|
10
|
+
module InstanceMethods
|
11
|
+
def url
|
12
|
+
data_url
|
13
|
+
end
|
14
|
+
|
15
|
+
def filename
|
16
|
+
datasource['filename']
|
17
|
+
end
|
18
|
+
|
19
|
+
def size
|
20
|
+
datasource['size']
|
21
|
+
end
|
22
|
+
|
23
|
+
def datasource
|
24
|
+
data.metadata
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cancan'
|
2
4
|
|
3
5
|
module Ckeditor
|
4
6
|
module Hooks
|
5
|
-
# This adapter is for the
|
7
|
+
# This adapter is for the CanCanCan[https://github.com/CanCanCommunity/cancancan] authorization library.
|
6
8
|
# You can create another adapter for different authorization behavior, just be certain it
|
7
9
|
# responds to each of the public methods here.
|
8
10
|
class CanCanAuthorization
|
@@ -45,3 +47,4 @@ module Ckeditor
|
|
45
47
|
end
|
46
48
|
|
47
49
|
Ckeditor::AUTHORIZATION_ADAPTERS[:cancan] = Ckeditor::Hooks::CanCanAuthorization
|
50
|
+
Ckeditor::AUTHORIZATION_ADAPTERS[:cancancan] = Ckeditor::Hooks::CanCanAuthorization
|
data/lib/ckeditor/http.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'digest/sha1'
|
3
4
|
|
4
5
|
module Ckeditor
|
@@ -41,16 +42,16 @@ module Ckeditor
|
|
41
42
|
class QqFile < ::Tempfile
|
42
43
|
attr_reader :original_filename
|
43
44
|
|
44
|
-
def initialize(filename, request
|
45
|
+
def initialize(filename, request)
|
45
46
|
@original_filename = filename
|
46
47
|
@request = request
|
47
48
|
|
48
|
-
super(Digest::SHA1.hexdigest(filename)
|
49
|
-
binmode
|
49
|
+
super(Digest::SHA1.hexdigest(filename))
|
50
50
|
fetch
|
51
51
|
end
|
52
52
|
|
53
53
|
def fetch
|
54
|
+
binmode
|
54
55
|
write(body)
|
55
56
|
rewind
|
56
57
|
self
|
@@ -72,12 +73,14 @@ module Ckeditor
|
|
72
73
|
# Convert nested Hash to HashWithIndifferentAccess and replace
|
73
74
|
# file upload hash with UploadedFile objects
|
74
75
|
def self.normalize_param(*args)
|
75
|
-
value = args.first
|
76
|
+
value = args.compact.first
|
76
77
|
|
77
78
|
if value.is_a?(Hash) && value.key?(:tempfile)
|
78
79
|
UploadedFile.new(value)
|
79
80
|
elsif value.is_a?(String)
|
80
81
|
QqFile.new(*args)
|
82
|
+
elsif value.is_a?(ActionDispatch::Request)
|
83
|
+
value.params['upload']
|
81
84
|
else
|
82
85
|
value
|
83
86
|
end
|
data/lib/ckeditor/orm/base.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Ckeditor
|
2
4
|
module Orm
|
3
5
|
module Base
|
@@ -6,6 +8,9 @@ module Ckeditor
|
|
6
8
|
def filename
|
7
9
|
data_file_name
|
8
10
|
end
|
11
|
+
def fileName
|
12
|
+
filename
|
13
|
+
end
|
9
14
|
|
10
15
|
def size
|
11
16
|
data_file_size
|
@@ -31,14 +36,18 @@ module Ckeditor
|
|
31
36
|
url(:thumb)
|
32
37
|
end
|
33
38
|
|
39
|
+
def uploaded
|
40
|
+
1
|
41
|
+
end
|
42
|
+
|
34
43
|
def as_json_methods
|
35
|
-
[:url_content, :url_thumb, :size, :filename, :format_created_at]
|
44
|
+
[:url, :url_content, :url_thumb, :size, :filename, :fileName, :format_created_at, :uploaded]
|
36
45
|
end
|
37
46
|
|
38
47
|
def as_json(options = nil)
|
39
48
|
options = {
|
40
49
|
methods: as_json_methods,
|
41
|
-
root: 'asset'
|
50
|
+
#root: 'asset'
|
42
51
|
}.merge!(options || {})
|
43
52
|
|
44
53
|
super(options)
|
data/lib/ckeditor/orm/mongoid.rb
CHANGED
data/lib/ckeditor/paginatable.rb
CHANGED
data/lib/ckeditor/rails.rb
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
-
require 'rails_admin/config/fields/types/ck_editor'
|
2
|
-
|
3
1
|
module RailsAdmin::Config::Fields::Types
|
4
|
-
class Ckeditor < RailsAdmin::Config::Fields::Types::
|
2
|
+
class Ckeditor < RailsAdmin::Config::Fields::Types::Text
|
5
3
|
RailsAdmin::Config::Fields::Types::register(:ckeditor, self)
|
4
|
+
register_instance_option :config_js do
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
register_instance_option :location do
|
9
|
+
nil
|
10
|
+
end
|
11
|
+
|
12
|
+
register_instance_option :base_location do
|
13
|
+
"#{Rails.application.config.assets.prefix}/ckeditor/"
|
14
|
+
end
|
15
|
+
|
16
|
+
register_instance_option :partial do
|
17
|
+
:form_ck_editor
|
18
|
+
end
|
6
19
|
end
|
7
20
|
end
|
data/lib/ckeditor/text_area.rb
CHANGED
data/lib/ckeditor/utils.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'active_support/json/encoding'
|
4
4
|
|
5
5
|
module Ckeditor
|
6
6
|
module Utils
|
7
7
|
autoload :JavascriptCode, 'ckeditor/utils/javascript_code'
|
8
|
-
autoload :ContentTypeDetector, 'ckeditor/utils/content_type_detector'
|
9
8
|
|
10
9
|
class << self
|
11
10
|
def escape_single_quotes(str)
|
@@ -77,19 +76,11 @@ module Ckeditor
|
|
77
76
|
relative_folder = Ckeditor.root_path.join(relative_path)
|
78
77
|
folder = relative_folder.join(path)
|
79
78
|
extensions = '*.{js,css,png,gif,jpg,html}'
|
80
|
-
languages = (Ckeditor.assets_languages || [])
|
81
79
|
|
82
80
|
# Files at root
|
83
81
|
files = Dir[folder.join(extensions)]
|
84
82
|
|
85
|
-
|
86
|
-
if Ckeditor.assets_plugins.nil?
|
87
|
-
files += Dir[folder.join('plugins', '**', extensions)]
|
88
|
-
else
|
89
|
-
Ckeditor.assets_plugins.each do |plugin|
|
90
|
-
files += Dir[folder.join('plugins', plugin, '**', extensions)]
|
91
|
-
end
|
92
|
-
end
|
83
|
+
files += Dir[folder.join('plugins', '**', extensions)]
|
93
84
|
|
94
85
|
# Other folders
|
95
86
|
Dir[folder.join('*/')].each do |subfolder|
|
@@ -101,11 +92,7 @@ module Ckeditor
|
|
101
92
|
files.inject([]) do |items, name|
|
102
93
|
file = Pathname.new(name)
|
103
94
|
base = file.basename('.*').to_s
|
104
|
-
|
105
|
-
if !name.include?('/lang/') || languages.include?(base) || languages.empty?
|
106
|
-
items << file.relative_path_from(relative_folder).to_s
|
107
|
-
end
|
108
|
-
|
95
|
+
items << file.relative_path_from(relative_folder).to_s
|
109
96
|
items
|
110
97
|
end
|
111
98
|
end
|
data/lib/ckeditor/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rails/generators'
|
2
4
|
require 'rails/generators/migration'
|
3
5
|
|
@@ -13,14 +15,14 @@ module Ckeditor
|
|
13
15
|
desc: 'Backend processor for upload support'
|
14
16
|
|
15
17
|
class_option :backend, type: :string, default: 'paperclip',
|
16
|
-
desc: 'paperclip (default),
|
18
|
+
desc: 'paperclip (default), active_storage, carrierwave or dragonfly'
|
17
19
|
|
18
20
|
def self.source_root
|
19
21
|
@source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
20
22
|
end
|
21
23
|
|
22
24
|
def self.next_migration_number(_dirname)
|
23
|
-
Time.now.strftime('%Y%m%d%H%M%S')
|
25
|
+
Time.now.utc.strftime('%Y%m%d%H%M%S')
|
24
26
|
end
|
25
27
|
|
26
28
|
# copy configuration
|
@@ -30,6 +32,10 @@ module Ckeditor
|
|
30
32
|
if backend_dragonfly?
|
31
33
|
template 'base/dragonfly/initializer.rb', 'config/initializers/ckeditor_dragonfly.rb'
|
32
34
|
end
|
35
|
+
|
36
|
+
if backend_shrine?
|
37
|
+
template 'base/shrine/initializer.rb', 'config/initializers/ckeditor_shrine.rb'
|
38
|
+
end
|
33
39
|
end
|
34
40
|
|
35
41
|
def mount_engine
|
@@ -52,11 +58,10 @@ module Ckeditor
|
|
52
58
|
end
|
53
59
|
|
54
60
|
def create_ckeditor_migration
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
end
|
61
|
+
return unless ['active_record'].include?(orm)
|
62
|
+
|
63
|
+
migration_template "#{generator_dir}/migration.rb",
|
64
|
+
File.join('db/migrate', 'create_ckeditor_assets.rb')
|
60
65
|
end
|
61
66
|
|
62
67
|
protected
|
@@ -69,6 +74,10 @@ module Ckeditor
|
|
69
74
|
backend == 'dragonfly'
|
70
75
|
end
|
71
76
|
|
77
|
+
def backend_shrine?
|
78
|
+
backend == 'shrine'
|
79
|
+
end
|
80
|
+
|
72
81
|
def ckeditor_dir
|
73
82
|
'ckeditor'
|
74
83
|
end
|
@@ -88,18 +97,6 @@ module Ckeditor
|
|
88
97
|
def backend
|
89
98
|
(options[:backend] || 'paperclip').to_s
|
90
99
|
end
|
91
|
-
|
92
|
-
def rails5?
|
93
|
-
Rails.version.start_with? '5'
|
94
|
-
end
|
95
|
-
|
96
|
-
def migration_version
|
97
|
-
"[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
|
98
|
-
end
|
99
|
-
|
100
|
-
def migration_file
|
101
|
-
rails5? ? 'migration_versioned' : 'migration'
|
102
|
-
end
|
103
100
|
end
|
104
101
|
end
|
105
102
|
end
|