alephant-renderer 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alephant/renderer/version.rb +1 -1
- data/lib/alephant/renderer/views/base.rb +12 -6
- 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: df6e0ade1b20534aa2189e0429253dc17a042f16
|
4
|
+
data.tar.gz: 65dba06edb78b5d658302da1cd8e6252c42ad514
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e6ebe2ff58911f96dc6df0a7ab6948e4d211ad9f22d87dc12aa5387a22466aec7dead9a989fb3d734b6c9c735c967287bc8038107f69ea7f828f2f33eedd2bf
|
7
|
+
data.tar.gz: e4919a87490d91d5c6cceefe0402ef35a4d587d39fde1f6465fa259f0266bf4fa22d8b9ff6c9da5d2da6baa6bc3d6d7b18bf1177b102d7645f89a18c436645b0
|
@@ -1,11 +1,12 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "alephant/renderer/views"
|
2
|
+
require "hashie"
|
3
|
+
require "pathname"
|
3
4
|
|
4
5
|
module Alephant
|
5
6
|
module Renderer
|
6
7
|
module Views
|
7
8
|
module Base
|
8
|
-
def self.included
|
9
|
+
def self.included(base)
|
9
10
|
base.send :include, InstanceMethods
|
10
11
|
base.extend ClassMethods
|
11
12
|
end
|
@@ -21,11 +22,16 @@ module Alephant
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def to_h
|
24
|
-
whitelist.reduce({})
|
25
|
+
whitelist.reduce({}) do |accum, method_key|
|
26
|
+
accum.tap { |a| a[method_key] = send(method_key) }
|
27
|
+
end
|
25
28
|
end
|
26
29
|
|
27
30
|
def setup; end
|
28
|
-
|
31
|
+
|
32
|
+
def whitelist
|
33
|
+
[]
|
34
|
+
end
|
29
35
|
end
|
30
36
|
|
31
37
|
module ClassMethods
|
@@ -33,7 +39,7 @@ module Alephant
|
|
33
39
|
|
34
40
|
def inherited(subclass)
|
35
41
|
current_dir = File.dirname(caller.first[/\/[^:]+/])
|
36
|
-
dir_path = Pathname.new(File.join(current_dir,
|
42
|
+
dir_path = Pathname.new(File.join(current_dir, "..")).realdirpath
|
37
43
|
|
38
44
|
subclass.base_path = dir_path.to_s
|
39
45
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-renderer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Kenny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|