turbograft 0.4.4 → 0.4.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
  SHA1:
3
- metadata.gz: 433d009a932180009262cbcd89d39cbff1d8410e
4
- data.tar.gz: 89fbc6072f6b803015c9e817d0ff3f6d7938fbd5
3
+ metadata.gz: b1b1d1336d82a5e3abbedadf7c7754cd6963b114
4
+ data.tar.gz: fcae3c55b4f62caa0e3a7611edd84649774e511f
5
5
  SHA512:
6
- metadata.gz: 747bf89f153ced295b2ea0ab4e0fe69ecba0728a8ad7c5f8bc5b639d86b1d31c25f43ca7f180c7657d566ae3daffabe12e46b59cf53ac890ba9345b8efbee255
7
- data.tar.gz: 19ac8dbfc36d19dcac93313b9e09ad0e87a9d1fadbe35ef13671fd00892f803578b69c01c708e26096b4c558200f9af054f8625d34c84f8e7ab4b5ea58f8d081
6
+ metadata.gz: 1285ab788870b5d4a91e8a44b88340a2a83466045313b6b2e6d107f711c12b8cb1ff3edbe518be39f958afa49fbb0b176365065955c3750f3eea4e6dc3cf9f26
7
+ data.tar.gz: 4f869a8b7ba41d846d8aaa4cf7e9622b097a84d285a75ed859ea8d22edd77ab06e7afc72197c42175f32e548d71e955c56fc78afe42d9c6c7e20eda3d5860614
@@ -14,16 +14,20 @@ module TurboGraft
14
14
  self.controllers = ["ActionController::Base"]
15
15
  end
16
16
 
17
+ def self.included(controller)
18
+ controller.class_eval do
19
+ include XHRHeaders, Cookies, XDomainBlocker, Redirection
20
+ before_action :set_xhr_redirected_to, :set_request_method_cookie
21
+ after_action :abort_xdomain_redirect
22
+ end
23
+ end
24
+
17
25
  class Engine < ::Rails::Engine
18
26
 
19
27
  initializer :turbograft do |config|
20
28
  ActiveSupport.on_load(:action_controller) do
21
- Config.controllers.each do |klass|
22
- klass.constantize.class_eval do
23
- include XHRHeaders, Cookies, XDomainBlocker, Redirection
24
- before_action :set_xhr_redirected_to, :set_request_method_cookie
25
- after_action :abort_xdomain_redirect
26
- end
29
+ Config.controllers.each do |class_name|
30
+ class_name.constantize.include(::TurboGraft)
27
31
  end
28
32
 
29
33
  ActionDispatch::Request.class_eval do
@@ -1,3 +1,3 @@
1
1
  module TurboGraft
2
- VERSION = '0.4.4'
2
+ VERSION = '0.4.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbograft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristian Plettenberg-Dussault
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2016-11-10 00:00:00.000000000 Z
18
+ date: 2016-12-16 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: coffee-rails