mobile_workflow 0.5.1 → 0.5.2

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: a1d55314927070ee5d1b4498b99b760952214839e146ae0e271bc2ff49a1fce9
4
- data.tar.gz: e666ed9c786f10335e1d30505a4f62059636034821d3e4e2d17d532929bfee93
3
+ metadata.gz: 041f527fb56b89086f71921c2f7042b0874d11f4cb264123d7fc023331cd7c8a
4
+ data.tar.gz: 9cff904cabee6ca078120c19c6ea9f45345dd2f882add3b1aa74142fbc7cd6c6
5
5
  SHA512:
6
- metadata.gz: 80da58aa822183db3273fd34e89b9563040349bc17b60f8817f467f59561e2d7e1684ecaa48b85f88e3993ac7819538fb0515b0aeaddf513727f3f033117b5be
7
- data.tar.gz: 6ad8369700ca16b92de687238fabad59f9bd695c9b8941d85beae13edd38d338a658edc5e5085439c3944d63f855f5ae3078ed4cd17467283dd121b7d4b8e848
6
+ metadata.gz: cf75977ab7da901813bc2ced43dc325c1f1beda300553538c5f352b5537de13fd9047e3c5b483855c42e49070b569c58bf3bfb6501e8fe5bab41f93abed762e5
7
+ data.tar.gz: 3d439a644c645a708b5b1a2ba6cc48be2366fbffa9f021e016e994156b2030367fa586051315a650950cbe70a8b3a01af625d693789971ef39a8b77351df3841
@@ -16,6 +16,23 @@ module MobileWorkflow::Cli
16
16
  def rspec_generator
17
17
  generate 'rspec:install'
18
18
  end
19
+
20
+ def administrate_generator
21
+ rails_command 'generate administrate:install'
22
+ file 'app/assets/config/manifest.js', <<-CODE
23
+ //= link administrate/application.css
24
+ //= link administrate/application.js
25
+ CODE
26
+
27
+ file 'app/controllers/admin/application_controller.rb', <<-CODE
28
+ module Admin
29
+ class ApplicationController < Administrate::ApplicationController
30
+ http_basic_authenticate_with(name: ENV["ADMIN_USER"], password: ENV["ADMIN_PASSWORD"])
31
+ end
32
+ end
33
+ CODE
34
+ generate 'administrate:routes'
35
+ end
19
36
 
20
37
  def ability_generator
21
38
  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
- generate_administrate
40
+ build :administrate_generator
41
41
 
42
42
  generate_dot_env
43
43
  initial_git_commit
@@ -57,23 +57,6 @@ module MobileWorkflow::Cli
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
61
  rails_command "db:drop"
79
62
  rails_command "db:create"
@@ -1,5 +1,5 @@
1
1
  module MobileWorkflow
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  RUBY_VERSION = '2.5.5'
4
4
  RAILS_VERSION = '6.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobile_workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith