ruby-ext 0.2.2 → 0.2.3

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.
Files changed (101) hide show
  1. data/.git/COMMIT_EDITMSG +1 -1
  2. data/.git/index +0 -0
  3. data/.git/logs/HEAD +3 -0
  4. data/.git/logs/refs/heads/master +3 -0
  5. data/.git/logs/refs/remotes/origin/master +3 -0
  6. data/.git/objects/3a/5fe0dc6aaa6e41eb8dd865fa7d7100f4e68ced +0 -0
  7. data/.git/objects/49/3774d80093f4ec3c6c3bfad21e1c8c9eaf41ec +0 -0
  8. data/.git/objects/52/94913c6107b381d1378279e58551fa2be7cecb +0 -0
  9. data/.git/objects/57/ab6c10ddf4eff75d98b5770a2c2bf573b692cd +0 -0
  10. data/.git/objects/61/beeaa4bc6790a469babafbdc7395e9e19dcb5d +0 -0
  11. data/.git/objects/62/3a67b104c04e24316da21f3e229e1bc2ba9d31 +0 -0
  12. data/.git/objects/6d/1da4d8a2949a1a9714d5f9979c7ee9613d7cfd +0 -0
  13. data/.git/objects/7f/2c583d1fdcc5313140c57778be8b0d45824be9 +0 -0
  14. data/.git/objects/9f/e2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f +0 -0
  15. data/.git/objects/e1/3f643da891453763504616e4f5a8195b8ffdb9 +0 -0
  16. data/.git/objects/ee/69f9fad83c5b0668b62622037094e989d3c394 +0 -0
  17. data/.git/refs/heads/master +1 -1
  18. data/.git/refs/remotes/origin/master +1 -1
  19. data/Rakefile +2 -2
  20. data/lib/ruby_ext/should.rb +14 -0
  21. data/old/README +860 -0
  22. data/old/lib/RubyExt/ClassLoader.rb +142 -0
  23. data/old/lib/RubyExt/ExtraBlankSlate.rb +14 -0
  24. data/old/lib/RubyExt/ImportAll.rb +9 -0
  25. data/old/lib/RubyExt/Localization/Module.rb +12 -0
  26. data/old/lib/RubyExt/Localization/Object.rb +19 -0
  27. data/old/lib/RubyExt/Localization/require.rb +3 -0
  28. data/old/lib/RubyExt/Localization.rb +28 -0
  29. data/old/lib/RubyExt/Log.config.sample +57 -0
  30. data/old/lib/RubyExt/Log.rb +59 -0
  31. data/old/lib/RubyExt/Path.rb +91 -0
  32. data/old/lib/RubyExt/Resource/file_system_provider.rb +273 -0
  33. data/old/lib/RubyExt/StateMashine.rb +176 -0
  34. data/old/lib/RubyExt/array.rb +24 -0
  35. data/old/lib/RubyExt/class.rb +0 -0
  36. data/old/lib/RubyExt/debug.rb +71 -0
  37. data/old/lib/RubyExt/false_class.rb +5 -0
  38. data/old/lib/RubyExt/kernel.rb +3 -0
  39. data/old/lib/RubyExt/module.rb +26 -0
  40. data/old/lib/RubyExt/nil_class.rb +5 -0
  41. data/old/lib/RubyExt/observable.rb +25 -0
  42. data/old/lib/RubyExt/require.rb +1 -0
  43. data/old/lib/RubyExt/require_base.rb +1 -0
  44. data/old/lib/RubyExt/resource.rb +172 -0
  45. data/old/lib/RubyExt/true_class.rb +5 -0
  46. data/old/rakefile +52 -0
  47. data/old/require.rb +3 -0
  48. data/old/require_base.rb +3 -0
  49. data/old/spec/RubyExt/ForClassLoader/ClassA.rb +4 -0
  50. data/old/spec/RubyExt/ForClassLoader/LoadCount.rb +1 -0
  51. data/old/spec/RubyExt/ForClassLoader/ModuleA/ClassB.rb +3 -0
  52. data/old/spec/RubyExt/ForClassLoader/ModuleA/ClassInsideAnonymousClass.rb +3 -0
  53. data/old/spec/RubyExt/ForClassLoader/ModuleA/InfinityLoop.rb +3 -0
  54. data/old/spec/RubyExt/ForClassLoader/ModuleA/ModuleB/ClassC.rb +3 -0
  55. data/old/spec/RubyExt/ForClassLoader/ModuleA/SameName/SomeClass.rb +2 -0
  56. data/old/spec/RubyExt/ForClassLoader/ModuleA/SameName.rb +2 -0
  57. data/old/spec/RubyExt/ForClassLoader/Scope/ScopeA1.rb +3 -0
  58. data/old/spec/RubyExt/ForClassLoader/Scope/ScopeB1.rb +5 -0
  59. data/old/spec/RubyExt/ForKernel/Raise2.rb +5 -0
  60. data/old/spec/RubyExt/ForKernel/RaiseWithoutSelf.rb +9 -0
  61. data/old/spec/RubyExt/ForLocalization/NS/A.rb +3 -0
  62. data/old/spec/RubyExt/ForLocalization/NS/A.ru.localization.yaml +2 -0
  63. data/old/spec/RubyExt/ForLocalization/NS/B.rb +22 -0
  64. data/old/spec/RubyExt/ForLocalization/NS/B.ru.localization.yaml +3 -0
  65. data/old/spec/RubyExt/ForLocalization/NS.ru.localization.yaml +2 -0
  66. data/old/spec/RubyExt/ForModule/NS1/A.data +1 -0
  67. data/old/spec/RubyExt/ForModule/NS1/A.rb +1 -0
  68. data/old/spec/RubyExt/ForModule/NS1/A2.rb +1 -0
  69. data/old/spec/RubyExt/ForModule/NS1/B.rb +2 -0
  70. data/old/spec/RubyExt/ForModule/NS1/B2.rb +1 -0
  71. data/old/spec/RubyExt/ForModule/NS1.data +1 -0
  72. data/old/spec/RubyExt/ForModule/NS2/A.data +1 -0
  73. data/old/spec/RubyExt/ForModule/NS2/A.rb +3 -0
  74. data/old/spec/RubyExt/ForModule/NS2/B.rb +3 -0
  75. data/old/spec/RubyExt/ForModule/NS2/M.data +1 -0
  76. data/old/spec/RubyExt/ForModule/NS2/M.rb +3 -0
  77. data/old/spec/RubyExt/ForResource/ChangedClass.rb +1 -0
  78. data/old/spec/RubyExt/ForResource/ChangedClass.res/Text.txt +0 -0
  79. data/old/spec/RubyExt/ForResource/ChangedClass.txt +0 -0
  80. data/old/spec/RubyExt/ForResource/ProviderChaining/ProviderABaseDir/ChainTest.rb +3 -0
  81. data/old/spec/RubyExt/ForResource/ProviderChaining/ProviderABaseDir/ChainTest.resource +1 -0
  82. data/old/spec/RubyExt/ForResource/ProviderChaining/ProviderABaseDir/ClassExistOnlyInProviderA.rb +3 -0
  83. data/old/spec/RubyExt/ForResource/ProviderChaining/ProviderBBaseDir/ChainTest.rb +3 -0
  84. data/old/spec/RubyExt/ForResource/ProviderChaining/ProviderBBaseDir/ChainTest.resource +1 -0
  85. data/old/spec/RubyExt/ForResource/ResourceExtension.rb +1 -0
  86. data/old/spec/RubyExt/ForResource/ResourceExtension.res/Data.yaml +2 -0
  87. data/old/spec/RubyExt/ForResource/ResourceTest/Test.rb +11 -0
  88. data/old/spec/RubyExt/ForResource/ResourceTest/Test.res/Data.txt +1 -0
  89. data/old/spec/RubyExt/ForResource/ResourceTest/Test.res/txt +1 -0
  90. data/old/spec/array_spec.rb +27 -0
  91. data/old/spec/class_loader_spec.rb +94 -0
  92. data/old/spec/import_all_spec.rb +21 -0
  93. data/old/spec/kernel_spec.rb +29 -0
  94. data/old/spec/localization_spec.rb +49 -0
  95. data/old/spec/module_spec.rb +14 -0
  96. data/old/spec/object_spec.rb +8 -0
  97. data/old/spec/observable_spec.rb +44 -0
  98. data/old/spec/path_spec.rb +169 -0
  99. data/old/spec/resource_spec.rb +136 -0
  100. data/old/spec/state_machine_spec.rb +201 -0
  101. metadata +93 -2
