ruby-ext 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/.git/index CHANGED
Binary file
data/.git/logs/HEAD CHANGED
@@ -11,3 +11,4 @@ e903ba4c283cd16c7291500d4f80da24c8f5f4df 97260e66124380267a414850b1d648da7932445
11
11
  f1eed82f16b829cf1f72f89142b089f43f99eda7 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f alex <alex@amac.local> 1264113431 +0300 commit: fix
12
12
  9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f ee69f9fad83c5b0668b62622037094e989d3c394 alex <alex@amac.local> 1265027071 +0300 commit: upd
13
13
  ee69f9fad83c5b0668b62622037094e989d3c394 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec alex <alex@amac.local> 1265027678 +0300 commit: upd
14
+ 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec 09c02be5623fa00484aa07a311112b1e0828f7e9 alex <alex@amac.local> 1265749453 +0300 commit: upd
@@ -11,3 +11,4 @@ e903ba4c283cd16c7291500d4f80da24c8f5f4df 97260e66124380267a414850b1d648da7932445
11
11
  f1eed82f16b829cf1f72f89142b089f43f99eda7 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f alex <alex@amac.local> 1264113431 +0300 commit: fix
12
12
  9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f ee69f9fad83c5b0668b62622037094e989d3c394 alex <alex@amac.local> 1265027071 +0300 commit: upd
13
13
  ee69f9fad83c5b0668b62622037094e989d3c394 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec alex <alex@amac.local> 1265027678 +0300 commit: upd
14
+ 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec 09c02be5623fa00484aa07a311112b1e0828f7e9 alex <alex@amac.local> 1265749453 +0300 commit: upd
@@ -10,3 +10,4 @@ e903ba4c283cd16c7291500d4f80da24c8f5f4df 97260e66124380267a414850b1d648da7932445
10
10
  f1eed82f16b829cf1f72f89142b089f43f99eda7 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f alex <alex@amac.local> 1264113438 +0300 update by push
11
11
  9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f ee69f9fad83c5b0668b62622037094e989d3c394 alex <alex@amac.local> 1265027644 +0300 update by push
12
12
  ee69f9fad83c5b0668b62622037094e989d3c394 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec alex <alex@amac.local> 1265027703 +0300 update by push
