s3arch 0.1.4 → 0.1.5

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: 1e94c87e16c5a1c133e8b155aa86f7993fda2e29c1f25b1039d4344eb28c5e8f
4
- data.tar.gz: fa25590c4becae78ca1a79c6a76bc5e884819c472bafcca5e996a2439d70112a
3
+ metadata.gz: 8c46893f02a5588325d730a0dbd3dfd7944a269ae03f398ca1ca9b0ebac13773
4
+ data.tar.gz: f2758f7ceb14bf54762c0f889d881a2f0e1edd4efa53ca143d31b1ba0bc6ea6d
5
5
  SHA512:
6
- metadata.gz: eb5464878dad0a59d3dfc2b0f23737eb99a88fa1c15889557a3c9d41eef9686b6614d3e647ad463143bbe6f3a388b7516d67515ec7b90044b2332d634b49e6a7
7
- data.tar.gz: d504be859a8a49b19be69c5fd354e9823b48bf67ce6bee7753b69e3ef6f88763323e6582ba7ed7ae227a0c6b8f20ec09903efcbac294cf7227e21fd7638030bc
6
+ metadata.gz: 8dc8da0493198ceb3248fe17e3a4f13ed82f0bc2459598fb0798a30334307df5597413b07e4f6007a3ea25a6cdd866bd796571e712a3801d8618f2b0d2f1db89
7
+ data.tar.gz: 5c32d8cea5c684d5471411865de486462d313f222aece96f69cc1863111bfab3d7a001d22714272d734b154e61c6a897cff3a51e9eee9a3658ed42735b48c3ee
data/README.md CHANGED
@@ -93,26 +93,18 @@ indexer.rebuild("user-123")
93
93
 
94
94
  ## Infrastructure
95
95
 
96
- A Terraform module is provided at [`terraform/`](./terraform/) that provisions:
96
+ S3arch infrastructure is defined using [Belt](https://github.com/stowzilla/belt) and [Conveyor Belt](https://github.com/stowzilla/terraform-provider-conveyor-belt) conventions:
97
+
98
+ - **[`config/routes.rb`](./config/routes.rb)** — API Gateway routes for search and rebuild endpoints
99
+ - **[`config/contracts.rb`](./config/contracts.rb)** — Request/response schema contracts
100
+
101
+ When using S3arch with a Belt app, these files are automatically picked up by `belt deploy`. For standalone use, you'll need to provision:
97
102
 
98
103
  - S3 bucket for index storage (with 90-day lifecycle)
99
104
  - DynamoDB version tracking table (PAY_PER_REQUEST)
100
105
  - SQS queue + DLQ for the indexer
101
106
  - EventBridge Pipe (DynamoDB Stream → SQS)
102
107
 
103
- ```hcl
104
- module "s3arch" {
105
- source = "github.com/stowzilla/s3arch//terraform"
106
- app_name = "myapp"
107
- environment = "production"
108
- source_table_name = aws_dynamodb_table.items.name
109
- source_table_arn = aws_dynamodb_table.items.arn
110
- source_table_stream_arn = aws_dynamodb_table.items.stream_arn
111
- }
112
- ```
113
-
114
- Outputs include `indexer_env_vars`, `searcher_env_vars`, `indexer_permissions`, and `searcher_permissions` for easy Lambda configuration.
115
-
116
108
  ## Configuration Options
117
109
 
118
110
  | Option | Default | Description |
@@ -148,13 +140,13 @@ S3arch requires the `sqlite3` native extension at runtime. A Rake task is includ
148
140
  rake s3arch:layer:build
149
141
 
150
142
  # Build and publish in one step
151
- rake s3arch:layer:publish PROFILE=devzilla
143
+ rake s3arch:layer:publish PROFILE=your-profile
152
144
 
153
145
  # Customize the build
154
146
  rake s3arch:layer:build RUBY_VERSION=3.4 ARCHITECTURE=x86_64
155
147
 
156
148
  # Publish to a specific region/account
157
- rake s3arch:layer:publish PROFILE=production REGION=us-west-2 LAYER_NAME=stowzilla-sqlite3-ruby
149
+ rake s3arch:layer:publish PROFILE=production REGION=us-west-2 LAYER_NAME=my-sqlite3-ruby
158
150
  ```
159
151
 
160
152
  | Environment Variable | Default | Description |
@@ -164,7 +156,7 @@ rake s3arch:layer:publish PROFILE=production REGION=us-west-2 LAYER_NAME=stowzil
164
156
  | `OUTPUT` | `pkg/sqlite-layer.zip` | Output path for the zip |
165
157
  | `PROFILE` | (none) | AWS CLI profile for publishing |
166
158
  | `REGION` | `us-east-1` | AWS region to publish to |
167
- | `LAYER_NAME` | `stowzilla-sqlite3-ruby` | Layer name in AWS |
159
+ | `LAYER_NAME` | `sqlite3-ruby` | Layer name in AWS |
168
160
  | `S3ARCH_VERSION` | `~> current minor` | Version constraint for s3arch in the layer |
169
161
 
170
162
  Requires Docker to be running (uses the official AWS SAM build images).
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- TerraDispatch.schema.define do
3
+ Belt.application.schema.define do
4
4
  # S3arch does not define request/response models yet.
5
5
  # The search_indexes table is provisioned by s3arch's own Terraform module.
6
6
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- TerraDispatch.routes.draw do
3
+ Belt.application.routes.draw do
4
4
  namespace :s3arch, auth: :cognito, tables: [:search_indexes] do
5
5
  get '/', action: 'index'
6
6
  post '/rebuild', action: 'rebuild'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module S3arch
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
@@ -127,9 +127,9 @@ namespace :s3arch do
127
127
  )
128
128
  end
129
129
 
130
- desc 'Build and publish the Lambda layer (set AWS_PROFILE, LAYER_NAME=stowzilla-sqlite3-ruby)'
130
+ desc 'Build and publish the Lambda layer (set AWS_PROFILE, LAYER_NAME=sqlite3-ruby)'
131
131
  task publish: :build do
132
- layer_name = ENV.fetch('LAYER_NAME', 'stowzilla-sqlite3-ruby')
132
+ layer_name = ENV.fetch('LAYER_NAME', 'sqlite3-ruby')
133
133
  ruby_version = ENV.fetch('RUBY_VERSION', '3.4')
134
134
  architecture = ENV.fetch('ARCHITECTURE', 'x86_64')
135
135
  output_file = File.expand_path(ENV.fetch('OUTPUT', 'pkg/sqlite-layer.zip'))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3arch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Dalton
@@ -90,8 +90,8 @@ files:
90
90
  - CHANGELOG.md
91
91
  - LICENSE.txt
92
92
  - README.md
93
- - infrastructure/routes.tf.rb
94
- - infrastructure/schema.tf.rb
93
+ - config/contracts.rb
94
+ - config/routes.rb
95
95
  - lambda/controllers/s3arch_controller.rb
96
96
  - lambda/models/search_version.rb
97
97
  - lib/s3arch.rb