Add Ruby ERB language spec
ERB (or Embedded Ruby) is a preprocessor or templating language in common use in Ruby projects.
ERB is similar in concept PHP, and is commonly embedded within HTML files. It uses
- <% ruby code %> - this will just execute the embedded ruby code
- <%- ruby code -%> - this will execute the embedded ruby code and strip the white space from the ERB segment
- <%= ruby code %> - this will execute the embedded ruby code, and replace the ERB tag with the output from the ruby code
- <%# ruby code %> - this is a commented out section of ERB and will be removed from the file and ignored
This merge request
- Fixes a bug in the Ruby language spec to prevent ERB closing tags being interpreted as an uncommon literal syntax in Ruby
- Adds an ERB language spec as a default (*.erb files)
- Adds an ERB in HTML language spec (*.html.erb files) - these are the default for view templates in Ruby on Rails projects
- Adds an ERB in Javascript language spec (*.js.erb files) - these are used for SJR responses in Ruby on Rails projects