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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '090b3070564f994192df8405b3e82cffe5e7898d1ff5a5d7d74b6f82894356a0'
4
- data.tar.gz: 17733e78cf3e0b6f180a3db9f6e4baf41e6d5616d805f91bc8af0a0053dfa9bd
3
+ metadata.gz: f9775519f09048d28dd30bf4f4483a469eed3660cea3860d8a24e67de1408799
4
+ data.tar.gz: 1d1a5f7c56a128b056e5d7cdb97b0e01c90525b0bb0aeffea409ffa4aecca9c1
5
5
  SHA512:
6
- metadata.gz: 62098f3fa6656bc4f5e29034fbade9f0087cfcb4462a161cf70549a272d94cc98bd2055a71b734a1089a0ebba80e9c309d36e5a51c4c1cb1cdeb4e39f7de3208
7
- data.tar.gz: 31facdd89a123b1682d2bf6f5ea5fc72370c3e08462c16c614d6225f03cc1b939c8b8e8952c5d7051ab0154d9cd4c9533e2e9de2ad285e5a477f3fd08b76d9d4
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)
@@ -1,5 +1,5 @@
1
1
  module MobileWorkflow
2
- VERSION = '0.6.23'
2
+ VERSION = '0.6.24'
3
3
  RUBY_VERSION = '2.7.2'
4
4
  RAILS_VERSION = '6.1.0'
5
5
  end
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.23
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-20 00:00:00.000000000 Z
11
+ date: 2021-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails