sanford 0.18.0 → 0.18.1

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
- SHA512:
3
- data.tar.gz: b37cfd3f2c40682c86f0beb66377fa878e9e9afa7176607ef4c8d5ca342f6bbf5bc79be72e6f57a34d77730bead2c61af1c3cde5e336ede29fb1de4f3910528e
4
- metadata.gz: db614d3e51992924e70599df591799d0437fc39790fdf279bf5f896db4dfab2d4f7da2f205d9d9cd1128aa120f6f7f14eb827a9cd3888fe2e9223188f5ddc21c
5
2
  SHA1:
6
- data.tar.gz: 982aa3206746b65d6fd27d6c285df134f78a8e80
7
- metadata.gz: e351442a99e056e6b8779701e9357dcb306cf48a
3
+ metadata.gz: c5f1accf3673547ce360de7dc566185944279d95
4
+ data.tar.gz: 6d78cbc59f1a1adf3689d4f23bfc273e3f8ce30e
5
+ SHA512:
6
+ metadata.gz: 00d138998988e74f24bedbd9af813ce3d50fa7ef0ae290e7755c3c2b91030280134d1e486d3a14e8d904823998aea003b123f3b1bdeb7ab1b7f7f9b95f63a609
7
+ data.tar.gz: f318a74e317f3826c2c4315a476a486a1645b154a0388a40dbf75d5cead44a9ee62d1fa86dd79c25965d881e33941ad35d530828f2e551172da9df4b8c73d841
@@ -207,10 +207,18 @@ module Sanford
207
207
  self.config.init_procs << block
208
208
  end
209
209
 
210
+ def init_procs
211
+ self.config.init_procs
212
+ end
213
+
210
214
  def error(&block)
211
215
  self.config.error_procs << block
212
216
  end
213
217
 
218
+ def error_procs
219
+ self.config.error_procs
220
+ end
221
+
214
222
  def template_source(value = nil)
215
223
  self.config.template_source = value if !value.nil?
216
224
  self.config.template_source
@@ -1,3 +1,3 @@
1
1
  module Sanford
2
- VERSION = "0.18.0"
2
+ VERSION = "0.18.1"
3
3
  end
@@ -19,7 +19,8 @@ module Sanford::Server
19
19
  should have_imeths :config
20
20
  should have_imeths :name, :ip, :port, :pid_file, :shutdown_timeout
21
21
  should have_imeths :worker_class, :worker_params, :num_workers, :workers
22
- should have_imeths :init, :error, :template_source, :logger, :router
22
+ should have_imeths :init, :init_procs, :error, :error_procs
23
+ should have_imeths :template_source, :logger, :router
23
24
  should have_imeths :receives_keep_alive, :verbose_logging
24
25
 
25
26
  should "use much-plugin" do
@@ -91,6 +92,11 @@ module Sanford::Server
91
92
  assert_equal exp, config.verbose_logging
92
93
  end
93
94
 
95
+ should "demeter its config values that aren't directly set" do
96
+ assert_equal subject.config.init_procs, subject.init_procs
97
+ assert_equal subject.config.error_procs, subject.error_procs
98
+ end
99
+
94
100
  should "have a router by default and allow overriding it" do
95
101
  assert_kind_of Sanford::Router, subject.router
96
102
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sanford
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collin Redding