tzispa_helpers 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/tzispa/helpers.rb +17 -12
- data/lib/tzispa/helpers/error_view.rb +1 -1
- data/lib/tzispa/helpers/hooks.rb +12 -0
- data/lib/tzispa/helpers/macro_field.rb +10 -3
- data/lib/tzispa/helpers/session.rb +1 -1
- data/lib/tzispa/helpers/session_auth.rb +0 -1
- data/lib/tzispa/helpers/version.rb +1 -1
- data/lib/tzispa_helpers.rb +4 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d48b8fbafce2025bc196d9fe9602913277d90b4
|
4
|
+
data.tar.gz: 635ea2e314e571be2780e68eaeccb7a900146c7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 071d4209a4b2efacc527bc8f05e8c63185e49eab9bb9cfaa9579c124adbcbfe474304b6764e3aa910c8aab69e9cb390eb43f002e3357471d595927ce59a72bd9
|
7
|
+
data.tar.gz: 415c15efef524ad0ddd60f7597515092754de4017d4266e04255ec9aec63d6465954c4d44df3373ee0b4d65fd00968d3c9a663636064e48e9e9dacf069b8731d
|
data/CHANGELOG.md
CHANGED
data/lib/tzispa/helpers.rb
CHANGED
@@ -3,18 +3,23 @@
|
|
3
3
|
module Tzispa
|
4
4
|
module Helpers
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
autoload :DateTime, 'tzispa/helpers/date_time'
|
7
|
+
autoload :ErrorView, 'tzispa/helpers/error_view'
|
8
|
+
autoload :Hooks, 'tzispa/helpers/hooks'
|
9
|
+
autoload :Html, 'tzispa/helpers/html'
|
10
|
+
autoload :MacroField, 'tzispa/helpers/macro_field'
|
11
|
+
autoload :Mime, 'tzispa/helpers/mime'
|
12
|
+
autoload :Pattern, 'tzispa/helpers/pattern'
|
13
|
+
autoload :Provider, 'tzispa/helpers/provider'
|
14
|
+
autoload :Request, 'tzispa/helpers/request'
|
15
|
+
autoload :Requirer, 'tzispa/helpers/requirer'
|
16
|
+
autoload :Response, 'tzispa/helpers/response'
|
17
|
+
autoload :Security, 'tzispa/helpers/security'
|
18
|
+
autoload :SessionAuth, 'tzispa/helpers/session_auth'
|
19
|
+
autoload :SessionFlashBag, 'tzispa/helpers/session_flash_bag'
|
20
|
+
autoload :Session, 'tzispa/helpers/session'
|
21
|
+
autoload :SignRequirer, 'tzispa/helpers/sign_requirer'
|
22
|
+
autoload :Text, 'tzispa/helpers/text'
|
18
23
|
|
19
24
|
end
|
20
25
|
end
|
@@ -14,9 +14,7 @@ module Tzispa
|
|
14
14
|
def process_macros(source, fields, data_object: nil, json: nil)
|
15
15
|
(data_object || {}).tap do |data|
|
16
16
|
fields.each do |name|
|
17
|
-
|
18
|
-
macro = macro_field.first.to_sym if macro_field.length == 2
|
19
|
-
field = macro_field.length == 2 ? macro_field.last : macro_field.first
|
17
|
+
macro, field = split_macro_field(name)
|
20
18
|
build_field source, field, macro, data
|
21
19
|
end
|
22
20
|
json&.each do |key, value|
|
@@ -25,6 +23,15 @@ module Tzispa
|
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
26
|
+
def split_macro_field(name)
|
27
|
+
macro_field = name.split('@:')
|
28
|
+
if macro_field.length == 2
|
29
|
+
[macro_field.first.to_sym, macro_field.last]
|
30
|
+
else
|
31
|
+
[nil, macro_field.first]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
28
35
|
def build_field(source, field, macro, data)
|
29
36
|
field.split(':').tap do |orig, dest|
|
30
37
|
dest ||= orig
|
data/lib/tzispa_helpers.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tzispa_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Antonio Piñero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/tzispa/helpers.rb
|
65
65
|
- lib/tzispa/helpers/date_time.rb
|
66
66
|
- lib/tzispa/helpers/error_view.rb
|
67
|
+
- lib/tzispa/helpers/hooks.rb
|
67
68
|
- lib/tzispa/helpers/hooks/after.rb
|
68
69
|
- lib/tzispa/helpers/hooks/before.rb
|
69
70
|
- lib/tzispa/helpers/html.rb
|
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
106
|
version: '0'
|
106
107
|
requirements: []
|
107
108
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.6.
|
109
|
+
rubygems_version: 2.6.14
|
109
110
|
signing_key:
|
110
111
|
specification_version: 4
|
111
112
|
summary: Helpers for Tzispa
|