mobile_workflow 0.6.30 → 0.6.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d031a1ce30dbdd14233f828a7cb3d8a6c651230bccd2d18de76f9a7277dc494b
4
- data.tar.gz: ef7c6fc5b5f030862460275073754f2643e83968222e3a34c29afa3c3cf3a204
3
+ metadata.gz: 37eb1d708549f31b01aca9e6cb6c68b2e0778f647c326c6f2ed54e55f64c58c0
4
+ data.tar.gz: 5b23a0cd92a3b8c3a9931651c9eb37322fdd693f44700aac1da684764fc8b5ef
5
5
  SHA512:
6
- metadata.gz: 8ca94e68e33f15522bcefd2d4d74cd648ac489894eae679cf886085208caf31e5d99c9923ed6d8404500246a89d05f3ec9f648e0cf2f43bdf8d60e09d6083930
7
- data.tar.gz: f28e43e1ebc48dfb63f2b52efba43a91e391c2da5a40ec115e5016b7b250081e10bea92737ffa5df579949b1ad772c4ecfd70f598b064229e3b2e45c5bac0bb9
6
+ metadata.gz: 1c345303b25a33807e58ca50e4ea1cea90853c896361f90b492f80d55306e45552fea574a28b0e548f1318e225519e478d3bb102e8a5f36d06ee773750aacded
7
+ data.tar.gz: 232110a1e208baddf77c246e4d7727cb6fb4f21ae06689e54a2e43be2db2fab0b3e48a99a25bf64a9759e1b904584b707d6bf2e0c134da616459dee6b8c0e3b6
data/README.md CHANGED
@@ -4,6 +4,11 @@ Short description and motivation.
4
4
  ## Usage
5
5
  How to use my plugin.
6
6
 
7
+ ## Uploads Design
8
+ This gem includes an engine to add and process S3 attachments. The design is as follows:
9
+
10
+ ![Uploads Design](https://github.com/FutureWorkshops/mobile_workflow/blob/master/uploads_design.png?raw=true)
11
+
7
12
  ## Installation
8
13
  Add this line to your application's Gemfile:
9
14
 
@@ -110,12 +110,12 @@ module MobileWorkflow
110
110
  { id: id, text: text, type: :smallSection }
111
111
  end
112
112
 
113
- def mw_grid_item(id: self.id, text:, image_attachment: nil)
113
+ def mw_grid_item(id: self.id, text:, image_attachment: nil, options: { resize_to_fill: [1560, 877.5] })
114
114
  raise 'Missing id' if id.nil?
115
115
  raise 'Missing text' if text.nil?
116
116
 
117
117
  item = { id: id, text: text, type: :item }
118
- item[:imageURL] = preview_url(image_attachment, options: { resize_to_fill: [1224, 760] }) if image_attachment
118
+ item[:imageURL] = preview_url(image_attachment, options: options) if image_attachment
119
119
  item
120
120
  end
121
121
 
@@ -35,7 +35,7 @@ module MobileWorkflow
35
35
  migration_template "create_users.rb", "db/migrate/create_users.rb"
36
36
 
37
37
  generate 'doorkeeper:install'
38
- gsub_file 'config/initializers/doorkeeper.rb', 'raise "Please configure doorkeeper resource_owner_authenticator block located in #{__FILE__}"', 'User.find_by_id(session[:user_id]) || redirect_to(new_session_url(return_to: request.fullpath))'
38
+ gsub_file 'config/initializers/doorkeeper.rb', 'raise "Please configure doorkeeper resource_owner_authenticator block located in #{__FILE__}"', 'User.find_by_id(session.delete(:user_id)) || redirect_to(new_session_url(return_to: request.fullpath))'
39
39
  generate 'doorkeeper:migration'
40
40
  generate 'doorkeeper:pkce'
41
41
  template("user.rb.erb", "app/models/user.rb")
@@ -1 +1 @@
1
- web: bundle exec rackup config.ru -p $PORT
1
+ web: bin/rails s -p $PORT
@@ -6,15 +6,10 @@ class SessionsController < ApplicationController
6
6
  @user = User.find_by("LOWER(email)= ?", params[:email].downcase)
7
7
  if @user && @user.authenticate(params[:password])
8
8
  session[:user_id] = @user.id
9
- redirect_to params[:return_to] || root_url, notice: "Logged in!"
9
+ redirect_to params[:return_to] || root_url
10
10
  else
11
11
  flash[:warning] = "You have entered incorrect email and/or password."
12
12
  render :new
13
13
  end
14
14
  end
15
-
16
- def destroy
17
- session.delete(:user_id)
18
- redirect_to root_path
19
- end
20
15
  end
@@ -44,15 +44,18 @@ def env_set(path)
44
44
  File.write(app_json_path, app_json.to_json)
45
45
  end
46
46
 
47
- namespace :env_set do
48
- desc 'Update Android app.json to use new env'
49
- task :android do
50
- env_set(File.join('app', 'src', 'main', 'res', 'raw', 'app.json'))
51
- end
47
+ namespace :mw do
48
+ namespace :set_env do
49
+ desc 'Update Android app.json to use new env'
50
+ task :android do
51
+ env_set(File.join('app', 'src', 'main', 'res', 'raw', 'app.json'))
52
+ end
52
53
 
53
- desc 'Update iOS app.json to use new env'
54
- task :ios do
55
- project_name = ENV["PROJECT_NAME"]
56
- env_set(File.join(project_name, project_name, "Resources", "app.json"))
57
- end
54
+ desc 'Update iOS app.json to use new env'
55
+ task :ios do
56
+ project_name = ENV["PROJECT_NAME"]
57
+ env_set(File.join(project_name, project_name, "Resources", "app.json"))
58
+ end
59
+ end
58
60
  end
61
+
@@ -1,5 +1,5 @@
1
1
  module MobileWorkflow
2
- VERSION = '0.6.30'
2
+ VERSION = '0.6.31'
3
3
  RUBY_VERSION = '2.7.3'
4
4
  RAILS_VERSION = '6.1.3.1'
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.30
4
+ version: 0.6.31
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-06-19 00:00:00.000000000 Z
11
+ date: 2021-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -138,7 +138,7 @@ files:
138
138
  - lib/mobile_workflow/engine.rb
139
139
  - lib/mobile_workflow/open_api_spec/parser.rb
140
140
  - lib/mobile_workflow/railtie.rb
141
- - lib/mobile_workflow/tasks/env_set.rake
141
+ - lib/mobile_workflow/tasks/set_env.rake
142
142
  - lib/mobile_workflow/version.rb
143
143
  homepage: https://github.com/futureworkshops/mobile_workflow
144
144
  licenses: