firetail 0.0.1.pre.alpha → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +11 -0
- data/.gitignore +13 -13
- data/Gemfile +1 -1
- data/Gemfile.lock +8 -6
- data/README.md +24 -10
- data/examples/rails/.gitattributes +8 -0
- data/examples/rails/.gitignore +31 -0
- data/examples/rails/.rspec +1 -0
- data/examples/rails/.ruby-version +1 -0
- data/examples/rails/Gemfile +44 -0
- data/examples/rails/Gemfile.lock +240 -0
- data/examples/rails/README.md +24 -0
- data/examples/rails/Rakefile +6 -0
- data/examples/rails/app/channels/application_cable/channel.rb +4 -0
- data/examples/rails/app/channels/application_cable/connection.rb +4 -0
- data/examples/rails/app/controllers/application_controller.rb +2 -0
- data/examples/rails/app/controllers/comments_controller.rb +52 -0
- data/examples/rails/app/controllers/concerns/.keep +0 -0
- data/examples/rails/app/controllers/posts_controller.rb +51 -0
- data/examples/rails/app/jobs/application_job.rb +7 -0
- data/examples/rails/app/mailers/application_mailer.rb +4 -0
- data/examples/rails/app/models/application_record.rb +3 -0
- data/examples/rails/app/models/comment.rb +4 -0
- data/examples/rails/app/models/concerns/.keep +0 -0
- data/examples/rails/app/models/post.rb +5 -0
- data/examples/rails/app/views/layouts/mailer.html.erb +13 -0
- data/examples/rails/app/views/layouts/mailer.text.erb +1 -0
- data/examples/rails/bin/bundle +114 -0
- data/examples/rails/bin/rails +5 -0
- data/examples/rails/bin/rake +5 -0
- data/examples/rails/bin/setup +33 -0
- data/examples/rails/bin/spring +14 -0
- data/examples/rails/config/application.rb +41 -0
- data/examples/rails/config/boot.rb +4 -0
- data/examples/rails/config/cable.yml +10 -0
- data/examples/rails/config/credentials.yml.enc +1 -0
- data/examples/rails/config/database.yml +25 -0
- data/examples/rails/config/environment.rb +5 -0
- data/examples/rails/config/environments/development.rb +66 -0
- data/examples/rails/config/environments/production.rb +113 -0
- data/examples/rails/config/environments/test.rb +60 -0
- data/examples/rails/config/firetail.yml +2 -0
- data/examples/rails/config/initializers/application_controller_renderer.rb +8 -0
- data/examples/rails/config/initializers/backtrace_silencers.rb +8 -0
- data/examples/rails/config/initializers/cors.rb +16 -0
- data/examples/rails/config/initializers/filter_parameter_logging.rb +6 -0
- data/examples/rails/config/initializers/inflections.rb +16 -0
- data/examples/rails/config/initializers/mime_types.rb +4 -0
- data/examples/rails/config/initializers/wrap_parameters.rb +14 -0
- data/examples/rails/config/locales/en.yml +33 -0
- data/examples/rails/config/puma.rb +43 -0
- data/examples/rails/config/routes.rb +6 -0
- data/examples/rails/config/schema.json +431 -0
- data/examples/rails/config/spring.rb +6 -0
- data/examples/rails/config/storage.yml +34 -0
- data/examples/rails/config.ru +6 -0
- data/examples/rails/db/migrate/20230730163722_create_posts.rb +8 -0
- data/examples/rails/db/migrate/20230730163741_create_comments.rb +9 -0
- data/examples/rails/db/migrate/20230730164121_add_fields_to_post.rb +6 -0
- data/examples/rails/db/migrate/20230730164214_add_fields_to_comments.rb +6 -0
- data/examples/rails/db/schema.rb +30 -0
- data/examples/rails/db/seeds.rb +7 -0
- data/examples/rails/lib/tasks/.keep +0 -0
- data/examples/rails/log/.keep +0 -0
- data/examples/rails/public/robots.txt +1 -0
- data/examples/rails/spec/models/comment_spec.rb +5 -0
- data/examples/rails/spec/models/post_spec.rb +5 -0
- data/examples/rails/spec/rails_helper.rb +63 -0
- data/examples/rails/spec/requests/comments_spec.rb +127 -0
- data/examples/rails/spec/requests/posts_spec.rb +127 -0
- data/examples/rails/spec/routing/comments_routing_spec.rb +30 -0
- data/examples/rails/spec/routing/posts_routing_spec.rb +30 -0
- data/examples/rails/spec/spec_helper.rb +94 -0
- data/examples/rails/storage/.keep +0 -0
- data/examples/rails/test/channels/application_cable/connection_test.rb +11 -0
- data/examples/rails/test/controllers/.keep +0 -0
- data/examples/rails/test/fixtures/files/.keep +0 -0
- data/examples/rails/test/integration/.keep +0 -0
- data/examples/rails/test/mailers/.keep +0 -0
- data/examples/rails/test/models/.keep +0 -0
- data/examples/rails/test/test_helper.rb +13 -0
- data/examples/rails/tmp/.keep +0 -0
- data/examples/rails/tmp/pids/.keep +0 -0
- data/examples/rails/vendor/.keep +0 -0
- data/firetail.gemspec +1 -1
- data/lib/backend.rb +0 -3
- data/lib/firetail/version.rb +1 -1
- data/lib/firetail.rb +2 -5
- data/lib/generators/firetail/install/templates/firetail.yml +2 -2
- data/lib/railtie.rb +3 -4
- metadata +90 -10
@@ -0,0 +1,33 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
+
# the default I18n backend:
|
21
|
+
#
|
22
|
+
# true, false, on, off, yes, no
|
23
|
+
#
|
24
|
+
# Instead, surround them with single quotes.
|
25
|
+
#
|
26
|
+
# en:
|
27
|
+
# 'true': 'foo'
|
28
|
+
#
|
29
|
+
# To learn more, please read the Rails Internationalization guide
|
30
|
+
# available at https://guides.rubyonrails.org/i18n.html.
|
31
|
+
|
32
|
+
en:
|
33
|
+
hello: "Hello world"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Puma can serve each request in a thread from an internal thread pool.
|
2
|
+
# The `threads` method setting takes two numbers: a minimum and maximum.
|
3
|
+
# Any libraries that use thread pools should be configured to match
|
4
|
+
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
|
+
# and maximum; this matches the default thread size of Active Record.
|
6
|
+
#
|
7
|
+
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
8
|
+
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
9
|
+
threads min_threads_count, max_threads_count
|
10
|
+
|
11
|
+
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
12
|
+
# terminating a worker in development environments.
|
13
|
+
#
|
14
|
+
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
15
|
+
|
16
|
+
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
17
|
+
#
|
18
|
+
port ENV.fetch("PORT") { 3000 }
|
19
|
+
|
20
|
+
# Specifies the `environment` that Puma will run in.
|
21
|
+
#
|
22
|
+
environment ENV.fetch("RAILS_ENV") { "development" }
|
23
|
+
|
24
|
+
# Specifies the `pidfile` that Puma will use.
|
25
|
+
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
26
|
+
|
27
|
+
# Specifies the number of `workers` to boot in clustered mode.
|
28
|
+
# Workers are forked web server processes. If using threads and workers together
|
29
|
+
# the concurrency of the application would be max `threads` * `workers`.
|
30
|
+
# Workers do not work on JRuby or Windows (both of which do not support
|
31
|
+
# processes).
|
32
|
+
#
|
33
|
+
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
34
|
+
|
35
|
+
# Use the `preload_app!` method when specifying a `workers` number.
|
36
|
+
# This directive tells Puma to first boot the application and load code
|
37
|
+
# before forking the application. This takes advantage of Copy On Write
|
38
|
+
# process behavior so workers use less memory.
|
39
|
+
#
|
40
|
+
# preload_app!
|
41
|
+
|
42
|
+
# Allow puma to be restarted by `rails restart` command.
|
43
|
+
plugin :tmp_restart
|
@@ -0,0 +1,431 @@
|
|
1
|
+
{
|
2
|
+
"openapi": "3.0.0",
|
3
|
+
"info": {
|
4
|
+
"title": "api-test",
|
5
|
+
"version": "1.0"
|
6
|
+
},
|
7
|
+
"servers": [
|
8
|
+
{
|
9
|
+
"url": "http://localhost:3000",
|
10
|
+
"description": "dev"
|
11
|
+
}
|
12
|
+
],
|
13
|
+
"paths": {
|
14
|
+
"/posts": {
|
15
|
+
"get": {
|
16
|
+
"summary": "Returns all posts",
|
17
|
+
"operationId": "findPosts",
|
18
|
+
"responses": {
|
19
|
+
"200": {
|
20
|
+
"description": "correct response",
|
21
|
+
"content": {
|
22
|
+
"application/json": {
|
23
|
+
"schema": {
|
24
|
+
"type": "array",
|
25
|
+
"properties": {
|
26
|
+
"title": {
|
27
|
+
"type": "string"
|
28
|
+
},
|
29
|
+
"content": {
|
30
|
+
"type": "string"
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"post": {
|
40
|
+
"requestBody": {
|
41
|
+
"content": {
|
42
|
+
"application/json": {
|
43
|
+
"schema": {
|
44
|
+
"$ref": "#/components/schemas/NewPost"
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
},
|
49
|
+
"responses": {
|
50
|
+
"200": {
|
51
|
+
"description": "correct response",
|
52
|
+
"content": {
|
53
|
+
"application/json": {
|
54
|
+
"schema": {
|
55
|
+
"$ref": "#/components/schemas/Post"
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"/posts/{id}" : {
|
64
|
+
"get": {
|
65
|
+
"summary": "Returns a post by ID",
|
66
|
+
"description": "Returns a post based on a single ID",
|
67
|
+
"operationId": "findPostByID",
|
68
|
+
"parameters": [
|
69
|
+
{
|
70
|
+
"name": "id",
|
71
|
+
"in": "path",
|
72
|
+
"description": "ID of post to fetch",
|
73
|
+
"required": true,
|
74
|
+
"schema": {
|
75
|
+
"type": "integer",
|
76
|
+
"format": "int64"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
],
|
80
|
+
"responses": {
|
81
|
+
"200": {
|
82
|
+
"description": "post response",
|
83
|
+
"content": {
|
84
|
+
"application/json": {
|
85
|
+
"schema": {
|
86
|
+
"$ref": "#/components/schemas/Post"
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
},
|
91
|
+
"default": {
|
92
|
+
"description": "unexpected error",
|
93
|
+
"content": {
|
94
|
+
"application/json": {
|
95
|
+
"schema": {
|
96
|
+
"$ref": "#/components/schemas/Error"
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
},
|
103
|
+
"delete": {
|
104
|
+
"summary": "Deletes a post by ID",
|
105
|
+
"description": "deletes a single post based on the ID supplied",
|
106
|
+
"operationId": "deletePost",
|
107
|
+
"parameters": [
|
108
|
+
{
|
109
|
+
"name": "id",
|
110
|
+
"in": "path",
|
111
|
+
"description": "ID of post to delete",
|
112
|
+
"required": true,
|
113
|
+
"schema": {
|
114
|
+
"type": "integer",
|
115
|
+
"format": "int64"
|
116
|
+
}
|
117
|
+
}
|
118
|
+
],
|
119
|
+
"responses": {
|
120
|
+
"204": {
|
121
|
+
"description": "post deleted"
|
122
|
+
},
|
123
|
+
"default": {
|
124
|
+
"description": "unexpected error",
|
125
|
+
"content": {
|
126
|
+
"application/json": {
|
127
|
+
"schema": {
|
128
|
+
"$ref": "#/components/schemas/Error"
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
},
|
136
|
+
"/posts/{postId}/comments" : {
|
137
|
+
"get": {
|
138
|
+
"summary": "Returns a list of comments for the post",
|
139
|
+
"description": "Returns comments for a post",
|
140
|
+
"operationId": "findCommentsByPostId",
|
141
|
+
"parameters": [
|
142
|
+
{
|
143
|
+
"name": "postId",
|
144
|
+
"in": "path",
|
145
|
+
"description": "comments by postId",
|
146
|
+
"required": true,
|
147
|
+
"schema": {
|
148
|
+
"type": "integer",
|
149
|
+
"format": "int64"
|
150
|
+
}
|
151
|
+
}
|
152
|
+
],
|
153
|
+
"responses": {
|
154
|
+
"200": {
|
155
|
+
"description": "comments response",
|
156
|
+
"content": {
|
157
|
+
"application/json": {
|
158
|
+
"schema": {
|
159
|
+
"type": "array",
|
160
|
+
"nullable": true,
|
161
|
+
"items": {
|
162
|
+
"$ref": "#/components/schemas/NamedComment"
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
167
|
+
},
|
168
|
+
"default": {
|
169
|
+
"description": "unexpected error",
|
170
|
+
"content": {
|
171
|
+
"application/json": {
|
172
|
+
"schema": {
|
173
|
+
"$ref": "#/components/schemas/Error"
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
},
|
180
|
+
"post": {
|
181
|
+
"requestBody": {
|
182
|
+
"content": {
|
183
|
+
"application/json": {
|
184
|
+
"schema": {
|
185
|
+
"$ref": "#/components/schemas/NewComment"
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
},
|
190
|
+
"responses": {
|
191
|
+
"200": {
|
192
|
+
"description": "correct response",
|
193
|
+
"content": {
|
194
|
+
"application/json": {
|
195
|
+
"schema": {
|
196
|
+
"$ref": "#/components/schemas/Comment"
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}
|
201
|
+
},
|
202
|
+
"security": ["MySecurityMechanism"]
|
203
|
+
}
|
204
|
+
},
|
205
|
+
"/posts/{postId}/comments/{id}" : {
|
206
|
+
"get": {
|
207
|
+
"summary": "Returns a list of comments for the post",
|
208
|
+
"description": "Returns comments for a post",
|
209
|
+
"operationId": "findCommentsByPostId",
|
210
|
+
"parameters": [
|
211
|
+
{
|
212
|
+
"name": "postId",
|
213
|
+
"in": "path",
|
214
|
+
"description": "comments by postId",
|
215
|
+
"required": true,
|
216
|
+
"schema": {
|
217
|
+
"type": "integer",
|
218
|
+
"format": "int64"
|
219
|
+
}
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"name": "id",
|
223
|
+
"in": "path",
|
224
|
+
"description": "comments by id",
|
225
|
+
"required": true,
|
226
|
+
"schema": {
|
227
|
+
"type": "integer",
|
228
|
+
"format": "int64"
|
229
|
+
}
|
230
|
+
}
|
231
|
+
],
|
232
|
+
"responses": {
|
233
|
+
"200": {
|
234
|
+
"description": "comments response",
|
235
|
+
"content": {
|
236
|
+
"application/json": {
|
237
|
+
"schema": {
|
238
|
+
"type": "array",
|
239
|
+
"nullable": true,
|
240
|
+
"items": {
|
241
|
+
"$ref": "#/components/schemas/NamedComment"
|
242
|
+
}
|
243
|
+
}
|
244
|
+
}
|
245
|
+
}
|
246
|
+
},
|
247
|
+
"default": {
|
248
|
+
"description": "unexpected error",
|
249
|
+
"content": {
|
250
|
+
"application/json": {
|
251
|
+
"schema": {
|
252
|
+
"$ref": "#/components/schemas/Error"
|
253
|
+
}
|
254
|
+
}
|
255
|
+
}
|
256
|
+
}
|
257
|
+
}
|
258
|
+
},
|
259
|
+
"delete": {
|
260
|
+
"summary": "Deletes a comment of a post by ID",
|
261
|
+
"description": "deletes a single post based on the ID supplied",
|
262
|
+
"operationId": "deletePost",
|
263
|
+
"parameters": [
|
264
|
+
{
|
265
|
+
"name": "postId",
|
266
|
+
"in": "path",
|
267
|
+
"description": "ID of post",
|
268
|
+
"required": true,
|
269
|
+
"schema": {
|
270
|
+
"type": "integer",
|
271
|
+
"format": "int64"
|
272
|
+
}
|
273
|
+
},
|
274
|
+
{
|
275
|
+
"name": "id",
|
276
|
+
"in": "path",
|
277
|
+
"description": "ID of comment to delete",
|
278
|
+
"required": true,
|
279
|
+
"schema": {
|
280
|
+
"type": "integer",
|
281
|
+
"format": "int64"
|
282
|
+
}
|
283
|
+
}
|
284
|
+
],
|
285
|
+
"responses": {
|
286
|
+
"204": {
|
287
|
+
"description": "comment deleted"
|
288
|
+
},
|
289
|
+
"default": {
|
290
|
+
"description": "unexpected error",
|
291
|
+
"content": {
|
292
|
+
"application/json": {
|
293
|
+
"schema": {
|
294
|
+
"$ref": "#/components/schemas/Error"
|
295
|
+
}
|
296
|
+
}
|
297
|
+
}
|
298
|
+
}
|
299
|
+
}
|
300
|
+
}
|
301
|
+
}
|
302
|
+
},
|
303
|
+
"components": {
|
304
|
+
"securitySchemes": {
|
305
|
+
"MySecurityMechanism": {
|
306
|
+
"type": "http",
|
307
|
+
"scheme": "bearer",
|
308
|
+
"bearerFormat": "JWT"
|
309
|
+
}
|
310
|
+
},
|
311
|
+
"schemas": {
|
312
|
+
"NewPost": {
|
313
|
+
"type": "object",
|
314
|
+
"required": [
|
315
|
+
"title",
|
316
|
+
"content"
|
317
|
+
],
|
318
|
+
"properties": {
|
319
|
+
"title": {
|
320
|
+
"type": "string",
|
321
|
+
"description": "Title of the post"
|
322
|
+
},
|
323
|
+
"content": {
|
324
|
+
"type": "string",
|
325
|
+
"description": "Content of the post"
|
326
|
+
}
|
327
|
+
}
|
328
|
+
},
|
329
|
+
"Comment": {
|
330
|
+
"allOf": [
|
331
|
+
{
|
332
|
+
"$ref": "#/components/schemas/Comment"
|
333
|
+
},
|
334
|
+
{
|
335
|
+
"required": [
|
336
|
+
"id"
|
337
|
+
],
|
338
|
+
"properties": {
|
339
|
+
"id": {
|
340
|
+
"type": "integer",
|
341
|
+
"format": "int64",
|
342
|
+
"description": "Unique id of the comment"
|
343
|
+
}
|
344
|
+
}
|
345
|
+
}
|
346
|
+
]
|
347
|
+
},
|
348
|
+
"NamedPost": {
|
349
|
+
"required": [
|
350
|
+
"id",
|
351
|
+
"title"
|
352
|
+
],
|
353
|
+
"additionalProperties": false,
|
354
|
+
"properties": {
|
355
|
+
"id": {
|
356
|
+
"type": "integer",
|
357
|
+
"format": "int64",
|
358
|
+
"description": "Unique id of the post"
|
359
|
+
},
|
360
|
+
"title": {
|
361
|
+
"type": "string",
|
362
|
+
"description": "Title of the post"
|
363
|
+
}
|
364
|
+
}
|
365
|
+
},
|
366
|
+
"NamedComment": {
|
367
|
+
"required": [
|
368
|
+
"message"
|
369
|
+
],
|
370
|
+
"additionalProperties": false,
|
371
|
+
"properties": {
|
372
|
+
"postId": {
|
373
|
+
"type": "integer",
|
374
|
+
"format": "int64",
|
375
|
+
"description": "Unique id of the post"
|
376
|
+
},
|
377
|
+
"message": {
|
378
|
+
"type": "string",
|
379
|
+
"description": "comment message"
|
380
|
+
}
|
381
|
+
}
|
382
|
+
},
|
383
|
+
"NewPost": {
|
384
|
+
"type": "object",
|
385
|
+
"required": [
|
386
|
+
"title",
|
387
|
+
"content"
|
388
|
+
],
|
389
|
+
"properties": {
|
390
|
+
"title": {
|
391
|
+
"type": "string",
|
392
|
+
"description": "Title of the post"
|
393
|
+
},
|
394
|
+
"content": {
|
395
|
+
"type": "string",
|
396
|
+
"description": "Content of the post"
|
397
|
+
}
|
398
|
+
}
|
399
|
+
},
|
400
|
+
"NewComment": {
|
401
|
+
"type": "object",
|
402
|
+
"required": [
|
403
|
+
"message"
|
404
|
+
],
|
405
|
+
"properties": {
|
406
|
+
"message": {
|
407
|
+
"type": "string",
|
408
|
+
"description": "Comment message"
|
409
|
+
}
|
410
|
+
}
|
411
|
+
},
|
412
|
+
"Error": {
|
413
|
+
"required": [
|
414
|
+
"code",
|
415
|
+
"message"
|
416
|
+
],
|
417
|
+
"properties": {
|
418
|
+
"code": {
|
419
|
+
"type": "integer",
|
420
|
+
"format": "int32",
|
421
|
+
"description": "Error code"
|
422
|
+
},
|
423
|
+
"message": {
|
424
|
+
"type": "string",
|
425
|
+
"description": "Error message"
|
426
|
+
}
|
427
|
+
}
|
428
|
+
}
|
429
|
+
}
|
430
|
+
}
|
431
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
test:
|
2
|
+
service: Disk
|
3
|
+
root: <%= Rails.root.join("tmp/storage") %>
|
4
|
+
|
5
|
+
local:
|
6
|
+
service: Disk
|
7
|
+
root: <%= Rails.root.join("storage") %>
|
8
|
+
|
9
|
+
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
10
|
+
# amazon:
|
11
|
+
# service: S3
|
12
|
+
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
13
|
+
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
14
|
+
# region: us-east-1
|
15
|
+
# bucket: your_own_bucket
|
16
|
+
|
17
|
+
# Remember not to checkin your GCS keyfile to a repository
|
18
|
+
# google:
|
19
|
+
# service: GCS
|
20
|
+
# project: your_project
|
21
|
+
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
22
|
+
# bucket: your_own_bucket
|
23
|
+
|
24
|
+
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
25
|
+
# microsoft:
|
26
|
+
# service: AzureStorage
|
27
|
+
# storage_account_name: your_account_name
|
28
|
+
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
29
|
+
# container: your_container_name
|
30
|
+
|
31
|
+
# mirror:
|
32
|
+
# service: Mirror
|
33
|
+
# primary: local
|
34
|
+
# mirrors: [ amazon, google, microsoft ]
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
+
#
|
5
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
|
+
# be faster and is potentially less error prone than running all of your
|
8
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
+
# migrations use external dependencies or application code.
|
10
|
+
#
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
12
|
+
|
13
|
+
ActiveRecord::Schema.define(version: 2023_07_30_164214) do
|
14
|
+
|
15
|
+
create_table "comments", force: :cascade do |t|
|
16
|
+
t.text "message"
|
17
|
+
t.datetime "created_at", precision: 6, null: false
|
18
|
+
t.datetime "updated_at", precision: 6, null: false
|
19
|
+
t.text "comment"
|
20
|
+
t.integer "post_id"
|
21
|
+
end
|
22
|
+
|
23
|
+
create_table "posts", force: :cascade do |t|
|
24
|
+
t.datetime "created_at", precision: 6, null: false
|
25
|
+
t.datetime "updated_at", precision: 6, null: false
|
26
|
+
t.string "title"
|
27
|
+
t.text "content"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
|
3
|
+
#
|
4
|
+
# Examples:
|
5
|
+
#
|
6
|
+
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
7
|
+
# Character.create(name: 'Luke', movie: movies.first)
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|