mobile_workflow 0.6.23 → 0.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/concerns/mobile_workflow/displayable.rb +23 -0
- data/lib/mobile_workflow/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: f9775519f09048d28dd30bf4f4483a469eed3660cea3860d8a24e67de1408799
|
4
|
+
data.tar.gz: 1d1a5f7c56a128b056e5d7cdb97b0e01c90525b0bb0aeffea409ffa4aecca9c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4209f4dd3e731a189da554458c36f06af935e51f5b2b2b52621e9123f4825d14b35c39b42f7a989aa051557db06f3a7edbce2ed43f905397b3bf4254fca30d8
|
7
|
+
data.tar.gz: c1781869445e2ba3ffb97824a071ad95a0735c9d778062df73e9d063c39f5590cf0a128a60e43fd5fe737bf322efa691e368316c304582f35d7901fd663cdb7b
|
@@ -91,6 +91,29 @@ module MobileWorkflow
|
|
91
91
|
text_choices_a = text_choices.map{|k, v| {_class: "ORKTextChoice", exclusive: false, text: k, value: v} }.to_a
|
92
92
|
{ question: question, answerFormat: { _class: "ORKTextChoiceAnswerFormat", style: style.to_s.camelize(:lower), textChoices: text_choices_a}}
|
93
93
|
end
|
94
|
+
|
95
|
+
def mw_grid_large_section(id:, text:)
|
96
|
+
raise 'Missing id' if id.nil?
|
97
|
+
raise 'Missing text' if text.nil?
|
98
|
+
|
99
|
+
{ id: id, text: text, type: :largeSection }
|
100
|
+
end
|
101
|
+
|
102
|
+
def mw_grid_small_section(id:, text:)
|
103
|
+
raise 'Missing id' if id.nil?
|
104
|
+
raise 'Missing text' if text.nil?
|
105
|
+
|
106
|
+
{ id: id, text: text, type: :smallSection }
|
107
|
+
end
|
108
|
+
|
109
|
+
def mw_grid_item(id:, text:, image_attachment: nil)
|
110
|
+
raise 'Missing id' if id.nil?
|
111
|
+
raise 'Missing text' if text.nil?
|
112
|
+
|
113
|
+
item = { id: id, text: text, type: :item }
|
114
|
+
item[:imageURL] = preview_url(image_attachment, options: { resize_to_fill: [600, 600] }) if image_attachment
|
115
|
+
item
|
116
|
+
end
|
94
117
|
|
95
118
|
private
|
96
119
|
def validate_on_success!(on_success)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobile_workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brooke-Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|