rbexy 0.1.4 → 0.1.5

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
  SHA256:
3
- metadata.gz: 1775f06e1058875736a53072d7d76c11f7320cea33176e5392afcdc8d1c95f76
4
- data.tar.gz: ccc233edf9234293845e67ebd8e8a27cc640c9f778e9bbb9c8063efd79cde318
3
+ metadata.gz: f2c4fd57eed2a80ab3e953e5ea7ca577723dad29e5af7d2fb1bc231171c359e6
4
+ data.tar.gz: 3f578fae5f23cab09d4b25744a933adcab8a119c72d3a937496298db9b235583
5
5
  SHA512:
6
- metadata.gz: 877b65e6375f895a730420811d59b7e82937fb075709a3b42d8778d7b6e7a3e16119adffacf657184ca2cd21f30d5aecb0601a0250eb4a8095295d2cebb4a676
7
- data.tar.gz: c77c30e0c6420d1154022daa40dec11ed5a9fd416d83df8d002f3b28cde6e7a64d39d8154734ffec80a56ef56e60b1bbdbd842da7f7e9bc0a77863d31dd255e1
6
+ metadata.gz: 7330738b406e5944b8b4c9d379f1527ec78745026e2505902149d32164ed8b074cbe8f485a2dcbdeae8e75e11339142e94d804bf1b0470d840313082fc73ce53
7
+ data.tar.gz: a900f8c4991796ef6719d4ed29bc6e7e60a7d04fdbee3fd29cc3ee38e50baa04597030dcac33c7e4c30f2af6b228e3e7cc863d348780732c77e0a4d80a5b9ba4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbexy (0.1.4)
4
+ rbexy (0.1.5)
5
5
  actionview (>= 5.0, < 7.0)
6
6
  activesupport (>= 5.0, < 7.0)
7
7
  railties (>= 5.0, < 7.0)
@@ -4,7 +4,11 @@ module Rbexy
4
4
  module Rails
5
5
  class Engine < ::Rails::Engine
6
6
  initializer "rbexy" do |app|
7
- ActionView::Template.register_template_handler(:rbx, Rbexy::Rails::TemplateHandler)
7
+ template_handler = ::Rails.version.to_f >= 6.0 ?
8
+ proc { |template, source| Rbexy.compile(source) } :
9
+ proc { |template| Rbexy.compile(template.source) }
10
+
11
+ ActionView::Template.register_template_handler(:rbx, template_handler)
8
12
 
9
13
  ActiveSupport.on_load :action_controller_base do
10
14
  helper Rbexy::ViewContextHelper
@@ -1,3 +1,3 @@
1
1
  module Rbexy
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbexy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Giancola
@@ -235,7 +235,6 @@ files:
235
235
  - lib/rbexy/parser.rb
236
236
  - lib/rbexy/rails.rb
237
237
  - lib/rbexy/rails/engine.rb
238
- - lib/rbexy/rails/template_handler.rb
239
238
  - lib/rbexy/runtime.rb
240
239
  - lib/rbexy/version.rb
241
240
  - lib/rbexy/view_context_helper.rb
@@ -1,9 +0,0 @@
1
- module Rbexy
2
- module Rails
3
- class TemplateHandler
4
- def self.call(template, source)
5
- Rbexy.compile(source)
6
- end
7
- end
8
- end
9
- end