need 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/History.txt +5 -0
  2. data/lib/need.rb +2 -2
  3. metadata +3 -3
@@ -1,3 +1,8 @@
1
+ === 1.0.2 / 2008-03-18
2
+
3
+ * 1 minor enhancement
4
+ * path creation now uses File.expand_path after joining to give the absolute path
5
+
1
6
  === 1.0.1 / 2008-02-07
2
7
 
3
8
  * 1 minor enhancement
@@ -1,10 +1,10 @@
1
1
  module Need
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
 
4
4
  # need takes a block which should contain a string of the relative path to the file
5
5
  # you wish to need.
6
6
  def need(&block)
7
- require File.join(File.expand_path(File.dirname(eval("__FILE__",block.binding))),block.call)
7
+ require File.expand_path(File.join(File.dirname(eval("__FILE__",block.binding)),block.call))
8
8
  end
9
9
  end
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: need
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Olson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-02-14 00:00:00 -08:00
12
+ date: 2008-03-18 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.5.0
22
+ version: 1.5.1
23
23
  version:
24
24
  description: "== DESCRIPTION: Need makes ruby relative requires just work. Simply need a file with a relative path and the file will always be required correctly, regardless of what file your application is being launched through. Typically, ruby projects would unshift lib onto $PATH or use the File.dirname(__FILE__) trick. Using need means you don't have to worry about either of these. Assume you have two files, one directly in lib and the other in lib/extensions. Let's assume that file_a in lib requires file_b, in lib/extensions. Previously, you would doing some crazy load path unshifting or use the __FILE__ trick to make these requires flexible enough to work when your app is being accessed by rake, through a test suite, or required as a gem. Now, just use need. In file_a: need{\"extensions/file_b\"}"
25
25
  email: olsonas@gmail.com