render_super_visagio 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +0 -0
- data/Rakefile +0 -0
- data/lib/render_super_visagio/version.rb +2 -2
- data/lib/render_super_visagio.rb +15 -6
- data/test/dummy/README.rdoc +0 -0
- data/test/dummy/Rakefile +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +0 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +0 -0
- data/test/dummy/config/application.rb +1 -1
- data/test/dummy/config/boot.rb +0 -0
- data/test/dummy/config/database.yml +0 -0
- data/test/dummy/config/environment.rb +0 -0
- data/test/dummy/config/environments/development.rb +0 -0
- data/test/dummy/config/environments/production.rb +0 -0
- data/test/dummy/config/environments/test.rb +0 -0
- data/test/dummy/config/initializers/assets.rb +0 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/test/dummy/config/initializers/inflections.rb +0 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/session_store.rb +0 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/test/dummy/config/locales/en.yml +0 -0
- data/test/dummy/config/routes.rb +0 -0
- data/test/dummy/config/secrets.yml +0 -0
- data/test/dummy/config.ru +0 -0
- data/test/dummy/public/404.html +0 -0
- data/test/dummy/public/422.html +0 -0
- data/test/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/render_super_test.rb +0 -0
- data/test/test_helper.rb +0 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7949cc34ac340af17a726f9074bcf2892853a31e37ff44dbfc2c9d2b122fa2b
|
4
|
+
data.tar.gz: 3088e62ee7db355ced11d926702d743585a52b1f6094925687dae4725000a3ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b4dc67a886f508525ea6b0caeb3ae58b39e3e3b331628e24017f985014e73569766a50daa9c47d8c7eb727458fc1019e685cd109ca5f3072bda2330b8b0377
|
7
|
+
data.tar.gz: 991299ad2212e40e2554f71955b814f9098c62f6071cf93feca9ac909f21c94624578d53dd69137ac2ba82b5e83ccbcf76bab4e99f3e78406e74e43c7a544f55
|
data/MIT-LICENSE
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
@@ -1,3 +1,3 @@
|
|
1
|
-
module
|
2
|
-
VERSION = "0.2
|
1
|
+
module RenderSuperVisagio
|
2
|
+
VERSION = "0.1.2"
|
3
3
|
end
|
data/lib/render_super_visagio.rb
CHANGED
@@ -18,11 +18,20 @@ module ActionView
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
module
|
21
|
+
module RenderSuperVisagio
|
22
22
|
def self.included(base) # :nodoc
|
23
|
-
|
23
|
+
base.extend(ClassMethods)
|
24
|
+
base.send(:include, InstanceMethods)
|
25
|
+
|
26
|
+
# Same as typing in the class
|
27
|
+
base.class_eval do
|
28
|
+
alias_method :render_without_super, :render
|
29
|
+
alias_method :render, :render_with_super
|
30
|
+
end
|
24
31
|
end
|
25
32
|
|
33
|
+
module ClassMethods; end
|
34
|
+
|
26
35
|
module InstanceMethods
|
27
36
|
#
|
28
37
|
# Adds rendering option.
|
@@ -31,7 +40,7 @@ module RenderSuper
|
|
31
40
|
#
|
32
41
|
# This renders the "super" template, i.e. the one hidden by the plugin
|
33
42
|
#
|
34
|
-
def
|
43
|
+
def render_with_super(*args, &block)
|
35
44
|
if args.first == :super
|
36
45
|
last_view = view_stack.last || {:view => instance_variable_get(:@virtual_path).split('/').last}
|
37
46
|
options = args[1] || {}
|
@@ -43,7 +52,7 @@ module RenderSuper
|
|
43
52
|
end
|
44
53
|
options[:template] = last_view[:templates].shift
|
45
54
|
view_stack << last_view
|
46
|
-
result =
|
55
|
+
result = render_without_super options
|
47
56
|
view_stack.pop
|
48
57
|
result
|
49
58
|
else
|
@@ -54,7 +63,7 @@ module RenderSuper
|
|
54
63
|
current_view[:locals] = options[:locals] if !current_view.nil? && options[:locals]
|
55
64
|
view_stack << current_view if current_view.present?
|
56
65
|
end
|
57
|
-
result =
|
66
|
+
result = render_without_super(*args, &block)
|
58
67
|
view_stack.pop if current_view.present?
|
59
68
|
result
|
60
69
|
end
|
@@ -66,4 +75,4 @@ module RenderSuper
|
|
66
75
|
end
|
67
76
|
end
|
68
77
|
end
|
69
|
-
ActionView::Base.send(:include,
|
78
|
+
ActionView::Base.send(:include, RenderSuperVisagio)
|
data/test/dummy/README.rdoc
CHANGED
File without changes
|
data/test/dummy/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/dummy/config/boot.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/dummy/config/routes.rb
CHANGED
File without changes
|
File without changes
|
data/test/dummy/config.ru
CHANGED
File without changes
|
data/test/dummy/public/404.html
CHANGED
File without changes
|
data/test/dummy/public/422.html
CHANGED
File without changes
|
data/test/dummy/public/500.html
CHANGED
File without changes
|
File without changes
|
data/test/render_super_test.rb
CHANGED
File without changes
|
data/test/test_helper.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: render_super_visagio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|
@@ -24,9 +24,9 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: Description of
|
27
|
+
description: Description of RenderSuperVisagio.
|
28
28
|
email:
|
29
|
-
-
|
29
|
+
- victor.campos@visagio.com
|
30
30
|
executables: []
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
@@ -90,11 +90,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.3.26
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
|
-
summary: Summary of
|
96
|
+
summary: Summary of RenderSuperVisagio.
|
97
97
|
test_files:
|
98
|
+
- test/dummy/README.rdoc
|
99
|
+
- test/dummy/Rakefile
|
98
100
|
- test/dummy/app/assets/javascripts/application.js
|
99
101
|
- test/dummy/app/assets/stylesheets/application.css
|
100
102
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -127,7 +129,5 @@ test_files:
|
|
127
129
|
- test/dummy/public/422.html
|
128
130
|
- test/dummy/public/500.html
|
129
131
|
- test/dummy/public/favicon.ico
|
130
|
-
- test/dummy/Rakefile
|
131
|
-
- test/dummy/README.rdoc
|
132
132
|
- test/render_super_test.rb
|
133
133
|
- test/test_helper.rb
|