mobile_workflow 0.6.10 → 0.6.11

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: c1e72adcc8d3a21ec01476098c7f16fe849c2ab8348f0164fe15ffde1872b156
4
- data.tar.gz: 5c361e5591040d4a5636aa425dbf77ec533cddbad38e150a6f1f94a1fdca360e
3
+ metadata.gz: 1e3e8921b520d2c949e637961bbeb4d13fa324214a4887efe11e235ab820ae51
4
+ data.tar.gz: ddc4c8b0334ab28a4f04151a8ede868719eb7ecaab56926ed76cc0e087a132fe
5
5
  SHA512:
6
- metadata.gz: 5b66dbaa49b726bc92618c6405af04e3cac7476809ffafeda4d7d444ec3275a993fae2c4a4b6c534ecd5569467c3c8fb4402c97a7b96d1238d1f0c5c34190148
7
- data.tar.gz: 67bd8a5575e05e1ec46653b42eadf089a81c05e64ea0c1e6f9702b6e0621e9fd6212e577f13ccbf085a299f53fd1bf288df2db01fd46b2b52d9a748f07aa0518
6
+ metadata.gz: c660ac1590e0d250eeae44209f57c53054411b5d470886cb9317793b059bf5d5d038b3f945e22032e1e3ce83b116885608bf172f7b84ad156795f614e186bd28
7
+ data.tar.gz: f8a008f70970aa378518f93824c8312780098d7983a8e53203ea17730c4b48c7389f5a5b3b8d3cac8c389d46a0ddf50e6f6dc945fbc1276e42bd03bbd3a7e20d
@@ -29,7 +29,7 @@ class <%= controller_class_name %>Controller < ApiController
29
29
  render json: { response: @<%= singular_table_name %> }, status: :created
30
30
  <% end -%>
31
31
  else
32
- head :unprocessable_entity
32
+ render json: { message: @<%= singular_table_name %>.errors.full_messages.to_sentence }, status: :unprocessable_entity
33
33
  end
34
34
  end
35
35
 
@@ -66,7 +66,22 @@ CODE
66
66
  end
67
67
 
68
68
  def format_source
69
- run 'rufo .'
69
+ `rufo .`
70
+ end
71
+
72
+ def generate_dot_env
73
+ admin_user = 'admin'
74
+ admin_password = SecureRandom.base64(12)
75
+
76
+ file '.env', <<-CODE
77
+ ADMIN_USER=#{admin_user}
78
+ ADMIN_PASSWORD=#{admin_password}
79
+ CODE
80
+ end
81
+
82
+ def git_commit(message = 'Initial commit')
83
+ git add: "."
84
+ git commit: %Q{ -m '#{message}'}
70
85
  end
71
86
 
72
87
  def s3_backend(region)
@@ -40,10 +40,8 @@ module MobileWorkflow::Cli
40
40
  build :migrate_db
41
41
  build :administrate_generator
42
42
  build :format_source
43
-
44
- generate_dot_env
45
- initial_git_commit
46
-
43
+ build :generate_dot_env
44
+ build :git_commit
47
45
  build :heroku if options[:heroku]
48
46
  build :dokku, options[:dokku_host] if options[:dokku]
49
47
  build :s3_backend, options[:aws_region] if options[:s3_storage]
@@ -56,22 +54,5 @@ module MobileWorkflow::Cli
56
54
  ::MobileWorkflow::Cli::AppBuilder
57
55
  end
58
56
 
59
- # Todo: MBS - move these methods to the builder class
60
- # Ideally override RailsBuilder methods
61
- private
62
- def initial_git_commit
63
- git add: "."
64
- git commit: %Q{ -m 'Initial commit' }
65
- end
66
-
67
- def generate_dot_env
68
- admin_user = 'admin'
69
- admin_password = SecureRandom.base64(12)
70
-
71
- file '.env', <<-CODE
72
- ADMIN_USER=#{admin_user}
73
- ADMIN_PASSWORD=#{admin_password}
74
- CODE
75
- end
76
57
  end
77
58
  end
@@ -1,5 +1,5 @@
1
1
  module MobileWorkflow
2
- VERSION = '0.6.10'
2
+ VERSION = '0.6.11'
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.10
4
+ version: 0.6.11
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-02-01 00:00:00.000000000 Z
11
+ date: 2021-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails