kamiflex 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kamiflex/actions.rb +10 -5
- data/lib/kamiflex/basic_elements.rb +15 -6
- data/lib/kamiflex/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f3a0c28faa7246ac46c30d299399e4a052238fd65ffbcf3876f3d212b5f8c7a
|
4
|
+
data.tar.gz: 23cff523a92f3eaa2519a295a4c29f31c2306a45016e3fa7e6cd9b5017637ffe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb297062b3e7037e25079f35597a616021a51d13244d6d157a1f71d2d04d38ec6af4cff3e6ed9c8ae3dba608c6fc360bd9878b7f62e0162f3678f292724ccd5c
|
7
|
+
data.tar.gz: 73de7d71fad0c304d603e8f1899f699abcf050e6f82ec9e0e72ab1d877bb0690eac743898c54c34a58fc79988fa88b1940ca47651da1f444f703d615fed80202
|
data/lib/kamiflex/actions.rb
CHANGED
@@ -9,14 +9,19 @@ module Kamiflex
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def uri_action(uri, **params)
|
12
|
-
{
|
12
|
+
action = {
|
13
13
|
type: "uri",
|
14
14
|
label: uri[0...40],
|
15
|
-
uri: uri
|
16
|
-
# altUri: {
|
17
|
-
# desktop: uri
|
18
|
-
# }
|
15
|
+
uri: uri
|
19
16
|
}
|
17
|
+
|
18
|
+
if params[:desktop].present?
|
19
|
+
action[:altUri] = {
|
20
|
+
desktop: params[:desktop]
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
action
|
20
25
|
end
|
21
26
|
|
22
27
|
def postback_action(data, **params)
|
@@ -43,13 +43,22 @@ module Kamiflex
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def url_button(label, url, **params)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
action = {
|
47
|
+
type: "uri",
|
48
|
+
label: label,
|
49
|
+
uri: url,
|
50
|
+
}
|
51
|
+
|
52
|
+
if params[:desktop].present?
|
53
|
+
action[:altUri] = {
|
54
|
+
desktop: params[:desktop]
|
52
55
|
}
|
56
|
+
params = params.reject {|key, value| key == :desktop }
|
57
|
+
end
|
58
|
+
|
59
|
+
@flex_contents << {
|
60
|
+
type: "button",
|
61
|
+
action: action
|
53
62
|
}.merge(params)
|
54
63
|
end
|
55
64
|
|
data/lib/kamiflex/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kamiflex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- etrex kuo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|