cowtech-extensions 1.0.0.1 → 1.0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cowtech-extensions}
8
- s.version = "1.0.0.1"
8
+ s.version = "1.0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Shogun}]
12
- s.date = %q{2011-07-29}
12
+ s.date = %q{2011-07-30}
13
13
  s.description = %q{Several Ruby object enhancements.}
14
14
  s.email = %q{shogun_panda@me.com}
15
15
  s.extra_rdoc_files = [
@@ -8,9 +8,9 @@ require "cowtech-extensions/object"
8
8
  require "cowtech-extensions/boolean"
9
9
  require "cowtech-extensions/string"
10
10
  require "cowtech-extensions/hash"
11
- require "cowtech-extensions/pathname"
12
11
  require "cowtech-extensions/datetime"
13
12
  require "cowtech-extensions/math"
13
+ require "cowtech-extensions/pathname" if defined?(Pathname)
14
14
  require "cowtech-extensions/active_record" if defined?(ActiveRecord)
15
15
 
16
16
  module Cowtech
@@ -22,61 +22,63 @@ module Cowtech
22
22
  yield if block_given?
23
23
 
24
24
  if what.include?("object") then
25
- Object.class_eval do
25
+ ::Object.class_eval do
26
26
  include Cowtech::Extensions::Object
27
27
  end
28
28
  end
29
29
 
30
30
  if what.include?("boolean") then
31
- TrueClass.class_eval do
31
+ ::TrueClass.class_eval do
32
+ include Cowtech::Extensions::Object
32
33
  include Cowtech::Extensions::Boolean
33
34
  end
34
35
 
35
- FalseClass.class_eval do
36
+ ::FalseClass.class_eval do
37
+ include Cowtech::Extensions::Object
36
38
  include Cowtech::Extensions::Boolean
37
39
  end
38
40
  end
39
41
 
40
42
  if what.include?("string") then
41
- String.class_eval do
43
+ ::String.class_eval do
42
44
  include Cowtech::Extensions::String
43
45
  end
44
46
  end
45
47
 
46
48
  if what.include?("string") then
47
- Hash.class_eval do
49
+ ::Hash.class_eval do
48
50
  include Cowtech::Extensions::Hash
49
51
  end
50
52
  end
51
53
 
52
- if what.include?("pathname") then
53
- Pathname.class_eval do
54
- include Cowtech::Extensions::Pathname
55
- end
56
- end
57
-
58
54
  if what.include?("datetime") then
59
- Time.class_eval do
55
+ ::Time.class_eval do
60
56
  include Cowtech::Extensions::DateTime
61
57
  end
62
58
 
63
- Date.class_eval do
59
+ ::Date.class_eval do
64
60
  include Cowtech::Extensions::DateTime
65
61
  end
66
62
 
67
- DateTime.class_eval do
63
+ ::DateTime.class_eval do
68
64
  include Cowtech::Extensions::DateTime
69
65
  end
70
66
  end
71
67
 
72
68
  if what.include?("math") then
73
- Math.class_eval do
69
+ ::Math.class_eval do
74
70
  include Cowtech::Extensions::Math
75
71
  end
76
72
  end
77
73
 
74
+ if defined?(Pathname) && what.include?("pathname") then
75
+ ::Pathname.class_eval do
76
+ include Cowtech::Extensions::Pathname
77
+ end
78
+ end
79
+
78
80
  if defined?(ActiveRecord) && what.include?("active_record") then
79
- ActiveRecord::Base.class_eval do
81
+ ::ActiveRecord::Base.class_eval do
80
82
  include Cowtech::Extensions::AR
81
83
  end
82
84
  end
@@ -107,7 +107,8 @@ module Cowtech
107
107
  value = iter[1][i]
108
108
  dict[key] = value
109
109
  }
110
-
110
+
111
+ p dict
111
112
  unlocal.gsub!(/(#{dict.keys.join("|")})/i) { |s| dict[$1] }
112
113
  end
113
114
 
@@ -12,7 +12,7 @@ module Cowtech
12
12
  MAJOR = 1
13
13
  MINOR = 0
14
14
  PATCH = 0
15
- BUILD = 1
15
+ BUILD = 2
16
16
 
17
17
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cowtech-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.1
4
+ version: 1.0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-29 00:00:00.000000000Z
12
+ date: 2011-07-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jeweler
16
- requirement: &70349102390500 !ruby/object:Gem::Requirement
16
+ requirement: &70122090557560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70349102390500
24
+ version_requirements: *70122090557560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: actionpack
27
- requirement: &70349102389420 !ruby/object:Gem::Requirement
27
+ requirement: &70122090556780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70349102389420
35
+ version_requirements: *70122090556780
36
36
  description: Several Ruby object enhancements.
37
37
  email: shogun_panda@me.com
38
38
  executables: []