take_care 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/take_care/reliable.rb +2 -2
- data/lib/take_care/version.rb +1 -1
- data/spec/take_care/reliable_spec.rb +5 -0
- metadata +2 -8
data/lib/take_care/reliable.rb
CHANGED
@@ -5,8 +5,8 @@ module TakeCare
|
|
5
5
|
end
|
6
6
|
alias_method :take_care_of, :take_care
|
7
7
|
|
8
|
-
def respond_to?(method_name)
|
9
|
-
return
|
8
|
+
def respond_to?(method_name, include_private = false)
|
9
|
+
return include_private if self.class.private_method_defined?(method_name)
|
10
10
|
/\Atake_care_(?:of_)?(.+)\Z/ =~ method_name && self.respond_to?($1) || super
|
11
11
|
end
|
12
12
|
|
data/lib/take_care/version.rb
CHANGED
@@ -51,6 +51,11 @@ describe TakeCare::Reliable do
|
|
51
51
|
Human.class_eval { private; def take_care_hard_work; end }
|
52
52
|
should_not be_respond_to :take_care_hard_work
|
53
53
|
end
|
54
|
+
|
55
|
+
it "is true if exists private method with such name and we are checking for private methods as well" do
|
56
|
+
Human.class_eval { private; def take_care_hard_work; end }
|
57
|
+
should be_respond_to :take_care_hard_work, true
|
58
|
+
end
|
54
59
|
end
|
55
60
|
end
|
56
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: take_care
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sidekiq
|
@@ -125,18 +125,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- - ! '>='
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
|
-
segments:
|
129
|
-
- 0
|
130
|
-
hash: 4157606556185016579
|
131
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
129
|
none: false
|
133
130
|
requirements:
|
134
131
|
- - ! '>='
|
135
132
|
- !ruby/object:Gem::Version
|
136
133
|
version: '0'
|
137
|
-
segments:
|
138
|
-
- 0
|
139
|
-
hash: 4157606556185016579
|
140
134
|
requirements: []
|
141
135
|
rubyforge_project:
|
142
136
|
rubygems_version: 1.8.23
|