eager_decorator 0.0.2 → 0.0.3
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 +4 -4
- data/README.md +1 -5
- data/lib/eager_decorator.rb +7 -11
- data/lib/eager_decorator/railtie.rb +3 -1
- data/lib/eager_decorator/version.rb +1 -1
- metadata +2 -3
- data/lib/eager_decorator/hooks.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4543dd7b9fc0611051def1381595ea0198d5351f
|
4
|
+
data.tar.gz: 4a873f64ed6872f2a7bd2b873be0d8e39827181f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d0e2c8ede2ac71463cd4e0018c4f9c5a2923eb5958d5635f97f614cdb0273f2f7bad4ce4f52bac20735bf31d79a7de0666160ffbfc64d909ea81d922b5c2265
|
7
|
+
data.tar.gz: 572cb3a21c761a040d816bdbf83c17f09bf8e082ed78c808b325679419715f26cb98a691d9da356b3dd3e561bece60fc15bb4568db5602b7749455855292bbb1
|
data/README.md
CHANGED
data/lib/eager_decorator.rb
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
require "rails"
|
2
2
|
require "eager_decorator/version"
|
3
|
-
require "eager_decorator/hooks"
|
4
3
|
require "eager_decorator/railtie"
|
5
4
|
|
6
5
|
module EagerDecorator
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
inherited_without_decorator(klass)
|
15
|
-
end
|
16
|
-
alias_method_chain(:inherited, :decorator)
|
6
|
+
def self.decorate cache_classes
|
7
|
+
Dir.glob(Rails.root + "app/decorators/**/*.rb").each do |file|
|
8
|
+
load file unless cache_classes
|
9
|
+
klass_name = File.basename(file, ".rb").sub /_decorator/, ""
|
10
|
+
klass = klass_name.classify.safe_constantize
|
11
|
+
decorator = "#{klass_name.classify}Decorator".safe_constantize
|
12
|
+
klass.send :include, decorator if decorator
|
17
13
|
end
|
18
14
|
end
|
19
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eager_decorator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KoyaFukuda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple Decorator for Rails
|
14
14
|
email:
|
@@ -30,7 +30,6 @@ files:
|
|
30
30
|
- gemfiles/Gemfile-rails.4.1.x
|
31
31
|
- gemfiles/Gemfile-rails.4.2.x
|
32
32
|
- lib/eager_decorator.rb
|
33
|
-
- lib/eager_decorator/hooks.rb
|
34
33
|
- lib/eager_decorator/railtie.rb
|
35
34
|
- lib/eager_decorator/version.rb
|
36
35
|
- lib/generators/rails/decorator_generator.rb
|