whereis 1.1.2 → 1.1.3

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 +36 -36
  8. data/whereis.gemspec +32 -32
  9. metadata +29 -35
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
2
- gem "sys-uname"
3
- gem "echoe"
1
+ source :rubygems
2
+ gem "sys-uname"
3
+ gem "echoe"
data/Gemfile.lock CHANGED
@@ -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
+ sys-uname (0.8.5)
18
+
19
+ PLATFORMS
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ echoe
24
+ sys-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.2'
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.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
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)
data/lib/whereis.rb CHANGED
@@ -1,36 +1,36 @@
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(/[\s\|\/]+/)
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 '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
data/whereis.gemspec CHANGED
@@ -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.2"
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-17}
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.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
metadata CHANGED
@@ -1,38 +1,35 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: whereis
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.3
4
5
  prerelease:
5
- version: 1.1.2
6
6
  platform: ruby
7
- authors:
8
- - ""
7
+ authors:
8
+ - ''
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-17 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2011-07-18 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: sys-uname
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &16798032 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
24
22
  type: :runtime
25
- version_requirements: *id001
23
+ prerelease: false
24
+ version_requirements: *16798032
26
25
  description: Ruby interface to `whereis` command.
27
26
  email: s.stpettersen@gmail.com
28
27
  executables: []
29
-
30
28
  extensions: []
31
-
32
- extra_rdoc_files:
29
+ extra_rdoc_files:
33
30
  - LICENSE
34
31
  - lib/whereis.rb
35
- files:
32
+ files:
36
33
  - Gemfile
37
34
  - Gemfile.lock
38
35
  - LICENSE
@@ -43,33 +40,30 @@ files:
43
40
  - whereis.gemspec
44
41
  homepage: http://github.com/stpettersens/Whereis
45
42
  licenses: []
46
-
47
43
  post_install_message:
48
- rdoc_options:
44
+ rdoc_options:
49
45
  - --line-numbers
50
46
  - --inline-source
51
47
  - --title
52
48
  - Whereis
53
- require_paths:
49
+ require_paths:
54
50
  - lib
55
- required_ruby_version: !ruby/object:Gem::Requirement
51
+ required_ruby_version: !ruby/object:Gem::Requirement
56
52
  none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: "0"
61
- required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
58
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: "1.2"
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '1.2'
67
63
  requirements: []
68
-
69
64
  rubyforge_project: whereis
70
65
  rubygems_version: 1.8.5
71
66
  signing_key:
72
67
  specification_version: 3
73
68
  summary: Ruby interface to `whereis` command.
74
69
  test_files: []
75
-