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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/verdict.rb +7 -6
- data/lib/verdict/railtie.rb +5 -0
- data/lib/verdict/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6e3a5adb9d317029cb0c348fcb7de3471316099
|
4
|
+
data.tar.gz: ee50b133ff7141f843de8ba3b70d9b38527006eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 241c7e151115f077964d1b7638e49d96f6256ddf9bf99acea509edbb22e506f3a6fe5d5f2b8a48e612082e384c86c2eedeb94e070f922e12d7559053cfd019f2
|
7
|
+
data.tar.gz: 86df227e5dd91d322e8a6a7ecb36c8e94b8e13b71b6b033956360b7c8e71253a0f88c48264bab7fc76308f287b1928a4773a32009d21e14348db5df08c9d1bde
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
data/lib/verdict.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/verdict/railtie.rb
CHANGED
@@ -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
|
data/lib/verdict/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|