active_cached_resource 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (316) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/LICENSE +21 -0
  4. data/lib/active_cached_resource/caching.rb +104 -1
  5. data/lib/active_cached_resource/configuration.rb +22 -1
  6. data/lib/active_cached_resource/logger.rb +14 -0
  7. data/lib/active_cached_resource/model.rb +18 -0
  8. data/lib/active_cached_resource/version.rb +1 -8
  9. metadata +2 -308
  10. data/.rspec +0 -3
  11. data/.rubocop.yml +0 -23
  12. data/.standard.yml +0 -2
  13. data/Rakefile +0 -29
  14. data/example/consumer/.dockerignore +0 -41
  15. data/example/consumer/.gitattributes +0 -9
  16. data/example/consumer/.gitignore +0 -36
  17. data/example/consumer/.kamal/hooks/docker-setup.sample +0 -3
  18. data/example/consumer/.kamal/hooks/post-deploy.sample +0 -14
  19. data/example/consumer/.kamal/hooks/post-proxy-reboot.sample +0 -3
  20. data/example/consumer/.kamal/hooks/pre-build.sample +0 -51
  21. data/example/consumer/.kamal/hooks/pre-connect.sample +0 -47
  22. data/example/consumer/.kamal/hooks/pre-deploy.sample +0 -109
  23. data/example/consumer/.kamal/hooks/pre-proxy-reboot.sample +0 -3
  24. data/example/consumer/.kamal/secrets +0 -17
  25. data/example/consumer/Dockerfile +0 -65
  26. data/example/consumer/Gemfile +0 -17
  27. data/example/consumer/Rakefile +0 -6
  28. data/example/consumer/app/controllers/application_controller.rb +0 -2
  29. data/example/consumer/app/controllers/concerns/.keep +0 -0
  30. data/example/consumer/app/jobs/application_job.rb +0 -7
  31. data/example/consumer/app/mailers/application_mailer.rb +0 -4
  32. data/example/consumer/app/models/application_record.rb +0 -3
  33. data/example/consumer/app/models/concerns/.keep +0 -0
  34. data/example/consumer/app/models/person.rb +0 -9
  35. data/example/consumer/app/views/layouts/mailer.html.erb +0 -13
  36. data/example/consumer/app/views/layouts/mailer.text.erb +0 -1
  37. data/example/consumer/bin/brakeman +0 -7
  38. data/example/consumer/bin/bundle +0 -109
  39. data/example/consumer/bin/dev +0 -2
  40. data/example/consumer/bin/docker-entrypoint +0 -14
  41. data/example/consumer/bin/jobs +0 -6
  42. data/example/consumer/bin/kamal +0 -27
  43. data/example/consumer/bin/rails +0 -4
  44. data/example/consumer/bin/rake +0 -4
  45. data/example/consumer/bin/rubocop +0 -8
  46. data/example/consumer/bin/setup +0 -34
  47. data/example/consumer/bin/thrust +0 -5
  48. data/example/consumer/config/application.rb +0 -20
  49. data/example/consumer/config/boot.rb +0 -3
  50. data/example/consumer/config/cache.yml +0 -16
  51. data/example/consumer/config/credentials.yml.enc +0 -1
  52. data/example/consumer/config/database.yml +0 -14
  53. data/example/consumer/config/deploy.yml +0 -116
  54. data/example/consumer/config/environment.rb +0 -5
  55. data/example/consumer/config/environments/development.rb +0 -64
  56. data/example/consumer/config/environments/production.rb +0 -85
  57. data/example/consumer/config/environments/test.rb +0 -50
  58. data/example/consumer/config/initializers/cors.rb +0 -16
  59. data/example/consumer/config/initializers/filter_parameter_logging.rb +0 -8
  60. data/example/consumer/config/initializers/inflections.rb +0 -16
  61. data/example/consumer/config/locales/en.yml +0 -31
  62. data/example/consumer/config/puma.rb +0 -41
  63. data/example/consumer/config/queue.yml +0 -18
  64. data/example/consumer/config/recurring.yml +0 -10
  65. data/example/consumer/config/routes.rb +0 -10
  66. data/example/consumer/config.ru +0 -6
  67. data/example/consumer/db/cache_schema.rb +0 -14
  68. data/example/consumer/db/queue_schema.rb +0 -129
  69. data/example/consumer/db/seeds.rb +0 -0
  70. data/example/consumer/lib/tasks/.keep +0 -0
  71. data/example/consumer/log/.keep +0 -0
  72. data/example/consumer/public/robots.txt +0 -1
  73. data/example/consumer/script/.keep +0 -0
  74. data/example/consumer/storage/.keep +0 -0
  75. data/example/consumer/tmp/.keep +0 -0
  76. data/example/consumer/tmp/cache/.keep +0 -0
  77. data/example/consumer/tmp/pids/.keep +0 -0
  78. data/example/consumer/tmp/storage/.keep +0 -0
  79. data/example/consumer/vendor/.keep +0 -0
  80. data/example/provider/.dockerignore +0 -41
  81. data/example/provider/.gitattributes +0 -9
  82. data/example/provider/.gitignore +0 -32
  83. data/example/provider/.kamal/hooks/docker-setup.sample +0 -3
  84. data/example/provider/.kamal/hooks/post-deploy.sample +0 -14
  85. data/example/provider/.kamal/hooks/post-proxy-reboot.sample +0 -3
  86. data/example/provider/.kamal/hooks/pre-build.sample +0 -51
  87. data/example/provider/.kamal/hooks/pre-connect.sample +0 -47
  88. data/example/provider/.kamal/hooks/pre-deploy.sample +0 -109
  89. data/example/provider/.kamal/hooks/pre-proxy-reboot.sample +0 -3
  90. data/example/provider/.kamal/secrets +0 -17
  91. data/example/provider/Dockerfile +0 -65
  92. data/example/provider/Gemfile +0 -14
  93. data/example/provider/Rakefile +0 -6
  94. data/example/provider/app/controllers/application_controller.rb +0 -2
  95. data/example/provider/app/controllers/concerns/.keep +0 -0
  96. data/example/provider/app/controllers/people_controller.rb +0 -68
  97. data/example/provider/app/jobs/application_job.rb +0 -7
  98. data/example/provider/app/mailers/application_mailer.rb +0 -4
  99. data/example/provider/app/models/address.rb +0 -3
  100. data/example/provider/app/models/application_record.rb +0 -3
  101. data/example/provider/app/models/company.rb +0 -3
  102. data/example/provider/app/models/concerns/.keep +0 -0
  103. data/example/provider/app/models/person.rb +0 -6
  104. data/example/provider/app/views/layouts/mailer.html.erb +0 -13
  105. data/example/provider/app/views/layouts/mailer.text.erb +0 -1
  106. data/example/provider/bin/brakeman +0 -7
  107. data/example/provider/bin/bundle +0 -109
  108. data/example/provider/bin/dev +0 -2
  109. data/example/provider/bin/docker-entrypoint +0 -14
  110. data/example/provider/bin/jobs +0 -6
  111. data/example/provider/bin/kamal +0 -27
  112. data/example/provider/bin/rails +0 -4
  113. data/example/provider/bin/rake +0 -4
  114. data/example/provider/bin/rubocop +0 -8
  115. data/example/provider/bin/setup +0 -34
  116. data/example/provider/bin/thrust +0 -5
  117. data/example/provider/config/application.rb +0 -44
  118. data/example/provider/config/boot.rb +0 -3
  119. data/example/provider/config/cache.yml +0 -16
  120. data/example/provider/config/credentials.yml.enc +0 -1
  121. data/example/provider/config/database.yml +0 -20
  122. data/example/provider/config/deploy.yml +0 -116
  123. data/example/provider/config/environment.rb +0 -5
  124. data/example/provider/config/environments/development.rb +0 -64
  125. data/example/provider/config/environments/production.rb +0 -85
  126. data/example/provider/config/environments/test.rb +0 -50
  127. data/example/provider/config/initializers/cors.rb +0 -16
  128. data/example/provider/config/initializers/filter_parameter_logging.rb +0 -8
  129. data/example/provider/config/initializers/inflections.rb +0 -16
  130. data/example/provider/config/locales/en.yml +0 -31
  131. data/example/provider/config/puma.rb +0 -41
  132. data/example/provider/config/queue.yml +0 -18
  133. data/example/provider/config/recurring.yml +0 -10
  134. data/example/provider/config/routes.rb +0 -4
  135. data/example/provider/config.ru +0 -6
  136. data/example/provider/db/cache_schema.rb +0 -14
  137. data/example/provider/db/migrate/20241202183937_create_people.rb +0 -11
  138. data/example/provider/db/migrate/20241202183955_create_addresses.rb +0 -13
  139. data/example/provider/db/migrate/20241202184017_create_companies.rb +0 -14
  140. data/example/provider/db/queue_schema.rb +0 -129
  141. data/example/provider/db/schema.rb +0 -47
  142. data/example/provider/db/seeds.rb +0 -18
  143. data/example/provider/lib/tasks/.keep +0 -0
  144. data/example/provider/log/.keep +0 -0
  145. data/example/provider/public/robots.txt +0 -1
  146. data/example/provider/script/.keep +0 -0
  147. data/example/provider/storage/.keep +0 -0
  148. data/example/provider/tmp/.keep +0 -0
  149. data/example/provider/tmp/pids/.keep +0 -0
  150. data/example/provider/tmp/storage/.keep +0 -0
  151. data/example/provider/vendor/.keep +0 -0
  152. data/lib/activeresource/.gitignore +0 -15
  153. data/lib/activeresource/examples/performance.rb +0 -72
  154. data/lib/activeresource/test/abstract_unit.rb +0 -154
  155. data/lib/activeresource/test/cases/active_job_serializer_test.rb +0 -53
  156. data/lib/activeresource/test/cases/association_test.rb +0 -104
  157. data/lib/activeresource/test/cases/associations/builder/belongs_to_test.rb +0 -42
  158. data/lib/activeresource/test/cases/associations/builder/has_many_test.rb +0 -28
  159. data/lib/activeresource/test/cases/associations/builder/has_one_test.rb +0 -28
  160. data/lib/activeresource/test/cases/authorization_test.rb +0 -276
  161. data/lib/activeresource/test/cases/base/custom_methods_test.rb +0 -155
  162. data/lib/activeresource/test/cases/base/equality_test.rb +0 -53
  163. data/lib/activeresource/test/cases/base/load_test.rb +0 -249
  164. data/lib/activeresource/test/cases/base/schema_test.rb +0 -428
  165. data/lib/activeresource/test/cases/base_errors_test.rb +0 -129
  166. data/lib/activeresource/test/cases/base_test.rb +0 -1622
  167. data/lib/activeresource/test/cases/callbacks_test.rb +0 -155
  168. data/lib/activeresource/test/cases/collection_test.rb +0 -196
  169. data/lib/activeresource/test/cases/connection_test.rb +0 -357
  170. data/lib/activeresource/test/cases/finder_test.rb +0 -217
  171. data/lib/activeresource/test/cases/format_test.rb +0 -137
  172. data/lib/activeresource/test/cases/http_mock_test.rb +0 -213
  173. data/lib/activeresource/test/cases/inheritence_test.rb +0 -19
  174. data/lib/activeresource/test/cases/inheriting_hash_test.rb +0 -25
  175. data/lib/activeresource/test/cases/log_subscriber_test.rb +0 -64
  176. data/lib/activeresource/test/cases/reflection_test.rb +0 -65
  177. data/lib/activeresource/test/cases/validations_test.rb +0 -78
  178. data/lib/activeresource/test/fixtures/address.rb +0 -20
  179. data/lib/activeresource/test/fixtures/beast.rb +0 -16
  180. data/lib/activeresource/test/fixtures/comment.rb +0 -5
  181. data/lib/activeresource/test/fixtures/customer.rb +0 -5
  182. data/lib/activeresource/test/fixtures/fixtures.rbi +0 -46
  183. data/lib/activeresource/test/fixtures/inventory.rb +0 -14
  184. data/lib/activeresource/test/fixtures/person.rb +0 -15
  185. data/lib/activeresource/test/fixtures/pet.rb +0 -6
  186. data/lib/activeresource/test/fixtures/post.rb +0 -5
  187. data/lib/activeresource/test/fixtures/product.rb +0 -11
  188. data/lib/activeresource/test/fixtures/project.rb +0 -19
  189. data/lib/activeresource/test/fixtures/proxy.rb +0 -6
  190. data/lib/activeresource/test/fixtures/sound.rb +0 -11
  191. data/lib/activeresource/test/fixtures/street_address.rb +0 -6
  192. data/lib/activeresource/test/fixtures/subscription_plan.rb +0 -7
  193. data/lib/activeresource/test/fixtures/weather.rb +0 -21
  194. data/lib/activeresource/test/setter_trap.rb +0 -28
  195. data/lib/activeresource/test/singleton_test.rb +0 -138
  196. data/lib/activeresource/test/threadsafe_attributes_test.rb +0 -91
  197. data/sorbet/config +0 -6
  198. data/sorbet/rbi/annotations/.gitattributes +0 -1
  199. data/sorbet/rbi/annotations/activemodel.rbi +0 -89
  200. data/sorbet/rbi/annotations/activesupport.rbi +0 -457
  201. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  202. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  203. data/sorbet/rbi/dsl/.gitattributes +0 -1
  204. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -21
  205. data/sorbet/rbi/gems/.gitattributes +0 -1
  206. data/sorbet/rbi/gems/actioncable@8.0.1.rbi +0 -252
  207. data/sorbet/rbi/gems/actionmailbox@8.0.1.rbi +0 -9
  208. data/sorbet/rbi/gems/actionmailer@8.0.1.rbi +0 -9
  209. data/sorbet/rbi/gems/actionpack@8.0.1.rbi +0 -21111
  210. data/sorbet/rbi/gems/actiontext@8.0.1.rbi +0 -9
  211. data/sorbet/rbi/gems/actionview@8.0.1.rbi +0 -16409
  212. data/sorbet/rbi/gems/activejob@8.0.1.rbi +0 -90
  213. data/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi +0 -166
  214. data/sorbet/rbi/gems/activemodel@8.0.1.rbi +0 -6865
  215. data/sorbet/rbi/gems/activerecord@8.0.1.rbi +0 -43277
  216. data/sorbet/rbi/gems/activestorage@8.0.1.rbi +0 -9
  217. data/sorbet/rbi/gems/activesupport@8.0.1.rbi +0 -21426
  218. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  219. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  220. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  221. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +0 -78
  222. data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
  223. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  224. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3607
  225. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  226. data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +0 -11645
  227. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  228. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
  229. data/sorbet/rbi/gems/date@3.4.1.rbi +0 -75
  230. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -1131
  231. data/sorbet/rbi/gems/docile@1.4.1.rbi +0 -377
  232. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  233. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -150
  234. data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
  235. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  236. data/sorbet/rbi/gems/io-console@0.8.0.rbi +0 -9
  237. data/sorbet/rbi/gems/json@2.9.0.rbi +0 -1944
  238. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  239. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +0 -240
  240. data/sorbet/rbi/gems/logger@1.6.3.rbi +0 -940
  241. data/sorbet/rbi/gems/loofah@2.23.1.rbi +0 -1081
  242. data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
  243. data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
  244. data/sorbet/rbi/gems/method_source@1.1.0.rbi +0 -304
  245. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
  246. data/sorbet/rbi/gems/minitest@5.25.4.rbi +0 -1547
  247. data/sorbet/rbi/gems/mocha@2.7.1.rbi +0 -12
  248. data/sorbet/rbi/gems/msgpack@1.7.5.rbi +0 -320
  249. data/sorbet/rbi/gems/net-imap@0.5.2.rbi +0 -9
  250. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
  251. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
  252. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +0 -9
  253. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  254. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
  255. data/sorbet/rbi/gems/nokogiri@1.17.2.rbi +0 -8201
  256. data/sorbet/rbi/gems/parallel@1.26.3.rbi +0 -291
  257. data/sorbet/rbi/gems/parser@3.3.6.0.rbi +0 -5519
  258. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  259. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1151
  260. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10076
  261. data/sorbet/rbi/gems/psych@5.2.1.rbi +0 -1785
  262. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  263. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +0 -727
  264. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +0 -747
  265. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4905
  266. data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
  267. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +0 -758
  268. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -785
  269. data/sorbet/rbi/gems/rails@8.0.1.rbi +0 -9
  270. data/sorbet/rbi/gems/railties@8.0.1.rbi +0 -6347
  271. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  272. data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3028
  273. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  274. data/sorbet/rbi/gems/rdoc@6.9.1.rbi +0 -12593
  275. data/sorbet/rbi/gems/regexp_parser@2.9.3.rbi +0 -3772
  276. data/sorbet/rbi/gems/reline@0.6.0.rbi +0 -2454
  277. data/sorbet/rbi/gems/rexml@3.4.0.rbi +0 -4871
  278. data/sorbet/rbi/gems/rspec-core@3.13.2.rbi +0 -11284
  279. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +0 -8183
  280. data/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi +0 -5341
  281. data/sorbet/rbi/gems/rspec-support@3.13.2.rbi +0 -1630
  282. data/sorbet/rbi/gems/rspec@3.13.0.rbi +0 -83
  283. data/sorbet/rbi/gems/rubocop-ast@1.37.0.rbi +0 -7713
  284. data/sorbet/rbi/gems/rubocop-md@1.2.4.rbi +0 -123
  285. data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +0 -2613
  286. data/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi +0 -388
  287. data/sorbet/rbi/gems/rubocop-performance@1.23.0.rbi +0 -9
  288. data/sorbet/rbi/gems/rubocop-rails@2.27.0.rbi +0 -9535
  289. data/sorbet/rbi/gems/rubocop@1.69.2.rbi +0 -59600
  290. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  291. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
  292. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +0 -78
  293. data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +0 -225
  294. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  295. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  296. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  297. data/sorbet/rbi/gems/sqlite3@2.3.1.rbi +0 -1824
  298. data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +0 -9
  299. data/sorbet/rbi/gems/standard-performance@1.6.0.rbi +0 -9
  300. data/sorbet/rbi/gems/standard@1.43.0.rbi +0 -926
  301. data/sorbet/rbi/gems/stringio@3.1.2.rbi +0 -9
  302. data/sorbet/rbi/gems/tapioca@0.16.4.rbi +0 -3597
  303. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  304. data/sorbet/rbi/gems/timeout@0.4.2.rbi +0 -151
  305. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  306. data/sorbet/rbi/gems/unicode-display_width@3.1.2.rbi +0 -130
  307. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +0 -251
  308. data/sorbet/rbi/gems/uri@1.0.2.rbi +0 -2377
  309. data/sorbet/rbi/gems/useragent@0.16.11.rbi +0 -9
  310. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +0 -9
  311. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
  312. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  313. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18504
  314. data/sorbet/rbi/gems/zeitwerk@2.7.1.rbi +0 -9
  315. data/sorbet/tapioca/config.yml +0 -13
  316. data/sorbet/tapioca/require.rb +0 -13
