rack-app-front_end 0.15.1 → 0.16.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 +4 -4
- data/VERSION +1 -1
- data/lib/rack/app/front_end/endpoint_methods.rb +1 -1
- data/lib/rack/app/front_end/template/scope.rb +0 -22
- data/lib/rack/app/front_end/utils.rb +11 -0
- data/lib/rack/app/front_end.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cd954150961d613cd319ff20a408457d1dbced3
|
4
|
+
data.tar.gz: 67a4aebcd7b6afaa5ab18312b58105b8620a7235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0415857f227556ba9cc0e353c465fc0ccb2f81b47e7cf57382ffc20f69a312218711849b2872566bd7c23a76fbbc89cce27522f4ac12981880c0cc8b0e88664
|
7
|
+
data.tar.gz: 3f7511f81b572ddd2f4328a10e9f1c8b2e6906b9e19599ec874e7096ecddd933b3831e532638da4fbe84c55c47897dde1963033753b0e5826ce6683be17e4433
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.16.0
|
@@ -5,7 +5,7 @@ module Rack::App::FrontEnd::EndpointMethods
|
|
5
5
|
|
6
6
|
scope = Rack::App::FrontEnd::Template::Scope.new
|
7
7
|
scope.extend(self.class.helpers)
|
8
|
-
|
8
|
+
Rack::App::FrontEnd::Utils.link_instance_variables(self, scope)
|
9
9
|
|
10
10
|
full_path = Rack::App::Utils.expand_path(template_path)
|
11
11
|
template = Rack::App::FrontEnd::Template.new(full_path, options)
|
@@ -1,24 +1,2 @@
|
|
1
1
|
class Rack::App::FrontEnd::Template::Scope
|
2
|
-
|
3
|
-
def extended_modules
|
4
|
-
class << self
|
5
|
-
self
|
6
|
-
end.included_modules
|
7
|
-
end
|
8
|
-
|
9
|
-
def inherit_modules!(object)
|
10
|
-
class << object
|
11
|
-
self
|
12
|
-
end.included_modules.each do |module_constant|
|
13
|
-
extend(module_constant)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def inherit_instance_variables!(object)
|
18
|
-
object.__send__(:instance_variables).each do |instance_variable|
|
19
|
-
value = object.__send__(:instance_variable_get, instance_variable)
|
20
|
-
instance_variable_set(instance_variable, value)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
2
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Rack::App::FrontEnd::Utils
|
2
|
+
extend self
|
3
|
+
|
4
|
+
def link_instance_variables(from, to)
|
5
|
+
from.__send__(:instance_variables).each do |instance_variable|
|
6
|
+
value = from.__send__(:instance_variable_get, instance_variable)
|
7
|
+
to.__send__(:instance_variable_set, instance_variable, value)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
data/lib/rack/app/front_end.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-app-front_end
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Luzsi
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/rack/app/front_end/template/default_layout.rb
|
108
108
|
- lib/rack/app/front_end/template/default_template.rb
|
109
109
|
- lib/rack/app/front_end/template/scope.rb
|
110
|
+
- lib/rack/app/front_end/utils.rb
|
110
111
|
- lib/rack/app/front_end/version.rb
|
111
112
|
- rack-app-front_end.gemspec
|
112
113
|
homepage: http://www.rack-app.com/
|