{"id":19692480,"url":"https://github.com/johansenja/open_source","last_synced_at":"2026-04-15T00:32:28.353Z","repository":{"id":56886900,"uuid":"445552221","full_name":"johansenja/open_source","owner":"johansenja","description":"Quickly open the source file of a Ruby Class, Module or Method in your $EDITOR","archived":false,"fork":false,"pushed_at":"2022-01-08T14:59:35.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T01:28:35.255Z","etag":null,"topics":["debugging","gem","ruby"],"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/johansenja.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":"2022-01-07T14:41:06.000Z","updated_at":"2022-01-10T14:13:01.000Z","dependencies_parsed_at":"2022-08-20T14:31:24.595Z","dependency_job_id":null,"html_url":"https://github.com/johansenja/open_source","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/johansenja/open_source","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansenja%2Fopen_source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansenja%2Fopen_source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansenja%2Fopen_source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansenja%2Fopen_source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johansenja","download_url":"https://codeload.github.com/johansenja/open_source/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansenja%2Fopen_source/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31821537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["debugging","gem","ruby"],"created_at":"2024-11-11T19:13:32.529Z","updated_at":"2026-04-15T00:32:28.330Z","avatar_url":"https://github.com/johansenja.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Source\n\nQuickly open the source file of a Class, Module, or Method in your favourite editor, from Ruby.\n\n## Usage\n\nFirst make sure your EDITOR environment variable is set ([How do I find and set my $EDITOR environment variable?](https://askubuntu.com/questions/432524/how-do-i-find-and-set-my-editor-environment-variable)).\n\nThen use as you wish\n\n```ruby\n# probably in a console, though doesn't have to be\nrequire 'open_source' # not needed if it's in your Gemfile, and this environment is loaded by bundler\n\nopen_source \"User\" # opens file where User class is defined\noso User           # same as above; use the aliases for ease of use!\noso Authenticable  # opens file where Authenticable module is defined\noso :log           # opens file where \"log\" method is defined\noso \"log\"          # same\noso method :log    # you get the idea\noso Rails.method(:application)\noso User.instance_method(:name)\n```\n\nLine numbers are supported too, currently for Vi and VsCode.\n\n### Configuration\n\n#### Using a specific editor for this gem\n\nIt's possible to use the `OPEN_SOURCE_GEM_EDITOR` env variable to set a specific editor for use with this gem, if you don't want to use your standard `EDITOR`.\n\nFor example:\n\n```bash\n# .bashrc or wherever\nexport EDITOR=vim                  # standard terminal based editor\nexport OPEN_SOURCE_GEM_EDITOR=gvim # a GUI version; opens in a different window. Takes priority over EDITOR\n```\n\nThis is optional, and if you normally use a GUI editor anyway it probably won't be needed.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'open_source_location', require: \"open_source\"\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install open_source_location\n\nJust make sure you then `require 'open_source'` where you need it.\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 the created tag, 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/johansenja/open_source.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohansenja%2Fopen_source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohansenja%2Fopen_source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohansenja%2Fopen_source/lists"}