Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ src/include/ast/ast_pretty_print.h
src/include/errors.h
src/include/lib/hb_foreach.h
src/parser/match_tags.c
src/analyze/action_view/helper_registry.c
src/analyze/action_view/generated_handlers.c
src/analyze/action_view/generated_handlers.h
src/include/analyze/action_view/helper_registry.h
src/visitor.c
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ java/nodes.h
java/org/herb/ast/Errors.java
java/org/herb/ast/Nodes.java
java/org/herb/ast/NodeVisitor.java
java/org/herb/ast/HelperRegistry.java
java/org/herb/ast/Visitor.java
javascript/packages/core/src/action-view-helpers.ts
javascript/packages/core/src/errors.ts
javascript/packages/core/src/html-entities.json
javascript/packages/core/src/node-type-guards.ts
Expand All @@ -108,21 +110,27 @@ javascript/packages/node/extension/error_helpers.cpp
javascript/packages/node/extension/error_helpers.h
javascript/packages/node/extension/nodes.cpp
javascript/packages/node/extension/nodes.h
lib/herb/action_view/helper_registry.rb
lib/herb/ast/nodes.rb
lib/herb/errors.rb
lib/herb/visitor.rb
rust/src/action_view_helpers.rs
rust/src/ast/nodes.rs
rust/src/errors.rs
rust/src/nodes.rs
rust/src/union_types.rs
rust/src/visitor.rs
sig/serialized_ast_errors.rbs
sig/serialized_ast_nodes.rbs
src/analyze/action_view/helper_registry.c
src/analyze/action_view/generated_handlers.c
src/analyze/action_view/generated_handlers.h
src/analyze/missing_end.c
src/analyze/transform.c
src/ast/ast_nodes.c
src/ast/ast_pretty_print.c
src/errors.c
src/include/analyze/action_view/helper_registry.h
src/include/ast/ast_nodes.h
src/include/ast/ast_pretty_print.h
src/include/errors.h
Expand Down
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ AllCops:
- 'vendor/**/*'
- 'tmp/**/*'
- 'node_modules/**/*'
- 'lib/herb/action_view/**/*'

Style/StringLiterals:
Enabled: true
Expand Down Expand Up @@ -104,6 +105,7 @@ Metrics/ClassLength:
- lib/herb/visitor.rb
- lib/herb/ast/nodes.rb
- test/**/*_test.rb
- templates/template.rb

