RequirePaths 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2005,2006 Jamis Buck
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,6 +1,5 @@
1
1
  RequirePaths
2
- by Gary McGhee
3
- jesq.blogspot.com
2
+ by magpie
4
3
 
5
4
  == DESCRIPTION:
6
5
 
@@ -34,7 +33,7 @@ none
34
33
 
35
34
  (The MIT License)
36
35
 
37
- Copyright (c) 2007 FIX
36
+ Copyright (c) 2007 magpie
38
37
 
39
38
  Permission is hereby granted, free of charge, to any person obtaining
40
39
  a copy of this software and associated documentation files (the
@@ -54,3 +53,4 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
54
53
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
55
54
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
56
55
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
56
+
data/Rakefile CHANGED
@@ -1,18 +1,36 @@
1
- # -*- ruby -*-
2
-
3
1
  require 'rubygems'
4
- require 'hoe'
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+ require 'rake/rdoctask'
5
+ require 'rake/packagetask'
6
+ require 'rake/gempackagetask'
7
+ require 'rake/contrib/rubyforgepublisher'
5
8
  require './lib/require_paths.rb'
6
9
 
7
- Hoe.new('RequirePaths', RequirePaths::VERSION) do |p|
8
- p.rubyforge_name = 'require_paths'
9
- # p.author = 'Gary McGhee'
10
- # p.email = 'gazmcghee@yahoo.com.author'
11
- # p.summary = 'Simply provides the require_paths method to all ruby files for cleanly adding paths to $LOAD_PATH, relative to the calling file.'
12
- # p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
13
- # p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
14
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
15
- p.remote_rdoc_dir = '' # Release to root
16
- end
10
+ desc "Build Spec"
11
+ task :default => [ :build_spec ]
17
12
 
18
- # vim: syntax=Ruby
13
+ task :build_spec do
14
+ spec = Gem::Specification.new do |s|
15
+ s.name = 'RequirePaths'
16
+ s.platform = Gem::Platform::RUBY
17
+ s.summary = 'Simply provides the require_paths method to all ruby files for cleanly adding paths to $LOAD_PATH, relative to the calling file.'
18
+ s.version = RequirePaths::VERSION
19
+
20
+ s.author = "magpie"
21
+ s.rubyforge_project = "blackwhitelogin"
22
+ s.homepage = "http://rubyforge.org/projects/blackwhitelogin/"
23
+
24
+ s.has_rdoc = false
25
+ s.requirements << 'none'
26
+ s.require_path = 'lib'
27
+
28
+ s.files = [ "Rakefile", "README", "MIT-LICENSE", "lib/require_paths.rb" ]
29
+ end
30
+
31
+ Rake::GemPackageTask.new(spec) do |p|
32
+ p.gem_spec = spec
33
+ p.need_tar = false
34
+ p.need_zip = false
35
+ end
36
+ end
data/lib/require_paths.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class RequirePaths
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
4
4
 
5
5
  # This sorts out the issues of require'ing files in Ruby
@@ -10,10 +10,11 @@ end
10
10
  #
11
11
  module ::Kernel
12
12
  def require_paths(*aArgs)
13
- caller_dir = File.dirname(File.expand_path(caller.first.sub!(/:[0-9]+$/,'')))
13
+ caller_dir = File.dirname(File.expand_path(caller.first.sub(/:[0-9]+.*/,'')))
14
14
  aArgs.each do |aPath|
15
15
  aPath = File.expand_path(aPath,caller_dir)
16
16
  $LOAD_PATH << aPath unless $LOAD_PATH.include?(aPath)
17
17
  end
18
18
  end
19
19
  end
20
+
metadata CHANGED
@@ -1,63 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: RequirePaths
5
3
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2007-09-24 00:00:00 +08:00
8
- summary: The author was too lazy to write a summary
9
- require_paths:
10
- - lib
11
- email: ryand-ruby@zenspider.com
12
- homepage: http://www.zenspider.com/ZSS/Products/RequirePaths/
13
- rubyforge_project: require_paths
14
- description: The author was too lazy to write a description
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 1.0.1
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
- - Ryan Davis
7
+ - magpie
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2007-12-19 00:00:00 +09:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email:
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
31
24
  files:
32
- - History.txt
33
- - Manifest.txt
34
- - README.txt
35
25
  - Rakefile
36
- - bin/require_paths
26
+ - README
27
+ - MIT-LICENSE
37
28
  - lib/require_paths.rb
38
- - test/test_require_paths.rb
39
- test_files:
40
- - test/test_require_paths.rb
41
- rdoc_options:
42
- - --main
43
- - README.txt
44
- extra_rdoc_files:
45
- - History.txt
46
- - Manifest.txt
47
- - README.txt
48
- executables:
49
- - require_paths
50
- extensions: []
29
+ has_rdoc: false
30
+ homepage: http://rubyforge.org/projects/blackwhitelogin/
31
+ post_install_message:
32
+ rdoc_options: []
51
33
 
52
- requirements: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: "0"
41
+ version:
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ version:
48
+ requirements:
49
+ - none
50
+ rubyforge_project: blackwhitelogin
51
+ rubygems_version: 0.9.5
52
+ signing_key:
53
+ specification_version: 2
54
+ summary: Simply provides the require_paths method to all ruby files for cleanly adding paths to $LOAD_PATH, relative to the calling file.
55
+ test_files: []
53
56
 
54
- dependencies:
55
- - !ruby/object:Gem::Dependency
56
- name: hoe
57
- version_requirement:
58
- version_requirements: !ruby/object:Gem::Version::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: 1.3.0
63
- version:
data/History.txt DELETED
@@ -1,4 +0,0 @@
1
- == 1.0.0 / 2007-09-24
2
-
3
- * First release
4
-
data/Manifest.txt DELETED
@@ -1,7 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- README.txt
4
- Rakefile
5
- bin/require_paths
6
- lib/require_paths.rb
7
- test/test_require_paths.rb
data/bin/require_paths DELETED
File without changes
File without changes