futurism 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/futurism.rb +6 -1
- data/lib/futurism.rb~ +10 -0
- data/lib/futurism/resolver/controller.rb +1 -5
- data/lib/futurism/resolver/controller.rb~ +17 -0
- data/lib/futurism/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bbd52daa2dfe15d3a6dc9c9e374d6be65299a42a7ee3975cee51838811f7783
|
4
|
+
data.tar.gz: 29bcba992840173fe09f1e67ecdfa387dfedc8b8574d1ef988a4f98b55142bd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6efdbccf19c4c0b9a16f92f8461cb9fb8153796b81f6cbdd981e7d16779cca93a907033fbff2dac3bd354a22335e22d014a46f14bda18d4ad973605447ef1f20
|
7
|
+
data.tar.gz: b642b4d646ae5b1047330a833f7d4c7eeb8c684f15337835afc1b56f5d1b51cf0fea9ac9234a693562152b92d09f5febea8eb415b0aa4a8c97a77c96ae2cd42f
|
data/README.md
CHANGED
@@ -137,7 +137,7 @@ You can also pass in the controller that will be used to render the partial.
|
|
137
137
|
By default (i.e. not passing in a value), futurize will use `ApplicationController`, but you may override by setting the Futurism default controller in an initializer, for example `config/initializers/futurism.rb`.
|
138
138
|
|
139
139
|
```ruby
|
140
|
-
Futurism.default_controller = MyController
|
140
|
+
Futurism.default_controller = "MyController" # to avoid the controller from trying to autoload at boot, provide as a string
|
141
141
|
```
|
142
142
|
|
143
143
|
### HTML Options
|
data/lib/futurism.rb
CHANGED
@@ -13,7 +13,12 @@ module Futurism
|
|
13
13
|
|
14
14
|
autoload :Helpers, "futurism/helpers"
|
15
15
|
|
16
|
-
mattr_accessor :skip_in_test, :
|
16
|
+
mattr_accessor :skip_in_test, default: false
|
17
|
+
|
18
|
+
mattr_writer :default_controller
|
19
|
+
def self.default_controller
|
20
|
+
(@@default_controller || "::ApplicationController").to_s.constantize
|
21
|
+
end
|
17
22
|
|
18
23
|
ActiveSupport.on_load(:action_view) {
|
19
24
|
include Futurism::Helpers
|
data/lib/futurism.rb~
CHANGED
@@ -2,6 +2,9 @@ require "rails"
|
|
2
2
|
require "action_cable"
|
3
3
|
require "cable_ready"
|
4
4
|
require "futurism/engine"
|
5
|
+
require "futurism/message_verifier"
|
6
|
+
require "futurism/resolver/controller"
|
7
|
+
require "futurism/resolver/controller/renderer"
|
5
8
|
require "futurism/channel"
|
6
9
|
require "futurism/helpers"
|
7
10
|
|
@@ -10,6 +13,13 @@ module Futurism
|
|
10
13
|
|
11
14
|
autoload :Helpers, "futurism/helpers"
|
12
15
|
|
16
|
+
mattr_accessor :skip_in_test, default: false
|
17
|
+
|
18
|
+
mattr_writer :default_controller
|
19
|
+
def self.default_controller
|
20
|
+
(@@default_controller || "::ApplicationController").to_s.constantize
|
21
|
+
end
|
22
|
+
|
13
23
|
ActiveSupport.on_load(:action_view) {
|
14
24
|
include Futurism::Helpers
|
15
25
|
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Futurism
|
2
|
+
module Resolver
|
3
|
+
class Controller
|
4
|
+
def self.from(signed_string:)
|
5
|
+
if signed_string.present?
|
6
|
+
Futurism::MessageVerifier
|
7
|
+
.message_verifier
|
8
|
+
.verify(signed_string)
|
9
|
+
.to_s
|
10
|
+
.safe_constantize
|
11
|
+
else
|
12
|
+
Futurism.default_controller
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/futurism/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: futurism
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Rubisch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- lib/futurism/helpers.rb~
|
172
172
|
- lib/futurism/message_verifier.rb
|
173
173
|
- lib/futurism/resolver/controller.rb
|
174
|
+
- lib/futurism/resolver/controller.rb~
|
174
175
|
- lib/futurism/resolver/controller/renderer.rb
|
175
176
|
- lib/futurism/resolver/controller/renderer.rb~
|
176
177
|
- lib/futurism/shims/deep_transform_values.rb
|