epitools 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/epitools.gemspec +2 -2
- data/lib/epitools/basetypes.rb +12 -0
- data/spec/basetypes_spec.rb +5 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4
|
data/epitools.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{epitools}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["epitron"]
|
12
|
-
s.date = %q{2011-01-
|
12
|
+
s.date = %q{2011-01-15}
|
13
13
|
s.description = %q{Miscellaneous utility libraries to make my life easier.}
|
14
14
|
s.email = %q{chris@ill-logic.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/epitools/basetypes.rb
CHANGED
@@ -354,6 +354,18 @@ end
|
|
354
354
|
|
355
355
|
class Object
|
356
356
|
|
357
|
+
unless defined?(__DIR__)
|
358
|
+
#
|
359
|
+
# This method is convenience for the `File.expand_path(File.dirname(__FILE__))` idiom.
|
360
|
+
# (taken from Michael Fellinger's Ramaze... thanx, dood! :D)
|
361
|
+
#
|
362
|
+
def __DIR__(*args)
|
363
|
+
filename = caller[0][/^(.*):/, 1]
|
364
|
+
dir = File.expand_path(File.dirname(filename))
|
365
|
+
::File.expand_path(::File.join(dir, *args.map{|a| a.to_s}))
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
357
369
|
#
|
358
370
|
# Instead of:
|
359
371
|
# if cookie_jar.include? cookie
|
data/spec/basetypes_spec.rb
CHANGED
@@ -61,6 +61,10 @@ describe Object do
|
|
61
61
|
10.not.even?.should == false
|
62
62
|
end
|
63
63
|
|
64
|
+
it "__DIR__s" do
|
65
|
+
__DIR__.should == File.dirname(File.expand_path(__FILE__))
|
66
|
+
end
|
67
|
+
|
64
68
|
end
|
65
69
|
|
66
70
|
describe Numeric do
|
@@ -79,7 +83,7 @@ describe String do
|
|
79
83
|
|
80
84
|
it "rot13s" do
|
81
85
|
message = "Unbreakable Code"
|
82
|
-
message.rot13.
|
86
|
+
message.rot13.should_not == message
|
83
87
|
message.rot13.rot13.should == message
|
84
88
|
end
|
85
89
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epitools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 4
|
10
|
+
version: 0.4.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- epitron
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-15 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|