launchy 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: launchy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 5
|
10
|
+
version: 2.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeremy Hinegardner
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-29 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|