scoobydoo 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/scoobydoo.rb +3 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55d84b45475c81f2d64d6dc33da6be61ec615e2e
4
- data.tar.gz: ab624022e06ed526b4b6f216fc0c10ec83a5059b
3
+ metadata.gz: f2b4be708b85dc0d044fb7df852223a9a993b631
4
+ data.tar.gz: 2ee14f9666c7c7aa887c7af3f9d0b9f2789ad434
5
5
  SHA512:
6
- metadata.gz: 00f493e1fe5fd6d6081439d5272a7a9ee727005292d9609cf89a78a669711c5542aab68d44ba89aaeb1e84fe85f48fb28a31df28fe1961a390facb018c16561f
7
- data.tar.gz: 220156c52f52fd105fa30a2922d5904258c66ff989cfd88bb09f588c550a6712c625afc635e17f0176102b5e4fa86d82e1dee6f5cf63ff08e5123639806ab6c7
6
+ metadata.gz: b0ab8e4e6fb51895ac2b18a0a04551b1e938da566968266afacb1f5d48e936ada39cafa33ef60bc37e5ffe9110003904cdfa56fdae49003a6051654a571f6cf3
7
+ data.tar.gz: 4fd8eecf42c65312f550e49b00de1961e1dd847dda5ea409209184813e6060c0a7636c86a22bf8679370915297bf1a693580f7d0cc8a7176cfa6119e35fe19e6
data/lib/scoobydoo.rb CHANGED
@@ -4,11 +4,9 @@ class ScoobyDoo
4
4
  @@cache = Hash.new
5
5
 
6
6
  def self.where_are_you(cmd)
7
- if (@@cache.has_key?(cmd))
8
- return @@cache[cmd]
9
- end
7
+ return @@cache[cmd] if (@@cache.has_key?(cmd))
10
8
 
11
- if (cmd.include?(File::PATH_SEPARATOR))
9
+ if (cmd.include?(File::SEPARATOR))
12
10
  exe = Pathname.new(cmd).expand_path
13
11
  return (exe.executable? && !exe.directory?) ? exe : nil
14
12
  end
@@ -23,6 +21,7 @@ class ScoobyDoo
23
21
  end
24
22
  end
25
23
  end
24
+
26
25
  return nil
27
26
  end
28
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scoobydoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-08 00:00:00.000000000 Z
11
+ date: 2016-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake