{"id":13503659,"url":"https://github.com/opal/opal-haml","last_synced_at":"2025-08-23T09:07:55.870Z","repository":{"id":12280273,"uuid":"14904349","full_name":"opal/opal-haml","owner":"opal","description":"Opal + Haml = \u003c3","archived":false,"fork":false,"pushed_at":"2024-01-28T19:16:19.000Z","size":58,"stargazers_count":23,"open_issues_count":1,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-23T09:07:34.485Z","etag":null,"topics":["haml-template","haml-templates","opal","opal-haml","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2013-12-03T20:01:01.000Z","updated_at":"2024-08-27T08:55:45.000Z","dependencies_parsed_at":"2024-02-03T04:44:13.194Z","dependency_job_id":null,"html_url":"https://github.com/opal/opal-haml","commit_stats":{"total_commits":70,"total_committers":4,"mean_commits":17.5,"dds":0.4,"last_synced_commit":"9404be3881703a3f14ac77f5e55674610f8c87e2"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/opal/opal-haml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opal%2Fopal-haml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opal%2Fopal-haml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opal%2Fopal-haml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opal%2Fopal-haml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opal","download_url":"https://codeload.github.com/opal/opal-haml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opal%2Fopal-haml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746302,"owners_count":24813556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["haml-template","haml-templates","opal","opal-haml","ruby"],"created_at":"2024-07-31T23:00:42.764Z","updated_at":"2025-08-23T09:07:55.837Z","avatar_url":"https://github.com/opal.png","language":"Ruby","readme":"# Opal Haml\n\n*Haml templates for Opal*\n\n[![Build Status](https://travis-ci.org/opal/opal-haml.svg?branch=master)](https://travis-ci.org/opal/opal-haml)\n\nThis gem adds `.haml` files to sprockets to precompile templates for opal. This\ngem does not make the haml compiler available under opal, just the result of\npre-compiling a haml template.\n\nA small runtime is included to handle dynamic attributes, as well as allowing\ncontent to be rendered.\n\nAll haml templates become available under the `Template` constant in Opal,\nwhich allows a template to be easily rendered in a context:\n\n```ruby\nTemplate['user'].render(my_user)\n# =\u003e \u003cdiv\u003e..\u003c/div\u003e\n```\n\n## Usage\n\nAdd opal-haml to your `Gemfile`:\n\n```ruby\ngem 'opal-haml'\n```\n\nCreate a haml file in the opal load path (e.g. `app/user_template.haml`):\n\n```haml\n.row\n  .col-md-6\n    = self.name\n  .col-md-6\n    = self.age\n```\n\nRender the haml template:\n\n```ruby\n# app/application.rb\nrequire 'user_template'\n\nclass User\n  attr_accessor :name, :age\n\n  def initialize(name, age)\n    @name, @age = name, age\n  end\nend\n\nuser = User.new('Ford Prefect', 42)\nhtml = Template['user_template'].render(user)\nputs html\n# =\u003e \u003cdiv class=\"row\"\u003e...\u003c/div\u003e\n```\n\n## Running tests\n\nGet dependencies:\n\n```\n$ bundle install\n```\n\nRun tests using opal-rspec:\n\n```\n$ bundle exec rake\n```\n\nRun specs in the browser:\n\n```\n$ bundle exec rackup\n```\n\n## License\n\n(The MIT License)\n\nCopyright (C) 2013 by Adam Beynon, 2015 Elia Schito\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopal%2Fopal-haml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopal%2Fopal-haml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopal%2Fopal-haml/lists"}