applin-rails 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +0 -6
- data/lib/applin/rails/version.rb +1 -1
- data/lib/applin.rb +19 -15
- data/sig/applin.rbs +9 -6
- 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: 9549a088e20dc0e39d0152d3a13be7c4f1bcb2202ce9fd3b78c87793ddba0dff
|
4
|
+
data.tar.gz: d6c833d8898a537d2542c861273aac8a4908d7d7cbe0b39a59ad22b2b607b106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84fe8b3b2b3da47a61027ea8e7187e366e2ae82a22e9c6449780beb1113aff83abb5399208749827801ce35fd95a2ee06138cde56bac84c90e44e8ebbb4713be
|
7
|
+
data.tar.gz: 2a75e3c118c8811a43e14033fb29949d2947cc4994b45c4c14e23dc26b53bc982e2edade9d4ff8743f4368cf125b33aa5b92c760e47ee052736ef64ac9a81e5d
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
## applin Ruby Gem Changes
|
2
|
+
- v0.7.0
|
3
|
+
- Support ApplinIos 0.32.0.
|
4
|
+
- Remove on_user_error_poll action and make it a parameter of the rpc action.
|
5
|
+
- Add `modal` action.
|
6
|
+
- Add `aspect_ratio` param to `choose_photo` and `take_photo` actions.
|
7
|
+
- v0.6.0
|
8
|
+
- Support ApplinIos v0.25.0.
|
9
|
+
- Add `poll_delay_ms` to checkbox and textfield.
|
10
|
+
- Remove checkbox `rpc` field.
|
data/README.md
CHANGED
@@ -15,12 +15,6 @@ To add the gem to your Rails application:
|
|
15
15
|
* Docs: <https://www.applin.dev/docs/backend-libraries.html>
|
16
16
|
* Example: <https://github.com/leonhard-llc/applin-rails-demo>
|
17
17
|
|
18
|
-
## Changes
|
19
|
-
- v0.6.0
|
20
|
-
- Support ApplinIos v0.25.0.
|
21
|
-
- Add `poll_delay_ms` to checkbox and textfield.
|
22
|
-
- Remove checkbox `rpc` field.
|
23
|
-
|
24
18
|
## Contributing
|
25
19
|
Bug reports and pull requests are welcome on GitHub at <https://github.com/leonhard-llc/applin-rails>.
|
26
20
|
|
data/lib/applin/rails/version.rb
CHANGED
data/lib/applin.rb
CHANGED
@@ -22,48 +22,52 @@ module Applin
|
|
22
22
|
|
23
23
|
# Actions ###################################################################
|
24
24
|
|
25
|
-
def choose_photo(upload_url:)
|
26
|
-
"choose_photo
|
25
|
+
def choose_photo(upload_url:, aspect_ratio: nil)
|
26
|
+
{ typ: "choose_photo", url: upload_url, aspect_ratio: aspect_ratio }
|
27
27
|
end
|
28
28
|
|
29
29
|
def copy_to_clipboard(text)
|
30
|
-
"copy_to_clipboard
|
30
|
+
{ typ: "copy_to_clipboard", string_value: text }
|
31
31
|
end
|
32
32
|
|
33
33
|
def launch_url(url)
|
34
|
-
"launch_url
|
34
|
+
{ typ: "launch_url", url: url }
|
35
35
|
end
|
36
36
|
|
37
37
|
def logout
|
38
|
-
"logout"
|
38
|
+
{ typ: "logout" }
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
42
|
-
|
41
|
+
def modal_button(text:, actions:)
|
42
|
+
{ text: text, actions: actions }
|
43
|
+
end
|
44
|
+
|
45
|
+
def modal(title:, buttons:, message: nil)
|
46
|
+
{ typ: "modal", title: title, message: message, buttons: buttons }
|
43
47
|
end
|
44
48
|
|
45
49
|
def poll
|
46
|
-
"poll"
|
50
|
+
{ typ: "poll" }
|
47
51
|
end
|
48
52
|
|
49
53
|
def pop
|
50
|
-
"pop"
|
54
|
+
{ typ: "pop" }
|
51
55
|
end
|
52
56
|
|
53
57
|
def push(page_key)
|
54
|
-
"push
|
58
|
+
{ typ: "push", page: page_key }
|
55
59
|
end
|
56
60
|
|
57
61
|
def replace_all(page_key)
|
58
|
-
"replace_all
|
62
|
+
{ typ: "replace_all", page: page_key }
|
59
63
|
end
|
60
64
|
|
61
|
-
def rpc(url)
|
62
|
-
"rpc
|
65
|
+
def rpc(url:, on_user_error_poll: nil)
|
66
|
+
{ typ: "rpc", url: url, on_user_error_poll: on_user_error_poll }
|
63
67
|
end
|
64
68
|
|
65
|
-
def take_photo(upload_url:)
|
66
|
-
"take_photo
|
69
|
+
def take_photo(upload_url:, aspect_ratio: nil)
|
70
|
+
{ typ: "take_photo", url: upload_url, aspect_ratio: aspect_ratio }
|
67
71
|
end
|
68
72
|
|
69
73
|
# Pages #####################################################################
|
data/sig/applin.rbs
CHANGED
@@ -27,7 +27,8 @@ module Applin
|
|
27
27
|
DISPOSITION_STRETCH: disposition
|
28
28
|
VERSION: String
|
29
29
|
|
30
|
-
type action = String
|
30
|
+
type action = { typ: String }
|
31
|
+
type modal_button = { text: String, actions: Array[action] }
|
31
32
|
type page = { title: String }
|
32
33
|
type widget = { typ: String }
|
33
34
|
|
@@ -43,7 +44,7 @@ module Applin
|
|
43
44
|
poll_delay_ms: Numeric?,
|
44
45
|
) -> widget
|
45
46
|
|
46
|
-
def choose_photo: (upload_url: String) -> action
|
47
|
+
def choose_photo: (upload_url: String, aspect_ratio: Numeric?) -> action
|
47
48
|
|
48
49
|
def column: (widgets: Array[widget], align: alignment?, spacing: Numeric?) -> widget
|
49
50
|
|
@@ -69,6 +70,10 @@ module Applin
|
|
69
70
|
|
70
71
|
def logout: -> action
|
71
72
|
|
73
|
+
def modal_button: (text: String, actions: Array[action]) -> modal_button
|
74
|
+
|
75
|
+
def modal: (title: String, message: String?, buttons: Array[modal_button]) -> action
|
76
|
+
|
72
77
|
def nav_button: (text: String, actions: Array[action], badge_text: String?, photo_url: String?, sub_text: String?) -> widget
|
73
78
|
|
74
79
|
def nav_page: (
|
@@ -80,8 +85,6 @@ module Applin
|
|
80
85
|
poll_seconds: Numeric?,
|
81
86
|
) { () -> widget } -> page
|
82
87
|
|
83
|
-
def on_user_error_poll: -> action
|
84
|
-
|
85
88
|
def plain_page: (
|
86
89
|
title: String?,
|
87
90
|
ephemeral: bool?,
|
@@ -97,13 +100,13 @@ module Applin
|
|
97
100
|
|
98
101
|
def replace_all: (String) -> action
|
99
102
|
|
100
|
-
def rpc: (String) -> action
|
103
|
+
def rpc: (url: String, on_user_error_poll: bool?) -> action
|
101
104
|
|
102
105
|
def scroll: () { () -> widget } -> widget
|
103
106
|
|
104
107
|
def table: (rows: Array[Array[widget]], spacing: Numeric?) -> widget
|
105
108
|
|
106
|
-
def take_photo: (upload_url: String) -> action
|
109
|
+
def take_photo: (upload_url: String, aspect_ratio: Numeric?) -> action
|
107
110
|
|
108
111
|
def text: (String) -> widget
|
109
112
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: applin-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Leonhard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create mobile apps using only backend code. Applin™ is a Server-Driven
|
14
14
|
UI (SDUI) system.
|