origen_testers 0.8.0 → 0.8.1
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5388980bf86c1fd3a55da48e41bbb11675a335a4
|
4
|
+
data.tar.gz: b50038d56b9f7cc8a5a19d54ddadd3598a18142b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b954a23fad17dbdc68f09cf884db156edc9e570a86ae64585f24f1af976f3279b1396bcf85c4acae39f79be35890d5479c1cb76b8cb971d0ff6e3677febcd2b
|
7
|
+
data.tar.gz: 88a977ee75b4f1eb9abf28b4a431d570ed2beae8beaf176a5990cbe2be8c64bbb5e692519a7e7f6ce678a04e0ffdd593991a6d705c3a6dc897d30804d605d760
|
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(', ')}"
|