data/.git/COMMIT_EDITMSG CHANGED
@@ -1 +1 @@
1
- fix passenger issue
1
+ upd
data/.git/index CHANGED
Binary file
data/.git/logs/HEAD CHANGED
@@ -8,3 +8,6 @@ e9d385c1913656b7ce15a1ac1424361d2e065a6c 06864a068d188ab7ae17e39d58d6c25dc49a8ff
8
8
  006a9c4671a6d1386f7d7dc800525e98697625ee e903ba4c283cd16c7291500d4f80da24c8f5f4df Alex <alex@alex.local> 1260655428 +0300 commit: add facets & small fix
9
9
  e903ba4c283cd16c7291500d4f80da24c8f5f4df 97260e66124380267a414850b1d648da79324455 Alex <alex@alex.local> 1261874167 +0300 commit: small upd
10
10
  97260e66124380267a414850b1d648da79324455 f1eed82f16b829cf1f72f89142b089f43f99eda7 Alex <alex@alex.local> 1262042917 +0300 commit: fix passenger issue
11
+ f1eed82f16b829cf1f72f89142b089f43f99eda7 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f alex <alex@amac.local> 1264113431 +0300 commit: fix
12
+ 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f ee69f9fad83c5b0668b62622037094e989d3c394 alex <alex@amac.local> 1265027071 +0300 commit: upd
13
+ ee69f9fad83c5b0668b62622037094e989d3c394 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec alex <alex@amac.local> 1265027678 +0300 commit: upd
@@ -8,3 +8,6 @@ e9d385c1913656b7ce15a1ac1424361d2e065a6c 06864a068d188ab7ae17e39d58d6c25dc49a8ff
8
8
  006a9c4671a6d1386f7d7dc800525e98697625ee e903ba4c283cd16c7291500d4f80da24c8f5f4df Alex <alex@alex.local> 1260655428 +0300 commit: add facets & small fix
