ruby_ext 0.4.20 → 0.4.21
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.
data/lib/rspec_ext.rb
CHANGED
@@ -124,4 +124,19 @@ class String
|
|
124
124
|
File.expand_path(self + "/..")
|
125
125
|
end
|
126
126
|
end
|
127
|
+
end
|
128
|
+
|
129
|
+
class Rspec::FuzzyHash < Hash
|
130
|
+
def == o
|
131
|
+
return true if super
|
132
|
+
|
133
|
+
if o.respond_to? :each
|
134
|
+
o.each do |k, v|
|
135
|
+
return false if (self[k.to_sym] || self[k.to_s]) != v
|
136
|
+
end
|
137
|
+
return true
|
138
|
+
end
|
139
|
+
|
140
|
+
false
|
141
|
+
end
|
127
142
|
end
|
File without changes
|
data/lib/ruby_ext/core/module.rb
CHANGED
@@ -126,9 +126,9 @@ Module.class_eval do
|
|
126
126
|
m.to_sym
|
127
127
|
end
|
128
128
|
|
129
|
-
def
|
129
|
+
def attr_required *attrs
|
130
130
|
attrs.each do |attr|
|
131
|
-
define_method(attr){instance_variable_get(:"@#{attr}") || raise("
|
131
|
+
define_method(attr){instance_variable_get(:"@#{attr}") || raise("attribute :#{attr} not defined!")}
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
data/lib/ruby_ext/core.rb
CHANGED
File without changes
|
data/lib/ruby_ext/more.rb
CHANGED
data/readme.md
CHANGED
@@ -61,7 +61,7 @@ These are just a small part of all handy methods and extensions, for more detail
|
|
61
61
|
|
62
62
|
require 'ruby_ext'
|
63
63
|
|
64
|
-
Copyright (c) Alexey Petrushin
|
64
|
+
Copyright (c) Alexey Petrushin, http://petrush.in, released under the MIT license.
|
65
65
|
|
66
66
|
# TODO
|
67
67
|
|
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.4.
|
4
|
+
version: 0.4.21
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-29 00:00:00 +04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -37,7 +37,7 @@ files:
|
|
37
37
|
- lib/ruby_ext/core/file.rb
|
38
38
|
- lib/ruby_ext/core/hash.rb
|
39
39
|
- lib/ruby_ext/core/kernel.rb
|
40
|
-
- lib/ruby_ext/core/
|
40
|
+
- lib/ruby_ext/core/miscellaneous.rb
|
41
41
|
- lib/ruby_ext/core/module.rb
|
42
42
|
- lib/ruby_ext/core/multiple_inheritance.rb
|
43
43
|
- lib/ruby_ext/core/must.rb
|
@@ -52,7 +52,7 @@ files:
|
|
52
52
|
- lib/ruby_ext/fixes.rb
|
53
53
|
- lib/ruby_ext/gems.rb
|
54
54
|
- lib/ruby_ext/more/declarative_cache.rb
|
55
|
-
- lib/ruby_ext/more/
|
55
|
+
- lib/ruby_ext/more/miscellaneous.rb
|
56
56
|
- lib/ruby_ext/more/observable2.rb
|
57
57
|
- lib/ruby_ext/more/open_constructor.rb
|
58
58
|
- lib/ruby_ext/more/safe_hash.rb
|