Module: Everywhere::Platform
- Defined in:
- lib/everywhere/platform/client.rb,
lib/everywhere/platform/snapshot.rb,
lib/everywhere/platform/credentials.rb
Overview
Talks to the RubyEverywhere Platform. Small JSON-over-HTTP wrapper — no gem dependency, so it works inside the packaged CLI too.
Defined Under Namespace
Modules: Snapshot Classes: Client, Credentials
Constant Summary collapse
- DEFAULT_URL =
Production Platform API. rubyeverywhere.com is the marketing/docs site; the Platform lives on the
platform.subdomain. Override for dev with --url or $EVERYWHERE_PLATFORM_URL (e.g. http://localhost:3000). "https://platform.rubyeverywhere.com"
Class Method Summary collapse
-
.open_url(url) ⇒ Object
Best-effort browser open; returns false (never raises) if it can't.
Class Method Details
.open_url(url) ⇒ Object
Best-effort browser open; returns false (never raises) if it can't.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/everywhere/platform/client.rb', line 18 def self.open_url(url) cmd = if RUBY_PLATFORM.include?("darwin") then ["open", url] elsif RUBY_PLATFORM.match?(/mingw|mswin/) then ["cmd", "/c", "start", "", url] else ["xdg-open", url] end system(*cmd, out: File::NULL, err: File::NULL) rescue StandardError false end |