@@ -1,4 +0,0 @@
1
- class ApplicationMailer < ActionMailer::Base
2
- default from: "from@example.com"
3
- layout "mailer"
4
- end
@@ -1,3 +0,0 @@
1
- class Address < ApplicationRecord
2
- belongs_to :person
3
- end
@@ -1,3 +0,0 @@
1
- class ApplicationRecord < ActiveRecord::Base
2
- primary_abstract_class
3
- end
@@ -1,3 +0,0 @@
1
- class Company < ApplicationRecord
2
- belongs_to :person
3
- end
File without changes
@@ -1,6 +0,0 @@
1
- class Person < ApplicationRecord
2
- has_many :addresses, dependent: :destroy
3
- has_one :company, dependent: :destroy
4
-
5
- accepts_nested_attributes_for :addresses, :company
6
- end
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <style>
6
- /* Email styles need to be inline */
7
- </style>
8
- </head>
9
-
10
- <body>
11
- <%= yield %>
12
- </body>
13
- </html>
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "rubygems"
3
- require "bundler/setup"
4
-
5
- ARGV.unshift("--ensure-latest")
6
-
7
- load Gem.bin_path("brakeman", "brakeman")
@@ -1,109 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'bundle' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "rubygems"
12
-
13
- m = Module.new do
14
- module_function
15
-
16
- def invoked_as_script?
17
- File.expand_path($0) == File.expand_path(__FILE__)
18
- end
19
-
20
- def env_var_version
21
- ENV["BUNDLER_VERSION"]
22
- end
23
-
24
- def cli_arg_version
25
- return unless invoked_as_script? # don't want to hijack other binstubs
26
- return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
- bundler_version = nil
28
- update_index = nil
29
- ARGV.each_with_index do |a, i|
30
- if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
31
- bundler_version = a
32
- end
33
- next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1
35
- update_index = i
36
- end
37
- bundler_version
38
- end
39
-
40
- def gemfile
41
- gemfile = ENV["BUNDLE_GEMFILE"]
42
- return gemfile if gemfile && !gemfile.empty?
43
-
44
- File.expand_path("../Gemfile", __dir__)
45
- end
46
-
47
- def lockfile
48
- lockfile =
49
- case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
51
- else "#{gemfile}.lock"
52
- end
53
- File.expand_path(lockfile)
54
- end
55
-
56
- def lockfile_version
57
- return unless File.file?(lockfile)
58
- lockfile_contents = File.read(lockfile)
59
- return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
- Regexp.last_match(1)
61
- end
62
-
63
- def bundler_requirement
64
- @bundler_requirement ||=
65
- env_var_version ||
66
- cli_arg_version ||
67
- bundler_requirement_for(lockfile_version)
68
- end
69
-
70
- def bundler_requirement_for(version)
71
- return "#{Gem::Requirement.default}.a" unless version
72
-
73
- bundler_gem_version = Gem::Version.new(version)
74
-
75
- bundler_gem_version.approximate_recommendation
76
- end
77
-
78
- def load_bundler!
79
- ENV["BUNDLE_GEMFILE"] ||= gemfile
80
-
81
- activate_bundler
82
- end
83
-
84
- def activate_bundler
85
- gem_error = activation_error_handling do
86
- gem "bundler", bundler_requirement
87
- end
88
- return if gem_error.nil?
89
- require_error = activation_error_handling do
90
- require "bundler/version"
91
- end
92
- return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
93
- warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
94
- exit 42
95
- end
96
-
97
- def activation_error_handling
98
- yield
99
- nil
100
- rescue StandardError, LoadError => e
101
- e
102
- end
103
- end
104
-
105
- m.load_bundler!
106
-
107
- if m.invoked_as_script?
108
- load Gem.bin_path("bundler", "bundle")
109
- end
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env ruby
2
- exec "./bin/rails", "server", *ARGV
@@ -1,14 +0,0 @@
1
- #!/bin/bash -e
2
-
3
- # Enable jemalloc for reduced memory usage and latency.
4
- if [ -z "${LD_PRELOAD+x}" ]; then
5
- LD_PRELOAD=$(find /usr/lib -name libjemalloc.so.2 -print -quit)
6
- export LD_PRELOAD
7
- fi
8
-
9
- # If running the rails server then create or migrate existing database
10
- if [ "${@: -2:1}" == "./bin/rails" ] && [ "${@: -1:1}" == "server" ]; then
11
- ./bin/rails db:prepare
12
- fi
13
-
14
- exec "${@}"
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative "../config/environment"
4
- require "solid_queue/cli"
5
-
6
- SolidQueue::Cli.start(ARGV)
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'kamal' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
-
13
- bundle_binstub = File.expand_path("bundle", __dir__)
14
-
15
- if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
- load(bundle_binstub)
18
- else
19
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
- end
22
- end
23
-
24
- require "rubygems"
25
- require "bundler/setup"
26
-
27
- load Gem.bin_path("kamal", "kamal")
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path("../config/application", __dir__)
3
- require_relative "../config/boot"
4
- require "rails/commands"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative "../config/boot"
3
- require "rake"
4
- Rake.application.run
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "rubygems"
3
- require "bundler/setup"
4
-
5
- # explicit rubocop config increases performance slightly while avoiding config confusion.
6
- ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
7
-
8
- load Gem.bin_path("rubocop", "rubocop")
@@ -1,34 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "fileutils"
3
-
4
- APP_ROOT = File.expand_path("..", __dir__)
5
-
6
- def system!(*args)
7
- system(*args, exception: true)
8
- end
9
-
10
- FileUtils.chdir APP_ROOT do
11
- # This script is a way to set up or update your development environment automatically.
12
- # This script is idempotent, so that you can run it at any time and get an expectable outcome.
13
- # Add necessary setup steps to this file.
14
-
15
- puts "== Installing dependencies =="
16
- system("bundle check") || system!("bundle install")
17
-
18
- # puts "\n== Copying sample files =="
19
- # unless File.exist?("config/database.yml")
20
- # FileUtils.cp "config/database.yml.sample", "config/database.yml"
21
- # end
22
-
23
- puts "\n== Preparing database =="
24
- system! "bin/rails db:prepare"
25
-
26
- puts "\n== Removing old logs and tempfiles =="
27
- system! "bin/rails log:clear tmp:clear"
28
-
29
- unless ARGV.include?("--skip-server")
30
- puts "\n== Starting development server =="
31
- STDOUT.flush # flush the output before exec(2) so that it displays
32
- exec "bin/dev"
33
- end
34
- end
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "rubygems"
3
- require "bundler/setup"
4
-
5
- load Gem.bin_path("thruster", "thrust")
@@ -1,44 +0,0 @@
1
- require_relative "boot"
2
-
3
- require "rails"
4
- # Pick the frameworks you want:
5
- require "active_model/railtie"
6
- require "active_job/railtie"
7
- require "active_record/railtie"
8
- # require "active_storage/engine"
9
- require "action_controller/railtie"
10
- require "action_mailer/railtie"
11
- # require "action_mailbox/engine"
12
- # require "action_text/engine"
13
- require "action_view/railtie"
14
- # require "action_cable/engine"
15
- # require "rails/test_unit/railtie"
16
-
17
- # Require the gems listed in Gemfile, including any gems
18
- # you've limited to :test, :development, or :production.
19
- Bundler.require(*Rails.groups)
20
-
21
- module Provider
22
- class Application < Rails::Application
23
- # Initialize configuration defaults for originally generated Rails version.
24
- config.load_defaults 8.0
25
-
26
- # Please, add to the `ignore` list any other `lib` subdirectories that do
27
- # not contain `.rb` files, or that should not be reloaded or eager loaded.
28
- # Common ones are `templates`, `generators`, or `middleware`, for example.
29
- config.autoload_lib(ignore: %w[assets tasks])
30
-
31
- # Configuration for the application, engines, and railties goes here.
32
- #
33
- # These settings can be overridden in specific environments using the files
34
- # in config/environments, which are processed later.
35
- #
36
- # config.time_zone = "Central Time (US & Canada)"
37
- # config.eager_load_paths << Rails.root.join("extras")
38
-
39
- # Only loads a smaller set of middleware suitable for API only apps.
40
- # Middleware like session, flash, cookies can be added back manually.
41
- # Skip views, helpers and assets when generating a new resource.
42
- config.api_only = true
43
- end
44
- end
@@ -1,3 +0,0 @@
1
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2
-
3
- require "bundler/setup" # Set up gems listed in the Gemfile.
@@ -1,16 +0,0 @@
1
- default: &default
2
- store_options:
3
- # Cap age of oldest cache entry to fulfill retention policies
4
- # max_age: <%= 60.days.to_i %>
5
- max_size: <%= 256.megabytes %>
6
- namespace: <%= Rails.env %>
7
-
8
- development:
9
- <<: *default
10
-
11
- test:
12
- <<: *default
13
-
14
- production:
15
- database: cache
16
- <<: *default
@@ -1 +0,0 @@
1
- oLf/r/U+4Xw/JBFp8Z985fyzuzpHSmoLclxhjnOu/qCZTH01VcdOSt2YJKyhADvjlMjrhkK/InDPs5AtY3KdGH4xe8WY06m1a6iclC4OPaoKgiNKeGB9XK+G4yec8SBIGE9VHWu6Thb3IT0HFnxVSncoZqgtbOd5kek3w6HQ1nE2hsqNALlt6349SfyIXDTB+7wum8uvkA9cy+YwZat/jTlXxY86mvTYmam4XB6GbeLX2464ZaQv2W+3B08nubVWtKqh+z9ZNTvUQPfy+6iycZVJDDIJVNLNViiuHwFNisUNJrwCr7rUKN+p72c/sWR5rzcSqAfFxhs7HfY90Y0yae6rD6XwT00yrxIz0o9Pz70aZqWpc6/ot5imdEAgOU3ctjPnl5WGV4/oXcfJr7L4Ofg3PaVOoI79klwKEzt4Y0g9i7ualSUIxIRtu6xwdZlhTj69ffEFrb9AGCTuFCNFzIcN45jLduEUxW42O5RD4yJySNLqH4U5R7P4--STxlRDIaEzWJamko--OR6vwoRNehHeH1+fFTHTpQ==
@@ -1,20 +0,0 @@
1
- # SQLite. Versions 3.8.0 and up are supported.
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem "sqlite3"
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
- timeout: 5000
11
- database: storage/db.sqlite3
12
-
13
- development:
14
- <<: *default
15
-
16
- test:
17
- <<: *default
18
-
19
- production:
20
- <<: *default
@@ -1,116 +0,0 @@
1
- # Name of your application. Used to uniquely configure containers.
2
- service: provider
3
-
4
- # Name of the container image.
5
- image: your-user/provider
6
-
7
- # Deploy to these servers.
8
- servers:
9
- web:
10
- - 192.168.0.1
11
- # job:
12
- # hosts:
13
- # - 192.168.0.1
14
- # cmd: bin/jobs
15
-
16
- # Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server.
17
- # Remove this section when using multiple web servers and ensure you terminate SSL at your load balancer.
18
- #
19
- # Note: If using Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption.
20
- proxy:
21
- ssl: true
22
- host: app.example.com
23
-
24
- # Credentials for your image host.
25
- registry:
26
- # Specify the registry server, if you're not using Docker Hub
27
- # server: registry.digitalocean.com / ghcr.io / ...
28
- username: your-user
29
-
30
- # Always use an access token rather than real password when possible.
31
- password:
32
- - KAMAL_REGISTRY_PASSWORD
33
-
34
- # Inject ENV variables into containers (secrets come from .kamal/secrets).
35
- env:
36
- secret:
37
- - RAILS_MASTER_KEY
38
- clear:
39
- # Run the Solid Queue Supervisor inside the web server's Puma process to do jobs.
40
- # When you start using multiple servers, you should split out job processing to a dedicated machine.
41
- SOLID_QUEUE_IN_PUMA: true
42
-
43
- # Set number of processes dedicated to Solid Queue (default: 1)
44
- # JOB_CONCURRENCY: 3
45
-
46
- # Set number of cores available to the application on each server (default: 1).
47
- # WEB_CONCURRENCY: 2
48
-
49
- # Match this to any external database server to configure Active Record correctly
50
- # Use provider-db for a db accessory server on same machine via local kamal docker network.
51
- # DB_HOST: 192.168.0.2
52
-
53
- # Log everything from Rails
54
- # RAILS_LOG_LEVEL: debug
55
-
56
- # Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
57
- # "bin/kamal logs -r job" will tail logs from the first server in the job section.
58
- aliases:
59
- console: app exec --interactive --reuse "bin/rails console"
60
- shell: app exec --interactive --reuse "bash"
61
- logs: app logs -f
62
- dbc: app exec --interactive --reuse "bin/rails dbconsole"
63
-
64
-
65
- # Use a persistent storage volume for sqlite database files and local Active Storage files.
66
- # Recommended to change this to a mounted volume path that is backed up off server.
67
- volumes:
68
- - "provider_storage:/rails/storage"
69
-
70
-
71
- # Bridge fingerprinted assets, like JS and CSS, between versions to avoid
72
- # hitting 404 on in-flight requests. Combines all files from new and old
73
- # version inside the asset_path.
74
- asset_path: /rails/public/assets
75
-
76
- # Configure the image builder.
77
- builder:
78
- arch: amd64
79
-
80
- # # Build image via remote server (useful for faster amd64 builds on arm64 computers)
81
- # remote: ssh://docker@docker-builder-server
82
- #
83
- # # Pass arguments and secrets to the Docker build process
84
- # args:
85
- # RUBY_VERSION: ruby-3.2.2
86
- # secrets:
87
- # - GITHUB_TOKEN
88
- # - RAILS_MASTER_KEY
89
-
90
- # Use a different ssh user than root
91
- # ssh:
92
- # user: app
93
-
94
- # Use accessory services (secrets come from .kamal/secrets).
95
- # accessories:
96
- # db:
97
- # image: mysql:8.0
98
- # host: 192.168.0.2
99
- # # Change to 3306 to expose port to the world instead of just local network.
100
- # port: "127.0.0.1:3306:3306"
101
- # env:
102
- # clear:
103
- # MYSQL_ROOT_HOST: '%'
104
- # secret:
105
- # - MYSQL_ROOT_PASSWORD
106
- # files:
107
- # - config/mysql/production.cnf:/etc/mysql/my.cnf
108
- # - db/production.sql:/docker-entrypoint-initdb.d/setup.sql
109
- # directories:
110
- # - data:/var/lib/mysql
111
- # redis:
112
- # image: redis:7.0
113
- # host: 192.168.0.2
114
- # port: 6379
115
- # directories:
116
- # - data:/data
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require_relative "application"
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,64 +0,0 @@
1
- require "active_support/core_ext/integer/time"
2
-
3
- Rails.application.configure do
4
- # Settings specified here will take precedence over those in config/application.rb.
5
-
6
- # Make code changes take effect immediately without server restart.
7
- config.enable_reloading = true
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports.
13
- config.consider_all_requests_local = true
14
-
15
- # Enable server timing.
16
- config.server_timing = true
17
-
18
- # Enable/disable Action Controller caching. By default Action Controller caching is disabled.
19
- # Run rails dev:cache to toggle Action Controller caching.
20
- if Rails.root.join("tmp/caching-dev.txt").exist?
21
- config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
22
- else
23
- config.action_controller.perform_caching = false
24
- end
25
-
26
- # Change to :null_store to avoid any caching.
27
- config.cache_store = :memory_store
28
-
29
- # Don't care if the mailer can't send.
30
- config.action_mailer.raise_delivery_errors = false
31
-
32
- # Make template changes take effect immediately.
33
- config.action_mailer.perform_caching = false
34
-
35
- # Set localhost to be used by links generated in mailer templates.
36
- config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
37
-
38
- # Print deprecation notices to the Rails logger.
39
- config.active_support.deprecation = :log
40
-
41
- # Raise an error on page load if there are pending migrations.
42
- config.active_record.migration_error = :page_load
43
-
44
- # Highlight code that triggered database queries in logs.
45
- config.active_record.verbose_query_logs = true
46
-
47
- # Append comments with runtime information tags to SQL queries in logs.
48
- config.active_record.query_log_tags_enabled = true
49
-
50
- # Highlight code that enqueued background job in logs.
51
- config.active_job.verbose_enqueue_logs = true
52
-
53
- # Raises error for missing translations.
54
- # config.i18n.raise_on_missing_translations = true
55
-
56
- # Annotate rendered view with file names.
57
- config.action_view.annotate_rendered_view_with_filenames = true
58
-
59
- # Raise error when a before_action's only/except options reference missing actions.
60
- config.action_controller.raise_on_missing_callback_actions = true
61
-
62
- # Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
63
- # config.generators.apply_rubocop_autocorrect_after_generate!
64
- end
@@ -1,85 +0,0 @@
1
- require "active_support/core_ext/integer/time"
2
-
3
- Rails.application.configure do
4
- # Settings specified here will take precedence over those in config/application.rb.
5
-
6
- # Code is not reloaded between requests.
7
- config.enable_reloading = false
8
-
9
- # Eager load code on boot for better performance and memory savings (ignored by Rake tasks).
10
- config.eager_load = true
11
-
12
- # Full error reports are disabled.
13
- config.consider_all_requests_local = false
14
-
15
- # Cache assets for far-future expiry since they are all digest stamped.
16
- config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
17
-
18
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
19
- # config.asset_host = "http://assets.example.com"
20
-
21
- # Assume all access to the app is happening through a SSL-terminating reverse proxy.
22
- config.assume_ssl = true
23
-
24
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
25
- config.force_ssl = true
26
-
27
- # Skip http-to-https redirect for the default health check endpoint.
28
- # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
29
-
30
- # Log to STDOUT with the current request id as a default log tag.
31
- config.log_tags = [ :request_id ]
32
- config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
33
-
34
- # Change to "debug" to log everything (including potentially personally-identifiable information!)
35
- config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
36
-
37
- # Prevent health checks from clogging up the logs.
38
- config.silence_healthcheck_path = "/up"
39
-
40
- # Don't log any deprecations.
41
- config.active_support.report_deprecations = false
42
-
43
- # Replace the default in-process memory cache store with a durable alternative.
44
- config.cache_store = :solid_cache_store
45
-
46
- # Replace the default in-process and non-durable queuing backend for Active Job.
47
- config.active_job.queue_adapter = :solid_queue
48
- config.solid_queue.connects_to = { database: { writing: :queue } }
49
-
50
-
51
- # Ignore bad email addresses and do not raise email delivery errors.
52
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
53
- # config.action_mailer.raise_delivery_errors = false
54
-
55
- # Set host to be used by links generated in mailer templates.
56
- config.action_mailer.default_url_options = { host: "example.com" }
57
-
58
- # Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
59
- # config.action_mailer.smtp_settings = {
60
- # user_name: Rails.application.credentials.dig(:smtp, :user_name),
61
- # password: Rails.application.credentials.dig(:smtp, :password),
62
- # address: "smtp.example.com",
63
- # port: 587,
64
- # authentication: :plain
65
- # }
66
-
67
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
- # the I18n.default_locale when a translation cannot be found).
69
- config.i18n.fallbacks = true
70
-
71
- # Do not dump schema after migrations.
72
- config.active_record.dump_schema_after_migration = false
73
-
74
- # Only use :id for inspections in production.
75
- config.active_record.attributes_for_inspect = [ :id ]
76
-
77
- # Enable DNS rebinding protection and other `Host` header attacks.
78
- # config.hosts = [
79
- # "example.com", # Allow requests from example.com
80
- # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
81
- # ]
82
- #
83
- # Skip DNS rebinding protection for the default health check endpoint.
84
- # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
85
- end