verdict 0.6.1 → 0.6.2

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: 356516f6235001dd2fc1a672c5bea9b2856802e6
4
- data.tar.gz: 40cf250f753ab3170bad68cee489982da0a7fd21
3
+ metadata.gz: f6e3a5adb9d317029cb0c348fcb7de3471316099
4
+ data.tar.gz: ee50b133ff7141f843de8ba3b70d9b38527006eb
5
5
  SHA512:
6
- metadata.gz: a632a3917034b8a3fe867d87a2390f1e5f7ecfce649eb7540eef20b7764b4dc66c164c3584a8e9c80cc33110c05ed5749306be3d0f02b0769508c5b69ea280d1
7
- data.tar.gz: 0dc32bcd5ade0ab74a400421e287668f07fd60112b6c331cb84a39acfb92968d231acc92cf78dae4a408cf034313054f41553e5d5394c99eeafb0d2a4c7e6f1b
6
+ metadata.gz: 241c7e151115f077964d1b7638e49d96f6256ddf9bf99acea509edbb22e506f3a6fe5d5f2b8a48e612082e384c86c2eedeb94e070f922e12d7559053cfd019f2
7
+ data.tar.gz: 86df227e5dd91d322e8a6a7ecb36c8e94b8e13b71b6b033956360b7c8e71253a0f88c48264bab7fc76308f287b1928a4773a32009d21e14348db5df08c9d1bde
@@ -1,3 +1,8 @@
1
+ ## v0.6.2
2
+
3
+ * Implement Verdict.clear_repository_cache, which fixes autoloading issues with Rails.
4
+ * Integrated Verdict.clear_repository_cache with our Railtie.
5
+
1
6
  ## v0.6.1
2
7
 
3
8
  * Make Verdict Railtie `.freeze` the eager_load_paths it changes as Rails itself does.
@@ -11,16 +11,17 @@ module Verdict
11
11
  end
12
12
 
13
13
  def repository
14
- if @repository.nil?
15
- @repository = {}
16
- discovery
17
- end
18
-
14
+ discovery if @repository.nil?
19
15
  @repository
20
16
  end
21
17
 
22
18
  def discovery
23
- Dir[File.join(Verdict.directory, '**', '*.rb')].each { |f| require f } if @directory
19
+ @repository = {}
20
+ Dir[File.join(Verdict.directory, '**', '*.rb')].each { |f| load f } if @directory
21
+ end
22
+
23
+ def clear_repository_cache
24
+ @repository = nil
24
25
  end
25
26
 
26
27
  class Error < StandardError; end
@@ -8,6 +8,11 @@ class Verdict::Railtie < Rails::Railtie
8
8
  app.config.eager_load_paths.freeze
9
9
  end
10
10
 
11
+ config.to_prepare do
12
+ # Clear Verdict's cache in order to avoid "A copy of ... has been removed from the module tree but is still active!"
13
+ Verdict.clear_repository_cache
14
+ end
15
+
11
16
  rake_tasks do
12
17
  load File.expand_path("./tasks.rake", File.dirname(__FILE__))
13
18
  end
@@ -1,3 +1,3 @@
1
1
  module Verdict
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
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.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-28 00:00:00.000000000 Z
11
+ date: 2017-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest