rack-app-front_end 0.15.1 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25f1b5ba45bcda159720f34bc1baf80a28b7944c
4
- data.tar.gz: 12959459fdedbac0ecf89ebd002156d2661fec11
3
+ metadata.gz: 4cd954150961d613cd319ff20a408457d1dbced3
4
+ data.tar.gz: 67a4aebcd7b6afaa5ab18312b58105b8620a7235
5
5
  SHA512:
6
- metadata.gz: 503153690722a962f33bf4b9bc48ead6d99d15621516315a6fb864c7e5c153241aea47a32631b04b138c6de4158bc724654f01e37d7d07e5661640b5f2172ea4
7
- data.tar.gz: 533a6f13055e7f7db5fc0225f3087f4a521991b1afd0e90f39561d6d0eefec3363f956a9d09ce9ad69c9d366015533a4c77920905d17769c50567ff379917478
6
+ metadata.gz: f0415857f227556ba9cc0e353c465fc0ccb2f81b47e7cf57382ffc20f69a312218711849b2872566bd7c23a76fbbc89cce27522f4ac12981880c0cc8b0e88664
7
+ data.tar.gz: 3f7511f81b572ddd2f4328a10e9f1c8b2e6906b9e19599ec874e7096ecddd933b3831e532638da4fbe84c55c47897dde1963033753b0e5826ce6683be17e4433
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.15.1
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
- scope.inherit_instance_variables!(self)
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
@@ -4,6 +4,7 @@ module Rack::App::FrontEnd
4
4
  require 'tilt'
5
5
  require 'tilt/plain'
6
6
 
7
+ require 'rack/app/front_end/utils'
7
8
  require 'rack/app/front_end/version'
8
9
  require 'rack/app/front_end/helpers'
9
10
  require 'rack/app/front_end/template'
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.15.1
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/