bootscale 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5a4eed56375a193f8dde0b4aef4bdcb5ffac59e
4
- data.tar.gz: 0c9a6e16ba2aa2147d3474d7be9710d314a67c30
3
+ metadata.gz: 8a7aaf845e800f1f64c2c2ef8441ad54aff38c2c
4
+ data.tar.gz: 6b0a73fe2db054d04ba54d487182ce17f42709a1
5
5
  SHA512:
6
- metadata.gz: e863df1b2d2a400d29d770482f0b8f8a0e60e39ed4850bba500ed232eccacd2fdac3fb0de11fd28fd3be20a30d873904ece13584d0e0486ce0756204de27b16a
7
- data.tar.gz: 443d742eb6f825169dd0de640bd1fb094b9c6edbad3343ef430b68a563baecfda9f0af9cbf197c1d1df35c77ddcec88a778df209fcb19ef5c7f72996d58183cb
6
+ metadata.gz: fc644b8650d023e093830e9f3c940bf50a13cb1f5e8fe642bedade1e4dd28b1bb533dcd0f12368a9a1bf0bf5486ed2513e940fa0228701b9c9ef768b637dc845
7
+ data.tar.gz: 34aada56e016d3eee070415109268a1afac1a16ef00833c3df7f7d76d8c46db37be3f7dbf3a8ea8c5e2751e861faa85234acb217f86bb121a2e9547333f56404
data/README.md CHANGED
@@ -23,14 +23,14 @@ If your application is a Rails application, you will find this in `config/boot.r
23
23
 
24
24
  ### Important
25
25
 
26
- Cache should be updated everytime `$LOAD_PATH` is modified by calling `Bootscale.regenerate`.
26
+ For correctness cache should be updated everytime `$LOAD_PATH` is modified by calling `Bootscale.regenerate`.
27
27
 
28
- For Rails apps it means adding an initializer in `config/application.rb`:
28
+ For Rails apps it means adding an initializer in `config/application.rb`.
29
29
 
30
30
  ```ruby
31
31
  module MyApp
32
32
  class Application < Rails::Application
33
- initializer :regenerate_require_cache, after: :set_load_path do
33
+ initializer :regenerate_require_cache, before: :load_environment_config do
34
34
  Bootscale.regenerate
35
35
  end
36
36
  end
data/lib/bootscale.rb CHANGED
@@ -9,12 +9,11 @@ module Bootscale
9
9
  def [](path)
10
10
  path = path.to_s
11
11
  return if path.start_with?(LEADING_SLASH)
12
- result = if path.end_with?(DOT_RB, DOT_SO)
12
+ if path.end_with?(DOT_RB, DOT_SO)
13
13
  @cache[path]
14
14
  else
15
15
  @cache["#{path}#{DOT_RB}"] || @cache["#{path}#{DOT_SO}"]
16
16
  end
17
- result unless result == :relative
18
17
  end
19
18
 
20
19
  def setup(options = {})
@@ -27,7 +27,7 @@ module Bootscale
27
27
  relative_path.sub!(ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN, DOT_SO)
28
28
  end
29
29
 
30
- all << [relative_path, (@absolute ? absolute_path : :relative)]
30
+ all << [relative_path, @absolute && absolute_path]
31
31
  end
32
32
  end
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module Bootscale
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootscale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-27 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Inspired by Aaron Patterson's talk on the subject
14
14
  email: