whereis 1.1 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/Manifest +1 -0
  2. data/Rakefile +1 -1
  3. data/demo.rb +13 -0
  4. data/lib/whereis.rb +1 -1
  5. data/whereis.gemspec +2 -2
  6. metadata +4 -3
data/Manifest CHANGED
@@ -2,5 +2,6 @@ Gemfile
2
2
  Gemfile.lock
3
3
  LICENSE
4
4
  Rakefile
5
+ demo.rb
5
6
  lib/whereis.rb
6
7
  Manifest
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'echoe'
4
4
  require 'fileutils'
5
5
 
6
6
  name = 'whereis'
7
- version = '1.1'
7
+ version = '1.1.1'
8
8
  Echoe.new(name, version) do |p|
9
9
  p.description = "Ruby interface to `whereis` command."
10
10
  p.url = "http://github.com/stpettersens/Whereis"
data/demo.rb ADDED
@@ -0,0 +1,13 @@
1
+ # Demonstate whereis usage
2
+ require "whereis"
3
+
4
+ good = "g++"
5
+ bad = "xyz"
6
+
7
+ # Will find g++ on my system
8
+ puts Whereis.whereis(good)
9
+ puts Whereis.boolean(good)
10
+
11
+ # Will not find xyz
12
+ puts Whereis.whereis(bad)
13
+ puts Whereis.boolean(bad)
@@ -27,7 +27,7 @@ module Whereis
27
27
  end
28
28
  def self.boolean(executable)
29
29
  output = self.whereis(executable)
30
- if output.match(/[\:|\/]+/)
30
+ if output.match(/[[A-Z]\:|\/]+/)
31
31
  return true
32
32
  else
33
33
  return false
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{whereis}
5
- s.version = "1.1"
5
+ s.version = "1.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = [%q{}]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Ruby interface to `whereis` command.}
11
11
  s.email = %q{s.stpettersen@gmail.com}
12
12
  s.extra_rdoc_files = [%q{LICENSE}, %q{lib/whereis.rb}]
13
- s.files = [%q{Gemfile}, %q{Gemfile.lock}, %q{LICENSE}, %q{Rakefile}, %q{lib/whereis.rb}, %q{Manifest}, %q{whereis.gemspec}]
13
+ s.files = [%q{Gemfile}, %q{Gemfile.lock}, %q{LICENSE}, %q{Rakefile}, %q{demo.rb}, %q{lib/whereis.rb}, %q{Manifest}, %q{whereis.gemspec}]
14
14
  s.homepage = %q{http://github.com/stpettersens/Whereis}
15
15
  s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Whereis}]
16
16
  s.require_paths = [%q{lib}]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whereis
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-07-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sys-uname
16
- requirement: &15964776 !ruby/object:Gem::Requirement
16
+ requirement: &16096932 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *15964776
24
+ version_requirements: *16096932
25
25
  description: Ruby interface to `whereis` command.
26
26
  email: s.stpettersen@gmail.com
27
27
  executables: []
@@ -34,6 +34,7 @@ files:
34
34
  - Gemfile.lock
35
35
  - LICENSE
36
36
  - Rakefile
37
+ - demo.rb
37
38
  - lib/whereis.rb
38
39
  - Manifest
39
40
  - whereis.gemspec