origen_testers 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea6d6cc546296af3cf008bf7af0e363de4ed58f7
|
4
|
+
data.tar.gz: 220cccb5392fb3641e5fce8b7e8295f14f3e7d4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93d488afb2bb0249e65781610e9a688b1ab44b302b35d912a5e89bd059399861231dbadbe3e0343217d45647d88891204e8f848b345b65db6b1343853872af6c
|
7
|
+
data.tar.gz: 1a78d52b6971173b14e94141b04c77f5594583fd2f635b5eba122987df137e0dec7f66d26bf16a02d5a59a6ead199cd584d6faee1df183ec9201da5cb59f7ca1
|
data/config/version.rb
CHANGED
@@ -29,12 +29,14 @@ module OrigenTesters
|
|
29
29
|
# Add any methods
|
30
30
|
if options[:methods][:methods]
|
31
31
|
methods = options[:methods][:methods]
|
32
|
-
@finalize = methods
|
32
|
+
@finalize = methods[:finalize]
|
33
33
|
methods.each do |method_name, function|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
unless method_name == :finalize
|
35
|
+
var_name = "@#{method_name}".gsub(/=|\?/, '_')
|
36
|
+
instance_variable_set(var_name, function)
|
37
|
+
define_singleton_method method_name do |*args|
|
38
|
+
instance_variable_get(var_name).call(self, *args)
|
39
|
+
end
|
38
40
|
end
|
39
41
|
end
|
40
42
|
end
|
@@ -51,6 +53,7 @@ module OrigenTesters
|
|
51
53
|
aliases << clean_attr.underscore if clean_attr.underscore != clean_attr
|
52
54
|
aliases.each do |alias_|
|
53
55
|
define_singleton_method("#{alias_}=") do |v|
|
56
|
+
v = v.to_s if v.is_a?(Symbol)
|
54
57
|
if allowed
|
55
58
|
unless allowed.include?(v)
|
56
59
|
fail "Cannot set #{alias_} to #{v}, valid values are: #{allowed.join(', ')}"
|