{"id":13747444,"url":"https://github.com/copiousfreetime/launchy","last_synced_at":"2025-05-09T08:32:42.591Z","repository":{"id":408438,"uuid":"27412","full_name":"copiousfreetime/launchy","owner":"copiousfreetime","description":"A helper for launching cross-platform applications in a fire and forget manner.","archived":false,"fork":false,"pushed_at":"2025-02-21T16:30:15.000Z","size":492,"stargazers_count":786,"open_issues_count":1,"forks_count":58,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-25T05:02:34.579Z","etag":null,"topics":["browser","commandline","launchy","ruby"],"latest_commit_sha":null,"homepage":"https://github.com/copiousfreetime/launchy","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/copiousfreetime.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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,"publiccode":null,"codemeta":null}},"created_at":"2008-06-22T03:36:06.000Z","updated_at":"2025-04-24T16:55:05.000Z","dependencies_parsed_at":"2024-02-26T01:28:04.021Z","dependency_job_id":"9f32385a-2d0b-4f14-972a-7090814d4f4d","html_url":"https://github.com/copiousfreetime/launchy","commit_stats":{"total_commits":460,"total_committers":22,"mean_commits":20.90909090909091,"dds":0.5152173913043478,"last_synced_commit":"0a1d3adf896c92a6278d9b3c48fd0599912e4938"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Flaunchy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Flaunchy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Flaunchy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copiousfreetime%2Flaunchy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/copiousfreetime","download_url":"https://codeload.github.com/copiousfreetime/launchy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251453343,"owners_count":21591830,"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":["browser","commandline","launchy","ruby"],"created_at":"2024-08-03T06:01:29.229Z","updated_at":"2025-05-09T08:32:42.541Z","avatar_url":"https://github.com/copiousfreetime.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# launchy\n\n[![Build Status](https://copiousfreetime.semaphoreci.com/badges/launchy/branches/main.svg)](https://copiousfreetime.semaphoreci.com/projects/launchy)\n\n* [Homepage](https://github.com/copiousfreetime/launchy)\n* [Github Project](https://github.com/copiousfreetime/launchy)\n\n## DESCRIPTION\n\nLaunchy is helper class for launching cross-platform applications in a fire and\nforget manner.\n\nThere are application concepts (browser, email client, etc) that are common\nacross all platforms, and they may be launched differently on each platform.\nLaunchy is here to make a common approach to launching external applications from\nwithin ruby programs.\n\n## FEATURES\n\nCurrently only launching a browser is supported.\n\n## SYNOPSIS\n\nYou can use launchy on the commandline, within the Capybara and Rspec-rails\ntesting environment, or via its API.\n\n### Commandline\n\n    % launchy https://www.ruby-lang.org/\n\nThere are additional command line options, use `launchy --help` to see them.\n\n### Using the `BROWSER` environment variable\n\nLaunchy has a predefined set of common browsers on each platform that it\nattempts to use, and of course it is not exhaustive. As a fallback you can make\nuse of the somewhat standard `BROWSER` environment variable.\n\n`BROWSER` works in a similar same way to `PATH`. It is a colon (`:`) separated\nlist of commands to try. You can also put in a `%s` in the command and the URL\nyou are attempting to open will be substituted there.\n\nAs an example if you set `BROWSER=/usr/local/bin/firefox-bin -new-tab\n'%s':/usr/local/bin/google-chrome-stable` and you call\n`Launchy.open(\"https://www.ruby-lang.org/\")` then Launchy will try, in order:\n\n* `/usr/local/bin/firefox-bin -new-tab 'https://www.ruby-lang.org'`\n* `/usr/local/bin/google-chrome-stable https://www.ruby-lang.org`\n\nAdditional links on the use of `BROWSER` as an environment variable.\n\n* http://www.catb.org/esr/BROWSER/index.html\n* https://help.ubuntu.com/community/EnvironmentVariables\n* https://wiki.archlinux.org/index.php/environment_variables\n\n### Capybara Testing\n\nFirst, install [Capybara](https://github.com/jnicklas/capybara) and [Rspec for\nRails](https://github.com/rspec/rspec-rails). Capybara provides the following\nmethod:\n\n    save_and_open_page\n\nWhen inserted into your code at the place where you would like to open your\nprogram, and when rspec is run, Capybara displays this message:\n\n    Page saved to /home/code/my_app_name/tmp/capybara/capybara-current-date-and-time.html with save_and_open_page.\n    Please install the launchy gem to open page automatically.\n\nWith Launchy installed, when rspec is run again, it will launch an unstyled\ninstance of the specific page. It can be especially useful when debugging errors\nin integration tests. For example:\n\n    context \"signin\" do\n      it \"lets a user sign in\" do\n        visit root_path\n        click_link signin_path\n        save_and_open_page\n        page.should have_content \"Enter your login information\"\n      end\n    end\n\n### Public API\n\nIn the vein of [Semantic Versioning](https://semver.org), this is the sole\nsupported public API.\n\n    Launchy.open( uri, options = {} ) { |exception| }\n\nAt the moment, the only available options are:\n\n    :debug        Turn on debugging output\n    :application  Explicitly state what application class is going to be used\n    :host_os      Explicitly state what host operating system to pretend to be\n    :dry_run      Do nothing and print the command that would be executed on $stdout\n\nIf `Launchy.open` is invoked with a block, then no exception will be thrown, and\nthe block will be called with the parameters passed to `#open` along with the\nexception that was raised.\n\n### An example of using the public API:\n\n    Launchy.open( \"https://www.ruby-lang.org\" )\n\n### An example of using the public API and using the error block:\n\n    uri = \"https://www.ruby-lang.org\"\n    Launchy.open( uri ) do |exception|\n      puts \"Attempted to open #{uri} and failed because #{exception}\"\n    end\n\n## ISC LICENSE\n\nhttps://opensource.org/licenses/isc-license.txt\n\nCopyright (c) 2007-2020 Jeremy Hinegardner\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice\nand this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopiousfreetime%2Flaunchy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopiousfreetime%2Flaunchy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopiousfreetime%2Flaunchy/lists"}