command_tower 0.3.0

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.
Files changed (112) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +59 -0
  4. data/Rakefile +32 -0
  5. data/app/controllers/command_tower/admin_controller.rb +104 -0
  6. data/app/controllers/command_tower/application_controller.rb +81 -0
  7. data/app/controllers/command_tower/auth/plain_text_controller.rb +132 -0
  8. data/app/controllers/command_tower/inbox/message_blast_controller.rb +89 -0
  9. data/app/controllers/command_tower/inbox/message_controller.rb +79 -0
  10. data/app/controllers/command_tower/user_controller.rb +49 -0
  11. data/app/controllers/command_tower/username_controller.rb +26 -0
  12. data/app/helpers/command_tower/application_helper.rb +4 -0
  13. data/app/helpers/command_tower/schema_helper.rb +29 -0
  14. data/app/jobs/command_tower/application_job.rb +4 -0
  15. data/app/mailers/command_tower/application_mailer.rb +8 -0
  16. data/app/mailers/command_tower/email_verification_mailer.rb +12 -0
  17. data/app/models/command_tower/application_record.rb +45 -0
  18. data/app/models/message.rb +30 -0
  19. data/app/models/message_blast.rb +27 -0
  20. data/app/models/user.rb +61 -0
  21. data/app/models/user_secret.rb +72 -0
  22. data/app/services/command_tower/README.md +49 -0
  23. data/app/services/command_tower/argument_validation/README.md +192 -0
  24. data/app/services/command_tower/argument_validation/class_methods.rb +178 -0
  25. data/app/services/command_tower/argument_validation/instance_methods.rb +148 -0
  26. data/app/services/command_tower/argument_validation.rb +11 -0
  27. data/app/services/command_tower/authorize/validate.rb +49 -0
  28. data/app/services/command_tower/inbox_service/blast/delete.rb +23 -0
  29. data/app/services/command_tower/inbox_service/blast/metadata.rb +26 -0
  30. data/app/services/command_tower/inbox_service/blast/new_user_blaster.rb +24 -0
  31. data/app/services/command_tower/inbox_service/blast/retrieve.rb +30 -0
  32. data/app/services/command_tower/inbox_service/blast/upsert.rb +67 -0
  33. data/app/services/command_tower/inbox_service/message/metadata.rb +35 -0
  34. data/app/services/command_tower/inbox_service/message/modify.rb +44 -0
  35. data/app/services/command_tower/inbox_service/message/retrieve.rb +36 -0
  36. data/app/services/command_tower/inbox_service/message/send.rb +33 -0
  37. data/app/services/command_tower/jwt/authenticate_user.rb +86 -0
  38. data/app/services/command_tower/jwt/decode.rb +21 -0
  39. data/app/services/command_tower/jwt/encode.rb +15 -0
  40. data/app/services/command_tower/jwt/login_create.rb +21 -0
  41. data/app/services/command_tower/jwt/time_delay_token.rb +17 -0
  42. data/app/services/command_tower/login_strategy/plain_text/create.rb +43 -0
  43. data/app/services/command_tower/login_strategy/plain_text/email_verification/generate.rb +29 -0
  44. data/app/services/command_tower/login_strategy/plain_text/email_verification/required.rb +20 -0
  45. data/app/services/command_tower/login_strategy/plain_text/email_verification/send.rb +23 -0
  46. data/app/services/command_tower/login_strategy/plain_text/email_verification/verify.rb +24 -0
  47. data/app/services/command_tower/login_strategy/plain_text/login.rb +50 -0
  48. data/app/services/command_tower/secrets/cleanse.rb +14 -0
  49. data/app/services/command_tower/secrets/generate.rb +62 -0
  50. data/app/services/command_tower/secrets/verify.rb +27 -0
  51. data/app/services/command_tower/secrets.rb +15 -0
  52. data/app/services/command_tower/service_base.rb +89 -0
  53. data/app/services/command_tower/service_logging.rb +41 -0
  54. data/app/services/command_tower/user_attributes/modify.rb +68 -0
  55. data/app/services/command_tower/user_attributes/roles.rb +27 -0
  56. data/app/services/command_tower/username/available.rb +64 -0
  57. data/app/views/command_tower/email_verification_mailer/verify_email.html.erb +26 -0
  58. data/config/routes.rb +55 -0
  59. data/db/migrate/20241117043720_create_command_tower_users.rb +42 -0
  60. data/db/migrate/20241204065708_create_command_tower_user_secrets.rb +16 -0
  61. data/db/migrate/20250223023306_create_command_tower_messages.rb +12 -0
  62. data/db/migrate/20250223023313_create_command_tower_message_blasts.rb +14 -0
  63. data/lib/command_tower/authorization/default.yml +42 -0
  64. data/lib/command_tower/authorization/entity.rb +101 -0
  65. data/lib/command_tower/authorization/role.rb +101 -0
  66. data/lib/command_tower/authorization.rb +85 -0
  67. data/lib/command_tower/configuration/admin/config.rb +18 -0
  68. data/lib/command_tower/configuration/application/config.rb +40 -0
  69. data/lib/command_tower/configuration/authorization/config.rb +24 -0
  70. data/lib/command_tower/configuration/base.rb +11 -0
  71. data/lib/command_tower/configuration/config.rb +77 -0
  72. data/lib/command_tower/configuration/email/config.rb +87 -0
  73. data/lib/command_tower/configuration/jwt/config.rb +22 -0
  74. data/lib/command_tower/configuration/login/config.rb +18 -0
  75. data/lib/command_tower/configuration/login/strategy/plain_text/config.rb +57 -0
  76. data/lib/command_tower/configuration/login/strategy/plain_text/email_verify.rb +50 -0
  77. data/lib/command_tower/configuration/login/strategy/plain_text/lockable.rb +27 -0
  78. data/lib/command_tower/configuration/otp/config.rb +54 -0
  79. data/lib/command_tower/configuration/user/config.rb +56 -0
  80. data/lib/command_tower/configuration/username/check.rb +31 -0
  81. data/lib/command_tower/configuration/username/config.rb +41 -0
  82. data/lib/command_tower/engine.rb +53 -0
  83. data/lib/command_tower/error.rb +5 -0
  84. data/lib/command_tower/schema/admin/users.rb +15 -0
  85. data/lib/command_tower/schema/error/base.rb +15 -0
  86. data/lib/command_tower/schema/error/invalid_argument.rb +15 -0
  87. data/lib/command_tower/schema/error/invalid_argument_response.rb +17 -0
  88. data/lib/command_tower/schema/inbox/blast_request.rb +15 -0
  89. data/lib/command_tower/schema/inbox/blast_response.rb +16 -0
  90. data/lib/command_tower/schema/inbox/message_blast_entity.rb +16 -0
  91. data/lib/command_tower/schema/inbox/message_blast_metadata.rb +16 -0
  92. data/lib/command_tower/schema/inbox/message_entity.rb +14 -0
  93. data/lib/command_tower/schema/inbox/metadata.rb +18 -0
  94. data/lib/command_tower/schema/inbox/modified.rb +13 -0
  95. data/lib/command_tower/schema/page.rb +14 -0
  96. data/lib/command_tower/schema/plain_text/create_user_request.rb +18 -0
  97. data/lib/command_tower/schema/plain_text/create_user_response.rb +17 -0
  98. data/lib/command_tower/schema/plain_text/email_verify_request.rb +11 -0
  99. data/lib/command_tower/schema/plain_text/email_verify_response.rb +11 -0
  100. data/lib/command_tower/schema/plain_text/email_verify_send_request.rb +9 -0
  101. data/lib/command_tower/schema/plain_text/email_verify_send_response.rb +11 -0
  102. data/lib/command_tower/schema/plain_text/login_request.rb +15 -0
  103. data/lib/command_tower/schema/plain_text/login_response.rb +13 -0
  104. data/lib/command_tower/schema/user.rb +28 -0
  105. data/lib/command_tower/schema.rb +38 -0
  106. data/lib/command_tower/spec_helper.rb +19 -0
  107. data/lib/command_tower/version.rb +5 -0
  108. data/lib/command_tower.rb +33 -0
  109. data/lib/generators/api_engine_base/configure/USAGE +8 -0
  110. data/lib/generators/api_engine_base/configure/configure_generator.rb +12 -0
  111. data/lib/tasks/auto_annotate_models.rake +60 -0
  112. metadata +255 -0
