mobile_workflow 0.5.1 → 0.5.6
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/controllers/mobile_workflow/sns_notifications_controller.rb +1 -1
- data/lib/generators/mobile_workflow/install/install_generator.rb +1 -1
- data/lib/generators/mobile_workflow/install/templates/Gemfile.erb +2 -1
- data/lib/mobile_workflow/cli/app_builder.rb +19 -0
- data/lib/mobile_workflow/cli/app_server_generator.rb +7 -22
- 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: a2a4d13fe23a8f256052b54fa14424c54d847bb327bf57128159b9dd8ffd334a
|
4
|
+
data.tar.gz: 0aa96388f99ac5f8ae69a1e6a06559c58c9eab58c355f877b259137472a3b176
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f5890bf8381f177530fe3607e5ec4fe276258638f4a28213665c7c2dab5724ed14fb4a9f3ea3027581c41499c4fb995701e4b08138d0d31466f4781aa8f279e
|
7
|
+
data.tar.gz: 7b5c52f4a9b754078eb0c1a70b6213bf5b33f9825f1c67ce0325199b5c2bc1038cde0044b951baccdb6120c7fa2b46546349258c444cca4db7b438a96dbd5b3f
|
@@ -78,7 +78,7 @@ module MobileWorkflow
|
|
78
78
|
|
79
79
|
def read_openapi_spec
|
80
80
|
say "Loading OpenAPI Spec: #{open_api_spec_path}"
|
81
|
-
return JSON.parse(File.read(
|
81
|
+
return JSON.parse(File.read(open_api_spec_path)).with_indifferent_access
|
82
82
|
end
|
83
83
|
|
84
84
|
def open_api_spec_path
|
@@ -11,7 +11,8 @@ gem 'turbolinks', '~> 5'
|
|
11
11
|
|
12
12
|
# Mobile Workflow
|
13
13
|
#gem 'mobile_workflow', path: '../mobile_workflow'
|
14
|
-
gem 'mobile_workflow', github: 'FutureWorkshops/mobile_workflow'
|
14
|
+
#gem 'mobile_workflow', github: 'FutureWorkshops/mobile_workflow'
|
15
|
+
gem 'mobile_workflow', '0.5.5'
|
15
16
|
|
16
17
|
# Authorisation / Authentication
|
17
18
|
<%- if options[:doorkeeper_oauth] %>
|
@@ -16,6 +16,25 @@ module MobileWorkflow::Cli
|
|
16
16
|
def rspec_generator
|
17
17
|
generate 'rspec:install'
|
18
18
|
end
|
19
|
+
|
20
|
+
def administrate_generator
|
21
|
+
Bundler.with_unbundled_env { generate 'administrate:install' }
|
22
|
+
|
23
|
+
file 'app/assets/config/manifest.js', <<-CODE
|
24
|
+
//= link administrate/application.css
|
25
|
+
//= link administrate/application.js
|
26
|
+
CODE
|
27
|
+
|
28
|
+
file 'app/controllers/admin/application_controller.rb', <<-CODE
|
29
|
+
module Admin
|
30
|
+
class ApplicationController < Administrate::ApplicationController
|
31
|
+
http_basic_authenticate_with(name: ENV["ADMIN_USER"], password: ENV["ADMIN_PASSWORD"])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
CODE
|
35
|
+
|
36
|
+
Bundler.with_unbundled_env { generate 'administrate:routes' }
|
37
|
+
end
|
19
38
|
|
20
39
|
def ability_generator
|
21
40
|
copy_file 'ability.rb', 'app/models/ability.rb'
|
@@ -37,7 +37,7 @@ module MobileWorkflow::Cli
|
|
37
37
|
build :active_storage if options[:s3_storage]
|
38
38
|
build :mobile_workflow_generator, ARGV[1]
|
39
39
|
setup_db
|
40
|
-
|
40
|
+
build :administrate_generator
|
41
41
|
|
42
42
|
generate_dot_env
|
43
43
|
initial_git_commit
|
@@ -51,33 +51,18 @@ module MobileWorkflow::Cli
|
|
51
51
|
protected
|
52
52
|
|
53
53
|
def get_builder_class
|
54
|
-
MobileWorkflow::Cli::AppBuilder
|
54
|
+
::MobileWorkflow::Cli::AppBuilder
|
55
55
|
end
|
56
56
|
|
57
57
|
# Todo: MBS - move these methods to the builder class
|
58
58
|
# Ideally override RailsBuilder methods
|
59
59
|
private
|
60
|
-
def generate_administrate
|
61
|
-
generate 'administrate:install'
|
62
|
-
file 'app/assets/config/manifest.js', <<-CODE
|
63
|
-
//= link administrate/application.css
|
64
|
-
//= link administrate/application.js
|
65
|
-
CODE
|
66
|
-
|
67
|
-
file 'app/controllers/admin/application_controller.rb', <<-CODE
|
68
|
-
module Admin
|
69
|
-
class ApplicationController < Administrate::ApplicationController
|
70
|
-
http_basic_authenticate_with(name: ENV["ADMIN_USER"], password: ENV["ADMIN_PASSWORD"])
|
71
|
-
end
|
72
|
-
end
|
73
|
-
CODE
|
74
|
-
generate 'administrate:routes'
|
75
|
-
end
|
76
|
-
|
77
60
|
def setup_db
|
78
|
-
|
79
|
-
|
80
|
-
|
61
|
+
Bundler.with_unbundled_env do
|
62
|
+
rails_command("db:drop")
|
63
|
+
rails_command("db:create")
|
64
|
+
rails_command("db:migrate")
|
65
|
+
end
|
81
66
|
end
|
82
67
|
|
83
68
|
def initial_git_commit
|
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.5.
|
4
|
+
version: 0.5.6
|
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: 2020-12-
|
11
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|