herb 0.9.7-arm-linux-gnu → 0.10.1-arm-linux-gnu
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/config/action_view_helpers/actioncable/action_cable_helper/action_cable_meta_tag.yml +20 -0
- data/config/action_view_helpers/actionpack/content_security_policy/content_security_policy?.yml +16 -0
- data/config/action_view_helpers/actionpack/content_security_policy/content_security_policy_nonce.yml +16 -0
- data/config/action_view_helpers/actionpack/polymorphic_routes/polymorphic_path.yml +27 -0
- data/config/action_view_helpers/actionpack/polymorphic_routes/polymorphic_url.yml +33 -0
- data/config/action_view_helpers/actionpack/request_forgery_protection/form_authenticity_token.yml +19 -0
- data/config/action_view_helpers/actionpack/request_forgery_protection/protect_against_forgery?.yml +16 -0
- data/config/action_view_helpers/actiontext/content_helper/render_action_text_content.yml +21 -0
- data/config/action_view_helpers/actiontext/content_helper/sanitize_action_text_content.yml +21 -0
- data/config/action_view_helpers/actiontext/tag_helper/rich_textarea_tag.yml +46 -0
- data/config/action_view_helpers/actionview/active_model_helper/error_message.yml +16 -0
- data/config/action_view_helpers/actionview/active_model_helper/error_wrapping.yml +16 -0
- data/config/action_view_helpers/actionview/active_model_helper/object.yml +16 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/apply_stylesheet_media_default.yml +16 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/audio_tag.yml +45 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/auto_discovery_link_tag.yml +44 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/auto_include_nonce.yml +16 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/auto_include_nonce_for_scripts.yml +16 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/auto_include_nonce_for_styles.yml +16 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/favicon_link_tag.yml +46 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/image_decoding.yml +16 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/image_loading.yml +16 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/image_tag.yml +68 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/javascript_include_tag.yml +59 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/picture_tag.yml +29 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/preload_link_tag.yml +50 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/preload_links_header.yml +16 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/stylesheet_link_tag.yml +50 -0
- data/config/action_view_helpers/actionview/asset_tag_helper/video_tag.yml +55 -0
- data/config/action_view_helpers/actionview/asset_url_helper/asset_path.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/asset_url.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/audio_path.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/audio_url.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/compute_asset_extname.yml +16 -0
- data/config/action_view_helpers/actionview/asset_url_helper/compute_asset_host.yml +16 -0
- data/config/action_view_helpers/actionview/asset_url_helper/compute_asset_path.yml +16 -0
- data/config/action_view_helpers/actionview/asset_url_helper/font_path.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/font_url.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/image_path.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/image_url.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/javascript_path.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/javascript_url.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/public_compute_asset_path.yml +16 -0
- data/config/action_view_helpers/actionview/asset_url_helper/stylesheet_path.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/stylesheet_url.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/video_path.yml +23 -0
- data/config/action_view_helpers/actionview/asset_url_helper/video_url.yml +23 -0
- data/config/action_view_helpers/actionview/atom_feed_helper/atom_feed.yml +40 -0
- data/config/action_view_helpers/actionview/cache_helper/cache.yml +28 -0
- data/config/action_view_helpers/actionview/cache_helper/cache_fragment_name.yml +16 -0
- data/config/action_view_helpers/actionview/cache_helper/cache_if.yml +27 -0
- data/config/action_view_helpers/actionview/cache_helper/cache_unless.yml +27 -0
- data/config/action_view_helpers/actionview/cache_helper/caching_predicate.yml +16 -0
- data/config/action_view_helpers/actionview/cache_helper/digest_path_from_template.yml +16 -0
- data/config/action_view_helpers/actionview/cache_helper/fragment_for.yml +16 -0
- data/config/action_view_helpers/actionview/cache_helper/fragment_name_with_digest.yml +16 -0
- data/config/action_view_helpers/actionview/cache_helper/read_fragment_for.yml +16 -0
- data/config/action_view_helpers/actionview/cache_helper/uncacheable.yml +16 -0
- data/config/action_view_helpers/actionview/cache_helper/write_fragment_for.yml +16 -0
- data/config/action_view_helpers/actionview/capture_helper/capture.yml +16 -0
- data/config/action_view_helpers/actionview/capture_helper/content_for.yml +24 -0
- data/config/action_view_helpers/actionview/capture_helper/content_for_predicate.yml +21 -0
- data/config/action_view_helpers/actionview/capture_helper/provide.yml +21 -0
- data/config/action_view_helpers/actionview/capture_helper/with_output_buffer.yml +16 -0
- data/config/action_view_helpers/actionview/content_exfiltration_prevention_helper/prepend_content_exfiltration_prevention.yml +16 -0
- data/config/action_view_helpers/actionview/content_exfiltration_prevention_helper/prevent_content_exfiltration.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/action_name.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/assign_controller.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/controller.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/controller_name.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/controller_path.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/cookies.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/flash.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/headers.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/logger.yml +18 -0
- data/config/action_view_helpers/actionview/controller_helper/params.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/request.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/request_forgery_protection_token.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/response.yml +16 -0
- data/config/action_view_helpers/actionview/controller_helper/session.yml +16 -0
- data/config/action_view_helpers/actionview/csp_helper/csp_meta_tag.yml +23 -0
- data/config/action_view_helpers/actionview/csrf_helper/csrf_meta_tags.yml +23 -0
- data/config/action_view_helpers/actionview/date_helper/date_select.yml +71 -0
- data/config/action_view_helpers/actionview/date_helper/datetime_select.yml +59 -0
- data/config/action_view_helpers/actionview/date_helper/distance_of_time_in_words.yml +33 -0
- data/config/action_view_helpers/actionview/date_helper/relative_time_in_words.yml +36 -0
- data/config/action_view_helpers/actionview/date_helper/select_date.yml +49 -0
- data/config/action_view_helpers/actionview/date_helper/select_datetime.yml +58 -0
- data/config/action_view_helpers/actionview/date_helper/select_day.yml +42 -0
- data/config/action_view_helpers/actionview/date_helper/select_hour.yml +48 -0
- data/config/action_view_helpers/actionview/date_helper/select_minute.yml +42 -0
- data/config/action_view_helpers/actionview/date_helper/select_month.yml +54 -0
- data/config/action_view_helpers/actionview/date_helper/select_second.yml +39 -0
- data/config/action_view_helpers/actionview/date_helper/select_time.yml +52 -0
- data/config/action_view_helpers/actionview/date_helper/select_year.yml +45 -0
- data/config/action_view_helpers/actionview/date_helper/time_ago_in_words.yml +26 -0
- data/config/action_view_helpers/actionview/date_helper/time_select.yml +56 -0
- data/config/action_view_helpers/actionview/date_helper/time_tag.yml +37 -0
- data/config/action_view_helpers/actionview/debug_helper/debug.yml +21 -0
- data/config/action_view_helpers/actionview/form_helper/apply_form_for_options.yml +16 -0
- data/config/action_view_helpers/actionview/form_helper/button.yml +38 -0
- data/config/action_view_helpers/actionview/form_helper/checkbox.yml +49 -0
- data/config/action_view_helpers/actionview/form_helper/color_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_helper/date_field.yml +38 -0
- data/config/action_view_helpers/actionview/form_helper/datetime_field.yml +43 -0
- data/config/action_view_helpers/actionview/form_helper/email_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_helper/emitted_hidden_id.yml +16 -0
- data/config/action_view_helpers/actionview/form_helper/fields.yml +31 -0
- data/config/action_view_helpers/actionview/form_helper/fields_for.yml +33 -0
- data/config/action_view_helpers/actionview/form_helper/file_field.yml +44 -0
- data/config/action_view_helpers/actionview/form_helper/form_for.yml +41 -0
- data/config/action_view_helpers/actionview/form_helper/form_with.yml +42 -0
- data/config/action_view_helpers/actionview/form_helper/form_with_generates_ids.yml +16 -0
- data/config/action_view_helpers/actionview/form_helper/form_with_generates_remote_forms.yml +16 -0
- data/config/action_view_helpers/actionview/form_helper/hidden_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_helper/label.yml +47 -0
- data/config/action_view_helpers/actionview/form_helper/month_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_helper/multipart.yml +16 -0
- data/config/action_view_helpers/actionview/form_helper/multiple_file_field_include_hidden.yml +16 -0
- data/config/action_view_helpers/actionview/form_helper/number_field.yml +44 -0
- data/config/action_view_helpers/actionview/form_helper/password_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_helper/radio_button.yml +37 -0
- data/config/action_view_helpers/actionview/form_helper/range_field.yml +44 -0
- data/config/action_view_helpers/actionview/form_helper/search_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_helper/submit.yml +35 -0
- data/config/action_view_helpers/actionview/form_helper/telephone_field.yml +34 -0
- data/config/action_view_helpers/actionview/form_helper/text_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_helper/textarea.yml +37 -0
- data/config/action_view_helpers/actionview/form_helper/time_field.yml +41 -0
- data/config/action_view_helpers/actionview/form_helper/url_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_helper/week_field.yml +32 -0
- data/config/action_view_helpers/actionview/form_options_helper/collection_checkboxes.yml +58 -0
- data/config/action_view_helpers/actionview/form_options_helper/collection_radio_buttons.yml +56 -0
- data/config/action_view_helpers/actionview/form_options_helper/collection_select.yml +65 -0
- data/config/action_view_helpers/actionview/form_options_helper/grouped_collection_select.yml +69 -0
- data/config/action_view_helpers/actionview/form_options_helper/grouped_options_for_select.yml +39 -0
- data/config/action_view_helpers/actionview/form_options_helper/option_groups_from_collection_for_select.yml +47 -0
- data/config/action_view_helpers/actionview/form_options_helper/options_for_select.yml +27 -0
- data/config/action_view_helpers/actionview/form_options_helper/options_from_collection_for_select.yml +37 -0
- data/config/action_view_helpers/actionview/form_options_helper/select.yml +59 -0
- data/config/action_view_helpers/actionview/form_options_helper/time_zone_options_for_select.yml +34 -0
- data/config/action_view_helpers/actionview/form_options_helper/time_zone_select.yml +53 -0
- data/config/action_view_helpers/actionview/form_options_helper/weekday_options_for_select.yml +31 -0
- data/config/action_view_helpers/actionview/form_options_helper/weekday_select.yml +38 -0
- data/config/action_view_helpers/actionview/form_tag_helper/button_tag.yml +39 -0
- data/config/action_view_helpers/actionview/form_tag_helper/checkbox_tag.yml +45 -0
- data/config/action_view_helpers/actionview/form_tag_helper/color_field_tag.yml +38 -0
- data/config/action_view_helpers/actionview/form_tag_helper/date_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/form_tag_helper/datetime_field_tag.yml +39 -0
- data/config/action_view_helpers/actionview/form_tag_helper/default_enforce_utf8.yml +16 -0
- data/config/action_view_helpers/actionview/form_tag_helper/email_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/form_tag_helper/embed_authenticity_token_in_remote_forms.yml +16 -0
- data/config/action_view_helpers/actionview/form_tag_helper/field_id.yml +32 -0
- data/config/action_view_helpers/actionview/form_tag_helper/field_name.yml +32 -0
- data/config/action_view_helpers/actionview/form_tag_helper/field_set_tag.yml +34 -0
- data/config/action_view_helpers/actionview/form_tag_helper/file_field_tag.yml +41 -0
- data/config/action_view_helpers/actionview/form_tag_helper/form_tag.yml +42 -0
- data/config/action_view_helpers/actionview/form_tag_helper/hidden_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/form_tag_helper/image_submit_tag.yml +40 -0
- data/config/action_view_helpers/actionview/form_tag_helper/label_tag.yml +38 -0
- data/config/action_view_helpers/actionview/form_tag_helper/month_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/form_tag_helper/number_field_tag.yml +49 -0
- data/config/action_view_helpers/actionview/form_tag_helper/password_field_tag.yml +38 -0
- data/config/action_view_helpers/actionview/form_tag_helper/radio_button_tag.yml +42 -0
- data/config/action_view_helpers/actionview/form_tag_helper/range_field_tag.yml +49 -0
- data/config/action_view_helpers/actionview/form_tag_helper/search_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/form_tag_helper/select_tag.yml +49 -0
- data/config/action_view_helpers/actionview/form_tag_helper/submit_tag.yml +39 -0
- data/config/action_view_helpers/actionview/form_tag_helper/telephone_field_tag.yml +39 -0
- data/config/action_view_helpers/actionview/form_tag_helper/text_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/form_tag_helper/textarea_tag.yml +43 -0
- data/config/action_view_helpers/actionview/form_tag_helper/time_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/form_tag_helper/url_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/form_tag_helper/utf8_enforcer_tag.yml +16 -0
- data/config/action_view_helpers/actionview/form_tag_helper/week_field_tag.yml +37 -0
- data/config/action_view_helpers/actionview/javascript_helper/escape_javascript.yml +23 -0
- data/config/action_view_helpers/actionview/javascript_helper/javascript_cdata_section.yml +16 -0
- data/config/action_view_helpers/actionview/javascript_helper/javascript_tag.yml +45 -0
- data/config/action_view_helpers/actionview/number_helper/number_to_currency.yml +36 -0
- data/config/action_view_helpers/actionview/number_helper/number_to_human.yml +27 -0
- data/config/action_view_helpers/actionview/number_helper/number_to_human_size.yml +24 -0
- data/config/action_view_helpers/actionview/number_helper/number_to_percentage.yml +24 -0
- data/config/action_view_helpers/actionview/number_helper/number_to_phone.yml +34 -0
- data/config/action_view_helpers/actionview/number_helper/number_with_delimiter.yml +29 -0
- data/config/action_view_helpers/actionview/number_helper/number_with_precision.yml +27 -0
- data/config/action_view_helpers/actionview/output_safety_helper/raw.yml +21 -0
- data/config/action_view_helpers/actionview/output_safety_helper/safe_join.yml +26 -0
- data/config/action_view_helpers/actionview/output_safety_helper/to_sentence.yml +33 -0
- data/config/action_view_helpers/actionview/record_identifier/dom_class.yml +27 -0
- data/config/action_view_helpers/actionview/record_identifier/dom_id.yml +27 -0
- data/config/action_view_helpers/actionview/record_identifier/dom_target.yml +22 -0
- data/config/action_view_helpers/actionview/record_identifier/model_name_from_record_or_class.yml +16 -0
- data/config/action_view_helpers/actionview/rendering_helper/render.yml +34 -0
- data/config/action_view_helpers/actionview/sanitize_helper/sanitize.yml +27 -0
- data/config/action_view_helpers/actionview/sanitize_helper/sanitize_css.yml +21 -0
- data/config/action_view_helpers/actionview/sanitize_helper/sanitizer_vendor.yml +16 -0
- data/config/action_view_helpers/actionview/sanitize_helper/strip_links.yml +21 -0
- data/config/action_view_helpers/actionview/sanitize_helper/strip_tags.yml +21 -0
- data/config/action_view_helpers/actionview/tag_helper/cdata_section.yml +21 -0
- data/config/action_view_helpers/actionview/tag_helper/content_tag.yml +64 -0
- data/config/action_view_helpers/actionview/tag_helper/escape_once.yml +21 -0
- data/config/action_view_helpers/actionview/tag_helper/tag.yml +47 -0
- data/config/action_view_helpers/actionview/tag_helper/token_list.yml +24 -0
- data/config/action_view_helpers/actionview/text_helper/concat.yml +21 -0
- data/config/action_view_helpers/actionview/text_helper/current_cycle.yml +22 -0
- data/config/action_view_helpers/actionview/text_helper/cycle.yml +31 -0
- data/config/action_view_helpers/actionview/text_helper/excerpt.yml +39 -0
- data/config/action_view_helpers/actionview/text_helper/highlight.yml +35 -0
- data/config/action_view_helpers/actionview/text_helper/pluralize.yml +32 -0
- data/config/action_view_helpers/actionview/text_helper/reset_cycle.yml +22 -0
- data/config/action_view_helpers/actionview/text_helper/safe_concat.yml +16 -0
- data/config/action_view_helpers/actionview/text_helper/simple_format.yml +40 -0
- data/config/action_view_helpers/actionview/text_helper/truncate.yml +40 -0
- data/config/action_view_helpers/actionview/text_helper/word_wrap.yml +27 -0
- data/config/action_view_helpers/actionview/translation_helper/debug_missing_translation.yml +16 -0
- data/config/action_view_helpers/actionview/translation_helper/localize.yml +29 -0
- data/config/action_view_helpers/actionview/translation_helper/translate.yml +32 -0
- data/config/action_view_helpers/actionview/url_helper/button_to.yml +55 -0
- data/config/action_view_helpers/actionview/url_helper/button_to_generates_button_tag.yml +16 -0
- data/config/action_view_helpers/actionview/url_helper/current_page?.yml +28 -0
- data/config/action_view_helpers/actionview/url_helper/link_to.yml +76 -0
- data/config/action_view_helpers/actionview/url_helper/link_to_if.yml +42 -0
- data/config/action_view_helpers/actionview/url_helper/link_to_unless.yml +42 -0
- data/config/action_view_helpers/actionview/url_helper/link_to_unless_current.yml +37 -0
- data/config/action_view_helpers/actionview/url_helper/mail_to.yml +56 -0
- data/config/action_view_helpers/actionview/url_helper/phone_to.yml +44 -0
- data/config/action_view_helpers/actionview/url_helper/sms_to.yml +47 -0
- data/config/action_view_helpers/actionview/url_helper/url_for.yml +22 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_exempts_page_from_cache.yml +16 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_exempts_page_from_cache_tag.yml +20 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_exempts_page_from_preview.yml +16 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_exempts_page_from_preview_tag.yml +20 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_page_requires_reload.yml +16 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_page_requires_reload_tag.yml +20 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_refresh_method_tag.yml +26 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_refresh_scroll_tag.yml +26 -0
- data/config/action_view_helpers/turbo-rails/drive_helper/turbo_refreshes_with.yml +22 -0
- data/config/action_view_helpers/turbo-rails/frames_helper/turbo_frame_tag.yml +50 -0
- data/config/action_view_helpers/turbo-rails/includes_helper/turbo_include_tags.yml +16 -0
- data/config/action_view_helpers/turbo-rails/streams_action_helper/turbo_stream_action_tag.yml +34 -0
- data/config/action_view_helpers/turbo-rails/streams_action_helper/turbo_stream_refresh_tag.yml +23 -0
- data/config/action_view_helpers/turbo-rails/streams_helper/turbo_stream.yml +16 -0
- data/config/action_view_helpers/turbo-rails/streams_helper/turbo_stream_from.yml +33 -0
- data/config/options.yml +14 -0
- data/config/view_context_methods/actionview/base/annotate_rendered_view_with_filenames.yml +8 -0
- data/config/view_context_methods/actionview/base/assign.yml +8 -0
- data/config/view_context_methods/actionview/base/assigns.yml +8 -0
- data/config/view_context_methods/actionview/base/automatically_disable_submit_tag.yml +8 -0
- data/config/view_context_methods/actionview/base/compiled_method_container.yml +8 -0
- data/config/view_context_methods/actionview/base/config.yml +8 -0
- data/config/view_context_methods/actionview/base/default_form_builder.yml +8 -0
- data/config/view_context_methods/actionview/base/default_formats.yml +8 -0
- data/config/view_context_methods/actionview/base/field_error_proc.yml +8 -0
- data/config/view_context_methods/actionview/base/formats.yml +8 -0
- data/config/view_context_methods/actionview/base/in_rendering_context.yml +8 -0
- data/config/view_context_methods/actionview/base/locale.yml +8 -0
- data/config/view_context_methods/actionview/base/lookup_context.yml +8 -0
- data/config/view_context_methods/actionview/base/output_buffer.yml +8 -0
- data/config/view_context_methods/actionview/base/prefix_partial_path_with_controller_namespace.yml +10 -0
- data/config/view_context_methods/actionview/base/remove_hidden_field_autocomplete.yml +8 -0
- data/config/view_context_methods/actionview/base/streaming_completion_on_exception.yml +8 -0
- data/config/view_context_methods/actionview/base/view_flow.yml +8 -0
- data/config/view_context_methods/actionview/base/view_paths.yml +8 -0
- data/config/view_context_methods/actionview/base/view_renderer.yml +8 -0
- data/config/view_context_methods/actionview/template/local_assigns.yml +8 -0
- data/config/view_context_methods/activemodel/conversion/convert_to_model.yml +8 -0
- data/config/view_context_methods/activesupport/benchmarkable/benchmark.yml +8 -0
- data/ext/herb/extconf.rb +1 -0
- data/ext/herb/extension.c +108 -0
- data/herb.gemspec +2 -1
- data/lib/herb/3.2/herb.so +0 -0
- data/lib/herb/3.3/herb.so +0 -0
- data/lib/herb/3.4/herb.so +0 -0
- data/lib/herb/4.0/herb.so +0 -0
- data/lib/herb/action_view/render_analyzer.rb +1057 -0
- data/lib/herb/ast/erb_render_node.rb +155 -0
- data/lib/herb/bootstrap.rb +0 -1
- data/lib/herb/cli.rb +253 -19
- data/lib/herb/colors.rb +18 -0
- data/lib/herb/configuration.rb +49 -13
- data/lib/herb/defaults.yml +3 -0
- data/lib/herb/dev/runner.rb +445 -0
- data/lib/herb/dev/server.rb +207 -0
- data/lib/herb/dev/server_entry.rb +128 -0
- data/lib/herb/diff_operation.rb +34 -0
- data/lib/herb/diff_result.rb +59 -0
- data/lib/herb/engine/compiler.rb +56 -3
- data/lib/herb/engine/validators/render_validator.rb +92 -0
- data/lib/herb/engine.rb +58 -4
- data/lib/herb/html/util.rb +16 -0
- data/lib/herb/project.rb +1 -6
- data/lib/herb/version.rb +1 -1
- data/lib/herb.rb +41 -5
- data/sig/herb/action_view/render_analyzer.rbs +122 -0
- data/sig/herb/ast/erb_render_node.rbs +29 -0
- data/sig/herb/colors.rbs +12 -0
- data/sig/herb/configuration.rbs +20 -1
- data/sig/herb/dev/runner.rbs +59 -0
- data/sig/herb/dev/server.rbs +50 -0
- data/sig/herb/dev/server_entry.rbs +51 -0
- data/sig/herb/diff_operation.rbs +34 -0
- data/sig/herb/diff_result.rbs +34 -0
- data/sig/herb/engine/compiler.rbs +6 -0
- data/sig/herb/engine/validators/render_validator.rbs +21 -0
- data/sig/herb/engine.rbs +15 -0
- data/sig/herb/html/util.rbs +13 -0
- data/sig/herb.rbs +12 -2
- data/sig/herb_c_extension.rbs +1 -1
- data/sig/vendor/did_you_mean.rbs +6 -0
- data/sig/vendor/parallel.rbs +4 -0
- data/src/analyze/action_view/attribute_extraction_helpers.c +3 -2
- data/src/diff/herb_diff.c +137 -0
- data/src/diff/herb_diff_attributes.c +207 -0
- data/src/diff/herb_diff_children.c +518 -0
- data/src/diff/herb_diff_helpers.c +114 -0
- data/src/diff/herb_diff_nodes.c +707 -0
- data/src/diff/herb_hash.c +42 -0
- data/src/diff/herb_hash_index_map.c +47 -0
- data/src/diff/herb_hash_map.c +104 -0
- data/src/diff/herb_hash_tree.c +680 -0
- data/src/include/diff/herb_diff.h +118 -0
- data/src/include/diff/herb_hash.h +25 -0
- data/src/include/diff/herb_hash_index_map.h +32 -0
- data/src/include/diff/herb_hash_map.h +30 -0
- data/src/include/herb.h +1 -0
- data/src/include/version.h +1 -1
- data/templates/javascript/packages/core/src/config.ts.erb +43 -0
- data/templates/rust/src/ast/nodes.rs.erb +1 -1
- data/templates/rust/src/config.rs.erb +50 -0
- data/templates/src/diff/herb_diff_helpers.c.erb +38 -0
- data/templates/src/diff/herb_diff_nodes.c.erb +224 -0
- data/templates/src/diff/herb_hash_tree.c.erb +147 -0
- data/templates/template.rb +4 -4
- metadata +307 -4
- data/lib/herb/3.0/herb.so +0 -0
- data/lib/herb/3.1/herb.so +0 -0
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
2
|
+
// be modified manually. See /home/runner/work/herb/herb/templates/src/diff/herb_hash_tree.c.erb
|
|
3
|
+
|
|
4
|
+
// Merkle tree hashing: each node's hash incorporates the hashes of its children,
|
|
5
|
+
// enabling O(1) subtree equality checks during tree diffing.
|
|
6
|
+
// Based on: Merkle, R. "A Digital Signature Based on a Conventional Encryption
|
|
7
|
+
// Function" (1987), Advances in Cryptology - CRYPTO '87.
|
|
8
|
+
// https://en.wikipedia.org/wiki/Merkle_tree
|
|
9
|
+
|
|
10
|
+
#include "../include/diff/herb_diff.h"
|
|
11
|
+
|
|
12
|
+
static herb_hash_T hash_token(herb_hash_T hash, const token_T* token) {
|
|
13
|
+
if (token == NULL) { return herb_hash_byte(hash, 0); }
|
|
14
|
+
|
|
15
|
+
hash = herb_hash_uint32(hash, (uint32_t) token->type);
|
|
16
|
+
hash = herb_hash_string(hash, token->value);
|
|
17
|
+
|
|
18
|
+
return hash;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static herb_hash_T hash_child_array(herb_hash_T hash, const hb_array_T* children, herb_hash_map_T* hash_map) {
|
|
22
|
+
if (children == NULL) { return herb_hash_byte(hash, 0); }
|
|
23
|
+
|
|
24
|
+
const size_t count = hb_array_size(children);
|
|
25
|
+
hash = herb_hash_uint64(hash, (uint64_t) count);
|
|
26
|
+
|
|
27
|
+
for (size_t index = 0; index < count; index++) {
|
|
28
|
+
const AST_NODE_T* child = (const AST_NODE_T*) hb_array_get(children, index);
|
|
29
|
+
herb_hash_T child_hash = herb_hash_tree(child, hash_map);
|
|
30
|
+
hash = herb_hash_combine(hash, child_hash);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return hash;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
herb_hash_T herb_hash_tree(const AST_NODE_T* node, herb_hash_map_T* hash_map) {
|
|
37
|
+
if (node == NULL) { return HERB_HASH_INIT; }
|
|
38
|
+
|
|
39
|
+
if (herb_hash_map_has(hash_map, node)) { return herb_hash_map_get(hash_map, node); }
|
|
40
|
+
|
|
41
|
+
herb_hash_T hash = HERB_HASH_INIT;
|
|
42
|
+
hash = herb_hash_uint32(hash, (uint32_t) node->type);
|
|
43
|
+
|
|
44
|
+
switch (node->type) {
|
|
45
|
+
case AST_DOCUMENT_NODE: {
|
|
46
|
+
const AST_DOCUMENT_NODE_T* document_node = (const AST_DOCUMENT_NODE_T*) node;
|
|
47
|
+
|
|
48
|
+
hash = hash_child_array(hash, document_node->children, hash_map);
|
|
49
|
+
} break;
|
|
50
|
+
|
|
51
|
+
case AST_LITERAL_NODE: {
|
|
52
|
+
const AST_LITERAL_NODE_T* literal_node = (const AST_LITERAL_NODE_T*) node;
|
|
53
|
+
|
|
54
|
+
hash = herb_hash_string(hash, literal_node->content);
|
|
55
|
+
} break;
|
|
56
|
+
|
|
57
|
+
case AST_HTML_OPEN_TAG_NODE: {
|
|
58
|
+
const AST_HTML_OPEN_TAG_NODE_T* html_open_tag_node = (const AST_HTML_OPEN_TAG_NODE_T*) node;
|
|
59
|
+
|
|
60
|
+
hash = hash_token(hash, html_open_tag_node->tag_opening);
|
|
61
|
+
|
|
62
|
+
hash = hash_token(hash, html_open_tag_node->tag_name);
|
|
63
|
+
|
|
64
|
+
hash = hash_token(hash, html_open_tag_node->tag_closing);
|
|
65
|
+
|
|
66
|
+
hash = hash_child_array(hash, html_open_tag_node->children, hash_map);
|
|
67
|
+
|
|
68
|
+
hash = herb_hash_bool(hash, html_open_tag_node->is_void);
|
|
69
|
+
} break;
|
|
70
|
+
|
|
71
|
+
case AST_HTML_CONDITIONAL_OPEN_TAG_NODE: {
|
|
72
|
+
const AST_HTML_CONDITIONAL_OPEN_TAG_NODE_T* html_conditional_open_tag_node = (const AST_HTML_CONDITIONAL_OPEN_TAG_NODE_T*) node;
|
|
73
|
+
|
|
74
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_conditional_open_tag_node->conditional, hash_map));
|
|
75
|
+
|
|
76
|
+
hash = hash_token(hash, html_conditional_open_tag_node->tag_name);
|
|
77
|
+
|
|
78
|
+
hash = herb_hash_bool(hash, html_conditional_open_tag_node->is_void);
|
|
79
|
+
} break;
|
|
80
|
+
|
|
81
|
+
case AST_HTML_CLOSE_TAG_NODE: {
|
|
82
|
+
const AST_HTML_CLOSE_TAG_NODE_T* html_close_tag_node = (const AST_HTML_CLOSE_TAG_NODE_T*) node;
|
|
83
|
+
|
|
84
|
+
hash = hash_token(hash, html_close_tag_node->tag_opening);
|
|
85
|
+
|
|
86
|
+
hash = hash_token(hash, html_close_tag_node->tag_name);
|
|
87
|
+
|
|
88
|
+
hash = hash_child_array(hash, html_close_tag_node->children, hash_map);
|
|
89
|
+
|
|
90
|
+
hash = hash_token(hash, html_close_tag_node->tag_closing);
|
|
91
|
+
} break;
|
|
92
|
+
|
|
93
|
+
case AST_HTML_OMITTED_CLOSE_TAG_NODE: {
|
|
94
|
+
const AST_HTML_OMITTED_CLOSE_TAG_NODE_T* html_omitted_close_tag_node = (const AST_HTML_OMITTED_CLOSE_TAG_NODE_T*) node;
|
|
95
|
+
|
|
96
|
+
hash = hash_token(hash, html_omitted_close_tag_node->tag_name);
|
|
97
|
+
} break;
|
|
98
|
+
|
|
99
|
+
case AST_HTML_VIRTUAL_CLOSE_TAG_NODE: {
|
|
100
|
+
const AST_HTML_VIRTUAL_CLOSE_TAG_NODE_T* html_virtual_close_tag_node = (const AST_HTML_VIRTUAL_CLOSE_TAG_NODE_T*) node;
|
|
101
|
+
|
|
102
|
+
hash = hash_token(hash, html_virtual_close_tag_node->tag_name);
|
|
103
|
+
} break;
|
|
104
|
+
|
|
105
|
+
case AST_HTML_ELEMENT_NODE: {
|
|
106
|
+
const AST_HTML_ELEMENT_NODE_T* html_element_node = (const AST_HTML_ELEMENT_NODE_T*) node;
|
|
107
|
+
|
|
108
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_element_node->open_tag, hash_map));
|
|
109
|
+
|
|
110
|
+
hash = hash_token(hash, html_element_node->tag_name);
|
|
111
|
+
|
|
112
|
+
hash = hash_child_array(hash, html_element_node->body, hash_map);
|
|
113
|
+
|
|
114
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_element_node->close_tag, hash_map));
|
|
115
|
+
|
|
116
|
+
hash = herb_hash_bool(hash, html_element_node->is_void);
|
|
117
|
+
|
|
118
|
+
hash = herb_hash_string(hash, html_element_node->element_source);
|
|
119
|
+
} break;
|
|
120
|
+
|
|
121
|
+
case AST_HTML_CONDITIONAL_ELEMENT_NODE: {
|
|
122
|
+
const AST_HTML_CONDITIONAL_ELEMENT_NODE_T* html_conditional_element_node = (const AST_HTML_CONDITIONAL_ELEMENT_NODE_T*) node;
|
|
123
|
+
|
|
124
|
+
hash = herb_hash_string(hash, html_conditional_element_node->condition);
|
|
125
|
+
|
|
126
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_conditional_element_node->open_conditional, hash_map));
|
|
127
|
+
|
|
128
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_conditional_element_node->open_tag, hash_map));
|
|
129
|
+
|
|
130
|
+
hash = hash_child_array(hash, html_conditional_element_node->body, hash_map);
|
|
131
|
+
|
|
132
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_conditional_element_node->close_tag, hash_map));
|
|
133
|
+
|
|
134
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_conditional_element_node->close_conditional, hash_map));
|
|
135
|
+
|
|
136
|
+
hash = hash_token(hash, html_conditional_element_node->tag_name);
|
|
137
|
+
|
|
138
|
+
hash = herb_hash_string(hash, html_conditional_element_node->element_source);
|
|
139
|
+
} break;
|
|
140
|
+
|
|
141
|
+
case AST_HTML_ATTRIBUTE_VALUE_NODE: {
|
|
142
|
+
const AST_HTML_ATTRIBUTE_VALUE_NODE_T* html_attribute_value_node = (const AST_HTML_ATTRIBUTE_VALUE_NODE_T*) node;
|
|
143
|
+
|
|
144
|
+
hash = hash_token(hash, html_attribute_value_node->open_quote);
|
|
145
|
+
|
|
146
|
+
hash = hash_child_array(hash, html_attribute_value_node->children, hash_map);
|
|
147
|
+
|
|
148
|
+
hash = hash_token(hash, html_attribute_value_node->close_quote);
|
|
149
|
+
|
|
150
|
+
hash = herb_hash_bool(hash, html_attribute_value_node->quoted);
|
|
151
|
+
} break;
|
|
152
|
+
|
|
153
|
+
case AST_HTML_ATTRIBUTE_NAME_NODE: {
|
|
154
|
+
const AST_HTML_ATTRIBUTE_NAME_NODE_T* html_attribute_name_node = (const AST_HTML_ATTRIBUTE_NAME_NODE_T*) node;
|
|
155
|
+
|
|
156
|
+
hash = hash_child_array(hash, html_attribute_name_node->children, hash_map);
|
|
157
|
+
} break;
|
|
158
|
+
|
|
159
|
+
case AST_HTML_ATTRIBUTE_NODE: {
|
|
160
|
+
const AST_HTML_ATTRIBUTE_NODE_T* html_attribute_node = (const AST_HTML_ATTRIBUTE_NODE_T*) node;
|
|
161
|
+
|
|
162
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_attribute_node->name, hash_map));
|
|
163
|
+
|
|
164
|
+
hash = hash_token(hash, html_attribute_node->equals);
|
|
165
|
+
|
|
166
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) html_attribute_node->value, hash_map));
|
|
167
|
+
} break;
|
|
168
|
+
|
|
169
|
+
case AST_RUBY_LITERAL_NODE: {
|
|
170
|
+
const AST_RUBY_LITERAL_NODE_T* ruby_literal_node = (const AST_RUBY_LITERAL_NODE_T*) node;
|
|
171
|
+
|
|
172
|
+
hash = herb_hash_string(hash, ruby_literal_node->content);
|
|
173
|
+
} break;
|
|
174
|
+
|
|
175
|
+
case AST_RUBY_HTML_ATTRIBUTES_SPLAT_NODE: {
|
|
176
|
+
const AST_RUBY_HTML_ATTRIBUTES_SPLAT_NODE_T* ruby_html_attributes_splat_node = (const AST_RUBY_HTML_ATTRIBUTES_SPLAT_NODE_T*) node;
|
|
177
|
+
|
|
178
|
+
hash = herb_hash_string(hash, ruby_html_attributes_splat_node->content);
|
|
179
|
+
|
|
180
|
+
hash = herb_hash_string(hash, ruby_html_attributes_splat_node->prefix);
|
|
181
|
+
} break;
|
|
182
|
+
|
|
183
|
+
case AST_ERB_OPEN_TAG_NODE: {
|
|
184
|
+
const AST_ERB_OPEN_TAG_NODE_T* erb_open_tag_node = (const AST_ERB_OPEN_TAG_NODE_T*) node;
|
|
185
|
+
|
|
186
|
+
hash = hash_token(hash, erb_open_tag_node->tag_opening);
|
|
187
|
+
|
|
188
|
+
hash = hash_token(hash, erb_open_tag_node->content);
|
|
189
|
+
|
|
190
|
+
hash = hash_token(hash, erb_open_tag_node->tag_closing);
|
|
191
|
+
|
|
192
|
+
hash = hash_token(hash, erb_open_tag_node->tag_name);
|
|
193
|
+
|
|
194
|
+
hash = hash_child_array(hash, erb_open_tag_node->children, hash_map);
|
|
195
|
+
} break;
|
|
196
|
+
|
|
197
|
+
case AST_HTML_TEXT_NODE: {
|
|
198
|
+
const AST_HTML_TEXT_NODE_T* html_text_node = (const AST_HTML_TEXT_NODE_T*) node;
|
|
199
|
+
|
|
200
|
+
hash = herb_hash_string(hash, html_text_node->content);
|
|
201
|
+
} break;
|
|
202
|
+
|
|
203
|
+
case AST_HTML_COMMENT_NODE: {
|
|
204
|
+
const AST_HTML_COMMENT_NODE_T* html_comment_node = (const AST_HTML_COMMENT_NODE_T*) node;
|
|
205
|
+
|
|
206
|
+
hash = hash_token(hash, html_comment_node->comment_start);
|
|
207
|
+
|
|
208
|
+
hash = hash_child_array(hash, html_comment_node->children, hash_map);
|
|
209
|
+
|
|
210
|
+
hash = hash_token(hash, html_comment_node->comment_end);
|
|
211
|
+
} break;
|
|
212
|
+
|
|
213
|
+
case AST_HTML_DOCTYPE_NODE: {
|
|
214
|
+
const AST_HTML_DOCTYPE_NODE_T* html_doctype_node = (const AST_HTML_DOCTYPE_NODE_T*) node;
|
|
215
|
+
|
|
216
|
+
hash = hash_token(hash, html_doctype_node->tag_opening);
|
|
217
|
+
|
|
218
|
+
hash = hash_child_array(hash, html_doctype_node->children, hash_map);
|
|
219
|
+
|
|
220
|
+
hash = hash_token(hash, html_doctype_node->tag_closing);
|
|
221
|
+
} break;
|
|
222
|
+
|
|
223
|
+
case AST_XML_DECLARATION_NODE: {
|
|
224
|
+
const AST_XML_DECLARATION_NODE_T* xml_declaration_node = (const AST_XML_DECLARATION_NODE_T*) node;
|
|
225
|
+
|
|
226
|
+
hash = hash_token(hash, xml_declaration_node->tag_opening);
|
|
227
|
+
|
|
228
|
+
hash = hash_child_array(hash, xml_declaration_node->children, hash_map);
|
|
229
|
+
|
|
230
|
+
hash = hash_token(hash, xml_declaration_node->tag_closing);
|
|
231
|
+
} break;
|
|
232
|
+
|
|
233
|
+
case AST_CDATA_NODE: {
|
|
234
|
+
const AST_CDATA_NODE_T* cdata_node = (const AST_CDATA_NODE_T*) node;
|
|
235
|
+
|
|
236
|
+
hash = hash_token(hash, cdata_node->tag_opening);
|
|
237
|
+
|
|
238
|
+
hash = hash_child_array(hash, cdata_node->children, hash_map);
|
|
239
|
+
|
|
240
|
+
hash = hash_token(hash, cdata_node->tag_closing);
|
|
241
|
+
} break;
|
|
242
|
+
|
|
243
|
+
case AST_WHITESPACE_NODE: {
|
|
244
|
+
const AST_WHITESPACE_NODE_T* whitespace_node = (const AST_WHITESPACE_NODE_T*) node;
|
|
245
|
+
|
|
246
|
+
hash = hash_token(hash, whitespace_node->value);
|
|
247
|
+
} break;
|
|
248
|
+
|
|
249
|
+
case AST_ERB_CONTENT_NODE: {
|
|
250
|
+
const AST_ERB_CONTENT_NODE_T* erb_content_node = (const AST_ERB_CONTENT_NODE_T*) node;
|
|
251
|
+
|
|
252
|
+
hash = hash_token(hash, erb_content_node->tag_opening);
|
|
253
|
+
|
|
254
|
+
hash = hash_token(hash, erb_content_node->content);
|
|
255
|
+
|
|
256
|
+
hash = hash_token(hash, erb_content_node->tag_closing);
|
|
257
|
+
|
|
258
|
+
hash = herb_hash_bool(hash, erb_content_node->parsed);
|
|
259
|
+
|
|
260
|
+
hash = herb_hash_bool(hash, erb_content_node->valid);
|
|
261
|
+
} break;
|
|
262
|
+
|
|
263
|
+
case AST_ERB_END_NODE: {
|
|
264
|
+
const AST_ERB_END_NODE_T* erb_end_node = (const AST_ERB_END_NODE_T*) node;
|
|
265
|
+
|
|
266
|
+
hash = hash_token(hash, erb_end_node->tag_opening);
|
|
267
|
+
|
|
268
|
+
hash = hash_token(hash, erb_end_node->content);
|
|
269
|
+
|
|
270
|
+
hash = hash_token(hash, erb_end_node->tag_closing);
|
|
271
|
+
} break;
|
|
272
|
+
|
|
273
|
+
case AST_ERB_ELSE_NODE: {
|
|
274
|
+
const AST_ERB_ELSE_NODE_T* erb_else_node = (const AST_ERB_ELSE_NODE_T*) node;
|
|
275
|
+
|
|
276
|
+
hash = hash_token(hash, erb_else_node->tag_opening);
|
|
277
|
+
|
|
278
|
+
hash = hash_token(hash, erb_else_node->content);
|
|
279
|
+
|
|
280
|
+
hash = hash_token(hash, erb_else_node->tag_closing);
|
|
281
|
+
|
|
282
|
+
hash = hash_child_array(hash, erb_else_node->statements, hash_map);
|
|
283
|
+
} break;
|
|
284
|
+
|
|
285
|
+
case AST_ERB_IF_NODE: {
|
|
286
|
+
const AST_ERB_IF_NODE_T* erb_if_node = (const AST_ERB_IF_NODE_T*) node;
|
|
287
|
+
|
|
288
|
+
hash = hash_token(hash, erb_if_node->tag_opening);
|
|
289
|
+
|
|
290
|
+
hash = hash_token(hash, erb_if_node->content);
|
|
291
|
+
|
|
292
|
+
hash = hash_token(hash, erb_if_node->tag_closing);
|
|
293
|
+
|
|
294
|
+
// skip location field: then_keyword
|
|
295
|
+
|
|
296
|
+
hash = hash_child_array(hash, erb_if_node->statements, hash_map);
|
|
297
|
+
|
|
298
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_if_node->subsequent, hash_map));
|
|
299
|
+
|
|
300
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_if_node->end_node, hash_map));
|
|
301
|
+
} break;
|
|
302
|
+
|
|
303
|
+
case AST_ERB_BLOCK_NODE: {
|
|
304
|
+
const AST_ERB_BLOCK_NODE_T* erb_block_node = (const AST_ERB_BLOCK_NODE_T*) node;
|
|
305
|
+
|
|
306
|
+
hash = hash_token(hash, erb_block_node->tag_opening);
|
|
307
|
+
|
|
308
|
+
hash = hash_token(hash, erb_block_node->content);
|
|
309
|
+
|
|
310
|
+
hash = hash_token(hash, erb_block_node->tag_closing);
|
|
311
|
+
|
|
312
|
+
hash = hash_child_array(hash, erb_block_node->body, hash_map);
|
|
313
|
+
|
|
314
|
+
hash = hash_child_array(hash, erb_block_node->block_arguments, hash_map);
|
|
315
|
+
|
|
316
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_block_node->rescue_clause, hash_map));
|
|
317
|
+
|
|
318
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_block_node->else_clause, hash_map));
|
|
319
|
+
|
|
320
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_block_node->ensure_clause, hash_map));
|
|
321
|
+
|
|
322
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_block_node->end_node, hash_map));
|
|
323
|
+
} break;
|
|
324
|
+
|
|
325
|
+
case AST_ERB_WHEN_NODE: {
|
|
326
|
+
const AST_ERB_WHEN_NODE_T* erb_when_node = (const AST_ERB_WHEN_NODE_T*) node;
|
|
327
|
+
|
|
328
|
+
hash = hash_token(hash, erb_when_node->tag_opening);
|
|
329
|
+
|
|
330
|
+
hash = hash_token(hash, erb_when_node->content);
|
|
331
|
+
|
|
332
|
+
hash = hash_token(hash, erb_when_node->tag_closing);
|
|
333
|
+
|
|
334
|
+
// skip location field: then_keyword
|
|
335
|
+
|
|
336
|
+
hash = hash_child_array(hash, erb_when_node->statements, hash_map);
|
|
337
|
+
} break;
|
|
338
|
+
|
|
339
|
+
case AST_ERB_CASE_NODE: {
|
|
340
|
+
const AST_ERB_CASE_NODE_T* erb_case_node = (const AST_ERB_CASE_NODE_T*) node;
|
|
341
|
+
|
|
342
|
+
hash = hash_token(hash, erb_case_node->tag_opening);
|
|
343
|
+
|
|
344
|
+
hash = hash_token(hash, erb_case_node->content);
|
|
345
|
+
|
|
346
|
+
hash = hash_token(hash, erb_case_node->tag_closing);
|
|
347
|
+
|
|
348
|
+
hash = hash_child_array(hash, erb_case_node->children, hash_map);
|
|
349
|
+
|
|
350
|
+
hash = hash_child_array(hash, erb_case_node->conditions, hash_map);
|
|
351
|
+
|
|
352
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_case_node->else_clause, hash_map));
|
|
353
|
+
|
|
354
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_case_node->end_node, hash_map));
|
|
355
|
+
} break;
|
|
356
|
+
|
|
357
|
+
case AST_ERB_CASE_MATCH_NODE: {
|
|
358
|
+
const AST_ERB_CASE_MATCH_NODE_T* erb_case_match_node = (const AST_ERB_CASE_MATCH_NODE_T*) node;
|
|
359
|
+
|
|
360
|
+
hash = hash_token(hash, erb_case_match_node->tag_opening);
|
|
361
|
+
|
|
362
|
+
hash = hash_token(hash, erb_case_match_node->content);
|
|
363
|
+
|
|
364
|
+
hash = hash_token(hash, erb_case_match_node->tag_closing);
|
|
365
|
+
|
|
366
|
+
hash = hash_child_array(hash, erb_case_match_node->children, hash_map);
|
|
367
|
+
|
|
368
|
+
hash = hash_child_array(hash, erb_case_match_node->conditions, hash_map);
|
|
369
|
+
|
|
370
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_case_match_node->else_clause, hash_map));
|
|
371
|
+
|
|
372
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_case_match_node->end_node, hash_map));
|
|
373
|
+
} break;
|
|
374
|
+
|
|
375
|
+
case AST_ERB_WHILE_NODE: {
|
|
376
|
+
const AST_ERB_WHILE_NODE_T* erb_while_node = (const AST_ERB_WHILE_NODE_T*) node;
|
|
377
|
+
|
|
378
|
+
hash = hash_token(hash, erb_while_node->tag_opening);
|
|
379
|
+
|
|
380
|
+
hash = hash_token(hash, erb_while_node->content);
|
|
381
|
+
|
|
382
|
+
hash = hash_token(hash, erb_while_node->tag_closing);
|
|
383
|
+
|
|
384
|
+
hash = hash_child_array(hash, erb_while_node->statements, hash_map);
|
|
385
|
+
|
|
386
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_while_node->end_node, hash_map));
|
|
387
|
+
} break;
|
|
388
|
+
|
|
389
|
+
case AST_ERB_UNTIL_NODE: {
|
|
390
|
+
const AST_ERB_UNTIL_NODE_T* erb_until_node = (const AST_ERB_UNTIL_NODE_T*) node;
|
|
391
|
+
|
|
392
|
+
hash = hash_token(hash, erb_until_node->tag_opening);
|
|
393
|
+
|
|
394
|
+
hash = hash_token(hash, erb_until_node->content);
|
|
395
|
+
|
|
396
|
+
hash = hash_token(hash, erb_until_node->tag_closing);
|
|
397
|
+
|
|
398
|
+
hash = hash_child_array(hash, erb_until_node->statements, hash_map);
|
|
399
|
+
|
|
400
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_until_node->end_node, hash_map));
|
|
401
|
+
} break;
|
|
402
|
+
|
|
403
|
+
case AST_ERB_FOR_NODE: {
|
|
404
|
+
const AST_ERB_FOR_NODE_T* erb_for_node = (const AST_ERB_FOR_NODE_T*) node;
|
|
405
|
+
|
|
406
|
+
hash = hash_token(hash, erb_for_node->tag_opening);
|
|
407
|
+
|
|
408
|
+
hash = hash_token(hash, erb_for_node->content);
|
|
409
|
+
|
|
410
|
+
hash = hash_token(hash, erb_for_node->tag_closing);
|
|
411
|
+
|
|
412
|
+
hash = hash_child_array(hash, erb_for_node->statements, hash_map);
|
|
413
|
+
|
|
414
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_for_node->end_node, hash_map));
|
|
415
|
+
} break;
|
|
416
|
+
|
|
417
|
+
case AST_ERB_RESCUE_NODE: {
|
|
418
|
+
const AST_ERB_RESCUE_NODE_T* erb_rescue_node = (const AST_ERB_RESCUE_NODE_T*) node;
|
|
419
|
+
|
|
420
|
+
hash = hash_token(hash, erb_rescue_node->tag_opening);
|
|
421
|
+
|
|
422
|
+
hash = hash_token(hash, erb_rescue_node->content);
|
|
423
|
+
|
|
424
|
+
hash = hash_token(hash, erb_rescue_node->tag_closing);
|
|
425
|
+
|
|
426
|
+
hash = hash_child_array(hash, erb_rescue_node->statements, hash_map);
|
|
427
|
+
|
|
428
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_rescue_node->subsequent, hash_map));
|
|
429
|
+
} break;
|
|
430
|
+
|
|
431
|
+
case AST_ERB_ENSURE_NODE: {
|
|
432
|
+
const AST_ERB_ENSURE_NODE_T* erb_ensure_node = (const AST_ERB_ENSURE_NODE_T*) node;
|
|
433
|
+
|
|
434
|
+
hash = hash_token(hash, erb_ensure_node->tag_opening);
|
|
435
|
+
|
|
436
|
+
hash = hash_token(hash, erb_ensure_node->content);
|
|
437
|
+
|
|
438
|
+
hash = hash_token(hash, erb_ensure_node->tag_closing);
|
|
439
|
+
|
|
440
|
+
hash = hash_child_array(hash, erb_ensure_node->statements, hash_map);
|
|
441
|
+
} break;
|
|
442
|
+
|
|
443
|
+
case AST_ERB_BEGIN_NODE: {
|
|
444
|
+
const AST_ERB_BEGIN_NODE_T* erb_begin_node = (const AST_ERB_BEGIN_NODE_T*) node;
|
|
445
|
+
|
|
446
|
+
hash = hash_token(hash, erb_begin_node->tag_opening);
|
|
447
|
+
|
|
448
|
+
hash = hash_token(hash, erb_begin_node->content);
|
|
449
|
+
|
|
450
|
+
hash = hash_token(hash, erb_begin_node->tag_closing);
|
|
451
|
+
|
|
452
|
+
hash = hash_child_array(hash, erb_begin_node->statements, hash_map);
|
|
453
|
+
|
|
454
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_begin_node->rescue_clause, hash_map));
|
|
455
|
+
|
|
456
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_begin_node->else_clause, hash_map));
|
|
457
|
+
|
|
458
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_begin_node->ensure_clause, hash_map));
|
|
459
|
+
|
|
460
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_begin_node->end_node, hash_map));
|
|
461
|
+
} break;
|
|
462
|
+
|
|
463
|
+
case AST_ERB_UNLESS_NODE: {
|
|
464
|
+
const AST_ERB_UNLESS_NODE_T* erb_unless_node = (const AST_ERB_UNLESS_NODE_T*) node;
|
|
465
|
+
|
|
466
|
+
hash = hash_token(hash, erb_unless_node->tag_opening);
|
|
467
|
+
|
|
468
|
+
hash = hash_token(hash, erb_unless_node->content);
|
|
469
|
+
|
|
470
|
+
hash = hash_token(hash, erb_unless_node->tag_closing);
|
|
471
|
+
|
|
472
|
+
// skip location field: then_keyword
|
|
473
|
+
|
|
474
|
+
hash = hash_child_array(hash, erb_unless_node->statements, hash_map);
|
|
475
|
+
|
|
476
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_unless_node->else_clause, hash_map));
|
|
477
|
+
|
|
478
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_unless_node->end_node, hash_map));
|
|
479
|
+
} break;
|
|
480
|
+
|
|
481
|
+
case AST_RUBY_RENDER_LOCAL_NODE: {
|
|
482
|
+
const AST_RUBY_RENDER_LOCAL_NODE_T* ruby_render_local_node = (const AST_RUBY_RENDER_LOCAL_NODE_T*) node;
|
|
483
|
+
|
|
484
|
+
hash = hash_token(hash, ruby_render_local_node->name);
|
|
485
|
+
|
|
486
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) ruby_render_local_node->value, hash_map));
|
|
487
|
+
} break;
|
|
488
|
+
|
|
489
|
+
case AST_RUBY_RENDER_KEYWORDS_NODE: {
|
|
490
|
+
const AST_RUBY_RENDER_KEYWORDS_NODE_T* ruby_render_keywords_node = (const AST_RUBY_RENDER_KEYWORDS_NODE_T*) node;
|
|
491
|
+
|
|
492
|
+
hash = hash_token(hash, ruby_render_keywords_node->partial);
|
|
493
|
+
|
|
494
|
+
hash = hash_token(hash, ruby_render_keywords_node->template_path);
|
|
495
|
+
|
|
496
|
+
hash = hash_token(hash, ruby_render_keywords_node->layout);
|
|
497
|
+
|
|
498
|
+
hash = hash_token(hash, ruby_render_keywords_node->file);
|
|
499
|
+
|
|
500
|
+
hash = hash_token(hash, ruby_render_keywords_node->inline_template);
|
|
501
|
+
|
|
502
|
+
hash = hash_token(hash, ruby_render_keywords_node->body);
|
|
503
|
+
|
|
504
|
+
hash = hash_token(hash, ruby_render_keywords_node->plain);
|
|
505
|
+
|
|
506
|
+
hash = hash_token(hash, ruby_render_keywords_node->html);
|
|
507
|
+
|
|
508
|
+
hash = hash_token(hash, ruby_render_keywords_node->renderable);
|
|
509
|
+
|
|
510
|
+
hash = hash_token(hash, ruby_render_keywords_node->collection);
|
|
511
|
+
|
|
512
|
+
hash = hash_token(hash, ruby_render_keywords_node->object);
|
|
513
|
+
|
|
514
|
+
hash = hash_token(hash, ruby_render_keywords_node->as_name);
|
|
515
|
+
|
|
516
|
+
hash = hash_token(hash, ruby_render_keywords_node->spacer_template);
|
|
517
|
+
|
|
518
|
+
hash = hash_token(hash, ruby_render_keywords_node->formats);
|
|
519
|
+
|
|
520
|
+
hash = hash_token(hash, ruby_render_keywords_node->variants);
|
|
521
|
+
|
|
522
|
+
hash = hash_token(hash, ruby_render_keywords_node->handlers);
|
|
523
|
+
|
|
524
|
+
hash = hash_token(hash, ruby_render_keywords_node->content_type);
|
|
525
|
+
|
|
526
|
+
hash = hash_child_array(hash, ruby_render_keywords_node->locals, hash_map);
|
|
527
|
+
} break;
|
|
528
|
+
|
|
529
|
+
case AST_ERB_RENDER_NODE: {
|
|
530
|
+
const AST_ERB_RENDER_NODE_T* erb_render_node = (const AST_ERB_RENDER_NODE_T*) node;
|
|
531
|
+
|
|
532
|
+
hash = hash_token(hash, erb_render_node->tag_opening);
|
|
533
|
+
|
|
534
|
+
hash = hash_token(hash, erb_render_node->content);
|
|
535
|
+
|
|
536
|
+
hash = hash_token(hash, erb_render_node->tag_closing);
|
|
537
|
+
|
|
538
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_render_node->keywords, hash_map));
|
|
539
|
+
|
|
540
|
+
hash = hash_child_array(hash, erb_render_node->body, hash_map);
|
|
541
|
+
|
|
542
|
+
hash = hash_child_array(hash, erb_render_node->block_arguments, hash_map);
|
|
543
|
+
|
|
544
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_render_node->rescue_clause, hash_map));
|
|
545
|
+
|
|
546
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_render_node->else_clause, hash_map));
|
|
547
|
+
|
|
548
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_render_node->ensure_clause, hash_map));
|
|
549
|
+
|
|
550
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) erb_render_node->end_node, hash_map));
|
|
551
|
+
} break;
|
|
552
|
+
|
|
553
|
+
case AST_RUBY_PARAMETER_NODE: {
|
|
554
|
+
const AST_RUBY_PARAMETER_NODE_T* ruby_parameter_node = (const AST_RUBY_PARAMETER_NODE_T*) node;
|
|
555
|
+
|
|
556
|
+
hash = hash_token(hash, ruby_parameter_node->name);
|
|
557
|
+
|
|
558
|
+
hash = herb_hash_combine(hash, herb_hash_tree((const AST_NODE_T*) ruby_parameter_node->default_value, hash_map));
|
|
559
|
+
|
|
560
|
+
hash = herb_hash_string(hash, ruby_parameter_node->kind);
|
|
561
|
+
|
|
562
|
+
hash = herb_hash_bool(hash, ruby_parameter_node->required);
|
|
563
|
+
} break;
|
|
564
|
+
|
|
565
|
+
case AST_ERB_STRICT_LOCALS_NODE: {
|
|
566
|
+
const AST_ERB_STRICT_LOCALS_NODE_T* erb_strict_locals_node = (const AST_ERB_STRICT_LOCALS_NODE_T*) node;
|
|
567
|
+
|
|
568
|
+
hash = hash_token(hash, erb_strict_locals_node->tag_opening);
|
|
569
|
+
|
|
570
|
+
hash = hash_token(hash, erb_strict_locals_node->content);
|
|
571
|
+
|
|
572
|
+
hash = hash_token(hash, erb_strict_locals_node->tag_closing);
|
|
573
|
+
|
|
574
|
+
hash = hash_child_array(hash, erb_strict_locals_node->locals, hash_map);
|
|
575
|
+
} break;
|
|
576
|
+
|
|
577
|
+
case AST_ERB_YIELD_NODE: {
|
|
578
|
+
const AST_ERB_YIELD_NODE_T* erb_yield_node = (const AST_ERB_YIELD_NODE_T*) node;
|
|
579
|
+
|
|
580
|
+
hash = hash_token(hash, erb_yield_node->tag_opening);
|
|
581
|
+
|
|
582
|
+
hash = hash_token(hash, erb_yield_node->content);
|
|
583
|
+
|
|
584
|
+
hash = hash_token(hash, erb_yield_node->tag_closing);
|
|
585
|
+
} break;
|
|
586
|
+
|
|
587
|
+
case AST_ERB_IN_NODE: {
|
|
588
|
+
const AST_ERB_IN_NODE_T* erb_in_node = (const AST_ERB_IN_NODE_T*) node;
|
|
589
|
+
|
|
590
|
+
hash = hash_token(hash, erb_in_node->tag_opening);
|
|
591
|
+
|
|
592
|
+
hash = hash_token(hash, erb_in_node->content);
|
|
593
|
+
|
|
594
|
+
hash = hash_token(hash, erb_in_node->tag_closing);
|
|
595
|
+
|
|
596
|
+
// skip location field: then_keyword
|
|
597
|
+
|
|
598
|
+
hash = hash_child_array(hash, erb_in_node->statements, hash_map);
|
|
599
|
+
} break;
|
|
600
|
+
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
herb_hash_map_set(hash_map, node, hash);
|
|
604
|
+
|
|
605
|
+
return hash;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
static herb_hash_T identity_hash_attributes(const hb_array_T* attributes, const herb_hash_map_T* hash_map) {
|
|
609
|
+
if (attributes == NULL) { return HERB_HASH_INIT; }
|
|
610
|
+
|
|
611
|
+
const size_t count = hb_array_size(attributes);
|
|
612
|
+
herb_hash_T combined = HERB_HASH_INIT;
|
|
613
|
+
|
|
614
|
+
for (size_t index = 0; index < count; index++) {
|
|
615
|
+
const AST_NODE_T* attribute = (const AST_NODE_T*) hb_array_get(attributes, index);
|
|
616
|
+
herb_hash_T attribute_hash = herb_hash_map_get(hash_map, attribute);
|
|
617
|
+
combined ^= attribute_hash;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return combined;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
herb_hash_T herb_hash_node_move_identity(const AST_NODE_T* node, const herb_hash_map_T* hash_map) {
|
|
624
|
+
if (node == NULL) { return HERB_HASH_INIT; }
|
|
625
|
+
|
|
626
|
+
herb_hash_T hash = HERB_HASH_INIT;
|
|
627
|
+
hash = herb_hash_uint32(hash, (uint32_t) node->type);
|
|
628
|
+
|
|
629
|
+
switch (node->type) {
|
|
630
|
+
case AST_HTML_ELEMENT_NODE: {
|
|
631
|
+
const AST_HTML_ELEMENT_NODE_T* element = (const AST_HTML_ELEMENT_NODE_T*) node;
|
|
632
|
+
hash = hash_token(hash, element->tag_name);
|
|
633
|
+
|
|
634
|
+
if (element->open_tag != NULL) {
|
|
635
|
+
const AST_HTML_OPEN_TAG_NODE_T* open_tag = (const AST_HTML_OPEN_TAG_NODE_T*) element->open_tag;
|
|
636
|
+
hash = herb_hash_combine(hash, identity_hash_attributes(open_tag->children, hash_map));
|
|
637
|
+
}
|
|
638
|
+
} break;
|
|
639
|
+
|
|
640
|
+
case AST_HTML_CONDITIONAL_ELEMENT_NODE: {
|
|
641
|
+
const AST_HTML_CONDITIONAL_ELEMENT_NODE_T* element = (const AST_HTML_CONDITIONAL_ELEMENT_NODE_T*) node;
|
|
642
|
+
hash = hash_token(hash, element->tag_name);
|
|
643
|
+
|
|
644
|
+
if (element->open_tag != NULL) {
|
|
645
|
+
hash = herb_hash_combine(hash, identity_hash_attributes(element->open_tag->children, hash_map));
|
|
646
|
+
}
|
|
647
|
+
} break;
|
|
648
|
+
|
|
649
|
+
default: {
|
|
650
|
+
hash = herb_hash_map_get(hash_map, node);
|
|
651
|
+
} break;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
return hash;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
herb_hash_T herb_hash_node_identity(const AST_NODE_T* node, const herb_hash_map_T* hash_map) {
|
|
658
|
+
if (node == NULL) { return HERB_HASH_INIT; }
|
|
659
|
+
|
|
660
|
+
herb_hash_T hash = HERB_HASH_INIT;
|
|
661
|
+
hash = herb_hash_uint32(hash, (uint32_t) node->type);
|
|
662
|
+
|
|
663
|
+
switch (node->type) {
|
|
664
|
+
case AST_HTML_ELEMENT_NODE: {
|
|
665
|
+
const AST_HTML_ELEMENT_NODE_T* element = (const AST_HTML_ELEMENT_NODE_T*) node;
|
|
666
|
+
hash = hash_token(hash, element->tag_name);
|
|
667
|
+
} break;
|
|
668
|
+
|
|
669
|
+
case AST_HTML_CONDITIONAL_ELEMENT_NODE: {
|
|
670
|
+
const AST_HTML_CONDITIONAL_ELEMENT_NODE_T* element = (const AST_HTML_CONDITIONAL_ELEMENT_NODE_T*) node;
|
|
671
|
+
hash = hash_token(hash, element->tag_name);
|
|
672
|
+
} break;
|
|
673
|
+
|
|
674
|
+
default: {
|
|
675
|
+
hash = herb_hash_map_get(hash_map, node);
|
|
676
|
+
} break;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
return hash;
|
|
680
|
+
}
|