metadata ADDED
@@ -0,0 +1,255 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: command_tower
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
5
+ platform: ruby
6
+ authors:
7
+ - matt-taylor
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-03-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rotp
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '7'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: jwt
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bcrypt
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '3'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: interactor
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: class_composer
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '2'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '2'
97
+ - !ruby/object:Gem::Dependency
98
+ name: json_schematize
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0.11'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0.11'
111
+ description: CommandTower is the Base API to handle all the things you don't want
112
+ to for a Rails API only backend serving a Dedicated frontend
113
+ email:
114
+ - ''
115
+ executables: []
116
+ extensions: []
117
+ extra_rdoc_files: []
118
+ files:
119
+ - MIT-LICENSE
120
+ - README.md
121
+ - Rakefile
122
+ - app/controllers/command_tower/admin_controller.rb
123
+ - app/controllers/command_tower/application_controller.rb
124
+ - app/controllers/command_tower/auth/plain_text_controller.rb
125
+ - app/controllers/command_tower/inbox/message_blast_controller.rb
126
+ - app/controllers/command_tower/inbox/message_controller.rb
127
+ - app/controllers/command_tower/user_controller.rb
128
+ - app/controllers/command_tower/username_controller.rb
129
+ - app/helpers/command_tower/application_helper.rb
130
+ - app/helpers/command_tower/schema_helper.rb
131
+ - app/jobs/command_tower/application_job.rb
132
+ - app/mailers/command_tower/application_mailer.rb
133
+ - app/mailers/command_tower/email_verification_mailer.rb
134
+ - app/models/command_tower/application_record.rb
135
+ - app/models/message.rb
136
+ - app/models/message_blast.rb
137
+ - app/models/user.rb
138
+ - app/models/user_secret.rb
139
+ - app/services/command_tower/README.md
140
+ - app/services/command_tower/argument_validation.rb
141
+ - app/services/command_tower/argument_validation/README.md
142
+ - app/services/command_tower/argument_validation/class_methods.rb
143
+ - app/services/command_tower/argument_validation/instance_methods.rb
144
+ - app/services/command_tower/authorize/validate.rb
145
+ - app/services/command_tower/inbox_service/blast/delete.rb
146
+ - app/services/command_tower/inbox_service/blast/metadata.rb
147
+ - app/services/command_tower/inbox_service/blast/new_user_blaster.rb
148
+ - app/services/command_tower/inbox_service/blast/retrieve.rb
149
+ - app/services/command_tower/inbox_service/blast/upsert.rb
150
+ - app/services/command_tower/inbox_service/message/metadata.rb
151
+ - app/services/command_tower/inbox_service/message/modify.rb
152
+ - app/services/command_tower/inbox_service/message/retrieve.rb
153
+ - app/services/command_tower/inbox_service/message/send.rb
154
+ - app/services/command_tower/jwt/authenticate_user.rb
155
+ - app/services/command_tower/jwt/decode.rb
156
+ - app/services/command_tower/jwt/encode.rb
157
+ - app/services/command_tower/jwt/login_create.rb
158
+ - app/services/command_tower/jwt/time_delay_token.rb
159
+ - app/services/command_tower/login_strategy/plain_text/create.rb
160
+ - app/services/command_tower/login_strategy/plain_text/email_verification/generate.rb
161
+ - app/services/command_tower/login_strategy/plain_text/email_verification/required.rb
162
+ - app/services/command_tower/login_strategy/plain_text/email_verification/send.rb
163
+ - app/services/command_tower/login_strategy/plain_text/email_verification/verify.rb
164
+ - app/services/command_tower/login_strategy/plain_text/login.rb
165
+ - app/services/command_tower/secrets.rb
166
+ - app/services/command_tower/secrets/cleanse.rb
167
+ - app/services/command_tower/secrets/generate.rb
168
+ - app/services/command_tower/secrets/verify.rb
169
+ - app/services/command_tower/service_base.rb
170
+ - app/services/command_tower/service_logging.rb
171
+ - app/services/command_tower/user_attributes/modify.rb
172
+ - app/services/command_tower/user_attributes/roles.rb
173
+ - app/services/command_tower/username/available.rb
174
+ - app/views/command_tower/email_verification_mailer/verify_email.html.erb
175
+ - config/routes.rb
176
+ - db/migrate/20241117043720_create_command_tower_users.rb
177
+ - db/migrate/20241204065708_create_command_tower_user_secrets.rb
178
+ - db/migrate/20250223023306_create_command_tower_messages.rb
179
+ - db/migrate/20250223023313_create_command_tower_message_blasts.rb
180
+ - lib/command_tower.rb
181
+ - lib/command_tower/authorization.rb
182
+ - lib/command_tower/authorization/default.yml
183
+ - lib/command_tower/authorization/entity.rb
184
+ - lib/command_tower/authorization/role.rb
185
+ - lib/command_tower/configuration/admin/config.rb
186
+ - lib/command_tower/configuration/application/config.rb
187
+ - lib/command_tower/configuration/authorization/config.rb
188
+ - lib/command_tower/configuration/base.rb
189
+ - lib/command_tower/configuration/config.rb
190
+ - lib/command_tower/configuration/email/config.rb
191
+ - lib/command_tower/configuration/jwt/config.rb
192
+ - lib/command_tower/configuration/login/config.rb
193
+ - lib/command_tower/configuration/login/strategy/plain_text/config.rb
194
+ - lib/command_tower/configuration/login/strategy/plain_text/email_verify.rb
195
+ - lib/command_tower/configuration/login/strategy/plain_text/lockable.rb
196
+ - lib/command_tower/configuration/otp/config.rb
197
+ - lib/command_tower/configuration/user/config.rb
198
+ - lib/command_tower/configuration/username/check.rb
199
+ - lib/command_tower/configuration/username/config.rb
200
+ - lib/command_tower/engine.rb
201
+ - lib/command_tower/error.rb
202
+ - lib/command_tower/schema.rb
203
+ - lib/command_tower/schema/admin/users.rb
204
+ - lib/command_tower/schema/error/base.rb
205
+ - lib/command_tower/schema/error/invalid_argument.rb
206
+ - lib/command_tower/schema/error/invalid_argument_response.rb
207
+ - lib/command_tower/schema/inbox/blast_request.rb
208
+ - lib/command_tower/schema/inbox/blast_response.rb
209
+ - lib/command_tower/schema/inbox/message_blast_entity.rb
210
+ - lib/command_tower/schema/inbox/message_blast_metadata.rb
211
+ - lib/command_tower/schema/inbox/message_entity.rb
212
+ - lib/command_tower/schema/inbox/metadata.rb
213
+ - lib/command_tower/schema/inbox/modified.rb
214
+ - lib/command_tower/schema/page.rb
215
+ - lib/command_tower/schema/plain_text/create_user_request.rb
216
+ - lib/command_tower/schema/plain_text/create_user_response.rb
217
+ - lib/command_tower/schema/plain_text/email_verify_request.rb
218
+ - lib/command_tower/schema/plain_text/email_verify_response.rb
219
+ - lib/command_tower/schema/plain_text/email_verify_send_request.rb
220
+ - lib/command_tower/schema/plain_text/email_verify_send_response.rb
221
+ - lib/command_tower/schema/plain_text/login_request.rb
222
+ - lib/command_tower/schema/plain_text/login_response.rb
223
+ - lib/command_tower/schema/user.rb
224
+ - lib/command_tower/spec_helper.rb
225
+ - lib/command_tower/version.rb
226
+ - lib/generators/api_engine_base/configure/USAGE
227
+ - lib/generators/api_engine_base/configure/configure_generator.rb
228
+ - lib/tasks/auto_annotate_models.rake
229
+ homepage: https://github.com/matt-taylor/command_tower
230
+ licenses:
231
+ - MIT
232
+ metadata:
233
+ homepage_uri: https://github.com/matt-taylor/command_tower
234
+ source_code_uri: https://github.com/matt-taylor/command_tower
235
+ post_install_message:
236
+ rdoc_options: []
237
+ require_paths:
238
+ - lib
239
+ required_ruby_version: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ required_rubygems_version: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - ">="
247
+ - !ruby/object:Gem::Version
248
+ version: '0'
249
+ requirements: []
250
+ rubygems_version: 3.5.9
251
+ signing_key:
252
+ specification_version: 4
253
+ summary: CommandTower is the Base API to handle all the things you don't want to for
254
+ a Rails API only backend serving a Dedicated frontend
255
+ test_files: []