belt 0.1.0 → 0.1.2
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +29 -1
- data/README.md +169 -51
- data/lib/belt/cli/console_command.rb +128 -0
- data/lib/belt/cli/new_command.rb +3 -1
- data/lib/belt/cli/routes_command/route_inference.rb +94 -0
- data/lib/belt/cli/routes_command/schema_loader.rb +71 -0
- data/lib/belt/cli/routes_command.rb +307 -0
- data/lib/belt/cli/tables_command.rb +2 -2
- data/lib/belt/cli/tasks_command.rb +110 -0
- data/lib/belt/cli.rb +28 -5
- data/lib/belt/root.rb +26 -0
- data/lib/belt/route_dsl.rb +605 -0
- data/lib/belt/table_inference.rb +71 -0
- data/lib/belt/version.rb +1 -1
- data/lib/belt.rb +1 -0
- data/lib/templates/new_app/AGENTS.md.erb +1 -1
- data/lib/templates/new_app/Gemfile.erb +1 -0
- data/lib/templates/new_app/Rakefile.erb +12 -0
- data/lib/templates/new_app/gitignore.erb +1 -1
- data/lib/templates/new_app/infrastructure/routes.tf.rb.erb +1 -1
- data/lib/templates/new_app/infrastructure/schema.tf.rb.erb +1 -1
- data/lib/templates/new_app/lambda/config/environment.rb.erb +18 -0
- data.tar.gz.sig +0 -0
- metadata +25 -2
- metadata.gz.sig +0 -0
- data/lib/templates/new_app/lambda/Gemfile.erb +0 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
|
|
5
|
+
# Load rake tasks from all gems that ship them
|
|
6
|
+
Gem.loaded_specs.each_value do |spec|
|
|
7
|
+
tasks_dir = File.join(spec.full_gem_path, 'lib', 'tasks')
|
|
8
|
+
Dir.glob("#{tasks_dir}/**/*.rake").each { |r| load r } if Dir.exist?(tasks_dir)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Load project-local tasks
|
|
12
|
+
Dir.glob('lib/tasks/**/*.rake').each { |r| load r }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Boot the application. Used by `belt console` and Lambda at runtime.
|
|
4
|
+
|
|
5
|
+
require 'belt'
|
|
6
|
+
require 'activeitem'
|
|
7
|
+
|
|
8
|
+
ENV['APP_NAME'] ||= '<%= @app_name %>'
|
|
9
|
+
ENV['AWS_REGION'] ||= 'us-east-1'
|
|
10
|
+
|
|
11
|
+
ActiveItem.configure do |config|
|
|
12
|
+
config.table_prefix = ENV['APP_NAME']
|
|
13
|
+
config.environment = ENV['ENVIRONMENT']
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Load lib and models
|
|
17
|
+
Dir[File.join(__dir__, '..', 'lib', '**', '*.rb')].sort.each { |f| require f }
|
|
18
|
+
Dir[File.join(__dir__, '..', 'models', '**', '*.rb')].sort.each { |f| require f }
|
data.tar.gz.sig
CHANGED
|
Binary file
|
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.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stowzilla
|
|
@@ -36,6 +36,20 @@ cert_chain:
|
|
|
36
36
|
-----END CERTIFICATE-----
|
|
37
37
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
38
38
|
dependencies:
|
|
39
|
+
- !ruby/object:Gem::Dependency
|
|
40
|
+
name: activeitem
|
|
41
|
+
requirement: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - "~>"
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0.0'
|
|
46
|
+
type: :runtime
|
|
47
|
+
prerelease: false
|
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '0.0'
|
|
39
53
|
- !ruby/object:Gem::Dependency
|
|
40
54
|
name: lambda_loadout
|
|
41
55
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -69,6 +83,7 @@ files:
|
|
|
69
83
|
- lib/belt/cli.rb
|
|
70
84
|
- lib/belt/cli/app_detection.rb
|
|
71
85
|
- lib/belt/cli/bucket_security.rb
|
|
86
|
+
- lib/belt/cli/console_command.rb
|
|
72
87
|
- lib/belt/cli/env_resolver.rb
|
|
73
88
|
- lib/belt/cli/environment_command.rb
|
|
74
89
|
- lib/belt/cli/frontend_command.rb
|
|
@@ -76,8 +91,12 @@ files:
|
|
|
76
91
|
- lib/belt/cli/frontend_setup_command.rb
|
|
77
92
|
- lib/belt/cli/generate_command.rb
|
|
78
93
|
- lib/belt/cli/new_command.rb
|
|
94
|
+
- lib/belt/cli/routes_command.rb
|
|
95
|
+
- lib/belt/cli/routes_command/route_inference.rb
|
|
96
|
+
- lib/belt/cli/routes_command/schema_loader.rb
|
|
79
97
|
- lib/belt/cli/setup_command.rb
|
|
80
98
|
- lib/belt/cli/tables_command.rb
|
|
99
|
+
- lib/belt/cli/tasks_command.rb
|
|
81
100
|
- lib/belt/cli/terraform_command.rb
|
|
82
101
|
- lib/belt/cli/views_command.rb
|
|
83
102
|
- lib/belt/helpers/cors_origin.rb
|
|
@@ -86,6 +105,9 @@ files:
|
|
|
86
105
|
- lib/belt/lambda_handler.rb
|
|
87
106
|
- lib/belt/observability.rb
|
|
88
107
|
- lib/belt/parameters.rb
|
|
108
|
+
- lib/belt/root.rb
|
|
109
|
+
- lib/belt/route_dsl.rb
|
|
110
|
+
- lib/belt/table_inference.rb
|
|
89
111
|
- lib/belt/version.rb
|
|
90
112
|
- lib/belt_controller/base.rb
|
|
91
113
|
- lib/templates/environment/backend.tf.erb
|
|
@@ -106,11 +128,12 @@ files:
|
|
|
106
128
|
- lib/templates/new_app/AGENTS.md.erb
|
|
107
129
|
- lib/templates/new_app/Gemfile.erb
|
|
108
130
|
- lib/templates/new_app/README.md.erb
|
|
131
|
+
- lib/templates/new_app/Rakefile.erb
|
|
109
132
|
- lib/templates/new_app/gitignore.erb
|
|
110
133
|
- lib/templates/new_app/infrastructure/routes.tf.rb.erb
|
|
111
134
|
- lib/templates/new_app/infrastructure/schema.tf.rb.erb
|
|
112
|
-
- lib/templates/new_app/lambda/Gemfile.erb
|
|
113
135
|
- lib/templates/new_app/lambda/api.rb.erb
|
|
136
|
+
- lib/templates/new_app/lambda/config/environment.rb.erb
|
|
114
137
|
- lib/templates/new_app/lambda/controllers/application_controller.rb.erb
|
|
115
138
|
- lib/templates/new_app/lambda/lib/routes/routes.rb.erb
|
|
116
139
|
- lib/templates/new_app/lambda/models/application_record.rb.erb
|
metadata.gz.sig
CHANGED
|
Binary file
|