belt 0.3.38 → 0.3.39

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
  SHA256:
3
- metadata.gz: 3e5d53661a4b6d4cc3c041c12f7ba7bd68683319eaf40d8a31c160c49d832014
4
- data.tar.gz: 1e0ea7568414ad29a6219ae5b1c2f3506d589df6cfedce365f3feaee6aae44a4
3
+ metadata.gz: e529a712ad25eb12761d155d77b9a62f4342858c9b2272713edd0eef36ce7b6c
4
+ data.tar.gz: e1e38c997a9bcfc0f454315915412cc4911cd832771cb389e8733b64d082fac9
5
5
  SHA512:
6
- metadata.gz: 5c9abf953818eacb858d5dda98c293c752ef07aaeef977e6914ddc6bccbbacd19992f8a762de131453fc8adf3cdbd121198e83d319961dee8e6cecb285a92f28
7
- data.tar.gz: 8e09702c796419dcd1359b48ab6e7d30b41e233e737d834a35447c03483e62ac5474a6d6af3260dad9e5d60984c8e5c4127a491aaa6e8a8ae7642ab40babe9e9
6
+ metadata.gz: 4f2dbd95f0dfe51d250baeed09aa65d0704fbe783b67054b61f8eb6d46519c1fc0ebad6c641db6a5bd76fe75acd2f7a74a60abca16589b4e89da1dcb1d796bc2
7
+ data.tar.gz: 462ba513dc663920b9cdd8af7fe12632d541c99f14234e8b43c4dd6e706de16995852a72781f38a572e3aa92f78111e304a924e92e8e03eb791a80209163df2b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.39
4
+
5
+ ### Enhancement
6
+
7
+ - **Auto-load `application_controller.rb` per gateway**: `Belt::LambdaHandler`
8
+ now requires each gateway's `application_controller.rb` before its sibling
9
+ controllers, mirroring the existing model convention (`application_record.rb`
10
+ loads first). Controllers can inherit from `ApplicationController` without an
11
+ explicit `require_relative 'application_controller'` — Belt handles ordering,
12
+ matching Rails. The `belt generate controller` template no longer emits the
13
+ redundant `require_relative`, keeping loading a single framework concern.
14
+
3
15
  ## 0.3.38
4
16
 
5
17
  ### Enhancement
@@ -39,7 +39,14 @@ module Belt
39
39
  Belt.controller_paths << controllers_dir
40
40
  Dir.children(controllers_dir).each do |child|
41
41
  subdir = File.join(controllers_dir, child)
42
- Belt.controller_paths << subdir if File.directory?(subdir)
42
+ next unless File.directory?(subdir)
43
+
44
+ Belt.controller_paths << subdir
45
+
46
+ # Auto-require application_controller.rb first (like application_record for models)
47
+ # so other controllers can inherit from it without explicit require_relative
48
+ app_controller = File.join(subdir, 'application_controller.rb')
49
+ require app_controller if File.exist?(app_controller)
43
50
  end
44
51
 
45
52
  # Auto-load all models (application_record first, then the rest)
data/lib/belt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Belt
4
- VERSION = '0.3.38'
4
+ VERSION = '0.3.39'
5
5
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'application_controller'
4
-
5
3
  module <%= @module_name %>Controllers
6
4
  class <%= @class_name %>sController < ApplicationController
7
5
  <% if @references.any? -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: belt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.38
4
+ version: 0.3.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stowzilla