whereis 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (9) hide show
  1. data/Gemfile +3 -3
  2. data/Gemfile.lock +24 -24
  3. data/LICENSE +21 -21
  4. data/Manifest +7 -7
  5. data/Rakefile +34 -34
  6. data/demo.rb +13 -13
  7. data/lib/whereis.rb +31 -36
  8. data/whereis.gemspec +32 -32
  9. metadata +36 -30
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
2
- gem "sys-uname"
3
- gem "echoe"
1
+ source :rubygems
2
+ gem "uname"
3
+ gem "echoe"
@@ -1,24 +1,24 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- allison (2.0.3)
5
- echoe (4.6.1)
6
- allison (>= 2.0.3)
7
- gemcutter (>= 0.7.0)
8
- rake (>= 0.9.2)
9
- rdoc (>= 3.6.1)
10
- rubyforge (>= 2.0.4)
11
- gemcutter (0.7.0)
12
- json_pure (1.5.3)
13
- rake (0.9.2)
14
- rdoc (3.8)
15
- rubyforge (2.0.4)
16
- json_pure (>= 1.1.7)
17
- sys-uname (0.8.5)
18
-
19
- PLATFORMS
20
- ruby
21
-
22
- DEPENDENCIES
23
- echoe
24
- sys-uname
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ allison (2.0.3)
5
+ echoe (4.6.1)
6
+ allison (>= 2.0.3)
7
+ gemcutter (>= 0.7.0)
8
+ rake (>= 0.9.2)
9
+ rdoc (>= 3.6.1)
10
+ rubyforge (>= 2.0.4)
11
+ gemcutter (0.7.0)
12
+ json_pure (1.5.3)
13
+ rake (0.9.2)
14
+ rdoc (3.8)
15
+ rubyforge (2.0.4)
16
+ json_pure (>= 1.1.7)
17
+ uname (1.0)
18
+
19
+ PLATFORMS
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ echoe
24
+ uname
data/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- Whereis
2
- Ruby interface to `whereis` command.
3
- Copyright (c) 2011 Sam Saint-Pettersen.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ Whereis
2
+ Ruby interface to `whereis` command.
3
+ Copyright (c) 2011 Sam Saint-Pettersen.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Manifest CHANGED
@@ -1,7 +1,7 @@
1
- Gemfile
2
- Gemfile.lock
3
- LICENSE
4
- Rakefile
5
- demo.rb
6
- lib/whereis.rb
7
- Manifest
1
+ Gemfile
2
+ Gemfile.lock
3
+ LICENSE
4
+ Rakefile
5
+ demo.rb
6
+ lib/whereis.rb
7
+ Manifest
data/Rakefile CHANGED
@@ -1,34 +1,34 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'echoe'
4
- require 'fileutils'
5
-
6
- name = 'whereis'
7
- version = '1.1.3'
8
- Echoe.new(name, version) do |p|
9
- p.description = "Ruby interface to `whereis` command."
10
- p.url = "http://github.com/stpettersens/Whereis"
11
- p.email = "s.stpettersen@gmail.com"
12
- p.ignore_pattern = []
13
- p.development_dependencies = []
14
- p.runtime_dependencies = ["sys-uname"]
15
- end
16
-
17
- task :makegem => [:build_gemspec] do
18
- puts "Building gem..."
19
- system("gem build #{name}.gemspec")
20
- end
21
-
22
- task :instgem do
23
- puts "Installing gem..."
24
- system("gem install #{name}-#{version}")
25
- end
26
-
27
- task :all => [:makegem, :instgem, :cleanup] do
28
- end
29
-
30
- task :cleanup => [:clobber] do
31
- puts "Removing everything, including .gemspec"
32
- FileUtils.rm("Manifest")
33
- FileUtils.rm("#{name}.gemspec")
34
- end
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'echoe'
4
+ require 'fileutils'
5
+
6
+ name = 'whereis'
7
+ version = '1.1.4'
8
+ Echoe.new(name, version) do |p|
9
+ p.description = "Ruby interface to `whereis` command."
10
+ p.url = "http://github.com/stpettersens/Whereis"
11
+ p.email = "s.stpettersen@gmail.com"
12
+ p.ignore_pattern = []
13
+ p.development_dependencies = []
14
+ p.runtime_dependencies = ["uname"]
15
+ end
16
+
17
+ task :makegem => [:build_gemspec] do
18
+ puts "Building gem..."
19
+ system("gem build #{name}.gemspec")
20
+ end
21
+
22
+ task :instgem do
23
+ puts "Installing gem..."
24
+ system("gem install #{name}-#{version}")
25
+ end
26
+
27
+ task :all => [:makegem, :instgem, :cleanup] do
28
+ end
29
+
30
+ task :cleanup => [:clobber] do
31
+ puts "Removing everything, including .gemspec"
32
+ FileUtils.rm("Manifest")
33
+ FileUtils.rm("#{name}.gemspec")
34
+ end
data/demo.rb CHANGED
@@ -1,13 +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)
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)
@@ -1,36 +1,31 @@
1
- #
2
- # Whereis
3
- # An interface to `whereis` [or `where` on Windows].
4
- # Copyright (c) 2011 Sam Saint-Pettersen.
5
- #
6
- # Released under the MIT/X11 License.
7
- #
8
- require 'sys/uname'
9
- include Sys
10
-
11
- module Whereis
12
- def self.whereis(executable)
13
- whereis = nil
14
- if Uname.sysname.match(/.*n[i|u]x/)
15
- whereis = 'whereis'
16
- else
17
- whereis = 'where'
18
- end
19
- output = IO.popen("#{whereis} #{executable}")
20
- begin
21
- output = output.readlines()
22
- output = output[0].chomp
23
- rescue
24
- output = ''
25
- end
26
- return output
27
- end
28
- def self.boolean(executable)
29
- output = self.whereis(executable)
30
- if output.match(/\w:\\|\//)
31
- return true
32
- else
33
- return false
34
- end
35
- end
36
- end
1
+ #
2
+ # Whereis
3
+ # An interface to `whereis` [or `where` on Windows].
4
+ # Copyright (c) 2011 Sam Saint-Pettersen.
5
+ #
6
+ # Released under the MIT/X11 License.
7
+ #
8
+ require 'uname'
9
+
10
+ module Whereis
11
+ def self.whereis(executable)
12
+ whereis = nil
13
+ if Uname.sysname.match(/.*n[i|u]x/)
14
+ whereis = 'whereis'
15
+ else
16
+ whereis = 'where'
17
+ end
18
+ output = IO.popen("#{whereis} #{executable}")
19
+ output = output.readlines
20
+ output = output[0].chomp
21
+ return output
22
+ end
23
+ def self.boolean(executable)
24
+ output = self.whereis(executable)
25
+ if output.match(/\w:\\|\//)
26
+ return true
27
+ else
28
+ return false
29
+ end
30
+ end
31
+ end
@@ -1,32 +1,32 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{whereis}
5
- s.version = "1.1.3"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
- s.authors = [%q{}]
9
- s.date = %q{2011-07-18}
10
- s.description = %q{Ruby interface to `whereis` command.}
11
- s.email = %q{s.stpettersen@gmail.com}
12
- s.extra_rdoc_files = [%q{LICENSE}, %q{lib/whereis.rb}]
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
- s.homepage = %q{http://github.com/stpettersens/Whereis}
15
- s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Whereis}]
16
- s.require_paths = [%q{lib}]
17
- s.rubyforge_project = %q{whereis}
18
- s.rubygems_version = %q{1.8.5}
19
- s.summary = %q{Ruby interface to `whereis` command.}
20
-
21
- if s.respond_to? :specification_version then
22
- s.specification_version = 3
23
-
24
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
25
- s.add_runtime_dependency(%q<sys-uname>, [">= 0"])
26
- else
27
- s.add_dependency(%q<sys-uname>, [">= 0"])
28
- end
29
- else
30
- s.add_dependency(%q<sys-uname>, [">= 0"])
31
- end
32
- end
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{whereis}
5
+ s.version = "1.1.4"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = [%q{}]
9
+ s.date = %q{2011-07-23}
10
+ s.description = %q{Ruby interface to `whereis` command.}
11
+ s.email = %q{s.stpettersen@gmail.com}
12
+ s.extra_rdoc_files = [%q{LICENSE}, %q{lib/whereis.rb}]
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
+ s.homepage = %q{http://github.com/stpettersens/Whereis}
15
+ s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Whereis}]
16
+ s.require_paths = [%q{lib}]
17
+ s.rubyforge_project = %q{whereis}
18
+ s.rubygems_version = %q{1.8.5}
19
+ s.summary = %q{Ruby interface to `whereis` command.}
20
+
21
+ if s.respond_to? :specification_version then
22
+ s.specification_version = 3
23
+
24
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
25
+ s.add_runtime_dependency(%q<uname>, [">= 0"])
26
+ else
27
+ s.add_dependency(%q<uname>, [">= 0"])
28
+ end
29
+ else
30
+ s.add_dependency(%q<uname>, [">= 0"])
31
+ end
32
+ end
metadata CHANGED
@@ -1,35 +1,38 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: whereis
3
- version: !ruby/object:Gem::Version
4
- version: 1.1.3
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 1.1.4
6
6
  platform: ruby
