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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +0 -0
  3. data/Rakefile +0 -0
  4. data/lib/render_super_visagio/version.rb +2 -2
  5. data/lib/render_super_visagio.rb +15 -6
  6. data/test/dummy/README.rdoc +0 -0
  7. data/test/dummy/Rakefile +0 -0
  8. data/test/dummy/app/assets/javascripts/application.js +0 -0
  9. data/test/dummy/app/assets/stylesheets/application.css +0 -0
  10. data/test/dummy/app/controllers/application_controller.rb +0 -0
  11. data/test/dummy/app/helpers/application_helper.rb +0 -0
  12. data/test/dummy/app/views/layouts/application.html.erb +0 -0
  13. data/test/dummy/config/application.rb +1 -1
  14. data/test/dummy/config/boot.rb +0 -0
  15. data/test/dummy/config/database.yml +0 -0
  16. data/test/dummy/config/environment.rb +0 -0
  17. data/test/dummy/config/environments/development.rb +0 -0
  18. data/test/dummy/config/environments/production.rb +0 -0
  19. data/test/dummy/config/environments/test.rb +0 -0
  20. data/test/dummy/config/initializers/assets.rb +0 -0
  21. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
  22. data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
  23. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -0
  24. data/test/dummy/config/initializers/inflections.rb +0 -0
  25. data/test/dummy/config/initializers/mime_types.rb +0 -0
  26. data/test/dummy/config/initializers/session_store.rb +0 -0
  27. data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
  28. data/test/dummy/config/locales/en.yml +0 -0
  29. data/test/dummy/config/routes.rb +0 -0
  30. data/test/dummy/config/secrets.yml +0 -0
  31. data/test/dummy/config.ru +0 -0
  32. data/test/dummy/public/404.html +0 -0
  33. data/test/dummy/public/422.html +0 -0
  34. data/test/dummy/public/500.html +0 -0
  35. data/test/dummy/public/favicon.ico +0 -0
  36. data/test/render_super_test.rb +0 -0
  37. data/test/test_helper.rb +0 -0
  38. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c00023a122b9361709f0ae091669b8b7565eebee859e5e5706b496060bb3a06
4
- data.tar.gz: b3e64bcce06500140e3932efc0cf82b16b9501651bbfdd4c1ee2660856ebbf11
3
+ metadata.gz: f7949cc34ac340af17a726f9074bcf2892853a31e37ff44dbfc2c9d2b122fa2b
4
+ data.tar.gz: 3088e62ee7db355ced11d926702d743585a52b1f6094925687dae4725000a3ce
5
5
  SHA512:
6
- metadata.gz: af51aaa00d65ec5f59fbde16c738a7fdd89ca0e360a51339c8126fecbe004cd1e5f07433a038e94e1062d2d067ea5a414d3d782e0a79cb69cb0313f85c0cdb70
7
- data.tar.gz: 67d032ee23c144def688f6fe5d7fb4add236cadad0493fc2a665566422850211a822e14ffa4a43f802687bf0e0d4fd6caac2439c1f62d6895e2ba28ecebe9290
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 RenderSuper
2
- VERSION = "0.2.0"
1
+ module RenderSuperVisagio
2
+ VERSION = "0.1.2"
3
3
  end
@@ -18,11 +18,20 @@ module ActionView
18
18
  end
19
19
  end
20
20
 
21
- module RenderSuper
21
+ module RenderSuperVisagio
22
22
  def self.included(base) # :nodoc
23
- ActionView::Base.send(:prepend, InstanceMethods)
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 render(*args, &block)
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 = super(options)
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 = super
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, RenderSuper)
78
+ ActionView::Base.send(:include, RenderSuperVisagio)
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
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require(*Rails.groups)
6
- require "render_super"
6
+ require "render_super_visagio"
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
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.ru CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
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.0
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: 2020-05-28 00:00:00.000000000 Z
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 RenderSuper.
27
+ description: Description of RenderSuperVisagio.
28
28
  email:
29
- - daniel.weil@visagio.com
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.0.8
93
+ rubygems_version: 3.3.26
94
94
  signing_key:
95
95
  specification_version: 4
96
- summary: Summary of RenderSuper.
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