whereis 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (8) hide show
  1. data/Gemfile +3 -3
  2. data/Gemfile.lock +24 -24
  3. data/LICENSE +21 -0
  4. data/Manifest +6 -5
  5. data/Rakefile +35 -35
  6. data/lib/whereis.rb +36 -31
  7. data/whereis.gemspec +32 -32
  8. metadata +31 -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"
@@ -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 ADDED
@@ -0,0 +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.
data/Manifest CHANGED
@@ -1,5 +1,6 @@
1
- Gemfile
2
- Gemfile.lock
3
- Rakefile
4
- lib/whereis.rb
5
- Manifest
1
+ Gemfile
2
+ Gemfile.lock
3
+ LICENSE
4
+ Rakefile
5
+ lib/whereis.rb
6
+ Manifest
data/Rakefile CHANGED
@@ -1,35 +1,35 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'echoe'
4
- require 'fileutils'
5
-
6
- name = 'whereis'
7
- version = '1.0'
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}-#{version}.gem")
34
- FileUtils.rm("#{name}.gemspec")
35
- end
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'echoe'
4
+ require 'fileutils'
5
+
6
+ name = 'whereis'
7
+ version = '1.1'
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}-#{version}.gem")
34
+ FileUtils.rm("#{name}.gemspec")
35
+ end
@@ -1,31 +1,36 @@
1
- #
2
- # An interface to `whereis` [or `where` on Windows].
3
- # Copyright (c) 2011 Sam Saint-Pettersen.
4
- #
5
- # Released under the MIT/X11 License.
6
- #
7
- require 'sys/uname'
8
- include Sys
9
-
10
- module Whereis
11
- def self.whereis(executable)
12
- whereis = nil
13
- if Uname.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(/[\|\/]+/)
26
- return true
27
- else
28
- return false
29
- end
30
- end
31
- 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(/[\:|\/]+/)
31
+ return true
32
+ else
33
+ return false
34
+ end
35
+ end
36
+ 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.0"
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-16}
10
- s.description = %q{Ruby interface to `whereis` command.}
11
- s.email = %q{s.stpettersen@gmail.com}
12
- s.extra_rdoc_files = [%q{lib/whereis.rb}]
13
- s.files = [%q{Gemfile}, %q{Gemfile.lock}, %q{Rakefile}, %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"
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{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,72 +1,68 @@
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'
4
5
  prerelease:
5
- version: "1.0"
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-16 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2011-07-17 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: &15964776 !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: *15964776
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:
30
+ - LICENSE
33
31
  - lib/whereis.rb
34
- files:
32
+ files:
35
33
  - Gemfile
36
34
  - Gemfile.lock
35
+ - LICENSE
37
36
  - Rakefile
38
37
  - lib/whereis.rb
39
38
  - Manifest
40
39
  - whereis.gemspec
41
40
  homepage: http://github.com/stpettersens/Whereis
42
41
  licenses: []
43
-
44
42
  post_install_message:
45
- rdoc_options:
43
+ rdoc_options:
46
44
  - --line-numbers
47
45
  - --inline-source
48
46
  - --title
49
47
  - Whereis
50
- require_paths:
48
+ require_paths:
51
49
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
50
+ required_ruby_version: !ruby/object:Gem::Requirement
53
51
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: "0"
58
- required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
57
  none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: "1.2"
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
64
62
  requirements: []
65
-
66
63
  rubyforge_project: whereis
67
64
  rubygems_version: 1.8.5
68
65
  signing_key:
69
66
  specification_version: 3
70
67
  summary: Ruby interface to `whereis` command.
71
68
  test_files: []
72
-