9
9
  e903ba4c283cd16c7291500d4f80da24c8f5f4df 97260e66124380267a414850b1d648da79324455 Alex <alex@alex.local> 1261874167 +0300 commit: small upd
10
10
  97260e66124380267a414850b1d648da79324455 f1eed82f16b829cf1f72f89142b089f43f99eda7 Alex <alex@alex.local> 1262042917 +0300 commit: fix passenger issue
11
+ f1eed82f16b829cf1f72f89142b089f43f99eda7 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f alex <alex@amac.local> 1264113431 +0300 commit: fix
12
+ 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f ee69f9fad83c5b0668b62622037094e989d3c394 alex <alex@amac.local> 1265027071 +0300 commit: upd
13
+ ee69f9fad83c5b0668b62622037094e989d3c394 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec alex <alex@amac.local> 1265027678 +0300 commit: upd
@@ -7,3 +7,6 @@ e9d385c1913656b7ce15a1ac1424361d2e065a6c 06864a068d188ab7ae17e39d58d6c25dc49a8ff
7
7
  006a9c4671a6d1386f7d7dc800525e98697625ee e903ba4c283cd16c7291500d4f80da24c8f5f4df Alex <alex@alex.local> 1260655434 +0300 update by push
8
8
  e903ba4c283cd16c7291500d4f80da24c8f5f4df 97260e66124380267a414850b1d648da79324455 Alex <alex@alex.local> 1261874172 +0300 update by push
9
9
  97260e66124380267a414850b1d648da79324455 f1eed82f16b829cf1f72f89142b089f43f99eda7 Alex <alex@alex.local> 1262042923 +0300 update by push
10
+ f1eed82f16b829cf1f72f89142b089f43f99eda7 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f alex <alex@amac.local> 1264113438 +0300 update by push
11
+ 9fe2acc9bded3dc0d29b1dfc7dc1b3bed5d72c8f ee69f9fad83c5b0668b62622037094e989d3c394 alex <alex@amac.local> 1265027644 +0300 update by push
12
+ ee69f9fad83c5b0668b62622037094e989d3c394 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec alex <alex@amac.local> 1265027703 +0300 update by push
@@ -1 +1 @@
1
- f1eed82f16b829cf1f72f89142b089f43f99eda7
1
+ 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec
@@ -1 +1 @@
1
- f1eed82f16b829cf1f72f89142b089f43f99eda7
1
+ 493774d80093f4ec3c6c3bfad21e1c8c9eaf41ec
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.2"
21
+ s.version = "0.2.3"
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"
@@ -30,7 +30,7 @@ spec = Gem::Specification.new do |s|
30
30
  s.has_rdoc = true
31
31
  s.extra_rdoc_files = ["README.rdoc"]
32
32
 
33
- s.files = (%w{Rakefile README.rdoc .gitignore} + Dir.glob("{lib,spec,.git}/**/*"))
33
+ s.files = (%w{Rakefile README.rdoc .gitignore} + Dir.glob("{lib,spec,old,.git}/**/*"))
34
34
  # s.executables = ['restclient']
35
35
  # s.add_dependency("BlueCloth", ">= 0.0.4")
36
36
  # s.add_dependency "facets"
@@ -38,6 +38,13 @@ class Object
38
38
  self.is_a? arg
39
39
  end
40
40
 
41
+ when :be_an
42
+ if arg.class == Array
43
+ arg.any?{|klass| self.is_a? klass}
44
+ else
45
+ self.is_a? arg
46
+ end
47
+
41
48
  when :be
42
49
  if arg.class == Array
43
50
  arg.any?{|klass| self.respond_to :is?, klass}
@@ -100,6 +107,13 @@ class Object
100
107
  else
101
108
  self.is_a? arg
102
109
  end
110
+
111
+ when :be_an
112
+ if arg.class == Array
113
+ arg.any?{|klass| self.is_a? klass}
114
+ else
115
+ self.is_a? arg
116
+ end
103
117
 
104
118
  when :be
105
119
  if arg.class == Array