https://github.com/copiousfreetime/launchy
A helper for launching cross-platform applications in a fire and forget manner.
https://github.com/copiousfreetime/launchy
Keywords
browser commandline launchy ruby
Keywords from Contributors
activerecord activejob mvc rspec rubygems ruby-gem rack cucumber minitest rubocop
Last synced: about 24 hours ago
JSON representation
Repository metadata
A helper for launching cross-platform applications in a fire and forget manner.
- Host: GitHub
- URL: https://github.com/copiousfreetime/launchy
- Owner: copiousfreetime
- License: isc
- Created: 2008-06-22T03:36:06.000Z (over 17 years ago)
- Default Branch: main
- Last Pushed: 2025-02-21T16:30:15.000Z (about 1 year ago)
- Last Synced: 2026-02-25T19:42:25.991Z (6 days ago)
- Topics: browser, commandline, launchy, ruby
- Language: Ruby
- Homepage: https://github.com/copiousfreetime/launchy
- Size: 480 KB
- Stars: 789
- Watchers: 10
- Forks: 59
- Open Issues: 3
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
README.md
launchy
DESCRIPTION
Launchy is helper class for launching cross-platform applications in a fire and
forget manner.
There are application concepts (browser, email client, etc) that are common
across all platforms, and they may be launched differently on each platform.
Launchy is here to make a common approach to launching external applications from
within ruby programs.
FEATURES
Currently only launching a browser is supported.
SYNOPSIS
You can use launchy on the commandline, within the Capybara and Rspec-rails
testing environment, or via its API.
Commandline
% launchy https://www.ruby-lang.org/
There are additional command line options, use launchy --help to see them.
Using the BROWSER environment variable
Launchy has a predefined set of common browsers on each platform that it
attempts to use, and of course it is not exhaustive. As a fallback you can make
use of the somewhat standard BROWSER environment variable.
BROWSER works in a similar same way to PATH. It is a colon (:) separated
list of commands to try. You can also put in a %s in the command and the URL
you are attempting to open will be substituted there.
As an example if you set BROWSER=/usr/local/bin/firefox-bin -new-tab '%s':/usr/local/bin/google-chrome-stable and you call
Launchy.open("https://www.ruby-lang.org/") then Launchy will try, in order:
/usr/local/bin/firefox-bin -new-tab 'https://www.ruby-lang.org'/usr/local/bin/google-chrome-stable https://www.ruby-lang.org
Additional links on the use of BROWSER as an environment variable.
- http://www.catb.org/esr/BROWSER/index.html
- https://help.ubuntu.com/community/EnvironmentVariables
- https://wiki.archlinux.org/index.php/environment_variables
Capybara Testing
First, install Capybara and Rspec for
Rails. Capybara provides the following
method:
save_and_open_page
When inserted into your code at the place where you would like to open your
program, and when rspec is run, Capybara displays this message:
Page saved to /home/code/my_app_name/tmp/capybara/capybara-current-date-and-time.html with save_and_open_page.
Please install the launchy gem to open page automatically.
With Launchy installed, when rspec is run again, it will launch an unstyled
instance of the specific page. It can be especially useful when debugging errors
in integration tests. For example:
context "signin" do
it "lets a user sign in" do
visit root_path
click_link signin_path
save_and_open_page
page.should have_content "Enter your login information"
end
end
Public API
In the vein of Semantic Versioning, this is the sole
supported public API.
Launchy.open( uri, options = {} ) { |exception| }
At the moment, the only available options are:
:debug Turn on debugging output
:application Explicitly state what application class is going to be used
:host_os Explicitly state what host operating system to pretend to be
:dry_run Do nothing and print the command that would be executed on $stdout
If Launchy.open is invoked with a block, then no exception will be thrown, and
the block will be called with the parameters passed to #open along with the
exception that was raised.
An example of using the public API:
Launchy.open( "https://www.ruby-lang.org" )
An example of using the public API and using the error block:
uri = "https://www.ruby-lang.org"
Launchy.open( uri ) do |exception|
puts "Attempted to open #{uri} and failed because #{exception}"
end
ISC LICENSE
https://opensource.org/licenses/isc-license.txt
Copyright (c) 2007-2020 Jeremy Hinegardner
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Owner metadata
- Name: Jeremy Hinegardner
- Login: copiousfreetime
- Email:
- Kind: user
- Description:
- Website: http://copiousfreetime.org
- Location: Boulder, CO
- Twitter:
- Company: Copious Free Time, LLC
- Icon url: https://avatars.githubusercontent.com/u/11256?v=4
- Repositories: 90
- Last ynced at: 2023-04-09T03:55:19.312Z
- Profile URL: https://github.com/copiousfreetime
GitHub Events
Total
- Delete event: 6
- Pull request event: 10
- Issues event: 8
- Watch event: 14
- Issue comment event: 12
- Push event: 23
- Create event: 8
Last Year
- Issues event: 1
- Watch event: 8
- Issue comment event: 2
Committers metadata
Last synced: 4 days ago
Total Commits: 487
Total Committers: 21
Avg Commits per committer: 23.19
Development Distribution Score (DDS): 0.053
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Jeremy Hinegardner | j****y@c****g | 461 |
| Chris Schmich | s****h@g****m | 3 |
| Mark J. Lehman | s****7 | 3 |
| Postmodern | p****3@g****m | 2 |
| Suraj N. Kurapati | s****u@g****m | 2 |
| Daniel Farina | d****l@h****m | 1 |
| Jack Turnbull | g****t@j****k | 1 |
| Mike Farmer | m****f@k****m | 1 |
| Nicolas Leger | n****r@n****m | 1 |
| git-darcs-import | 1 | |
| Bogdan Gusiev | a****o@g****m | 1 |
| Colin Bell | c****l@b****g | 1 |
| Corey Haines | c****s@g****m | 1 |
| Gioele Barabucci | g****e@s****t | 1 |
| Jeremy Moritz | j****y@j****m | 1 |
| Josef Šimánek | j****k@g****m | 1 |
| Marc Rohloff | m****c@m****m | 1 |
| Mariusz Pietrzyk | w****t@w****l | 1 |
| Miquel Rodríguez Telep / Michael Rodríguez-Torrent | m****l@d****k | 1 |
| Stephen Judkins | s****s@g****m | 1 |
| piruty | 8****y | 1 |
Committer domains:
- designunbound.co.uk: 1
- wijet.pl: 1
- marcrohloff.com: 1
- jeremymoritz.com: 1
- svario.it: 1
- baibell.org: 1
- nleger.com: 1
- kynetx.com: 1
- jackturnbull.co.uk: 1
- heroku.com: 1
- copiousfreetime.org: 1
Issue and Pull Request metadata
Last synced: about 2 months ago
Total issues: 77
Total pull requests: 47
Average time to close issues: 9 months
Average time to close pull requests: 2 months
Total issue authors: 66
Total pull request authors: 27
Average comments per issue: 3.17
Average comments per pull request: 1.21
Merged pull request: 33
Bot issues: 0
Bot pull requests: 1
Past year issues: 3
Past year pull requests: 10
Past year average time to close issues: 16 days
Past year average time to close pull requests: about 3 hours
Past year issue authors: 3
Past year pull request authors: 1
Past year average comments per issue: 3.0
Past year average comments per pull request: 0.0
Past year merged pull request: 10
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- copiousfreetime (6)
- gioele (3)
- rubyFeedback (2)
- schmich (2)
- Rubioli (2)
- cefn (2)
- alok1312 (1)
- bailey86 (1)
- ghost (1)
- surajmoda (1)
- GlenDrs (1)
- dleidert (1)
- ianks (1)
- greeneca (1)
- javiersegovia (1)
Top Pull Request Authors
- copiousfreetime (18)
- stephenjudkins (2)
- simi (2)
- Spone (2)
- bruceadams (1)
- supremebeing7 (1)
- infertux (1)
- coreyhaines (1)
- bparanj (1)
- jackturnbull (1)
- fdr (1)
- JamieKD-RIFT (1)
- gioele (1)
- jeremymoritz (1)
- dependabot[bot] (1)
Top Issue Labels
- bug (9)
- feature (7)
- documentation (1)
Top Pull Request Labels
- bug (3)
- feature (1)
- confirm that it is fixed (1)
- dependencies (1)
Package metadata
- Total packages: 11
-
Total downloads:
- rubygems: 549,124,366 total
- Total docker downloads: 1,143,838,914
- Total dependent packages: 1,040 (may contain duplicates)
- Total dependent repositories: 94,948 (may contain duplicates)
- Total versions: 122
- Total maintainers: 1
gem.coop: launchy
Launchy is helper class for launching cross-platform applications in a fire and forget manner. There are application concepts (browser, email client, etc) that are common across all platforms, and they may be launched differently on each platform. Launchy is here to make a common approach to launching external applications from within ruby programs.
- Homepage: https://github.com/copiousfreetime/launchy
- Documentation: http://www.rubydoc.info/gems/launchy/
- Licenses: ISC
- Latest release: 3.1.1 (published about 1 year ago)
- Last Synced: 2026-02-28T12:01:53.001Z (3 days ago)
- Versions: 45
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 274,557,862 Total
- Docker Downloads: 571,919,457
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.063%
- Downloads: 0.091%
- Docker downloads count: 0.162%
- Maintainers (1)
debian-13: ruby-launchy
- Homepage: https://github.com/copiousfreetime/launchy
- Documentation: https://packages.debian.org/trixie/ruby-launchy
- Licenses: isc
- Latest release: 2.5.2-1 (published 19 days ago)
- Last Synced: 2026-02-13T13:17:15.975Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.366%
- Stargazers count: 0.53%
- Forks count: 0.935%
rubygems.org: launchy
Launchy is helper class for launching cross-platform applications in a fire and forget manner. There are application concepts (browser, email client, etc) that are common across all platforms, and they may be launched differently on each platform. Launchy is here to make a common approach to launching external applications from within ruby programs.
- Homepage: https://github.com/copiousfreetime/launchy
- Documentation: http://www.rubydoc.info/gems/launchy/
- Licenses: ISC
- Latest release: 3.1.1 (published about 1 year ago)
- Last Synced: 2026-02-28T18:00:33.565Z (3 days ago)
- Versions: 45
- Dependent Packages: 1,040
- Dependent Repositories: 94,948
- Downloads: 274,566,504 Total
- Docker Downloads: 571,919,457
-
Rankings:
- Dependent packages count: 0.047%
- Downloads: 0.091%
- Dependent repos count: 0.122%
- Docker downloads count: 0.23%
- Average: 1.011%
- Stargazers count: 2.112%
- Forks count: 3.467%
- Maintainers (1)
proxy.golang.org: github.com/copiousfreetime/launchy
- Homepage:
- Documentation: https://pkg.go.dev/github.com/copiousfreetime/launchy#section-documentation
- Licenses: isc
- Latest release: v3.1.1+incompatible (published about 1 year ago)
- Last Synced: 2026-02-25T18:01:21.994Z (6 days ago)
- Versions: 24
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 2.258%
- Forks count: 3.239%
- Average: 6.469%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
ubuntu-23.10: ruby-launchy
- Homepage: https://github.com/copiousfreetime/launchy
- Licenses:
- Latest release: 2.5.0-3 (published 18 days ago)
- Last Synced: 2026-02-13T18:24:23.287Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-11: ruby-launchy
- Homepage: https://github.com/copiousfreetime/launchy
- Documentation: https://packages.debian.org/bullseye/ruby-launchy
- Licenses:
- Latest release: 2.5.0-3 (published 21 days ago)
- Last Synced: 2026-02-13T08:21:49.661Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-22.04: ruby-launchy
- Homepage: https://github.com/copiousfreetime/launchy
- Licenses:
- Latest release: 2.5.0-3 (published 18 days ago)
- Last Synced: 2026-02-13T13:19:45.191Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.04: ruby-launchy
- Homepage: https://github.com/copiousfreetime/launchy
- Licenses:
- Latest release: 2.5.0-3 (published 21 days ago)
- Last Synced: 2026-02-11T06:42:39.825Z (21 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-launchy
- Homepage: https://github.com/copiousfreetime/launchy
- Documentation: https://packages.debian.org/bookworm/ruby-launchy
- Licenses:
- Latest release: 2.5.0-3 (published 19 days ago)
- Last Synced: 2026-02-12T23:34:09.382Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- addressable 2.8.0
- docile 1.4.0
- jar-dependencies 0.4.1
- launchy 2.5.1
- minitest 5.15.0
- psych 4.0.3
- public_suffix 4.0.7
- rake 13.0.1
- rdoc 6.4.0
- simplecov 0.21.2
- simplecov-html 0.12.3
- simplecov_json_formatter 0.1.4
- stringio 3.0.1
Score: 30.96888758529629