card 1.19.0 → 1.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/card.gemspec +3 -3
- data/config/initializers/{02_extensions → 02_patches}/kaminari.rb +16 -5
- data/config/initializers/patches.rb +7 -0
- data/config/locales/en.yml +15 -6
- data/db/migrate_core_cards/20150724123438_update_file_and_image_cards.rb +11 -11
- data/db/migrate_core_cards/data/themes/bootstrap_default/_variables.scss +2 -1
- data/db/seed/new/card_actions.yml +915 -443
- data/db/seed/new/card_acts.yml +348 -186
- data/db/seed/new/card_changes.yml +4409 -3329
- data/db/seed/new/card_references.yml +220 -3
- data/db/seed/new/cards.yml +6687 -3445
- data/db/seed/test/fixtures/card_actions.yml +1953 -1513
- data/db/seed/test/fixtures/card_acts.yml +615 -453
- data/db/seed/test/fixtures/card_changes.yml +7596 -6516
- data/db/seed/test/fixtures/card_references.yml +892 -675
- data/db/seed/test/fixtures/cards.yml +8803 -5561
- data/db/seeds.rb +8 -0
- data/lib/card.rb +10 -0
- data/lib/card/auth/setup.rb +6 -6
- data/lib/card/mod/dirs.rb +13 -3
- data/lib/card/set/advanced_api.rb +5 -4
- data/lib/cardio.rb +7 -3
- data/mod/Modfile +2 -2
- data/mod/admin/set/self/admin.rb +47 -30
- data/mod/admin/set/self/admin_info.rb +11 -11
- data/mod/basic_formats/set/self/head.rb +1 -1
- data/mod/{basic_types → basic_formats}/spec/set/all/all_css_spec.rb +0 -0
- data/mod/{basic_types → basic_formats}/spec/set/all/all_csv_spec.rb +0 -0
- data/mod/{basic_types → basic_formats}/spec/set/all/base_spec.rb +0 -0
- data/mod/{basic_types → basic_formats}/spec/set/all/file_spec.rb +0 -0
- data/mod/{basic_types → basic_formats}/spec/set/all/json_spec.rb +0 -0
- data/mod/{basic_types → basic_formats}/spec/set/all/rss_spec.rb +0 -0
- data/mod/{basic_types → basic_formats}/spec/set/all/text_spec.rb +0 -0
- data/mod/bootstrap/lib/stylesheets/bootstrap/_variables.scss +1 -1
- data/mod/bootstrap/set/all/bootstrap/table.rb +1 -1
- data/mod/bootstrap/set/self/bootswatch_shared.rb +1 -1
- data/mod/carrierwave/Gemfile +4 -0
- data/mod/carrierwave/lib/carrier_wave/cardmount.rb +24 -13
- data/mod/carrierwave/lib/carrier_wave/file_card_uploader.rb +189 -57
- data/mod/carrierwave/lib/carrier_wave/image_card_uploader.rb +5 -0
- data/mod/carrierwave/set/abstract/attachment.rb +26 -190
- data/mod/carrierwave/set/abstract/attachment/paths.rb +50 -0
- data/mod/carrierwave/set/abstract/attachment/storage_type.rb +319 -0
- data/mod/carrierwave/set/abstract/attachment/upload_cache.rb +77 -0
- data/mod/carrierwave/set/all/file_utils.rb +28 -0
- data/mod/carrierwave/set/self/admin.rb +23 -0
- data/mod/carrierwave/set/type/file.rb +26 -23
- data/mod/carrierwave/set/type/image.rb +1 -0
- data/mod/carrierwave/spec/lib/carrier_wave/file_card_uploader_spec.rb +67 -0
- data/mod/carrierwave/spec/set/type/file_spec.rb +557 -0
- data/mod/{standard → carrierwave}/spec/set/type/image_spec.rb +22 -4
- data/mod/core/set/abstract/code_file.rb +3 -3
- data/mod/core/set/all/debug.rb +23 -0
- data/mod/core/set/all/name.rb +1 -1
- data/mod/core/set/all/permissions.rb +22 -12
- data/mod/core/set/all/tracked_attributes.rb +0 -76
- data/mod/core/set/all/trash.rb +50 -0
- data/mod/core/set/all/update_read_rules.rb +84 -0
- data/mod/core/set/all/utils.rb +1 -75
- data/mod/email/set/type_plus_right/user/follow.rb +4 -8
- data/mod/history/lib/card/act.rb +3 -1
- data/mod/history/lib/card/action.rb +3 -1
- data/mod/history/lib/card/action/differ.rb +12 -1
- data/mod/history/set/all/history.rb +2 -1
- data/mod/machines/file/all_script_machine_output/file.js +211 -0
- data/mod/machines/file/all_style_machine_output/file.css +19 -0
- data/mod/machines/set/abstract/machine.rb +270 -0
- data/mod/machines/set/abstract/machine_input.rb +76 -0
- data/mod/machines/set/right/machine_output.rb +9 -1
- data/mod/machines/set/type/coffee_script.rb +2 -6
- data/mod/machines/set/type/css.rb +2 -2
- data/mod/machines/set/type/java_script.rb +2 -2
- data/mod/machines/set/type/skin.rb +2 -2
- data/mod/machines/spec/set/abstract/machine_spec.rb +10 -0
- data/mod/{basic_types → pointer}/spec/set/type/pointer_spec.rb +10 -26
- data/mod/settings/set/right/script.rb +1 -1
- data/mod/settings/set/right/style.rb +1 -1
- data/mod/solid_cache/set/all/solid_cache.rb +1 -1
- data/mod/standard/file/credit_image/image-icon.png +0 -0
- data/mod/standard/file/credit_image/image-large.png +0 -0
- data/mod/standard/file/credit_image/image-medium.png +0 -0
- data/mod/standard/file/credit_image/image-small.png +0 -0
- data/mod/standard/file/favicon/image-icon.png +0 -0
- data/mod/standard/file/favicon/image-large.png +0 -0
- data/mod/standard/file/favicon/image-medium.png +0 -0
- data/mod/standard/file/favicon/image-small.png +0 -0
- data/mod/standard/file/logo/image-icon.png +0 -0
- data/mod/standard/file/logo/image-large.png +0 -0
- data/mod/standard/file/logo/image-medium.png +0 -0
- data/mod/standard/file/logo/image-small.png +0 -0
- data/mod/standard/set/all/links.rb +2 -2
- data/spec/spec_helper.rb +15 -3
- data/tmpsets/set/{mod014-admin → mod001-admin}/self/admin.rb +47 -30
- data/tmpsets/set/{mod014-admin → mod001-admin}/self/admin_info.rb +11 -11
- data/tmpsets/set/{mod014-admin → mod001-admin}/self/version.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/abstract/code_file.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/actify.rb +6 -5
- data/tmpsets/set/{mod001-core → mod002-core}/all/active_card.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/collection.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/content.rb +0 -0
- data/tmpsets/set/mod002-core/all/debug.rb +30 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/erb.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/event.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/export.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/fetch.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/haml.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/initialize.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/location_history.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/name.rb +1 -1
- data/tmpsets/set/{mod001-core → mod002-core}/all/name_validations.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/pattern.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/permissions.rb +22 -12
- data/tmpsets/set/{mod001-core → mod002-core}/all/phases.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/references.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/rules.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/stages.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/states.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/subcards.rb +0 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/templating.rb +0 -0
- data/tmpsets/set/mod002-core/all/tracked_attributes.rb +78 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/trash.rb +50 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/type.rb +0 -0
- data/tmpsets/set/mod002-core/all/update_read_rules.rb +91 -0
- data/tmpsets/set/mod002-core/all/utils.rb +62 -0
- data/tmpsets/set/{mod001-core → mod002-core}/all/view_cache.rb +0 -0
- data/tmpsets/set/{mod002-history → mod003-history}/all/actions.rb +0 -0
- data/tmpsets/set/{mod002-history → mod003-history}/all/content_history.rb +0 -0
- data/tmpsets/set/{mod002-history → mod003-history}/all/history.rb +2 -1
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/all/all_css.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/all/all_csv.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/all/all_js.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/all/base.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/all/file.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/all/json.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/all/rss.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/all/text.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/self/01_head/javascript.rb +0 -0
- data/tmpsets/set/{mod003-basic_formats → mod004-basic_formats}/self/head.rb +1 -1
- data/tmpsets/set/{mod004-pointer → mod005-pointer}/abstract/01_pointer.rb +0 -0
- data/tmpsets/set/{mod004-pointer → mod005-pointer}/abstract/01_pointer/edit.rb +0 -0
- data/tmpsets/set/{mod004-pointer → mod005-pointer}/abstract/code_pointer.rb +0 -0
- data/tmpsets/set/{mod004-pointer → mod005-pointer}/self/script_editors.rb +0 -0
- data/tmpsets/set/{mod004-pointer → mod005-pointer}/self/script_mods.rb +0 -0
- data/tmpsets/set/{mod004-pointer → mod005-pointer}/self/script_pointer_config.rb +0 -0
- data/tmpsets/set/{mod004-pointer → mod005-pointer}/type/pointer.rb +0 -0
- data/tmpsets/set/{mod005-ace_editor → mod006-ace_editor}/abstract/ace_editor.rb +0 -0
- data/tmpsets/set/{mod005-ace_editor → mod006-ace_editor}/self/script_ace.rb +0 -0
- data/tmpsets/set/{mod005-ace_editor → mod006-ace_editor}/self/script_ace_config.rb +0 -0
- data/tmpsets/set/{mod006-prosemirror_editor → mod007-prosemirror_editor}/abstract/prosemirror_editor.rb +0 -0
- data/tmpsets/set/{mod006-prosemirror_editor → mod007-prosemirror_editor}/self/script_prosemirror.rb +0 -0
- data/tmpsets/set/{mod006-prosemirror_editor → mod007-prosemirror_editor}/self/script_prosemirror_config.rb +0 -0
- data/tmpsets/set/{mod008-solid_cache → mod009-solid_cache}/abstract/solid_cache.rb +0 -0
- data/tmpsets/set/{mod008-solid_cache → mod009-solid_cache}/all/solid_cache.rb +0 -0
- data/tmpsets/set/{mod008-solid_cache → mod009-solid_cache}/right/solid_cache.rb +0 -0
- data/tmpsets/set/{mod009-basic_types → mod010-basic_types}/type/html.rb +0 -0
- data/tmpsets/set/{mod009-basic_types → mod010-basic_types}/type/plain_text.rb +0 -0
- data/tmpsets/set/mod011-machines/abstract/machine.rb +277 -0
- data/tmpsets/set/mod011-machines/abstract/machine_input.rb +83 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/abstract/script.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/all/reset_machines.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/right/machine_cache.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/right/machine_input.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/right/machine_output.rb +9 -1
- data/tmpsets/set/{mod010-machines → mod011-machines}/self/script_card_menu.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/self/script_html5shiv_printshiv.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/self/script_jquery.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/self/script_jquery_helper.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/self/script_slot.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/self/style_bootstrap_compatible.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/self/style_cards.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/self/style_jquery_ui_smoothness.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/type/coffee_script.rb +2 -6
- data/tmpsets/set/{mod010-machines → mod011-machines}/type/css.rb +2 -2
- data/tmpsets/set/{mod010-machines → mod011-machines}/type/java_script.rb +2 -2
- data/tmpsets/set/{mod010-machines → mod011-machines}/type/scss.rb +0 -0
- data/tmpsets/set/{mod010-machines → mod011-machines}/type/skin.rb +2 -2
- data/tmpsets/set/{mod011-settings → mod012-settings}/abstract/permission.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/add_help.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/comment.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/create.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/default.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/delete.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/help.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/read.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/script.rb +1 -1
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/structure.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/style.rb +1 -1
- data/tmpsets/set/{mod011-settings → mod012-settings}/right/update.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/accountable.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/add_help.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/autoname.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/captcha.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/create.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/default.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/default_html_view.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/delete.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/follow_fields.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/help.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/input.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/layout.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/on_create.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/on_delete.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/on_update.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/options.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/options_label.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/read.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/recent_settings.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/script.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/structure.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/style.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/table_of_contents.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/thanks.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/self/update.rb +0 -0
- data/tmpsets/set/{mod011-settings → mod012-settings}/type/setting.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/all/email_html.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/all/email_text.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/all/follow.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/all/notify.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/all/observer.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/bcc.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/cc.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/follow.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/follow_fields.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/followers.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/following.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/from.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/html_message.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/right/to.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/self/always.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/self/created.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/self/edited.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/self/follow.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/self/follow_defaults.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/self/never.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/type/email_template.rb +0 -0
- data/tmpsets/set/{mod012-email → mod013-email}/type_plus_right/user/follow.rb +4 -8
- data/tmpsets/set/{mod015-developer → mod014-developer}/all/event_viz.rb +0 -0
- data/tmpsets/set/{mod015-developer → mod014-developer}/all/view_viz.rb +0 -0
- data/tmpsets/set/{mod015-developer → mod014-developer}/right/debug.rb +0 -0
- data/tmpsets/set/mod015-carrierwave/abstract/attachment.rb +118 -0
- data/tmpsets/set/mod015-carrierwave/abstract/attachment/paths.rb +57 -0
- data/tmpsets/set/mod015-carrierwave/abstract/attachment/storage_type.rb +326 -0
- data/tmpsets/set/mod015-carrierwave/abstract/attachment/upload_cache.rb +84 -0
- data/tmpsets/set/mod015-carrierwave/all/file_utils.rb +35 -0
- data/tmpsets/set/mod015-carrierwave/self/admin.rb +30 -0
- data/tmpsets/set/{mod013-carrierwave → mod015-carrierwave}/type/file.rb +27 -24
- data/tmpsets/set/{mod013-carrierwave → mod015-carrierwave}/type/image.rb +1 -0
- data/tmpsets/set/mod016-standard/all/links.rb +2 -2
- data/tmpsets/set/mod018-bootstrap/all/bootstrap/table.rb +1 -1
- data/tmpsets/set/mod018-bootstrap/self/bootswatch_shared.rb +1 -1
- data/vendor/carrierwave/.gitignore +19 -0
- data/vendor/carrierwave/.rubocop.yml +262 -0
- data/vendor/carrierwave/.travis.yml +58 -0
- data/vendor/carrierwave/CHANGELOG.md +81 -0
- data/vendor/carrierwave/CONTRIBUTING.md +37 -0
- data/vendor/carrierwave/Gemfile +5 -0
- data/vendor/carrierwave/README.md +995 -0
- data/vendor/carrierwave/Rakefile +26 -0
- data/vendor/carrierwave/carrierwave.gemspec +45 -0
- data/vendor/carrierwave/cucumber.yml +2 -0
- data/vendor/carrierwave/features/caching.feature +28 -0
- data/vendor/carrierwave/features/download.feature +20 -0
- data/vendor/carrierwave/features/file_storage.feature +37 -0
- data/vendor/carrierwave/features/file_storage_overridden_filename.feature +38 -0
- data/vendor/carrierwave/features/file_storage_overridden_store_dir.feature +38 -0
- data/vendor/carrierwave/features/file_storage_reversing_processor.feature +43 -0
- data/vendor/carrierwave/features/fixtures/bork.txt +1 -0
- data/vendor/carrierwave/features/fixtures/monkey.txt +1 -0
- data/vendor/carrierwave/features/fixtures/upcased_bork.txt +1 -0
- data/vendor/carrierwave/features/mount_activerecord.feature +46 -0
- data/vendor/carrierwave/features/step_definitions/activerecord_steps.rb +20 -0
- data/vendor/carrierwave/features/step_definitions/caching_steps.rb +12 -0
- data/vendor/carrierwave/features/step_definitions/datamapper_steps.rb +27 -0
- data/vendor/carrierwave/features/step_definitions/download_steps.rb +8 -0
- data/vendor/carrierwave/features/step_definitions/file_steps.rb +51 -0
- data/vendor/carrierwave/features/step_definitions/general_steps.rb +102 -0
- data/vendor/carrierwave/features/step_definitions/mount_steps.rb +17 -0
- data/vendor/carrierwave/features/step_definitions/store_steps.rb +16 -0
- data/vendor/carrierwave/features/support/activerecord.rb +18 -0
- data/vendor/carrierwave/features/support/env.rb +19 -0
- data/vendor/carrierwave/features/versions_basics.feature +50 -0
- data/vendor/carrierwave/features/versions_caching_from_versions.feature +32 -0
- data/vendor/carrierwave/features/versions_nested_versions.feature +70 -0
- data/vendor/carrierwave/features/versions_overridden_filename.feature +51 -0
- data/vendor/carrierwave/features/versions_overriden_store_dir.feature +41 -0
- data/vendor/carrierwave/gemfiles/rails-4-0-stable.gemfile +5 -0
- data/vendor/carrierwave/gemfiles/rails-4-1-stable.gemfile +5 -0
- data/vendor/carrierwave/gemfiles/rails-4-2-stable.gemfile +5 -0
- data/vendor/carrierwave/gemfiles/rails-master.gemfile +11 -0
- data/vendor/carrierwave/lib/carrierwave.rb +93 -0
- data/vendor/carrierwave/lib/carrierwave/compatibility/paperclip.rb +103 -0
- data/vendor/carrierwave/lib/carrierwave/error.rb +8 -0
- data/vendor/carrierwave/lib/carrierwave/locale/cs.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/de.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/el.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/en.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/es.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/fr-CA.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/fr.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/id.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/ja.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/nb.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/nl.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/pl.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/pt-BR.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/pt-PT.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/ru.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/sk.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/tr.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/zh-CN.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/locale/zh-TW.yml +14 -0
- data/vendor/carrierwave/lib/carrierwave/mount.rb +444 -0
- data/vendor/carrierwave/lib/carrierwave/mounter.rb +163 -0
- data/vendor/carrierwave/lib/carrierwave/orm/activerecord.rb +103 -0
- data/vendor/carrierwave/lib/carrierwave/processing.rb +2 -0
- data/vendor/carrierwave/lib/carrierwave/processing/mini_magick.rb +328 -0
- data/vendor/carrierwave/lib/carrierwave/processing/rmagick.rb +379 -0
- data/vendor/carrierwave/lib/carrierwave/sanitized_file.rb +348 -0
- data/vendor/carrierwave/lib/carrierwave/storage.rb +2 -0
- data/vendor/carrierwave/lib/carrierwave/storage/abstract.rb +43 -0
- data/vendor/carrierwave/lib/carrierwave/storage/file.rb +118 -0
- data/vendor/carrierwave/lib/carrierwave/storage/fog.rb +462 -0
- data/vendor/carrierwave/lib/carrierwave/test/matchers.rb +394 -0
- data/vendor/carrierwave/lib/carrierwave/uploader.rb +67 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/cache.rb +207 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/callbacks.rb +33 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/configuration.rb +203 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/content_type_blacklist.rb +48 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/content_type_whitelist.rb +48 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/default_url.rb +17 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/download.rb +92 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/extension_blacklist.rb +51 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/extension_whitelist.rb +51 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/file_size.rb +41 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/magic_mime_blacklist.rb +94 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/magic_mime_whitelist.rb +94 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/mountable.rb +38 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/processing.rb +88 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/proxy.rb +86 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/remove.rb +21 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/serialization.rb +28 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/store.rb +93 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/url.rb +41 -0
- data/vendor/carrierwave/lib/carrierwave/uploader/versions.rb +295 -0
- data/vendor/carrierwave/lib/carrierwave/utilities.rb +6 -0
- data/vendor/carrierwave/lib/carrierwave/utilities/uri.rb +21 -0
- data/vendor/carrierwave/lib/carrierwave/validations/active_model.rb +78 -0
- data/vendor/carrierwave/lib/carrierwave/version.rb +3 -0
- data/vendor/carrierwave/lib/generators/templates/uploader.rb +49 -0
- data/vendor/carrierwave/lib/generators/uploader_generator.rb +7 -0
- data/vendor/carrierwave/script/console +10 -0
- data/vendor/carrierwave/script/destroy +14 -0
- data/vendor/carrierwave/script/generate +14 -0
- data/vendor/carrierwave/spec/compatibility/paperclip_spec.rb +138 -0
- data/vendor/carrierwave/spec/fixtures/Uppercase.jpg +1 -0
- data/vendor/carrierwave/spec/fixtures/bork.ttxt +1 -0
- data/vendor/carrierwave/spec/fixtures/bork.txt +1 -0
- data/vendor/carrierwave/spec/fixtures/bork.txtt +1 -0
- data/vendor/carrierwave/spec/fixtures/case.JPG +1 -0
- data/vendor/carrierwave/spec/fixtures/landscape.jpg +0 -0
- data/vendor/carrierwave/spec/fixtures/multi_page.pdf +0 -0
- data/vendor/carrierwave/spec/fixtures/new.jpeg +1 -0
- data/vendor/carrierwave/spec/fixtures/new.txt +1 -0
- data/vendor/carrierwave/spec/fixtures/old.jpeg +1 -0
- data/vendor/carrierwave/spec/fixtures/old.txt +1 -0
- data/vendor/carrierwave/spec/fixtures/portrait.jpg +0 -0
- data/vendor/carrierwave/spec/fixtures/ruby.gif +0 -0
- data/vendor/carrierwave/spec/fixtures/sponsored.doc +1 -0
- data/vendor/carrierwave/spec/fixtures/test+.jpg +1 -0
- data/vendor/carrierwave/spec/fixtures/test.jpeg +1 -0
- data/vendor/carrierwave/spec/fixtures/test.jpg +1 -0
- data/vendor/carrierwave/spec/generators/uploader_generator_spec.rb +19 -0
- data/vendor/carrierwave/spec/mount_multiple_spec.rb +913 -0
- data/vendor/carrierwave/spec/mount_single_spec.rb +793 -0
- data/vendor/carrierwave/spec/orm/activerecord_spec.rb +1556 -0
- data/vendor/carrierwave/spec/processing/mini_magick_spec.rb +210 -0
- data/vendor/carrierwave/spec/processing/rmagick_spec.rb +250 -0
- data/vendor/carrierwave/spec/sanitized_file_spec.rb +805 -0
- data/vendor/carrierwave/spec/spec_helper.rb +105 -0
- data/vendor/carrierwave/spec/storage/file_spec.rb +82 -0
- data/vendor/carrierwave/spec/storage/fog_credentials.rb +46 -0
- data/vendor/carrierwave/spec/storage/fog_helper.rb +428 -0
- data/vendor/carrierwave/spec/storage/fog_spec.rb +48 -0
- data/vendor/carrierwave/spec/support/activerecord.rb +31 -0
- data/vendor/carrierwave/spec/support/file_utils_helper.rb +15 -0
- data/vendor/carrierwave/spec/uploader/cache_spec.rb +324 -0
- data/vendor/carrierwave/spec/uploader/callback_spec.rb +30 -0
- data/vendor/carrierwave/spec/uploader/configuration_spec.rb +133 -0
- data/vendor/carrierwave/spec/uploader/content_type_blacklist_spec.rb +61 -0
- data/vendor/carrierwave/spec/uploader/content_type_whitelist_spec.rb +63 -0
- data/vendor/carrierwave/spec/uploader/default_url_spec.rb +77 -0
- data/vendor/carrierwave/spec/uploader/download_spec.rb +204 -0
- data/vendor/carrierwave/spec/uploader/extension_blacklist_spec.rb +112 -0
- data/vendor/carrierwave/spec/uploader/extension_whitelist_spec.rb +102 -0
- data/vendor/carrierwave/spec/uploader/file_size_spec.rb +52 -0
- data/vendor/carrierwave/spec/uploader/mountable_spec.rb +26 -0
- data/vendor/carrierwave/spec/uploader/overrides_spec.rb +71 -0
- data/vendor/carrierwave/spec/uploader/paths_spec.rb +18 -0
- data/vendor/carrierwave/spec/uploader/processing_spec.rb +159 -0
- data/vendor/carrierwave/spec/uploader/proxy_spec.rb +79 -0
- data/vendor/carrierwave/spec/uploader/remove_spec.rb +71 -0
- data/vendor/carrierwave/spec/uploader/store_spec.rb +400 -0
- data/vendor/carrierwave/spec/uploader/url_spec.rb +273 -0
- data/vendor/carrierwave/spec/uploader/versions_spec.rb +633 -0
- metadata +339 -187
- data/config/initializers/extensions.rb +0 -3
- data/mod/05_standard/file/favicon/image-icon.png +0 -0
- data/mod/05_standard/file/favicon/image-large.png +0 -0
- data/mod/05_standard/file/favicon/image-medium.png +0 -0
- data/mod/05_standard/file/favicon/image-original.png +0 -0
- data/mod/05_standard/file/favicon/image-small.png +0 -0
- data/mod/machines/lib/card/machine.rb +0 -261
- data/mod/machines/lib/card/machine_input.rb +0 -80
- data/mod/standard/file/credit/icon-image.png +0 -0
- data/mod/standard/file/credit/large-image.png +0 -0
- data/mod/standard/file/credit/medium-image.png +0 -0
- data/mod/standard/file/credit/original-image.png +0 -0
- data/mod/standard/file/credit/small-image.png +0 -0
- data/mod/standard/spec/set/type/file_spec.rb +0 -99
- data/tmpsets/set/mod001-core/all/tracked_attributes.rb +0 -154
- data/tmpsets/set/mod001-core/all/utils.rb +0 -132
- data/tmpsets/set/mod013-carrierwave/abstract/attachment.rb +0 -282
data/db/seeds.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
WAGN_SEED_TABLES = %w( cards card_actions card_acts card_changes
|
2
|
+
card_references ).freeze
|
3
|
+
WAGN_SEED_PATH = File.join(
|
4
|
+
ENV["DECKO_SEED_REPO_PATH"] || [Cardio.gem_root, "db", "seed"], "new"
|
5
|
+
)
|
6
|
+
|
7
|
+
require "active_record/fixtures"
|
8
|
+
ActiveRecord::FixtureSet.create_fixtures WAGN_SEED_PATH, WAGN_SEED_TABLES
|
data/lib/card.rb
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
+
cw_path = File.expand_path "../../vendor/carrierwave/lib", __FILE__
|
3
|
+
$LOAD_PATH.unshift(cw_path) unless $LOAD_PATH.include?(cw_path)
|
2
4
|
require "carrierwave"
|
5
|
+
|
6
|
+
# if Cardio.file_buckets.present?
|
7
|
+
# require "carrierwave/storage/fog"
|
8
|
+
# Cardio.file_buckets.each do |bucket, config|
|
9
|
+
# require config["provider"]
|
10
|
+
# end
|
11
|
+
# end
|
12
|
+
|
3
13
|
Object.send :remove_const, :Card if Object.send(:const_defined?, :Card)
|
4
14
|
|
5
15
|
# Cards are wiki-inspired building blocks.
|
data/lib/card/auth/setup.rb
CHANGED
@@ -21,12 +21,12 @@ class Card
|
|
21
21
|
@simulating_setup_need = mode
|
22
22
|
end
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
def instant_account_activation
|
25
|
+
simulate_setup_need!
|
26
|
+
yield
|
27
|
+
ensure
|
28
|
+
simulate_setup_need! false
|
29
|
+
end
|
30
30
|
|
31
31
|
private
|
32
32
|
|
data/lib/card/mod/dirs.rb
CHANGED
@@ -17,12 +17,22 @@ class Card
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
# add a new mod to mod load paths
|
21
|
+
def add_path mod_name
|
22
|
+
if @mods.include? mod_name
|
23
|
+
raise Error,
|
24
|
+
"name conflict: mod with name \"#{mod_name}\" already loaded"
|
25
|
+
end
|
21
26
|
@mods << mod_name
|
22
|
-
# TODO: do something if two mods have the same name?
|
23
27
|
@paths[mod_name] = File.join @current_path, mod_name
|
24
28
|
end
|
25
29
|
|
30
|
+
alias_method :mod, :add_path
|
31
|
+
|
32
|
+
def path mod_name
|
33
|
+
@paths[mod_name]
|
34
|
+
end
|
35
|
+
|
26
36
|
def each type=nil
|
27
37
|
super() do |path|
|
28
38
|
dirname = type ? File.join(path, type.to_s) : path
|
@@ -58,7 +68,7 @@ class Card
|
|
58
68
|
def load_from_dir
|
59
69
|
Dir.entries(@current_path).sort.each do |filename|
|
60
70
|
next if filename =~ /^\./
|
61
|
-
|
71
|
+
add_path filename
|
62
72
|
end.compact
|
63
73
|
end
|
64
74
|
|
@@ -20,10 +20,11 @@ class Card
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def attachment name, args
|
23
|
-
|
24
|
-
add_attributes name, "remote_#{name}_url".to_sym,
|
25
|
-
:action_id_of_cached_upload, :empty_ok
|
26
|
-
|
23
|
+
include_set Abstract::Attachment
|
24
|
+
add_attributes name, "remote_#{name}_url".to_sym,
|
25
|
+
:action_id_of_cached_upload, :empty_ok,
|
26
|
+
:storage_type, :bucket, :mod
|
27
|
+
uploader_class = args[:uploader] || ::CarrierWave::FileCardUploader
|
27
28
|
mount_uploader name, uploader_class
|
28
29
|
end
|
29
30
|
|
data/lib/cardio.rb
CHANGED
@@ -53,7 +53,11 @@ module Cardio
|
|
53
53
|
encoding: "utf-8",
|
54
54
|
request_logger: false,
|
55
55
|
performance_logger: false,
|
56
|
-
sql_comments: true
|
56
|
+
sql_comments: true,
|
57
|
+
|
58
|
+
file_storage: :local,
|
59
|
+
file_buckets: {},
|
60
|
+
file_default_bucket: nil
|
57
61
|
}
|
58
62
|
end
|
59
63
|
|
@@ -61,8 +65,8 @@ module Cardio
|
|
61
65
|
@@config = config
|
62
66
|
@@root = config.root
|
63
67
|
|
64
|
-
config.autoload_paths += Dir["#{gem_root}/mod/*/lib/**/"]
|
65
68
|
config.autoload_paths += Dir["#{gem_root}/lib/**/"]
|
69
|
+
config.autoload_paths += Dir["#{gem_root}/mod/*/lib/**/"]
|
66
70
|
config.autoload_paths += Dir["#{root}/mod/*/lib/**/"]
|
67
71
|
|
68
72
|
default_configs.each_pair do |setting, value|
|
@@ -92,7 +96,7 @@ module Cardio
|
|
92
96
|
add_path "db/migrate"
|
93
97
|
add_path "db/migrate_core_cards"
|
94
98
|
add_path "db/migrate_deck_cards", root: root, with: "db/migrate_cards"
|
95
|
-
add_path "db/seeds", with: "db/seeds.rb"
|
99
|
+
add_path "db/seeds.rb", with: "db/seeds.rb"
|
96
100
|
|
97
101
|
add_path "config/initializers", glob: "**/*.rb"
|
98
102
|
add_initializers root
|
data/mod/Modfile
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
mod 'admin'
|
1
2
|
mod 'core'
|
2
3
|
mod 'history'
|
3
4
|
mod 'basic_formats'
|
@@ -10,9 +11,8 @@ mod 'basic_types'
|
|
10
11
|
mod 'machines'
|
11
12
|
mod 'settings'
|
12
13
|
mod 'email'
|
13
|
-
mod 'carrierwave'
|
14
|
-
mod 'admin'
|
15
14
|
mod 'developer'
|
15
|
+
mod 'carrierwave'
|
16
16
|
mod 'standard'
|
17
17
|
mod 'account'
|
18
18
|
mod 'bootstrap'
|
data/mod/admin/set/self/admin.rb
CHANGED
@@ -1,16 +1,22 @@
|
|
1
|
+
# collect arrays of the form
|
2
|
+
# [task symbol, { execute_policy: block, stats_policy: block }]
|
3
|
+
basket :tasks
|
4
|
+
|
1
5
|
event :admin_tasks, :initialize, on: :update do
|
2
6
|
return unless (task = Env.params[:task])
|
3
|
-
raise Card::Error::PermissionDenied
|
7
|
+
raise Card::Error::PermissionDenied, self unless Auth.always_ok?
|
4
8
|
|
5
9
|
case task.to_sym
|
6
10
|
when :clear_cache then Card::Cache.reset_all
|
7
11
|
when :repair_references then Card::Reference.repair_all
|
8
|
-
when :empty_trash then Card.empty_trash
|
9
12
|
when :clear_view_cache then Card::Cache::ViewCache.reset
|
10
13
|
when :delete_old_revisions then Card::Action.delete_old
|
11
14
|
when :repair_permissions then Card.repair_all_permissions
|
12
15
|
when :clear_solid_cache then Card.clear_solid_cache
|
13
16
|
when :clear_machine_cache then Card.reset_all_machines
|
17
|
+
else
|
18
|
+
task_data = tasks.find { |h| h[:name].to_sym == task }
|
19
|
+
task_data[:execute_policy].call if task_data
|
14
20
|
end
|
15
21
|
abort :success
|
16
22
|
end
|
@@ -20,63 +26,74 @@ format :html do
|
|
20
26
|
stats = card_stats
|
21
27
|
stats += cache_stats
|
22
28
|
stats += memory_stats
|
23
|
-
|
29
|
+
card.tasks.each do |task|
|
30
|
+
stats += Array.wrap task[:stats]
|
31
|
+
end
|
32
|
+
table_content = stats.map { |args| stat_row(args) }
|
24
33
|
table table_content, header: %w(Stat Value Action)
|
25
34
|
end
|
26
35
|
|
27
36
|
def card_stats
|
28
37
|
[
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
38
|
+
{ title: "cards",
|
39
|
+
count: Card.where(trash: false) },
|
40
|
+
{ title: "actions",
|
41
|
+
count: Card::Action,
|
42
|
+
link_text: "delete old",
|
43
|
+
task: "delete_old_revisions" },
|
44
|
+
{ title: "references",
|
45
|
+
count: Card::Reference,
|
46
|
+
link_text: "repair all",
|
47
|
+
task: "repair_references" }
|
37
48
|
]
|
38
49
|
end
|
39
50
|
|
40
51
|
def cache_stats
|
41
52
|
stats = [
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
53
|
+
{ title: "solid cache",
|
54
|
+
count: solid_cache_count, unit: " cards",
|
55
|
+
link_text: "clear cache",
|
56
|
+
task: "clear_solid_cache" },
|
57
|
+
{ title: "machine cache",
|
58
|
+
count: machine_cache_count, unit: " cards",
|
59
|
+
link_text: "clear cache",
|
60
|
+
task: "clear_machine_cache" }
|
48
61
|
]
|
49
62
|
return stats unless Card.config.view_cache
|
50
|
-
stats <<
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
stats
|
63
|
+
stats << { title: "view cache",
|
64
|
+
count: Card::Cache::ViewCache,
|
65
|
+
link_text: "clear view cache",
|
66
|
+
task: "clear_view_cache" }
|
55
67
|
end
|
56
68
|
|
57
69
|
def memory_stats
|
58
70
|
oldmem = session[:memory]
|
59
71
|
session[:memory] = newmem = card.profile_memory
|
60
72
|
stats = [
|
61
|
-
|
62
|
-
|
73
|
+
{ title: "memory now",
|
74
|
+
count: newmem, unit: "M",
|
75
|
+
link_text: "clear cache", task: "clear_cache" }
|
63
76
|
]
|
64
77
|
return stats unless oldmem
|
65
|
-
stats <<
|
66
|
-
stats <<
|
78
|
+
stats << { title: "memory prev", count: oldmem, unit: "M" }
|
79
|
+
stats << { title: "memory diff", count: newmem - oldmem, unit: "M" }
|
67
80
|
stats
|
68
81
|
end
|
69
82
|
|
70
|
-
def stat_row
|
71
|
-
res = [
|
72
|
-
|
73
|
-
res << "#{args[:count]}#{args[:unit]}"
|
83
|
+
def stat_row args={}
|
84
|
+
res = [(args[:title] || "")]
|
85
|
+
res << "#{count(args[:count])}#{args[:unit]}"
|
74
86
|
return res unless args[:task]
|
75
87
|
path = card_path("update/:admin?task=#{args[:task]}")
|
76
88
|
res << link_to(args[:link_text] || args[:task], path)
|
77
89
|
res
|
78
90
|
end
|
79
91
|
|
92
|
+
def count counter
|
93
|
+
counter = counter.call if counter.is_a?(Proc)
|
94
|
+
counter.respond_to?(:count) ? counter.count : counter
|
95
|
+
end
|
96
|
+
|
80
97
|
def solid_cache_count
|
81
98
|
Card.search right: { codename: "solid_cache" }, return: "count"
|
82
99
|
end
|
@@ -22,7 +22,7 @@ format :html do
|
|
22
22
|
def render_warning_list warnings
|
23
23
|
# 'ADMINISTRATOR WARNING'
|
24
24
|
admin_warn = I18n.t(:admin_warn,
|
25
|
-
scope: "mod.
|
25
|
+
scope: "mod.admin.set.self.admin_info")
|
26
26
|
"<h6>#{admin_warn}</h6>".html_safe + list_group(
|
27
27
|
warnings,
|
28
28
|
items: { class: "list-group-item-warning" }
|
@@ -33,7 +33,7 @@ format :html do
|
|
33
33
|
# "Email delivery is turned off."
|
34
34
|
# "Change settings in config/application.rb to send sign up notifications."
|
35
35
|
I18n.t(:email_off,
|
36
|
-
scope: "mod.
|
36
|
+
scope: "mod.admin.set.self.admin_info",
|
37
37
|
path: "config/application.rb")
|
38
38
|
end
|
39
39
|
|
@@ -43,16 +43,16 @@ format :html do
|
|
43
43
|
# %(Your captcha is currently working with temporary settings.
|
44
44
|
# This is fine for a local installation, but you will need new
|
45
45
|
# recaptcha keys if you want to make this site public.)
|
46
|
-
I18n.t(:captcha_temp, scope: "mod.
|
46
|
+
I18n.t(:captcha_temp, scope: "mod.admin.set.self.admin_info")
|
47
47
|
else
|
48
48
|
# %(You are configured to use [[*captcha]], but for that to work
|
49
49
|
# you need new recaptcha keys.)
|
50
50
|
process_content(I18n.t(:captcha_keys,
|
51
|
-
scope: "mod.
|
51
|
+
scope: "mod.admin.set.self.admin_info"))
|
52
52
|
end
|
53
53
|
# 'Instructions'
|
54
54
|
instructions = I18n.t(:instructions,
|
55
|
-
scope: "mod.
|
55
|
+
scope: "mod.admin.set.self.admin_info")
|
56
56
|
<<-HTML
|
57
57
|
<p>
|
58
58
|
#{warning}
|
@@ -71,15 +71,15 @@ format :html do
|
|
71
71
|
def howto_add_new_recaptcha_keys
|
72
72
|
instructions(
|
73
73
|
# 'How to add new recaptcha keys:'
|
74
|
-
I18n.t(:howto_add_keys, scope: "mod.
|
74
|
+
I18n.t(:howto_add_keys, scope: "mod.admin.set.self.admin_info"),
|
75
75
|
[
|
76
76
|
# "1. Register your domain at #{web_link 'http://google.com/recaptcha'}"
|
77
77
|
I18n.t(:howto_register,
|
78
|
-
scope: "mod.
|
78
|
+
scope: "mod.admin.set.self.admin_info",
|
79
79
|
recaptcha_link: web_link("http://google.com/recaptcha")),
|
80
80
|
# "2. Add your keys to #{card_link :recaptcha_settings}"
|
81
81
|
I18n.t(:howto_add,
|
82
|
-
scope: "mod.
|
82
|
+
scope: "mod.admin.set.self.admin_info",
|
83
83
|
recaptcha_settings: card_link(:recaptcha_settings))
|
84
84
|
]
|
85
85
|
)
|
@@ -88,15 +88,15 @@ format :html do
|
|
88
88
|
def howto_turn_captcha_off
|
89
89
|
instructions(
|
90
90
|
# 'How to turn captcha off:'
|
91
|
-
I18n.t(:howto_turn_off, scope: "mod.
|
91
|
+
I18n.t(:howto_turn_off, scope: "mod.admin.set.self.admin_info"),
|
92
92
|
[
|
93
93
|
# "1. Go to #{card_link :captcha}"
|
94
94
|
I18n.t(:howto_go,
|
95
|
-
scope: "mod.
|
95
|
+
scope: "mod.admin.set.self.admin_info",
|
96
96
|
captcha_card: card_link(:captcha)),
|
97
97
|
# '2. Update all *captcha rules to "no".'
|
98
98
|
I18n.t(:howto_update,
|
99
|
-
scope: "mod.
|
99
|
+
scope: "mod.admin.set.self.admin_info")
|
100
100
|
]
|
101
101
|
)
|
102
102
|
end
|
@@ -51,7 +51,7 @@ format :html do
|
|
51
51
|
if params[:debug] == "style"
|
52
52
|
page_path(style_card.cardname, item: :import, format: :css)
|
53
53
|
elsif style_card
|
54
|
-
|
54
|
+
style_card.machine_output_url
|
55
55
|
end
|
56
56
|
return unless @css_path
|
57
57
|
%(<link href="#{@css_path}" media="all" rel="stylesheet" type="text/css" />)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -80,7 +80,7 @@ $headings-color: inherit !default;
|
|
80
80
|
|
81
81
|
// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
|
82
82
|
// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
|
83
|
-
$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "
|
83
|
+
$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "[[/assets/fonts/bootstrap/]]") !default;
|
84
84
|
|
85
85
|
//** File name for all font files.
|
86
86
|
$icon-font-name: "glyphicons-halflings-regular" !default;
|
@@ -9,7 +9,7 @@ view :raw do |_args|
|
|
9
9
|
content = File.read("#{bootstrap_path}/_variables.scss")
|
10
10
|
content += %(
|
11
11
|
$bootstrap-sass-asset-helper: false;
|
12
|
-
$icon-font-path: "#{
|
12
|
+
$icon-font-path: "#{card_url 'assets/fonts/'}";
|
13
13
|
)
|
14
14
|
# mixins
|
15
15
|
content += Dir.glob("#{bootstrap_path}/mixins/*.scss").map do |name|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
cw_path = File.expand_path "../../../../../vendor/carrierwave/lib", __FILE__
|
2
|
+
$LOAD_PATH.unshift(cw_path) unless $LOAD_PATH.include?(cw_path)
|
1
3
|
require "carrierwave"
|
2
4
|
|
3
5
|
module CarrierWave
|
@@ -30,15 +32,12 @@ module CarrierWave
|
|
30
32
|
on: :update do
|
31
33
|
mark_remove_#{column}_false
|
32
34
|
end
|
33
|
-
event :
|
35
|
+
event :store_previous_changes_for_#{column}_event, :store,
|
34
36
|
on: :update, when: proc { |c| !c.history? } do
|
35
|
-
|
37
|
+
store_previous_changes_for_#{column}
|
36
38
|
end
|
37
|
-
event :remove_previously_stored_#{column}_event, :
|
39
|
+
event :remove_previously_stored_#{column}_event, :finalize,
|
38
40
|
on: :update, when: proc { |c| !c.history?} do
|
39
|
-
if @previous_model_for_#{column}
|
40
|
-
@previous_model_for_#{column}.include_set_modules
|
41
|
-
end
|
42
41
|
remove_previously_stored_#{column}
|
43
42
|
end
|
44
43
|
|
@@ -64,23 +63,35 @@ module CarrierWave
|
|
64
63
|
|
65
64
|
def #{column}=(new_file)
|
66
65
|
return if new_file.blank?
|
67
|
-
|
68
|
-
db_column = _mounter(:#{column}).serialization_column
|
69
|
-
send(:"\#{db_column}_will_change!")
|
70
|
-
super
|
66
|
+
assign_file(new_file) { super }
|
71
67
|
end
|
72
68
|
|
73
69
|
def remote_#{column}_url=(url)
|
74
|
-
|
70
|
+
assign_file(url) { super }
|
71
|
+
end
|
72
|
+
|
73
|
+
def assign_file file
|
75
74
|
db_column = _mounter(:#{column}).serialization_column
|
76
75
|
send(:"\#{db_column}_will_change!")
|
76
|
+
if web?
|
77
|
+
self.content = file
|
78
|
+
else
|
79
|
+
send(:"#{column}_will_change!")
|
80
|
+
yield
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def remove_#{column}=(value)
|
85
|
+
column = _mounter(:#{column}).serialization_column
|
86
|
+
send(:"\#{column}_will_change!")
|
77
87
|
super
|
78
88
|
end
|
79
89
|
|
80
90
|
def remove_#{column}!
|
91
|
+
self.remove_#{column} = true
|
92
|
+
write_#{column}_identifier
|
93
|
+
self.remove_#{column} = false
|
81
94
|
super
|
82
|
-
_mounter(:#{column}).remove = true
|
83
|
-
_mounter(:#{column}).write_identifier
|
84
95
|
end
|
85
96
|
|
86
97
|
def #{column}_will_change!
|