hoc_utils 0.1.2 → 0.1.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87eb7f4c4ca68489d15d90736c12b64bec0a44f9
|
4
|
+
data.tar.gz: 064286e1a33f6782a00ebcda3c859ac090d4d001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 414943208f23b3e11003cc1202e1d80c0ea024bed2d268bfff6d255442d8867434a19cb46115ef70f20f082dd3b1e8029cb4229ac9f5011d5060102127d3d02e
|
7
|
+
data.tar.gz: 0a969e3711cb94ac87719e7c5ae19d9ef183578a843d1677f50c992ec22d209599b8f54889459d1bb44ea881bbca7aa4aa4ad96f46d2fea4ff2026ab55dd90d2
|
@@ -92,8 +92,29 @@ ACTS
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def migrate
|
95
|
+
say "Migrating...", :bold
|
95
96
|
rails_command 'db:migrate'
|
96
97
|
end
|
98
|
+
|
99
|
+
def update_swagger
|
100
|
+
say "Updating swagger documentation...", :bold
|
101
|
+
rails_command 'rswag:specs:swaggerize'
|
102
|
+
end
|
103
|
+
|
104
|
+
def salute
|
105
|
+
msg <<~MSG
|
106
|
+
Generation complete.
|
107
|
+
Next step is to customize the generated code.
|
108
|
+
* Open 'spec/swagger_helper.rb' and change the definitions #{singular_table_name}_input and #{singular_table_name}.
|
109
|
+
* Run 'rails rswag:specs:swaggerize' to update swagger.
|
110
|
+
* Make sure any referenced models are updated with eg. has_many :#{plural_table_name}
|
111
|
+
* Customize the table and form definition in 'app/admin/#{plural_table_name}_admin.rb'
|
112
|
+
* #beAwesome
|
113
|
+
|
114
|
+
MSG
|
115
|
+
say msg, :green, :bold
|
116
|
+
end
|
117
|
+
|
97
118
|
end
|
98
119
|
end
|
99
120
|
end
|
@@ -19,7 +19,7 @@ describe 'House of Code API' do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
post 'creates a profile' do
|
22
|
-
tags '<%=
|
22
|
+
tags '<%= plural_table_name.camelize %>'
|
23
23
|
description 'Creates <%= singular_table_name %> with given input'
|
24
24
|
produces 'application/json'
|
25
25
|
consumes 'application/json'
|
@@ -40,7 +40,7 @@ describe 'House of Code API' do
|
|
40
40
|
|
41
41
|
path '/api/<%= "#{api_version}/#{plural_table_name}" %>/{id}' do
|
42
42
|
get 'Get <%= singular_table_name %>' do
|
43
|
-
tags '<%= plural_table_name %>'
|
43
|
+
tags '<%= plural_table_name.camelize %>'
|
44
44
|
description 'Gets <%= singular_table_name %> with :id'
|
45
45
|
produces 'application/json'
|
46
46
|
consumes 'application/json'
|
@@ -57,7 +57,7 @@ describe 'House of Code API' do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
put 'Update <%= singular_table_name %>' do
|
60
|
-
tags '<%= plural_table_name %>'
|
60
|
+
tags '<%= plural_table_name.camelize %>'
|
61
61
|
description 'Updates <%= singular_table_name %> with :id'
|
62
62
|
produces 'application/json'
|
63
63
|
consumes 'application/json'
|
@@ -74,7 +74,7 @@ describe 'House of Code API' do
|
|
74
74
|
end
|
75
75
|
|
76
76
|
delete 'Delete <%= singular_table_name %> with :id' do
|
77
|
-
tags '<%= plural_table_name %>'
|
77
|
+
tags '<%= plural_table_name.camelize %>'
|
78
78
|
description 'Deletes <%= singular_table_name %> with :id'
|
79
79
|
produces 'application/json'
|
80
80
|
consumes 'application/json'
|
data/lib/hoc_utils/version.rb
CHANGED