launchy 0.3.7 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +4 -0
- data/gemspec.rb +5 -0
- data/lib/launchy/application.rb +1 -1
- data/lib/launchy/browser.rb +1 -1
- data/lib/launchy/version.rb +4 -4
- data/spec/browser_spec.rb +4 -0
- data/spec/spec_helper.rb +1 -1
- data/tasks/config.rb +4 -4
- data/tasks/rspec.rake +4 -16
- metadata +55 -7
data/HISTORY
CHANGED
data/gemspec.rb
CHANGED
@@ -23,6 +23,11 @@ Launchy::GEM_SPEC = Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency("rake", ">= 0.8.1")
|
24
24
|
spec.add_dependency("configuration", ">= 0.0.5")
|
25
25
|
|
26
|
+
spec.add_development_dependency("rake", "~> 0.8.7")
|
27
|
+
spec.add_development_dependency("configuration", "~> 1.2.0")
|
28
|
+
spec.add_development_dependency("rspec-core", "~> 2.5.1")
|
29
|
+
|
30
|
+
|
26
31
|
if rdoc = Configuration.for_if_exist?('rdoc') then
|
27
32
|
spec.has_rdoc = true
|
28
33
|
spec.extra_rdoc_files = pkg.files.rdoc
|
data/lib/launchy/application.rb
CHANGED
@@ -135,7 +135,7 @@ module Launchy
|
|
135
135
|
# On windows a good general default is the 'start' Command Shell command
|
136
136
|
def windows_app_list
|
137
137
|
Launchy.log "#{self.class.name} : Using 'start' command on windows."
|
138
|
-
|
138
|
+
%w[ start ]
|
139
139
|
end
|
140
140
|
|
141
141
|
# Cygwin uses the windows start but through an explicit execution of the cmd shell
|
data/lib/launchy/browser.rb
CHANGED
@@ -26,7 +26,7 @@ module Launchy
|
|
26
26
|
begin
|
27
27
|
Launchy.log "#{self.name} : testing if [#{args[0]}] (#{args[0].class}) is a url."
|
28
28
|
uri = URI.parse(args[0])
|
29
|
-
result = [
|
29
|
+
result = %w[http https ftp file].include?(uri.scheme)
|
30
30
|
rescue Exception => e
|
31
31
|
# hmm... why does rcov not see that this is executed ?
|
32
32
|
Launchy.log "#{self.name} : not a url, #{e}"
|
data/lib/launchy/version.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Launchy
|
2
2
|
module Version
|
3
3
|
MAJOR = 0
|
4
|
-
MINOR =
|
5
|
-
BUILD =
|
4
|
+
MINOR = 4
|
5
|
+
BUILD = 0
|
6
6
|
|
7
7
|
def self.to_a
|
8
8
|
[MAJOR, MINOR, BUILD]
|
@@ -11,7 +11,7 @@ module Launchy
|
|
11
11
|
def self.to_s
|
12
12
|
to_a.join(".")
|
13
13
|
end
|
14
|
-
STRING = Version.to_s
|
14
|
+
STRING = Version.to_s
|
15
15
|
end
|
16
|
-
VERSION = Version.to_s
|
16
|
+
VERSION = Version.to_s
|
17
17
|
end
|
data/spec/browser_spec.rb
CHANGED
@@ -21,6 +21,10 @@ describe Launchy::Browser do
|
|
21
21
|
Launchy::Browser.handle?("ftp://download.example.com").should == true
|
22
22
|
end
|
23
23
|
|
24
|
+
it "should handle an file url" do
|
25
|
+
Launchy::Browser.handle?("file:///home/user/index.html").should == true
|
26
|
+
end
|
27
|
+
|
24
28
|
it "should not handle a mailto url" do
|
25
29
|
Launchy::Browser.handle?("mailto:jeremy@example.com").should == false
|
26
30
|
end
|
data/spec/spec_helper.rb
CHANGED
data/tasks/config.rb
CHANGED
@@ -61,8 +61,8 @@ Configuration.for("gem") {
|
|
61
61
|
Configuration.for('test') {
|
62
62
|
mode "spec"
|
63
63
|
files Configuration.for("packaging").files.test
|
64
|
-
options %w[ --format
|
65
|
-
ruby_opts %w[
|
64
|
+
options %w[ --format documentation --color ]
|
65
|
+
ruby_opts %w[ ]
|
66
66
|
}
|
67
67
|
|
68
68
|
#-----------------------------------------------------------------------
|
@@ -71,8 +71,8 @@ Configuration.for('test') {
|
|
71
71
|
Configuration.for('rcov') {
|
72
72
|
output_dir "coverage"
|
73
73
|
libs %w[ lib ]
|
74
|
-
rcov_opts %w[ --html ]
|
75
|
-
ruby_opts %w[
|
74
|
+
rcov_opts %w[ --html -o coverage ]
|
75
|
+
ruby_opts %w[ ]
|
76
76
|
test_files Configuration.for('packaging').files.test
|
77
77
|
}
|
78
78
|
|
data/tasks/rspec.rake
CHANGED
@@ -10,28 +10,16 @@ if spec_config = Configuration.for_if_exist?("test") then
|
|
10
10
|
|
11
11
|
task :default => :spec
|
12
12
|
|
13
|
-
require '
|
14
|
-
|
13
|
+
require 'rspec/core/rake_task'
|
14
|
+
rs = RSpec::Core::RakeTask.new do |r|
|
15
15
|
r.ruby_opts = spec_config.ruby_opts
|
16
|
-
r.
|
17
|
-
Launchy::Paths.root_dir ]
|
18
|
-
r.spec_files = spec_config.files
|
19
|
-
r.spec_opts = spec_config.options
|
16
|
+
r.rspec_opts = spec_config.options
|
20
17
|
|
21
18
|
if rcov_config = Configuration.for_if_exist?('rcov') then
|
22
|
-
r.rcov =
|
23
|
-
r.rcov_dir = rcov_config.output_dir
|
19
|
+
r.rcov = false
|
24
20
|
r.rcov_opts = rcov_config.rcov_opts
|
25
21
|
end
|
26
22
|
end
|
27
|
-
|
28
|
-
Spec::Rake::SpecTask.new( :spec ) do |r|
|
29
|
-
r.ruby_opts = spec_config.ruby_opts
|
30
|
-
r.libs = [ Launchy::Paths.lib_path,
|
31
|
-
Launchy::Paths.root_dir ]
|
32
|
-
r.spec_files = spec_config.files
|
33
|
-
r.spec_opts = spec_config.options
|
34
|
-
end
|
35
23
|
end
|
36
24
|
end
|
37
25
|
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 15
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 0.4.0
|
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:
|
18
|
+
date: 2011-02-27 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -50,6 +50,54 @@ dependencies:
|
|
50
50
|
version: 0.0.5
|
51
51
|
type: :runtime
|
52
52
|
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rake
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 49
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
- 8
|
65
|
+
- 7
|
66
|
+
version: 0.8.7
|
67
|
+
type: :development
|
68
|
+
version_requirements: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: configuration
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 31
|
78
|
+
segments:
|
79
|
+
- 1
|
80
|
+
- 2
|
81
|
+
- 0
|
82
|
+
version: 1.2.0
|
83
|
+
type: :development
|
84
|
+
version_requirements: *id004
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: rspec-core
|
87
|
+
prerelease: false
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 25
|
94
|
+
segments:
|
95
|
+
- 2
|
96
|
+
- 5
|
97
|
+
- 1
|
98
|
+
version: 2.5.1
|
99
|
+
type: :development
|
100
|
+
version_requirements: *id005
|
53
101
|
description: |-
|
54
102
|
Launchy is helper class for launching cross-platform applications in a
|
55
103
|
fire and forget manner.
|
@@ -133,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
181
|
requirements: []
|
134
182
|
|
135
183
|
rubyforge_project: copiousfreetime
|
136
|
-
rubygems_version: 1.
|
184
|
+
rubygems_version: 1.5.2
|
137
185
|
signing_key:
|
138
186
|
specification_version: 3
|
139
187
|
summary: Launchy is helper class for launching cross-platform applications in a fire and forget manner
|