{"id":25487837,"url":"https://github.com/carlosramireziii/better_sjr","last_synced_at":"2025-04-09T22:20:36.001Z","repository":{"id":59151055,"uuid":"74413855","full_name":"carlosramireziii/better_sjr","owner":"carlosramireziii","description":"Improvements to server-generated JavaScript (SJR) responses in Rails","archived":false,"fork":false,"pushed_at":"2016-12-30T01:49:37.000Z","size":38,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T00:11:53.109Z","etag":null,"topics":["rails","ruby","sjr"],"latest_commit_sha":null,"homepage":"","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/carlosramireziii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-21T23:06:24.000Z","updated_at":"2020-12-27T18:53:21.000Z","dependencies_parsed_at":"2022-09-13T11:00:49.698Z","dependency_job_id":null,"html_url":"https://github.com/carlosramireziii/better_sjr","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosramireziii%2Fbetter_sjr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosramireziii%2Fbetter_sjr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosramireziii%2Fbetter_sjr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosramireziii%2Fbetter_sjr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlosramireziii","download_url":"https://codeload.github.com/carlosramireziii/better_sjr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631834,"owners_count":20970069,"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","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":["rails","ruby","sjr"],"created_at":"2025-02-18T20:28:14.864Z","updated_at":"2025-04-09T22:20:35.981Z","avatar_url":"https://github.com/carlosramireziii.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BetterSJR\n\n[![Build Status](https://travis-ci.org/carlosramireziii/better_sjr.svg?branch=master)](https://travis-ci.org/carlosramireziii/better_sjr)\n[![Inline docs](http://inch-ci.org/github/carlosramireziii/better_sjr.svg?branch=master)](http://inch-ci.org/github/carlosramireziii/better_sjr)\n\nBetterSJR improves server-generated JavaScript (SJR) responses in Rails by adding error messages for debugging. \n\nWhen enabled, all SJR response templates will be automatically wrapped in a try-catch statement, \nand the error message of any thrown exception will be printed to the console. \n\nFor more information on common SJR errors, [read this article](http://www.carlosramireziii.com/3-reasons-why-your-sjr-template-isnt-working.html?utm_source=github\u0026utm_campaign=better_sjr).\n\n## Requirements\n\n### Ruby and Rails\n\nThis gem has been tested against Ruby **\u003e= 2.1** and Rails **\u003e= 4.0**.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'better_sjr'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install better_sjr\n\n## Usage\n\nDebugging is not enabled by default. \n\nTo enable in development only (recommended), add an initializer and set `debug_sjr`.\n\n```ruby\n# config/initializers/better_sjr.rb\nBetterSJR.debug_sjr = Rails.env.development?\n```\n\nJavaScript runtime errors will now be caught and printed to the browser console instead of failing silently.\n\n![Image of JavaScript runtime error in browser console](docs/assets/javascript_runtime_error_in_console.png)\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/carlosramireziii/better_sjr.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosramireziii%2Fbetter_sjr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlosramireziii%2Fbetter_sjr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosramireziii%2Fbetter_sjr/lists"}