verdict 0.10.0 → 0.11.0

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
  SHA256:
3
- metadata.gz: 23482b6ebd56ecd7bdb03d318c4a507e8d9ca6b3a70ace6c63a52349855f1666
4
- data.tar.gz: fe4b75a65e3daca4c40cfead80d1c9ff266e40faa4af99b912c8f5116b7f5cae
3
+ metadata.gz: 8e98209c988365064ac1570a47b2dc5c0b0663f673ec62cb8d2640bdf38c9f3d
4
+ data.tar.gz: 1111714a3fbfffc8ee878c49db5dbaacc5e0c8d6c53f8425dfe69cfdcde96e38
5
5
  SHA512:
6
- metadata.gz: a403a445b44731fccaddb181fcda9acbd2b138adad07fadde5d8c3b0f97fd97c02a3873256672b1dc2d6756b7471b6575345b9e525efee27c8c25c7d89d3bf3c
7
- data.tar.gz: 3d52f3c2517c91a132c327ba57a695f008f611b82ff17d6bee86cd23628102c4b6d9f70ad62768929eb986d46ce566c215c6f676e4c0883029c24d422ad32c7d
6
+ metadata.gz: 71b77a462635384229bcce809954d15fac8e75fe3d307172eb1f31a5950e92e36f0a51c686c0cdb22d89fafcb0c5d6e10ba9a51b708580ac28e7ab480698fde7
7
+ data.tar.gz: 48b4b96643a1235479061ceec0954700a7997105f37b03b51833dff7becd5f6db11582f177df81fcc79c56ed5a6b9b2ecd038a33c2e2233f74f69185cbe49a7a
@@ -1,3 +1,7 @@
1
+ ## v0.11.0
2
+
3
+ * Automatic eager loading when inside a Rails app.
4
+
1
5
  ## v0.10.0
2
6
 
3
7
  * Add `Experiment#cleanup` to remove stored redis hashes.
@@ -15,6 +15,10 @@ module Verdict
15
15
  @repository
16
16
  end
17
17
 
18
+ def eager_load!
19
+ discovery
20
+ end
21
+
18
22
  def discovery
19
23
  @repository = {}
20
24
  Dir[File.join(Verdict.directory, '**', '*.rb')].each { |f| load f } if @directory
@@ -1,5 +1,7 @@
1
1
  class Verdict::Railtie < Rails::Railtie
2
2
  initializer "experiments.configure_rails_initialization" do |app|
3
+ app.config.eager_load_namespaces << Verdict
4
+
3
5
  Verdict.default_logger = Rails.logger
4
6
 
5
7
  Verdict.directory ||= Rails.root.join('app', 'experiments')
@@ -1,3 +1,3 @@
1
1
  module Verdict
2
- VERSION = "0.10.0"
2
+ VERSION = "0.11.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verdict
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-22 00:00:00.000000000 Z
11
+ date: 2019-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest