decorators 1.0.5 → 2.0.0

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: 265d704ccd8a15c29c70aaf5e19fe61b56a30eb4
4
- data.tar.gz: ce71931babf9cc7a656f87f21f2876d1c41a6afc
3
+ metadata.gz: fe7e9dc3732fcbd67705e03a592889bc4bf2b741
4
+ data.tar.gz: e06202364b70bac2d506d2a86c87e5a4e0c2193c
5
5
  SHA512:
6
- metadata.gz: 4fc36298b2d6bf24170bf881a75613b6724be54297fa428ab0993930f5d6c16dab41371e758d4191661f5af8d85dede284b137af8d878c286858824f546ae64e
7
- data.tar.gz: 5976f624f6dff498d4ac42b5f8d1eb879c9c7cf871b180bb82cde6fc51724ecf79385fa657563f2db44982d2e72a9a1cd809add5e317aea86e65105f1652ebff
6
+ metadata.gz: 4c1593e5294e9cd8ef70474e33579631fe6b029de8daebc8de9398efe47d335c24101e9fc08d1c0ee1531829cce094664719bb7021de1c8ef2d62ce960b4e4ed
7
+ data.tar.gz: 0f43415c404eb40b7b8e2995ed2a5007a1c7bd7e7b6ce1dc5a5eccaea1d7dea28b98accc7b993ed31836766c347649ca39a7b036d6c4621190b08058d6ccc3e2
@@ -1,5 +1,6 @@
1
1
  module Decorators
2
2
  require 'decorators/paths'
3
+ require 'decorators/railtie'
3
4
 
4
5
  class << self
5
6
  def load!(cache_classes)
@@ -41,5 +42,3 @@ module Decorators
41
42
  end
42
43
 
43
44
  end
44
-
45
- require 'decorators/railtie'
@@ -3,12 +3,15 @@ require 'rails'
3
3
  module Decorators
4
4
  class Railtie < Rails::Railtie
5
5
 
6
- load_decorators = proc do
7
- Decorators.load! Rails.application.config.cache_classes
8
- end
6
+ config.before_initialize do |app|
7
+ loader = proc { Decorators.load!(app.config.cache_classes) }
9
8
 
10
- config.to_prepare &load_decorators
11
- config.after_initialize &load_decorators
9
+ if app.config.eager_load
10
+ app.config.after_initialize(&loader)
11
+ else
12
+ app.config.to_prepare(&loader)
13
+ end
14
+ end
12
15
 
13
16
  end
14
17
  end
data/readme.md CHANGED
@@ -26,7 +26,7 @@ The important parts are being inside a sub directory of `app/decorators` and hav
26
26
  In your Gemfile, add the gem:
27
27
 
28
28
  ```ruby
29
- gem 'decorators', '~> 1.0.5'
29
+ gem 'decorators', '~> 1.0.4'
30
30
  ```
31
31
 
32
32
  Now, run `bundle install` and the gem should install.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decorators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Arndt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-16 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.19
19
+ version: 4.0.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 5.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 3.0.19
29
+ version: 4.0.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 5.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rspec
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -69,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
75
  version: '0'
70
76
  requirements: []
71
77
  rubyforge_project:
72
- rubygems_version: 2.4.6
78
+ rubygems_version: 2.4.5
73
79
  signing_key:
74
80
  specification_version: 4
75
81
  summary: Rails decorators plugin.