Metrics/ModuleLength:
Exclude:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: action_cable_meta_tag
source: "ActionCable::Helpers::ActionCableHelper#action_cable_meta_tag"
gem: actioncable
output: html
visibility: public
supported: false
supports_block: false
description: |-
Returns an `"action-cable-url"` `<meta>` tag with the value of the URL specified in your configuration. Ensure this is above your JavaScript tag. Used by Action Cable to determine the URL of your WebSocket server.
signature: "action_cable_meta_tag"
documentation_url: "https://api.rubyonrails.org/classes/ActionCable/Helpers/ActionCableHelper.html#method-i-action_cable_meta_tag"
tag:
name: meta
is_void: true
preferred: false
detect_style: call_name
arguments: []
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: content_security_policy?
source: "ActionController::ContentSecurityPolicy#content_security_policy?"
gem: actionpack
output: boolean
visibility: public
supported: false
supports_block: false
description: |-
Returns whether a Content-Security-Policy is present for the current request.
signature: "content_security_policy?"
documentation_url: ""
tag: null
arguments: []
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: content_security_policy_nonce
source: "ActionController::ContentSecurityPolicy#content_security_policy_nonce"
gem: actionpack
output: text
visibility: public
supported: false
supports_block: false
description: |-
Returns the Content-Security-Policy nonce for the current request. This nonce value is used in `<script>` and `<style>` tags to allow inline content when a CSP is configured with a nonce source.
signature: "content_security_policy_nonce"
documentation_url: ""
tag: null
arguments: []
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: polymorphic_path
source: "ActionDispatch::Routing::PolymorphicRoutes#polymorphic_path"
gem: actionpack
output: url
visibility: public
supported: false
supports_block: false
description: |-
Returns the path component of a URL for the given record. Like `polymorphic_url` but returns a path instead of a full URL.
signature: "polymorphic_path(record_or_hash_or_array, options = {})"
documentation_url: "https://api.rubyonrails.org/classes/ActionDispatch/Routing/PolymorphicRoutes.html#method-i-polymorphic_path"
tag: null
arguments:
- name: record_or_hash_or_array
position: 1
type: object
optional: false
description: "An Active Record instance, class, array, or hash."
- name: options
position: 2
type: hash
optional: true
default: "{}"
description: "URL options hash."
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: polymorphic_url
source: "ActionDispatch::Routing::PolymorphicRoutes#polymorphic_url"
gem: actionpack
output: url
visibility: public
supported: false
supports_block: false
description: |-
Returns the URL for the given record or array of records. Automatically resolves to the named route based on the class of the record.
signature: "polymorphic_url(record_or_hash_or_array, options = {})"
documentation_url: "https://api.rubyonrails.org/classes/ActionDispatch/Routing/PolymorphicRoutes.html#method-i-polymorphic_url"
tag: null
arguments:
- name: record_or_hash_or_array
position: 1
type: object
optional: false
description: "An Active Record instance, class, array, or hash."
- name: options
position: 2
type: hash
optional: true
default: "{}"
description: "URL options hash."
options:
- name: action
type: symbol
description: "Route action (e.g. `:edit`, `:new`)."
- name: routing_type
type: symbol
description: "Whether to generate `:url` or `:path`. Defaults to `:url`."
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: form_authenticity_token
source: "ActionController::RequestForgeryProtection#form_authenticity_token"
gem: actionpack
output: text
visibility: public
supported: false
supports_block: false
description: |-
Creates the authenticity token for the current request. Returns the masked CSRF token string used for protecting forms against cross-site request forgery.
signature: "form_authenticity_token(form_options: {})"
documentation_url: "https://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html#method-i-form_authenticity_token"
tag: null
arguments: []
options:
- name: form_options
type: hash
description: "A hash that may contain `:action` and `:method` keys for per-form CSRF tokens."
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: protect_against_forgery?
source: "ActionController::RequestForgeryProtection#protect_against_forgery?"
gem: actionpack
output: boolean
visibility: public
supported: false
supports_block: false
description: |-
Checks if the controller allows forgery protection. Returns `true` if forgery protection is enabled and the session is active.
signature: "protect_against_forgery?"
documentation_url: "https://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html#method-i-protect_against_forgery-3F"
tag: null
arguments: []
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: render_action_text_content
source: "ActionText::ContentHelper#render_action_text_content"
gem: actiontext
output: html
visibility: public
supported: false
supports_block: false
description: |-
Renders Action Text content by processing attachments and sanitizing the resulting HTML. Sets `prefix_partial_path_with_controller_namespace` to `false`, renders attachments, and then sanitizes the content.
signature: "render_action_text_content(content)"
documentation_url: "https://api.rubyonrails.org/classes/ActionText/ContentHelper.html#method-i-render_action_text_content"
tag: null
arguments:
- name: content
position: 1
type: object
optional: false
description: "The Action Text content object to render."
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: sanitize_action_text_content
source: "ActionText::ContentHelper#sanitize_action_text_content"
gem: actiontext
output: html
visibility: public
supported: false
supports_block: false
description: |-
Sanitizes Action Text content HTML using the configured sanitizer, allowed tags, allowed attributes, and scrubber. Returns the sanitized HTML as an `html_safe` string.
signature: "sanitize_action_text_content(content)"
documentation_url: "https://api.rubyonrails.org/classes/ActionText/ContentHelper.html#method-i-sanitize_action_text_content"
tag: null
arguments:
- name: content
position: 1
type: object
optional: false
description: "The Action Text content object to sanitize."
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: rich_textarea_tag
source: "ActionText::TagHelper#rich_textarea_tag"
gem: actiontext
output: html
visibility: public
supported: false
supports_block: true
description: |-
Returns a `<trix-editor>` tag that instantiates the Trix JavaScript editor as well as a hidden field that Trix will write to on changes, so the content will be sent on form submissions.
signature: "rich_textarea_tag(name, value = nil, options = {}, &block)"
documentation_url: "https://api.rubyonrails.org/classes/ActionText/TagHelper.html#method-i-rich_textarea_tag"
tag:
name: trix-editor
is_void: false
preferred: true
detect_style: call_name
arguments:
- name: name
position: 1
type: string
optional: false
description: "Name attribute for the hidden field and editor."
- name: value
position: 2
type: string
optional: true
default: "nil"
description: "Initial content for the editor."
- name: options
position: 3
type: hash
optional: true
default: "{}"
description: "HTML attributes hash."
options:
- name: class
type: string
description: |-
CSS class. Defaults to `"trix-content"` for default styles.
- name: data
type: hash
maps_to: data-*
description: |-
Hash of `data-*` attributes. Includes direct_upload_url and blob_url_template by default.
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: error_message
source: "ActionView::Helpers::ActiveModelHelper#error_message"
gem: actionview
output: text
visibility: internal
supported: false
supports_block: false
description: |-
Returns the validation error message for the current field.
signature: "error_message"
documentation_url: ""
tag: null
arguments: []
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: error_wrapping
source: "ActionView::Helpers::ActiveModelHelper#error_wrapping"
gem: actionview
output: html
visibility: internal
supported: false
supports_block: false
description: |-
Wraps the given HTML tag with error-specific markup when the associated field has validation errors.
signature: "error_wrapping(html_tag)"
documentation_url: ""
tag: null
arguments: []
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: object
source: "ActionView::Helpers::ActiveModelHelper#object"
gem: actionview
output: text
visibility: internal
supported: false
supports_block: false
description: |-
Returns the model object associated with the form builder.
signature: "object"
documentation_url: ""
tag: null
arguments: []
options: []
special_behaviors: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: apply_stylesheet_media_default
source: "ActionView::Helpers::AssetTagHelper#apply_stylesheet_media_default"
gem: actionview
output: text
visibility: internal
supported: false
supports_block: false
description: |-
Returns whether `stylesheet_link_tag` applies a default `media` attribute.
signature: "apply_stylesheet_media_default"
documentation_url: "https://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html"
tag: null
arguments: []
options: []
special_behaviors: []
Loading
Loading