13
+ 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec 09c02be5623fa00484aa07a311112b1e0828f7e9 alex <alex@amac.local> 1265749458 +0300 update by push
@@ -0,0 +1,3 @@
1
+ xm�A
2
+ 1 E]{��^
3
+ �N��Jj3Z�-���9�iDž��$� ?H �nv��������E�X�@���Ii�8 '1������(q�}��5�����W�T�yB���_U�b�����(�Ѧ �2�&�^�vٶ��lC�
@@ -0,0 +1 @@
1
+ x}��N1 D�f�b(RiQťT*U��GD�ƻD�N�+��$a .����s��߽S��3;UK�c���$�kos�~]vxri�ΘD��a�ļ O-���_�r�LgLu�X��7�%��8�?T3�)N���_�&L��џ�=�pv�^dd�Ql�a��ٶd(�Zo�0���˦!8����\��v� �J�ҿ����Zq�� ��q(�kSw8�����z�
@@ -1 +1 @@
1
- 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec
1
+ 09c02be5623fa00484aa07a311112b1e0828f7e9
@@ -1 +1 @@
1
- 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec
1
+ 09c02be5623fa00484aa07a311112b1e0828f7e9
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ require 'fileutils'
18
18
 
19
19
  spec = Gem::Specification.new do |s|
20
20
  s.name = "ruby-ext"
21
- s.version = "0.2.3"
21
+ s.version = "0.2.4"
22
22
  s.summary = "Set of common Ruby language extensions"
23
23
  s.description = "Set of common Ruby language extensions"
24
24
  s.author = "Alexey Petrushin"
@@ -0,0 +1,11 @@
1
+ Class.class_eval do
2
+ def name_alias name = nil
3
+ if name
4
+ name.should! :be_a, String
5
+ name.should_not_be! :blank
6
+ @name_alias = name.to_s
7
+ else
8
+ @name_alias || self.name
9
+ end
10
+ end
11
+ end
data/lib/ruby_ext/file.rb CHANGED
@@ -1,4 +1,4 @@
1
- class File
1
+ File.class_eval do
2
2
  class << self
3
3
 
4
4
  # There is similar methods in ActiveSupport, that takes also second paramether buffer
@@ -1,4 +1,4 @@
1
- module Kernel
1
+ Kernel.class_eval do
2
2
  def respond_to sym, *args
3
3
  return nil if not respond_to? sym
4
4
  send sym, *args
@@ -1,6 +1,6 @@
1
1
  require 'set'
2
2
 
3
- class Module
3
+ Module.class_eval do
4
4
  def is?(base)
5
5
  ancestors.include?(base)
6
6
  end
@@ -1,4 +1,4 @@
1
- class Object
1
+ Object.class_eval do
2
2
  def self; self end
3
3
 
4
4
  # def copy
@@ -1,4 +1,4 @@
1
- class Object
1
+ Object.class_eval do
2
2
  def should_be! method
3
3
  unless self.send("#{method}?") == true
4
4
  raise RuntimeError, "
@@ -1,4 +1,4 @@
1
- class String
1
+ String.class_eval do
2
2
  def to_reader
3
3
  self.to_sym
4
4
  end
@@ -1,4 +1,4 @@
1
- class Symbol
1
+ Symbol.class_eval do
2
2
  def <=> other
3
3
  self.to_s <=> other.to_s
4
4
  end
data/lib/ruby_ext.rb CHANGED
@@ -24,6 +24,7 @@ more = [
24
24
  module
25
25
  not_defined
26
26
  object
27
+ class
27
28
  string
28
29
  symbol
29
30
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Petrushin
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-01 00:00:00 +03:00
12
+ date: 2010-02-10 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -25,6 +25,7 @@ files:
25
25
  - Rakefile
26
26
  - README.rdoc
27
27
  - .gitignore
28
+ - lib/ruby_ext/class.rb
28
29
  - lib/ruby_ext/declarative_cache.rb
29
30
  - lib/ruby_ext/file.rb
30
31
  - lib/ruby_ext/kernel.rb
@@ -151,11 +152,14 @@ files:
151
152
  - .git/objects/05/18bc8be5c58a5bd9d7fc82c75c87478aa361e9
152
153
  - .git/objects/05/b76a8d022e0e0fbca5b69b9f7b4d2a132fcc89
153
154
  - .git/objects/06/864a068d188ab7ae17e39d58d6c25dc49a8ff3
155
+ - .git/objects/09/c02be5623fa00484aa07a311112b1e0828f7e9
154
156
  - .git/objects/0a/c8dd6e52864a0384859a517d546546d61e3c0c
155
157
  - .git/objects/0e/13cf36bc744c90f576c0a31c3f76dcf1fd2485
156
158
  - .git/objects/0f/add343d54917efbd138ee2d7c092a52b12ebd5
157
159
  - .git/objects/10/53306d48d434b477991f5fb64a6d8d3aca84a0
160
+ - .git/objects/15/1b50a37eb87750d0b6213da8a21df141e94f62
158
161
  - .git/objects/17/70296a7ba0a9aaadd3e857ae34d92d2e13e935
162
+ - .git/objects/18/4a49936babbbd306a9d34846959d4a901d0014
159
163
  - .git/objects/18/fa4a1fd6a6e5293c34c6eebefaff644c553a97
160
164
  - .git/objects/19/342d43c2e91b7bca75f329bf758d69818c827e
161
165
  - .git/objects/20/c2ee1bb9f6749181e464a4ce444092fc1a1ecb
@@ -171,6 +175,7 @@ files:
171
175
  - .git/objects/38/91f271b22f2a1caee6910a34139076e27ade00
172
176
  - .git/objects/38/bf6dbb2520b448e08ac9cb353523bbc72118db
173
177
  - .git/objects/3a/5fe0dc6aaa6e41eb8dd865fa7d7100f4e68ced
178
+ - .git/objects/3b/203741a23f9eb3df39a0444c4c5a4469a89c51
174
179
  - .git/objects/44/73d59f32a2806eca098ba6bf10cdc2e6453542
175
180
  - .git/objects/44/e92f51b4c9a44497c7f170598fae64564052eb
176
181
  - .git/objects/49/3774d80093f4ec3c6c3bfad21e1c8c9eaf41ec
@@ -192,12 +197,15 @@ files:
192
197
  - .git/objects/61/beeaa4bc6790a469babafbdc7395e9e19dcb5d
193
198
  - .git/objects/61/d4509b8fc63e53b8e5d417ace33919e8a7a8f2
194
199
  - .git/objects/62/3a67b104c04e24316da21f3e229e1bc2ba9d31
200
+ - .git/objects/65/b47f9e813e8daeca4c2acc9f704096103d6ab6
195
201
  - .git/objects/6a/0946485381787f48e60893549eac156d1f057c
202
+ - .git/objects/6a/95257f41d66e2451c5a59759981640a9b0861c
196
203
  - .git/objects/6b/dcac704e4f8abe1928e8f3f5d9b7e17e4992de
197
204
  - .git/objects/6b/e43d64c6aeffd7ac08701e1ee93865248683cf
198
205
  - .git/objects/6c/18afba63861887fb7ac53fee1b24c181b2a8e4
199
206
  - .git/objects/6d/1da4d8a2949a1a9714d5f9979c7ee9613d7cfd
200
207
  - .git/objects/70/222d828221b1884b6b8ce124b7f22eea5d420d
208
+ - .git/objects/70/24a34893a27973147a32aa305ed958181bf821
201
209
  - .git/objects/74/bf8f37d70d9818474e1fb5081f04c496741a28
202
210
  - .git/objects/77/141a7a91a61baff283e5f16e55a720d0bc65e0
203
211
  - .git/objects/7f/2c583d1fdcc5313140c57778be8b0d45824be9
@@ -208,23 +216,28 @@ files:
208
216
  - .git/objects/90/eea923ef08bb39013e7cd5be777b7539733638
209
217
  - .git/objects/93/276f74ef0e157c5f81eeec7844f30d4eceda7a
210
218
  - .git/objects/97/260e66124380267a414850b1d648da79324455
219
+ - .git/objects/98/359366defef2b74ad1f641f1f237f284d663e2
211
220
  - .git/objects/9c/d9497bad03afd65531dda2695719b3593e02b6
212
221
  - .git/objects/9e/a37d9fc7e1ad1504b50da2a1ec639c523fb8b7
213
222
  - .git/objects/9f/9a4ebb6d3b4f75ebebc57119b2cf61606d4685
214
223
  - .git/objects/9f/e2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f
215
224
  - .git/objects/a4/ab487fcb12cfb831b09c525544f52d60a98598
216
225
  - .git/objects/a4/d0f078375c5b39cee3083ad428912698777c7b
226
+ - .git/objects/a7/eab1d126c7e7e7d24c3a4159abe4e15a5c02fe
217
227
  - .git/objects/a9/2112f979b22837fa6d3d39829eff7c3fd34947
218
228
  - .git/objects/ab/daaab37771475482389bdfcb2021b1651ba399
219
229
  - .git/objects/ad/09237b6008fc0ebfb9b8c920490dda8503bfd1
220
230
  - .git/objects/ad/7462077a480cb995d1ad397c3c737644e59887
221
231
  - .git/objects/ad/e1a70e7cf984a2f518d19ef625362d78a5fbd0
232
+ - .git/objects/b2/07485e0a3aabbdae649837d2a50b95194a33fa
222
233
  - .git/objects/b4/cbb05893636d6b7314fbc4df7e3a8dcaeb0de1
223
234
  - .git/objects/b6/17a8cc2ae7f6ea496051db493aa56edc178073
224
235
  - .git/objects/b6/863b5d4c0a4d87b81a9bbc29e786fcf7ef0df2
225
236
  - .git/objects/b8/c374e1a9042d9c4a478bee2c2b5b469aba55d6
226
237
  - .git/objects/bc/ee5c51061bdb9ab5a5aea4f00245a8ab3689b2
238
+ - .git/objects/bd/0327e9af9fce9cb9ff1a16b0d51df043c5f8cb
227
239
  - .git/objects/be/a9ade8ddb19a7ff5b18bc77fac5cb27d6cf284
240
+ - .git/objects/c2/063002322bb3367c490c5a3b8ecb6c50951dc0
228
241
  - .git/objects/c3/faad9ba42388a50a57acf9df88f6d2a64a4122
229
242
  - .git/objects/ca/9716fd518aac44d4acaa94a86838cde6030f6a
230
243
  - .git/objects/d0/b6eae8243889753a5a3e9a801b4dd5bcd09d91
@@ -239,12 +252,14 @@ files:
239
252
  - .git/objects/ee/69f9fad83c5b0668b62622037094e989d3c394
240
253
  - .git/objects/f0/c37cf78e53e6f859111f35d9dbf52cbfbc633d
241
254
  - .git/objects/f0/f0c35fd385e1ac016e6d3f7d72ea188c578b77
255
+ - .git/objects/f1/03c61b701ab4d981c4d16888c11bee87d65a0d
242
256
  - .git/objects/f1/2346269ed5287267f0271f57546291c013b318
243
257
  - .git/objects/f1/bf0dc44ec7b29845cdecd0b295aa8075a84940
244
258
  - .git/objects/f1/eed82f16b829cf1f72f89142b089f43f99eda7
245
259
  - .git/objects/f3/655e33b96e5b8b25990a2ae88fcdfed415074b
246
260
  - .git/objects/f7/c0fa5621b81aca548c738c08907055696e1956
247
261
  - .git/objects/f8/c960b12cbddb90f18123673e6778efdc822058
262
+ - .git/objects/fa/8df3e916f0af98b6439ebdd73253f97cd2c172
248
263
  - .git/objects/fb/85b5793dcebae826b04cd8c37406504540d8a4
249
264
  - .git/objects/fd/305b4d657d487e6f5f69c760b8d433d16f6a47
250
265
  - .git/objects/fd/d3ef7ec06e804f3688491e21caaa4d89796b16