launchy 2.0.4-java → 2.0.5-java
Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY
CHANGED
@@ -25,10 +25,11 @@ class Launchy::Application
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def nix_app_list
|
28
|
-
nix_de = Launchy::Detect::NixDesktopEnvironment.detect
|
29
28
|
app_list = %w[ xdg-open ]
|
30
|
-
|
31
|
-
|
29
|
+
if nix_de = Launchy::Detect::NixDesktopEnvironment.detect then
|
30
|
+
app_list << nix_de.browser
|
31
|
+
app_list << nix_de.fallback_browsers
|
32
|
+
end
|
32
33
|
app_list.flatten!
|
33
34
|
app_list.delete_if { |b| b.nil? || (b.strip.size == 0) }
|
34
35
|
app_list.collect { |bin| find_executable( bin ) }.find_all { |x| not x.nil? }
|
@@ -14,8 +14,8 @@ module Launchy::Detect
|
|
14
14
|
# NixDekstopEnvironment::Unknown
|
15
15
|
def self.detect
|
16
16
|
found = find_child( :is_current_desktop_environment? )
|
17
|
-
|
18
|
-
|
17
|
+
Launchy.log("Current Desktop environment not flound. #{Launchy.bug_report_message}") unless found
|
18
|
+
return found
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.fallback_browsers
|
data/lib/launchy/version.rb
CHANGED
@@ -40,5 +40,15 @@ describe Launchy::Application::Browser do
|
|
40
40
|
uri = Addressable::URI.parse( __FILE__ )
|
41
41
|
Launchy::Application::Browser.handles?( uri ).must_equal true
|
42
42
|
end
|
43
|
+
|
44
|
+
it "handles the case where $BROWSER is set and no *nix desktop environment is found" do
|
45
|
+
ENV.delete( "KDE_FULL_SESSION" )
|
46
|
+
ENV.delete( "GNOME_DESKTOP_SESSION_ID" )
|
47
|
+
ENV['BROWSER'] = "do-this-instead"
|
48
|
+
Launchy.host_os = 'linux'
|
49
|
+
browser = Launchy::Application::Browser.new
|
50
|
+
browser.browser_cmdline.must_equal "do-this-instead"
|
51
|
+
end
|
52
|
+
|
43
53
|
end
|
44
54
|
|
@@ -23,10 +23,11 @@ describe Launchy::Detect::NixDesktopEnvironment do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
|
26
|
-
it "
|
26
|
+
it "returns nil if it cannot determine the *nix desktop environment" do
|
27
27
|
Launchy.host_os = "linux"
|
28
28
|
ENV.delete( "KDE_FULL_SESSION" )
|
29
29
|
ENV.delete( "GNOME_DESKTOP_SESSION_ID" )
|
30
|
-
|
30
|
+
Launchy::Detect::NixDesktopEnvironment.detect.must_equal( nil )
|
31
31
|
end
|
32
|
+
|
32
33
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: launchy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.0.
|
5
|
+
version: 2.0.5
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Jeremy Hinegardner
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-11-21 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|