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 +4 -4
- data/lib/turbograft.rb +10 -6
- data/lib/turbograft/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1b1d1336d82a5e3abbedadf7c7754cd6963b114
|
4
|
+
data.tar.gz: fcae3c55b4f62caa0e3a7611edd84649774e511f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1285ab788870b5d4a91e8a44b88340a2a83466045313b6b2e6d107f711c12b8cb1ff3edbe518be39f958afa49fbb0b176365065955c3750f3eea4e6dc3cf9f26
|
7
|
+
data.tar.gz: 4f869a8b7ba41d846d8aaa4cf7e9622b097a84d285a75ed859ea8d22edd77ab06e7afc72197c42175f32e548d71e955c56fc78afe42d9c6c7e20eda3d5860614
|
data/lib/turbograft.rb
CHANGED
@@ -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 |
|
22
|
-
|
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
|
data/lib/turbograft/version.rb
CHANGED
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
|
+
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-
|
18
|
+
date: 2016-12-16 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: coffee-rails
|