wagn 1.13.0.pre2 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.simplecov +7 -2
- data/.tm_properties +1 -0
- data/CONTRIBUTING.rdoc +13 -2
- data/README.rdoc +3 -5
- data/VERSION +1 -1
- data/config/routes.rb +1 -5
- data/config/version_cards.txt +1 -1
- data/db/bootstrap/card_references.yml +199 -213
- data/db/bootstrap/card_revisions.yml +634 -656
- data/db/bootstrap/cards.yml +1403 -1437
- data/db/migrate_cards/20140307231621_user_data_to_cards.rb +1 -7
- data/db/migrate_cards/20140317035504_account_requests_to_signups.rb +9 -0
- data/db/migrate_cards/20140725180118_config_card_updates.rb +12 -0
- data/db/migrate_cards/data/1.13_config_text.json +32 -0
- data/features/setup.feature +1 -1
- data/lib/card/auth.rb +0 -24
- data/lib/card/content.rb +9 -4
- data/lib/card/env.rb +1 -13
- data/lib/card/format.rb +8 -3
- data/lib/card/generators/format/format_generator.rb +2 -2
- data/lib/card/generators/set/set_generator.rb +2 -2
- data/lib/card/loader.rb +11 -11
- data/lib/card/set.rb +3 -3
- data/lib/card/set_pattern.rb +1 -1
- data/lib/wagn/application.rb +6 -6
- data/lib/wagn/commands.rb +2 -2
- data/lib/wagn/config/environments/development.rb +1 -5
- data/lib/wagn/config/initializers/uuid_state_file.rb +1 -0
- data/lib/wagn/generators/wagn/templates/Gemfile +21 -16
- data/lib/wagn/generators/wagn/templates/config/application.rb +1 -1
- data/lib/wagn/generators/wagn/templates/config/boot.rb +7 -3
- data/lib/wagn/generators/wagn/wagn_generator.rb +4 -4
- data/lib/wagn/mods_spec_helper.rb +0 -2
- data/lib/wagn/tasks/test.rake +1 -1
- data/lib/wagn/tasks/wagn.rake +21 -26
- data/lib/wagn/version.rb +4 -8
- data/{mods/core/chunks → mod/core/chunk}/include.rb +0 -0
- data/{mods/core/chunks → mod/core/chunk}/link.rb +0 -0
- data/{mods/core/chunks → mod/core/chunk}/literal.rb +0 -0
- data/{mods/core/chunks → mod/core/chunk}/reference.rb +0 -0
- data/{mods/core/chunks → mod/core/chunk}/uri.rb +0 -0
- data/{mods/core/formats → mod/core/format}/data_format.rb +0 -0
- data/{mods/core/formats → mod/core/format}/html_format.rb +2 -2
- data/{mods/core/formats → mod/core/format}/text_format.rb +0 -0
- data/{mods/core/layouts → mod/core/layout}/blank.html +0 -0
- data/{mods/core/layouts → mod/core/layout}/default.html +0 -0
- data/{mods/core/layouts → mod/core/layout}/noside.html +0 -0
- data/{mods/core/layouts → mod/core/layout}/pre.html +0 -0
- data/{mods/core/layouts → mod/core/layout}/simple.html +0 -0
- data/{mods/core/sets → mod/core/set}/all/active_card.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/attribute_tracking.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/collection.rb +38 -0
- data/{mods/core/sets → mod/core/set}/all/content.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/fetch.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/initialize.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/name.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/pattern.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/permissions.rb +17 -7
- data/{mods/core/sets → mod/core/set}/all/phases.rb +1 -0
- data/{mods/core/sets → mod/core/set}/all/references.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/rules.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/states.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/templating.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/tracked_attributes.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/trash.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/type.rb +0 -0
- data/{mods/core/sets → mod/core/set}/all/utils.rb +4 -2
- data/{mods/core/sets → mod/core/set}/right/structure.rb +0 -0
- data/{mods/core/sets → mod/core/set}/type/plain_text.rb +0 -0
- data/{mods/core/set_patterns → mod/core/set_pattern}/01_all.rb +0 -0
- data/{mods/core/set_patterns → mod/core/set_pattern}/02_all_plus.rb +0 -0
- data/{mods/core/set_patterns → mod/core/set_pattern}/03_type.rb +0 -0
- data/{mods/core/set_patterns → mod/core/set_pattern}/04_star.rb +0 -0
- data/{mods/core/set_patterns → mod/core/set_pattern}/05_rstar.rb +0 -0
- data/{mods/core/set_patterns → mod/core/set_pattern}/06_right.rb +0 -0
- data/{mods/core/set_patterns → mod/core/set_pattern}/07_type_plus_right.rb +0 -0
- data/{mods/core/set_patterns → mod/core/set_pattern}/08_self.rb +0 -0
- data/{mods/standard/files → mod/standard/file}/103/icon-6566.ico +0 -0
- data/{mods/standard/files → mod/standard/file}/103/large-6566.ico +0 -0
- data/{mods/standard/files → mod/standard/file}/103/medium-6566.ico +0 -0
- data/{mods/standard/files → mod/standard/file}/103/original-6566.ico +0 -0
- data/{mods/standard/files → mod/standard/file}/103/small-6566.ico +0 -0
- data/{mods/standard/files → mod/standard/file}/79/icon-6556.png +0 -0
- data/{mods/standard/files → mod/standard/file}/79/large-6556.png +0 -0
- data/{mods/standard/files → mod/standard/file}/79/medium-6556.png +0 -0
- data/{mods/standard/files → mod/standard/file}/79/original-6556.png +0 -0
- data/{mods/standard/files → mod/standard/file}/79/small-6556.png +0 -0
- data/{mods/standard/files → mod/standard/file}/790/icon-6419.png +0 -0
- data/{mods/standard/files → mod/standard/file}/790/large-6419.png +0 -0
- data/{mods/standard/files → mod/standard/file}/790/medium-6419.png +0 -0
- data/{mods/standard/files → mod/standard/file}/790/original-6419.png +0 -0
- data/{mods/standard/files → mod/standard/file}/790/small-6419.png +0 -0
- data/{mods/standard/formats → mod/standard/format}/css_format.rb +0 -0
- data/{mods/standard/formats → mod/standard/format}/csv_format.rb +0 -0
- data/{mods/standard/formats → mod/standard/format}/email_html_format.rb +0 -0
- data/{mods/standard/formats → mod/standard/format}/file_format.rb +0 -0
- data/{mods/standard/formats → mod/standard/format}/js_format.rb +0 -0
- data/{mods/standard/formats → mod/standard/format}/json_format.rb +0 -0
- data/{mods/standard/formats → mod/standard/format}/rss_format.rb +0 -0
- data/{mods/standard/formats → mod/standard/format}/xml_format.rb +0 -0
- data/{mods → mod}/standard/lib/card/machine.rb +37 -9
- data/{mods → mod}/standard/lib/card/machine_input.rb +2 -2
- data/{mods → mod}/standard/lib/javascript/html5shiv-printshiv.js +0 -0
- data/{mods → mod}/standard/lib/javascript/jquery-ui.js +0 -0
- data/{mods → mod}/standard/lib/javascript/jquery.autosize.js +0 -0
- data/{mods → mod}/standard/lib/javascript/jquery.fileupload.js +0 -0
- data/{mods → mod}/standard/lib/javascript/jquery.iframe-transport.js +0 -0
- data/{mods → mod}/standard/lib/javascript/jquery.js +0 -0
- data/{mods → mod}/standard/lib/javascript/jquery.ui.autocomplete.html.js +0 -0
- data/{mods → mod}/standard/lib/javascript/jquery_ujs.js +0 -0
- data/{mods → mod}/standard/lib/javascript/jquerymobile.js +0 -0
- data/{mods → mod}/standard/lib/javascript/tinymce.js +0 -0
- data/{mods → mod}/standard/lib/javascript/wagn.js.coffee +13 -4
- data/{mods → mod}/standard/lib/javascript/wagn_menu.js +0 -0
- data/{mods → mod}/standard/lib/javascript/wagn_mod.js.coffee +0 -0
- data/{mods → mod}/standard/lib/stylesheets/functional.scss +0 -0
- data/{mods → mod}/standard/lib/stylesheets/jquery-ui-smoothness.css +0 -0
- data/{mods → mod}/standard/lib/stylesheets/standard.scss +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/account.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/all_css.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/all_csv.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/attach.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/all/base.rb +2 -2
- data/{mods/standard/sets → mod/standard/set}/all/comment.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/email_html.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/event_viz.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/file.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/flexmail.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/follow.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/history.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/all/json.rb +2 -2
- data/{mods/standard/sets → mod/standard/set}/all/rich_html.rb +12 -7
- data/{mods/standard/sets → mod/standard/set}/all/rss.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/all/text.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/account.rb +27 -10
- data/{mods/standard/sets → mod/standard/set}/right/add_help.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/comment.rb +2 -2
- data/{mods/standard/sets → mod/standard/set}/right/create.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/default.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/delete.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/email.rb +0 -0
- data/mod/standard/set/right/help.rb +3 -0
- data/mod/standard/set/right/machine_output.rb +19 -0
- data/{mods/standard/sets → mod/standard/set}/right/password.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/read.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/salt.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/script.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/stats.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/status.rb +0 -0
- data/mod/standard/set/right/style.rb +9 -0
- data/{mods/standard/sets → mod/standard/set}/right/token.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/update.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/when_created.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/right/when_last_edited.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/rstar/rules.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/self/account_links.rb +3 -3
- data/{mods/standard/sets → mod/standard/set}/self/alerts.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/self/all.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/self/foot.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/self/head.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/self/navbox.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/self/now.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/self/recent.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/self/script_card_menu.rb +1 -1
- data/{mods/standard/sets/self/style_functional.rb → mod/standard/set/self/script_html5shiv_printshiv.rb} +1 -2
- data/{mods/standard/sets → mod/standard/set}/self/script_jquery.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/self/script_jquery_helper.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/self/script_slot.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/self/script_tinymce.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/self/search.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/self/signin.rb +9 -1
- data/{mods/standard/sets → mod/standard/set}/self/stats.rb +0 -0
- data/mod/standard/set/self/style_functional.rb +8 -0
- data/mod/standard/set/self/style_jquery_ui_smoothness.rb +8 -0
- data/{mods/standard/sets → mod/standard/set}/self/style_standard.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/self/version.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/basic.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/cardtype.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/coffee_script.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/css.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/date.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/file.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/html.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/image.rb +1 -1
- data/{mods/standard/sets → mod/standard/set}/type/java_script.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/layout_type.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/number.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/phrase.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/pointer.rb +11 -1
- data/{mods/standard/sets → mod/standard/set}/type/scss.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/search_type.rb +1 -35
- data/{mods/standard/sets → mod/standard/set}/type/set.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/setting.rb +0 -0
- data/mod/standard/set/type/signup.rb +146 -0
- data/{mods/standard/sets → mod/standard/set}/type/skin.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/toggle.rb +0 -0
- data/{mods/standard/sets → mod/standard/set}/type/user.rb +10 -20
- data/spec/controllers/card_controller_spec.rb +1 -4
- data/spec/{mods/core/chunks → mod/core/chunk}/literal_spec.rb +0 -0
- data/spec/{mods/core/chunks → mod/core/chunk}/uri_spec.rb +0 -0
- data/spec/{mods/core/formats → mod/core/format}/data_format_spec.rb +0 -0
- data/spec/{mods/core/formats → mod/core/format}/html_format_spec.rb +0 -0
- data/spec/{mods/core/formats → mod/core/format}/text_format_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/active_card_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/attribute_tracking_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/collection_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/content_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/fetch_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/initialize_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/name_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/pattern_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/permissions_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/phases_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/references_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/rules2_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/rules_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/states_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/templating_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/tracked_attributes_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/trash_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/type_spec.rb +0 -0
- data/spec/{mods/core/sets → mod/core/set}/all/utils_spec.rb +0 -0
- data/spec/{mods/standard/chunks → mod/standard/chunk}/include_spec.rb +0 -0
- data/spec/{mods/standard/chunks → mod/standard/chunk}/link_spec.rb +0 -0
- data/spec/{mods/standard/formats → mod/standard/format}/css_format_spec.rb +0 -0
- data/spec/{mods/standard/formats → mod/standard/format}/csv_format_spec.rb +0 -0
- data/spec/{mods/standard/formats → mod/standard/format}/email_html_format_spec.rb +0 -0
- data/spec/{mods/standard/formats → mod/standard/format}/file_format_spec.rb +0 -0
- data/spec/{mods/standard/formats → mod/standard/format}/js_format_spec.rb +0 -0
- data/spec/{mods/standard/formats → mod/standard/format}/json_format_spec.rb +0 -0
- data/spec/{mods/standard/formats → mod/standard/format}/rss_format_spec.rb +0 -0
- data/spec/{mods/standard/formats → mod/standard/format}/xml_format_spec.rb +0 -0
- data/spec/{mods → mod}/standard/lib/machine_input_spec.rb +0 -0
- data/spec/{mods → mod}/standard/lib/machine_spec.rb +17 -3
- data/spec/{mods/standard/sets → mod/standard/set}/all/account_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/all_css_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/all_csv_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/attach_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/base_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/comment_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/email_html_spec.rb +0 -0
- data/spec/mod/standard/set/all/event_viz_spec.rb +9 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/file_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/flexmail_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/follow_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/history_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/json_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/rich_html_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/rss_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/all/text_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/account_spec.rb +1 -1
- data/spec/{mods/standard/sets → mod/standard/set}/right/add_help_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/comment_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/create_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/default_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/delete_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/email_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/help_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/machine_output_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/password_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/read_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/salt_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/script_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/stats_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/status_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/structure_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/style_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/token_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/update_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/when_created_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/right/when_last_edited_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/rstar/rules_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/account_links_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/alerts_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/all_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/foot_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/head_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/navbox_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/now_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/recent_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/search_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/signin_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/stats_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/style_functional_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/style_jquery_ui_smoothness_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/style_standard_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/self/version_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/basic_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/cardtype_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/coffeescript_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/css_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/date_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/file_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/html_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/image_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/javascript_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/layout_type_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/number_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/phrase_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/plain_text_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/pointer_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/scss_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/search_type_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/set_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/setting_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/signup_spec.rb +44 -5
- data/spec/{mods/standard/sets → mod/standard/set}/type/skin_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/toggle_spec.rb +0 -0
- data/spec/{mods/standard/sets → mod/standard/set}/type/user_spec.rb +0 -0
- data/spec/spec_helper.rb +2 -2
- data/test/fixtures/card_references.yml +440 -482
- data/test/fixtures/card_revisions.yml +1287 -1384
- data/test/fixtures/cards.yml +2268 -2472
- metadata +389 -390
- data/config.ru +0 -4
- data/config/samples/asset_htaccess +0 -9
- data/config/samples/robots.txt +0 -12
- data/mods/standard/sets/right/help.rb +0 -3
- data/mods/standard/sets/right/machine_output.rb +0 -14
- data/mods/standard/sets/right/style.rb +0 -22
- data/mods/standard/sets/self/script_html5shiv_printshiv.rb +0 -7
- data/mods/standard/sets/self/style_jquery_ui_smoothness.rb +0 -8
- data/mods/standard/sets/type/signup.rb +0 -113
- data/spec/mods/standard/sets/all/event_viz_spec.rb +0 -7
@@ -30,7 +30,7 @@ module <%= app_const_base %>
|
|
30
30
|
# config.paths['files'] = 'files'
|
31
31
|
# where uploaded files are actually stored. (eg Image and File cards)
|
32
32
|
|
33
|
-
# config.paths['local-
|
33
|
+
# config.paths['local-mod'] = 'mod'
|
34
34
|
# where mods are stored
|
35
35
|
|
36
36
|
# config.allow_inline_styles = false
|
@@ -1,11 +1,15 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
# comment out this line to default to development mode
|
3
|
-
ENV['RAILS_ENV'] ||= 'production'
|
4
2
|
|
5
3
|
require 'rubygems'
|
6
4
|
|
5
|
+
# defaults to development mode without the following
|
6
|
+
<% if options['mod-dev'] || options['core-dev'] -%>
|
7
|
+
# ENV['RAILS_ENV'] ||= 'production'
|
8
|
+
<% else -%>
|
9
|
+
ENV['RAILS_ENV'] ||= 'production'
|
10
|
+
<% end -%>
|
11
|
+
|
7
12
|
# Set up gems listed in the Gemfile.
|
8
13
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("Gemfile")
|
9
14
|
|
10
|
-
|
11
15
|
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
@@ -34,7 +34,7 @@ class WagnGenerator < Rails::Generators::AppBase
|
|
34
34
|
|
35
35
|
template "rspec", ".rspec"
|
36
36
|
elsif options['mod-dev']
|
37
|
-
@spec_path = '
|
37
|
+
@spec_path = 'mod/'
|
38
38
|
@spec_helper_path = 'wagn/mods_spec_helper'
|
39
39
|
template "rspec", ".rspec"
|
40
40
|
end
|
@@ -49,8 +49,8 @@ class WagnGenerator < Rails::Generators::AppBase
|
|
49
49
|
# copy_file "README", "README.rdoc"
|
50
50
|
# end
|
51
51
|
|
52
|
-
def
|
53
|
-
empty_directory_with_gitkeep '
|
52
|
+
def mod
|
53
|
+
empty_directory_with_gitkeep 'mod'
|
54
54
|
end
|
55
55
|
|
56
56
|
def log
|
@@ -155,7 +155,7 @@ TEXT
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
else
|
158
|
-
puts "Review the database configuration in config/database.yml and run 'wagn seed' to complete the installation.\nStart the server with 'wagn
|
158
|
+
puts "Review the database configuration in config/database.yml and run 'wagn seed' to complete the installation.\nStart the server with 'wagn server'."
|
159
159
|
end
|
160
160
|
end
|
161
161
|
|
@@ -3,8 +3,6 @@ require 'spork'
|
|
3
3
|
|
4
4
|
ENV["RAILS_ENV"] = 'test'
|
5
5
|
|
6
|
-
#require File.expand_path( '../../../spec/mods/standard/lib/machine_spec.rb', __FILE__ )
|
7
|
-
#require File.expand_path( '../../../spec/mods/standard/lib/machine_input_spec.rb', __FILE__ )
|
8
6
|
|
9
7
|
Spork.prefork do
|
10
8
|
if ENV["RAILS_ROOT"]
|
data/lib/wagn/tasks/test.rake
CHANGED
data/lib/wagn/tasks/wagn.rake
CHANGED
@@ -40,8 +40,8 @@ namespace :wagn do
|
|
40
40
|
#system 'bundle update'
|
41
41
|
if Wagn.paths["tmp"].existent
|
42
42
|
FileUtils.rm_rf Wagn.paths["tmp"].first, :secure=>true
|
43
|
-
Dir.mkdir Wagn.paths["tmp"].first
|
44
43
|
end
|
44
|
+
Dir.mkdir Wagn.paths["tmp"].first
|
45
45
|
Rake::Task['wagn:migrate'].invoke
|
46
46
|
# FIXME remove tmp dir / clear cache
|
47
47
|
puts "set symlink for assets"
|
@@ -95,7 +95,7 @@ namespace :wagn do
|
|
95
95
|
task :cards => :environment do
|
96
96
|
Wagn::Cache.reset_global
|
97
97
|
ENV['SCHEMA'] = "#{Wagn.gem_root}/db/schema.rb"
|
98
|
-
Wagn.config.perform_deliveries = false
|
98
|
+
Wagn.config.action_mailer.perform_deliveries = false
|
99
99
|
Card # this is needed in production mode to insure core db structures are loaded before schema_mode is set
|
100
100
|
|
101
101
|
paths = ActiveRecord::Migrator.migrations_paths = Wagn::MigrationHelper.card_migration_paths
|
@@ -109,9 +109,9 @@ namespace :wagn do
|
|
109
109
|
desc 'write the version to a file (not usually called directly)' #maybe we should move this to a method?
|
110
110
|
task :stamp, :suffix do |t, args|
|
111
111
|
ENV['SCHEMA'] = "#{Wagn.gem_root}/db/schema.rb"
|
112
|
-
Wagn.config.perform_deliveries = false
|
112
|
+
Wagn.config.action_mailer.perform_deliveries = false
|
113
113
|
|
114
|
-
stamp_file = Wagn::Version.schema_stamp_path args[:suffix]
|
114
|
+
stamp_file = Wagn::Version.schema_stamp_path( args[:suffix] )
|
115
115
|
Wagn::MigrationHelper.schema_mode args[:suffix ] do
|
116
116
|
version = ActiveRecord::Migrator.current_version
|
117
117
|
puts ">> writing version: #{version} to #{stamp_file}"
|
@@ -122,36 +122,21 @@ namespace :wagn do
|
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
|
-
desc "copy over .htaccess files useful in production mode"
|
126
|
-
task :copy_htaccess do
|
127
|
-
access_file = File.join(Wagn.gem_root, 'config/samples/asset_htaccess')
|
128
|
-
|
129
|
-
%w{ files assets }.each do |dirname|
|
130
|
-
dir = File.join Rails.public_path, dirname
|
131
|
-
mkdir_p dir
|
132
|
-
cp access_file, File.join( dir, '.htaccess' )
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
|
137
125
|
namespace :bootstrap do
|
138
126
|
desc "rid template of unneeded cards, revisions, and references"
|
139
127
|
task :clean => :environment do
|
140
128
|
Wagn::Cache.reset_global
|
141
129
|
|
142
130
|
# Correct time and user stamps
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
}
|
148
|
-
WAGN_BOOTSTRAP_TABLES.each do |table|
|
149
|
-
next if table == 'card_references'
|
150
|
-
ActiveRecord::Base.connection.update("update #{table} set created_at=now() #{extra_sql[table.to_sym] || ''};")
|
131
|
+
%w{ cards card_revisions }.each do |table|
|
132
|
+
sql = "update #{table} set created_at=now(), creator_id=#{ Card::WagnBotID }"
|
133
|
+
sql += ",updated_at=now(), updater_id=#{ Card::WagnBotID }" if table == 'cards'
|
134
|
+
ActiveRecord::Base.connection.update sql
|
151
135
|
end
|
152
136
|
|
153
|
-
# delete ignored cards
|
154
137
|
Card::Auth.as_bot do
|
138
|
+
# delete ignored cards
|
139
|
+
|
155
140
|
if ignoramus = Card['*ignore']
|
156
141
|
ignoramus.item_cards.each do |card|
|
157
142
|
if card.account #have to get rid of revisions to delete account
|
@@ -161,6 +146,13 @@ namespace :wagn do
|
|
161
146
|
card.delete!
|
162
147
|
end
|
163
148
|
end
|
149
|
+
|
150
|
+
%w{ machine_input machine_output }.each do |codename|
|
151
|
+
Card.search(:right=>{:codename=>codename }).each do |card|
|
152
|
+
FileUtils.rm_rf File.join('files', card.id.to_s ), :secure=>true
|
153
|
+
card.delete!
|
154
|
+
end
|
155
|
+
end
|
164
156
|
end
|
165
157
|
|
166
158
|
ActiveRecord::Base.connection.delete( "delete from cards where trash is true" )
|
@@ -173,6 +165,9 @@ namespace :wagn do
|
|
173
165
|
" (referee_id is not null and not exists (select * from cards where cards.id = card_references.referee_id)) or " +
|
174
166
|
" ( referer_id is not null and not exists (select * from cards where cards.id = card_references.referer_id));"
|
175
167
|
)
|
168
|
+
|
169
|
+
ActiveRecord::Base.connection.delete( "delete from sessions" )
|
170
|
+
|
176
171
|
Wagn::Cache.reset_global
|
177
172
|
|
178
173
|
end
|
@@ -208,7 +203,7 @@ namespace :wagn do
|
|
208
203
|
desc "copy files from template database to standard mod and update cards"
|
209
204
|
task :copy_mod_files => :environment do
|
210
205
|
template_files_dir = "#{Wagn.root}/files"
|
211
|
-
standard_files_dir = "#{Wagn.gem_root}/
|
206
|
+
standard_files_dir = "#{Wagn.gem_root}/mod/standard/file"
|
212
207
|
|
213
208
|
#FIXME - this should delete old revisions
|
214
209
|
|
data/lib/wagn/version.rb
CHANGED
@@ -12,16 +12,12 @@ module Wagn
|
|
12
12
|
def schema type=nil
|
13
13
|
File.read( schema_stamp_path type ).strip
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
def schema_stamp_path type
|
17
|
-
|
18
|
-
File.join
|
17
|
+
stamp_dir = ENV['SCHEMA_STAMP_PATH'] || File.join( Wagn.gem_root, 'config' )
|
18
|
+
File.join stamp_dir, "version#{ '_cards' if type.to_s =~ /card/ }.txt"
|
19
19
|
end
|
20
|
-
|
21
|
-
def schema_stamp_dir
|
22
|
-
File.join Wagn.gem_root, 'config'
|
23
|
-
end
|
24
|
-
|
20
|
+
|
25
21
|
end
|
26
22
|
end
|
27
23
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -179,7 +179,7 @@ class Card
|
|
179
179
|
def process_relative_tags args
|
180
180
|
_render_raw(args).scan( /\{\{\s*\+[^\}]*\}\}/ ).map do |inc| #fixme - wrong place for regexp!
|
181
181
|
process_content( inc ).strip
|
182
|
-
end.join
|
182
|
+
end.join
|
183
183
|
end
|
184
184
|
|
185
185
|
|
@@ -300,7 +300,7 @@ class Card
|
|
300
300
|
klasses << 'autosave' if action == :update
|
301
301
|
html[:class] = klasses.join ' '
|
302
302
|
|
303
|
-
html[:recaptcha] ||= 'on' if
|
303
|
+
html[:recaptcha] ||= 'on' if card.recaptcha_on?
|
304
304
|
html.delete :recaptcha if html[:recaptcha] == :off
|
305
305
|
|
306
306
|
{ :url=>url, :remote=>true, :html=>html }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -47,3 +47,41 @@ def contextual_content context_card, format_args={}
|
|
47
47
|
self.format(:not_current=>true)._render_raw
|
48
48
|
)
|
49
49
|
end
|
50
|
+
|
51
|
+
format do
|
52
|
+
|
53
|
+
def search_params
|
54
|
+
@search_params ||= begin
|
55
|
+
p = default_search_params.clone
|
56
|
+
|
57
|
+
if focal?
|
58
|
+
p[:offset] = params[:offset] if params[:offset]
|
59
|
+
p[:limit] = params[:limit] if params[:limit]
|
60
|
+
p.merge! params[:wql] if params[:wql]
|
61
|
+
end
|
62
|
+
p
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def default_search_params # wahh?
|
67
|
+
set_default_search_params
|
68
|
+
end
|
69
|
+
|
70
|
+
def set_default_search_params overrides={}
|
71
|
+
@default_search_params ||= begin
|
72
|
+
p = { :default_limit=> 100 }.merge overrides
|
73
|
+
set_search_params_variables! p
|
74
|
+
p
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def set_search_params_variables! hash
|
79
|
+
hash[:vars] = params[:vars] || {}
|
80
|
+
params.each do |key,val|
|
81
|
+
case key.to_s
|
82
|
+
when '_wql' ; hash.merge! val
|
83
|
+
when /^\_(\w+)$/ ; hash[:vars][$1.to_sym] = val
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -217,14 +217,24 @@ def track_permission_errors
|
|
217
217
|
result
|
218
218
|
end
|
219
219
|
|
220
|
+
|
221
|
+
def recaptcha_on?
|
222
|
+
have_recaptcha_keys? &&
|
223
|
+
Env[:controller] &&
|
224
|
+
!Auth.signed_in? &&
|
225
|
+
!Auth.needs_setup? &&
|
226
|
+
!Auth.always_ok? &&
|
227
|
+
Card.toggle( rule :captcha )
|
228
|
+
end
|
229
|
+
|
230
|
+
def have_recaptcha_keys?
|
231
|
+
@@have_recaptcha_keys = defined?(@@have_recaptcha_keys) ? @@have_recaptcha_keys :
|
232
|
+
!!( Wagn.config.recaptcha_public_key && Wagn.config.recaptcha_private_key )
|
233
|
+
end
|
234
|
+
|
220
235
|
event :recaptcha, :before=>:approve do
|
221
|
-
if !@supercard
|
222
|
-
|
223
|
-
Card.toggle( rule :captcha ) and
|
224
|
-
num = Card::Env[:recaptcha_count] and
|
225
|
-
num < 1
|
226
|
-
|
227
|
-
Env[:recaptcha_count] = num + 1
|
236
|
+
if !@supercard && !Env[:recaptcha_used] && recaptcha_on?
|
237
|
+
Env[:recaptcha_used] = true
|
228
238
|
Env[:controller].verify_recaptcha :model=>self, :attribute=>:captcha
|
229
239
|
end
|
230
240
|
end
|
@@ -121,6 +121,7 @@ event :process_subcards, :after=>:approve, :on=>:save do
|
|
121
121
|
|
122
122
|
subcards.keys.each do |sub_name|
|
123
123
|
opts = @subcards[sub_name] || {}
|
124
|
+
opts = { 'content' => opts } if String===opts
|
124
125
|
ab_name = sub_name.to_name.to_absolute_name name
|
125
126
|
next if ab_name.key == key # don't resave self!
|
126
127
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -34,8 +34,9 @@ module ClassMethods
|
|
34
34
|
attribs.each do |row|
|
35
35
|
result = begin
|
36
36
|
merge row['name'], row, opts
|
37
|
-
rescue
|
38
|
-
|
37
|
+
# rescue => e
|
38
|
+
# Rails.logger.info "merge_list problem: #{ e.message }"
|
39
|
+
# false
|
39
40
|
end
|
40
41
|
unmerged.push row unless result == true
|
41
42
|
end
|
@@ -56,6 +57,7 @@ module ClassMethods
|
|
56
57
|
|
57
58
|
|
58
59
|
def merge name, attribs={}, opts={}
|
60
|
+
puts "merging #{ name }"
|
59
61
|
card = fetch name, :new=>{}
|
60
62
|
|
61
63
|
if opts[:pristine] && !card.pristine?
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|