itrigga-core_ext 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.3.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{itrigga-core_ext}
8
- s.version = "0.2.2"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Al Davidson", "Anson Kelly"]
12
- s.date = %q{2011-10-07}
12
+ s.date = %q{2011-11-17}
13
13
  s.description = %q{Adds methods for
14
14
  Hash:
15
15
  - symbolize_keys
@@ -37,6 +37,7 @@ Gem::Specification.new do |s|
37
37
  "lib/itrigga/core_ext/array.rb",
38
38
  "lib/itrigga/core_ext/hash.rb",
39
39
  "lib/itrigga/core_ext/nil.rb",
40
+ "lib/itrigga/core_ext/object.rb",
40
41
  "lib/itrigga/core_ext/string.rb",
41
42
  "pkg/core_ext-0.1.0.gem",
42
43
  "pkg/itrigga-core_ext-0.1.0.gem",
@@ -0,0 +1,8 @@
1
+ class Object
2
+
3
+ # just cause its so damm handy
4
+ def to_a
5
+ self.respond_to?(:to_ary) ? self.to_ary : [self]
6
+ end
7
+
8
+ end
@@ -8,6 +8,13 @@ class String
8
8
  !!(self =~ /^[-+]?[0-9]([0-9]*)?$/)
9
9
  end
10
10
 
11
+ #
12
+ # Removes starting, trailing whitespace and double spaces
13
+ #
14
+ def trim
15
+ self.gsub(/^(.*[^\s])\s+$/, '\1').gsub(/^\s*(.*)$/, '\1')
16
+ end
17
+
11
18
  def to_utf16le
12
19
  Iconv.conv('utf-16le', 'UTF-8', self)
13
20
  end
metadata CHANGED
@@ -5,9 +5,10 @@ version: !ruby/object:Gem::Version
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 2
10
- version: 0.2.2
8
+ - 3
9
+ - 0
10
+ segments_generated: true
11
+ version: 0.3.0
11
12
  platform: ruby
12
13
  authors:
13
14
  - Al Davidson
@@ -16,7 +17,7 @@ autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
19
 
19
- date: 2011-10-07 00:00:00 +01:00
20
+ date: 2011-11-17 00:00:00 +00:00
20
21
  default_executable:
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
@@ -32,6 +33,7 @@ dependencies:
32
33
  - 1
33
34
  - 3
34
35
  - 0
36
+ segments_generated: true
35
37
  version: 1.3.0
36
38
  requirement: *id001
37
39
  type: :development
@@ -48,6 +50,7 @@ dependencies:
48
50
  - 1
49
51
  - 3
50
52
  - 2
53
+ segments_generated: true
51
54
  version: 1.3.2
52
55
  requirement: *id002
53
56
  type: :development
@@ -64,6 +67,7 @@ dependencies:
64
67
  - 1
65
68
  - 0
66
69
  - 0
70
+ segments_generated: true
67
71
  version: 1.0.0
68
72
  requirement: *id003
69
73
  type: :development
@@ -80,6 +84,7 @@ dependencies:
80
84
  - 1
81
85
  - 6
82
86
  - 4
87
+ segments_generated: true
83
88
  version: 1.6.4
84
89
  requirement: *id004
85
90
  type: :development
@@ -94,6 +99,7 @@ dependencies:
94
99
  hash: 3
95
100
  segments:
96
101
  - 0
102
+ segments_generated: true
97
103
  version: "0"
98
104
  requirement: *id005
99
105
  type: :development
@@ -110,6 +116,7 @@ dependencies:
110
116
  - 1
111
117
  - 5
112
118
  - 4
119
+ segments_generated: true
113
120
  version: 1.5.4
114
121
  requirement: *id006
115
122
  type: :development
@@ -134,6 +141,7 @@ files:
134
141
  - lib/itrigga/core_ext/array.rb
135
142
  - lib/itrigga/core_ext/hash.rb
136
143
  - lib/itrigga/core_ext/nil.rb
144
+ - lib/itrigga/core_ext/object.rb
137
145
  - lib/itrigga/core_ext/string.rb
138
146
  - pkg/core_ext-0.1.0.gem
139
147
  - pkg/itrigga-core_ext-0.1.0.gem
@@ -160,6 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
168
  hash: 3
161
169
  segments:
162
170
  - 0
171
+ segments_generated: true
163
172
  version: "0"
164
173
  required_rubygems_version: !ruby/object:Gem::Requirement
165
174
  none: false
@@ -169,6 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
178
  hash: 3
170
179
  segments:
171
180
  - 0
181
+ segments_generated: true
172
182
  version: "0"
173
183
  requirements: []
174
184