delivery_boy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/delivery_boy/config.rb +8 -8
- data/lib/delivery_boy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a19c52f7ecd3f52631f6f8da1f0c8c7ac11bbfcc
|
4
|
+
data.tar.gz: fce6287fb747ab8ea364959e0ecd430f54871168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e1ac8f245940ae11f884edd46f480120542f9b4798f9771a59bd5e6e842a7cb2a024b9b69065f1adc24ccd5edb980b619fb3f38738749517fecd589f24ca71d
|
7
|
+
data.tar.gz: a73bb0d6df9e5bb5bef5fd638673fab04774861c1fcaaca61a3ad353384a26aa8c58c680669c6a3058a09042d9c2f6b596928b9b4bb8960c12460a0a839f94b3
|
data/lib/delivery_boy/config.rb
CHANGED
@@ -56,6 +56,14 @@ module DeliveryBoy
|
|
56
56
|
loader.load_file(path, environment)
|
57
57
|
end
|
58
58
|
|
59
|
+
def set(variable, value)
|
60
|
+
unless VARIABLES.include?(variable.to_s)
|
61
|
+
raise ConfigError, "unknown configuration variable #{variable}"
|
62
|
+
end
|
63
|
+
|
64
|
+
instance_variable_set("@#{variable}", value)
|
65
|
+
end
|
66
|
+
|
59
67
|
private
|
60
68
|
|
61
69
|
def load_config(config)
|
@@ -86,13 +94,5 @@ module DeliveryBoy
|
|
86
94
|
|
87
95
|
loader.validate!
|
88
96
|
end
|
89
|
-
|
90
|
-
def set(variable, value)
|
91
|
-
unless VARIABLES.include?(variable.to_s)
|
92
|
-
raise ConfigError, "unknown configuration variable #{variable}"
|
93
|
-
end
|
94
|
-
|
95
|
-
instance_variable_set("@#{variable}", value)
|
96
|
-
end
|
97
97
|
end
|
98
98
|
end
|
data/lib/delivery_boy/version.rb
CHANGED