splat 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/splat.rb +6 -6
  2. metadata +2 -2
data/lib/splat.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  class Splat
2
2
  attr_reader :platform
3
3
 
4
- def try_load feature, *gems
4
+ def try_load feature, params
5
5
  begin
6
- gems.each {|gem| require gem }
6
+ params.each {|gem, req| require req }
7
7
  yield
8
8
  rescue Exception
9
9
  puts "for #{feature} support with splat on #{@platform}:"
10
- gems.each {|gem| puts " * gem install #{gem}" }
10
+ params.each {|gem, req| puts " * gem install #{gem}" }
11
11
  end
12
12
  end
13
13
 
@@ -19,13 +19,13 @@ class Splat
19
19
  case Config::CONFIG['host_os']
20
20
  when /mswin|win32|dos|cygwin|mingw/i
21
21
  @platform = :win32
22
- try_load 'clipboard', ' win32-clipboard' do
22
+ try_load 'clipboard', 'win32-clipboard' => 'win32/clipboard' do
23
23
  require 'splat/win32_clipboard'
24
24
  @clipboard = Splat::Win32Clipboard.new
25
25
  end
26
26
  require 'splat/win32_launcher'
27
27
  @launcher = Splat::Win32Launcher.new
28
- try_load 'browser automation', 'watir' do
28
+ try_load 'browser automation', 'watir' => 'watir' do
29
29
  @browser_class = Watir::IE
30
30
  end
31
31
  def @path_cleaner.clean path
@@ -37,7 +37,7 @@ class Splat
37
37
  @clipboard = Splat::DarwinClipboard.new
38
38
  require 'splat/darwin_launcher'
39
39
  @launcher = Splat::DarwinLauncher.new
40
- try_load 'browser automation', ' rb-appscript', 'safariwatir' do
40
+ try_load 'browser automation', 'rb-appscript' => 'rb-appscript', 'safariwatir' => 'safariwatir' do
41
41
  @browser_class = Watir::Safari
42
42
  end
43
43
  else
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mark Ryall