relative 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ === 1.0.1 / 2008-06-25
2
+ * Include example program.
3
+
1
4
  === 1.0.0 / 2008-06-25
2
5
  Initial release of relative. This release includes support for:
3
6
  * constructing pathnames relative to the caller
data/Manifest.txt CHANGED
@@ -3,6 +3,7 @@ LICENSE
3
3
  History.txt
4
4
  README.txt
5
5
  Rakefile
6
+ examples/example.rb
6
7
  lib/relative.rb
7
8
  lib/relative/file.rb
8
9
  lib/relative/kernel.rb
data/Rakefile CHANGED
@@ -1,13 +1,11 @@
1
1
  # -*- ruby -*-
2
2
 
3
- $LOAD_PATH.unshift("lib")
4
-
5
3
  require 'rubygems'
6
4
  require 'hoe'
7
5
 
8
6
  $stderr = STDERR
9
7
 
10
- Hoe.new('relative', "1.0.0") do |p|
8
+ Hoe.new('relative', "1.0.1") do |p|
11
9
  p.remote_rdoc_dir = ''
12
10
  p.developer('DesigningPatterns', 'technical.inquiries@designingpatterns.com')
13
11
  end
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'relative'
4
+
5
+ relative_path = "../Rakefile"
6
+
7
+ print("====================================================================\n")
8
+ print("The absolute path of #{relative_path} (relative to #{__FILE__}):\n")
9
+ print("#{File.expand_path_relative_to_caller(relative_path)}\n")
10
+ print("====================================================================\n")
11
+ print("The Pathname of #{relative_path} (relative to #{__FILE__}):\n")
12
+ print("#{Pathname.new(relative_path).expand_path_relative_to_caller()}\n")
13
+ print("====================================================================\n")
14
+ print("The contents of #{relative_path} (relative to #{__FILE__}):\n")
15
+ print("#{IO.read(PathRelativeToCaller.new(relative_path))}")
16
+ print("====================================================================\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relative
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DesigningPatterns
@@ -14,6 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hoe
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
@@ -38,6 +39,7 @@ files:
38
39
  - History.txt
39
40
  - README.txt
40
41
  - Rakefile
42
+ - examples/example.rb
41
43
  - lib/relative.rb
42
44
  - lib/relative/file.rb
43
45
  - lib/relative/kernel.rb
@@ -70,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
72
  requirements: []
71
73
 
72
74
  rubyforge_project: relative
73
- rubygems_version: 1.0.1
75
+ rubygems_version: 1.2.0
74
76
  signing_key:
75
77
  specification_version: 2
76
78
  summary: The relative library enhances Ruby's core and standard libraries to support naming, opening, and reading files relative to the Ruby file currently being interpreted (the contents of the __ FILE __ identifier)