7
- authors:
8
- - ''
7
+ authors:
8
+ - ""
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-18 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: sys-uname
16
- requirement: &16798032 !ruby/object:Gem::Requirement
12
+
13
+ date: 2011-07-23 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: uname
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
17
19
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
22
24
  type: :runtime
23
- prerelease: false
24
- version_requirements: *16798032
25
+ version_requirements: *id001
25
26
  description: Ruby interface to `whereis` command.
26
27
  email: s.stpettersen@gmail.com
27
28
  executables: []
29
+
28
30
  extensions: []
29
- extra_rdoc_files:
31
+
32
+ extra_rdoc_files:
30
33
  - LICENSE
31
34
  - lib/whereis.rb
32
- files:
35
+ files:
33
36
  - Gemfile
34
37
  - Gemfile.lock
35
38
  - LICENSE
@@ -40,30 +43,33 @@ files:
40
43
  - whereis.gemspec
41
44
  homepage: http://github.com/stpettersens/Whereis
42
45
  licenses: []
46
+
43
47
  post_install_message:
44
- rdoc_options:
48
+ rdoc_options:
45
49
  - --line-numbers
46
50
  - --inline-source
47
51
  - --title
48
52
  - Whereis
49
- require_paths:
53
+ require_paths:
50
54
  - lib
51
- required_ruby_version: !ruby/object:Gem::Requirement
55
+ required_ruby_version: !ruby/object:Gem::Requirement
52
56
  none: false
53
- requirements:
54
- - - ! '>='
55
- - !ruby/object:Gem::Version
56
- version: '0'
57
- required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: "0"
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
62
  none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '1.2'
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: "1.2"
63
67
  requirements: []
68
+
64
69
  rubyforge_project: whereis
65
70
  rubygems_version: 1.8.5
66
71
  signing_key:
67
72
  specification_version: 3
68
73
  summary: Ruby interface to `whereis` command.
69
74
  test_files: []
75
+