hoc_utils 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: c8650f7155297da8455a5e24e932427e30e3428d
4
- data.tar.gz: 03831ff39011311f3cd17b9326e75a66ce1d6aa0
3
+ metadata.gz: 87eb7f4c4ca68489d15d90736c12b64bec0a44f9
4
+ data.tar.gz: 064286e1a33f6782a00ebcda3c859ac090d4d001
5
5
  SHA512:
6
- metadata.gz: 9d49f0041f8a15a734bd6c80ead43149e0abbd16e0a91e9d5180c8b76712cdb4b370bf4e086609db0abab9a8bfb2e2dc62201f584e35a051934d15bef3a8e88c
7
- data.tar.gz: 2757644d1748d88a8b8a53ecc4af1d24f06edf5d0da4eace21b59ecbf612ea5ae6214dbe4db213e64a960432dd1a442b810a1e2f8a5ef896fbdf08ea9ce5e3ff
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 '<%= singular_table_name.camelize %>'
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'
@@ -1,3 +1,3 @@
1
1
  module HocUtils
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoc_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gert Lavsen