bones 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 3.3.0 / 2010-03-04
2
+
3
+ 1 minor enhancement
4
+ - updating the default ruby project template
5
+
1
6
  == 3.2.1 / 2010-02-01
2
7
 
3
8
  2 bug fixes
@@ -17,16 +17,34 @@ module <%= classname %>
17
17
  # they will be joined to the end of the libray path using
18
18
  # <tt>File.join</tt>.
19
19
  #
20
- def self.libpath( *args )
21
- args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
20
+ def self.libpath( *args, &block )
21
+ rv = args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
22
+ if block
23
+ begin
24
+ $LOAD_PATH.unshift LIBPATH
25
+ rv = block.call
26
+ ensure
27
+ $LOAD_PATH.shift
28
+ end
29
+ end
30
+ return rv
22
31
  end
23
32
 
24
33
  # Returns the lpath for the module. If any arguments are given,
25
34
  # they will be joined to the end of the path using
26
35
  # <tt>File.join</tt>.
27
36
  #
28
- def self.path( *args )
29
- args.empty? ? PATH : ::File.join(PATH, args.flatten)
37
+ def self.path( *args, &block )
38
+ rv = args.empty? ? PATH : ::File.join(PATH, args.flatten)
39
+ if block
40
+ begin
41
+ $LOAD_PATH.unshift PATH
42
+ rv = block.call
43
+ ensure
44
+ $LOAD_PATH.shift
45
+ end
46
+ end
47
+ return rv
30
48
  end
31
49
 
32
50
  # Utility method used to require all files ending in .rb that lie in the
data/lib/bones.rb CHANGED
@@ -12,7 +12,7 @@ module Bones
12
12
  extend LittlePlugger
13
13
 
14
14
  # :stopdoc:
15
- VERSION = '3.2.1'
15
+ VERSION = '3.3.0'
16
16
  PATH = File.expand_path(File.join(File.dirname(__FILE__), '..'))
17
17
  LIBPATH = File.expand_path(File.join(PATH, 'lib'))
18
18
  HOME = File.expand_path(ENV['HOME'] || ENV['USERPROFILE'])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bones
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pease
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-01 00:00:00 -07:00
12
+ date: 2010-03-04 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency