browser_gui 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ require "sinatra"
4
4
  require "browser_gui"
5
5
 
6
6
  # Change the URL that the browser opens to /hello and add a parameter.
7
- set :browser_url, "/hello?world=1"
7
+ set :browser_url, "/hello?world=1&foo=bar"
8
8
 
9
9
  get "/hello" do
10
10
  "params: #{params.inspect}"
@@ -1,3 +1,3 @@
1
1
  module BrowserGui
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/browser_gui.rb CHANGED
@@ -8,11 +8,11 @@ end
8
8
  module BrowserGui
9
9
  def self.open_browser(url)
10
10
  if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/ then
11
- system("start #{url}")
11
+ system("start '#{url}'")
12
12
  elsif RbConfig::CONFIG['host_os'] =~ /darwin/ then
13
- system("open #{url}")
13
+ system("open '#{url}'")
14
14
  elsif RbConfig::CONFIG['host_os'] =~ /linux/ then
15
- system("xdg-open #{url}")
15
+ system("xdg-open '#{url}'")
16
16
  end
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browser_gui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: