mobile_workflow 0.6.25 → 0.6.30
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 +12 -8
- data/lib/generators/mobile_workflow/install/templates/Gemfile.erb +3 -3
- data/lib/generators/mobile_workflow/install/templates/lib/tasks/mobile_workflow_s3.rake +4 -3
- data/lib/generators/mobile_workflow/install/templates/seeds.rb.erb +2 -1
- data/lib/mobile_workflow/version.rb +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d031a1ce30dbdd14233f828a7cb3d8a6c651230bccd2d18de76f9a7277dc494b
|
4
|
+
data.tar.gz: ef7c6fc5b5f030862460275073754f2643e83968222e3a34c29afa3c3cf3a204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ca94e68e33f15522bcefd2d4d74cd648ac489894eae679cf886085208caf31e5d99c9923ed6d8404500246a89d05f3ec9f648e0cf2f43bdf8d60e09d6083930
|
7
|
+
data.tar.gz: f28e43e1ebc48dfb63f2b52efba43a91e391c2da5a40ec115e5016b7b250081e10bea92737ffa5df579949b1ad772c4ecfd70f598b064229e3b2e45c5bac0bb9
|
@@ -8,14 +8,18 @@ module MobileWorkflow
|
|
8
8
|
CONTENT_MODE_OPTIONS = [:scale_aspect_fill, :scale_aspect_fit]
|
9
9
|
QUESTION_STYLES = [:single_choice, :multiple_choice]
|
10
10
|
|
11
|
-
def mw_list_item(id: self.id, text:, detail_text: nil, sf_symbol_name: nil, image_attachment: nil)
|
12
|
-
mw_list_item = {id: id, text: text, detailText: detail_text, sfSymbolName: sf_symbol_name}
|
13
|
-
mw_list_item[:imageURL] = preview_url(image_attachment, options: { resize_to_fill: [
|
11
|
+
def mw_list_item(id: self.id, text:, detail_text: nil, sf_symbol_name: nil, material_icon_name: nil, image_attachment: nil)
|
12
|
+
mw_list_item = {id: id, text: text, detailText: detail_text, sfSymbolName: sf_symbol_name, materialIconName: material_icon_name}
|
13
|
+
mw_list_item[:imageURL] = preview_url(image_attachment, options: { resize_to_fill: [200, 200] }) if image_attachment
|
14
14
|
mw_list_item.compact
|
15
15
|
end
|
16
16
|
|
17
|
+
def mw_list_search_suggestion(id: self.id, text:, section_name:, sf_symbol_name: nil)
|
18
|
+
{id: id.to_s, text: text, sectionName: section_name, sfSymbolName: sf_symbol_name}.compact
|
19
|
+
end
|
20
|
+
|
17
21
|
def mw_map_item(id: self.id, text:, detail_text: nil, latitude:, longitude:)
|
18
|
-
{id: id, text: text, detailText: detail_text, latitude: latitude, longitude: longitude}.compact
|
22
|
+
{id: id.to_s, text: text, detailText: detail_text, latitude: latitude, longitude: longitude}.compact
|
19
23
|
end
|
20
24
|
|
21
25
|
def mw_pie_chart_item(id: self.id, label:, value:)
|
@@ -26,7 +30,7 @@ module MobileWorkflow
|
|
26
30
|
{type: :text, label: label, text: text.to_s}.compact
|
27
31
|
end
|
28
32
|
|
29
|
-
def mw_display_image(attachment, content_mode: :scale_aspect_fill, options: { resize_to_fill: [
|
33
|
+
def mw_display_image(attachment, content_mode: :scale_aspect_fill, options: { resize_to_fill: [1200, 600] })
|
30
34
|
validate_content_mode!(content_mode)
|
31
35
|
|
32
36
|
{type: :image, contentMode: content_mode.to_s.camelize(:lower), previewURL: preview_url(attachment, options: options), url: attachment_url(attachment)}
|
@@ -69,7 +73,7 @@ module MobileWorkflow
|
|
69
73
|
|
70
74
|
def mw_display_system_url_button(label:, apple_system_url: nil, android_deep_link: nil, style: :primary, sf_symbol_name: nil, material_icon_name: nil)
|
71
75
|
validate_button_style!(style)
|
72
|
-
raise 'Invalid android_deep_link'
|
76
|
+
raise 'Invalid android_deep_link' if android_deep_link && !android_deep_link.start_with?('http')
|
73
77
|
|
74
78
|
{type: :button, label: label, appleSystemURL: apple_system_url, androidDeepLink: android_deep_link, style: style, sfSymbolName: sf_symbol_name, materialIconName: material_icon_name}.compact
|
75
79
|
end
|
@@ -111,7 +115,7 @@ module MobileWorkflow
|
|
111
115
|
raise 'Missing text' if text.nil?
|
112
116
|
|
113
117
|
item = { id: id, text: text, type: :item }
|
114
|
-
item[:imageURL] = preview_url(image_attachment, options: { resize_to_fill: [
|
118
|
+
item[:imageURL] = preview_url(image_attachment, options: { resize_to_fill: [1224, 760] }) if image_attachment
|
115
119
|
item
|
116
120
|
end
|
117
121
|
|
@@ -151,7 +155,7 @@ module MobileWorkflow
|
|
151
155
|
end
|
152
156
|
|
153
157
|
def attachment_host
|
154
|
-
"https://#{ENV
|
158
|
+
"https://#{ENV.fetch('HEROKU_APP_NAME')}.herokuapp.com"
|
155
159
|
end
|
156
160
|
end
|
157
161
|
end
|
@@ -4,13 +4,13 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
4
4
|
ruby '<%= MobileWorkflow::RUBY_VERSION %>'
|
5
5
|
|
6
6
|
# Core Gems
|
7
|
-
gem 'rails', '
|
7
|
+
gem 'rails', '<%= MobileWorkflow::RAILS_VERSION %>'
|
8
8
|
gem 'puma', '~> 5.0'
|
9
9
|
gem 'sass-rails', '>= 6'
|
10
10
|
gem 'turbolinks', '~> 5'
|
11
11
|
|
12
12
|
# Mobile Workflow
|
13
|
-
gem 'mobile_workflow', '
|
13
|
+
gem 'mobile_workflow', '<%= MobileWorkflow::VERSION %>'
|
14
14
|
|
15
15
|
# Authorisation / Authentication
|
16
16
|
<%- if options[:doorkeeper_oauth] %>
|
@@ -32,7 +32,7 @@ gem 'aws-sdk-sns', '~> 1.23'
|
|
32
32
|
<%- end %>
|
33
33
|
|
34
34
|
# FFI for Mac M1
|
35
|
-
gem 'ffi',
|
35
|
+
gem 'ffi', '~> 1.15.1'
|
36
36
|
|
37
37
|
group :development do
|
38
38
|
gem 'web-console', '>= 3.3.0'
|
@@ -1,9 +1,10 @@
|
|
1
|
-
desc "Add S3 storage to
|
1
|
+
desc "Add S3 storage to a Heroku app"
|
2
2
|
task add_heroku_s3_storage: :environment do
|
3
3
|
require 'mobile_workflow/cli'
|
4
4
|
app_name = ENV['APP_NAME']
|
5
|
-
|
6
|
-
|
5
|
+
aws_region = ENV['AWS_REGION'] || 'us-east-1'
|
6
|
+
aws = MobileWorkflow::Cli::AwsBackend.new(app_name: app_name, region: aws_region)
|
7
|
+
heroku = MobileWorkflow::Cli::HerokuBackend.new(app_name: app_name)
|
7
8
|
aws.create
|
8
9
|
aws.create_topic_subscription(heroku.notifications_endpoint)
|
9
10
|
end
|
@@ -1,3 +1,4 @@
|
|
1
1
|
<%- if options[:doorkeeper_oauth] %>
|
2
|
-
|
2
|
+
# You can set the OAuth client ID and client secret in your ENV in order to avoid them being reset each time you reset the database.
|
3
|
+
Doorkeeper::Application.create! name: 'Main App', redirect_uri: 'mww://callback', scopes: 'public', uid: ENV['OAUTH_CLIENT_ID'], secret: ENV['OAUTH_CLIENT_SECRET']
|
3
4
|
<%- 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.
|
4
|
+
version: 0.6.30
|
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-
|
11
|
+
date: 2021-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.1.
|
19
|
+
version: 6.1.3.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.1.
|
26
|
+
version: 6.1.3.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,14 +152,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
152
|
requirements:
|
153
153
|
- - ">="
|
154
154
|
- !ruby/object:Gem::Version
|
155
|
-
version: 2.7.
|
155
|
+
version: 2.7.3
|
156
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
158
|
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubygems_version: 3.1.
|
162
|
+
rubygems_version: 3.1.6
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: A Rails engine to provide API support for Mobile Workflow Apps.
|