pg_multitenant_schemas 0.1.3 โ†’ 0.2.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.md +46 -0
  4. data/README.md +269 -16
  5. data/docs/README.md +77 -0
  6. data/docs/configuration.md +340 -0
  7. data/docs/context.md +292 -0
  8. data/docs/errors.md +498 -0
  9. data/docs/integration_testing.md +454 -0
  10. data/docs/migrator.md +291 -0
  11. data/docs/rails_integration.md +468 -0
  12. data/docs/schema_switcher.md +182 -0
  13. data/docs/tenant_resolver.md +394 -0
  14. data/docs/testing.md +358 -0
  15. data/examples/context_management.rb +198 -0
  16. data/examples/migration_workflow.rb +50 -0
  17. data/examples/rails_integration/controller_examples.rb +368 -0
  18. data/examples/schema_operations.rb +124 -0
  19. data/lib/pg_multitenant_schemas/configuration.rb +4 -4
  20. data/lib/pg_multitenant_schemas/migration_display_reporter.rb +30 -0
  21. data/lib/pg_multitenant_schemas/migration_executor.rb +81 -0
  22. data/lib/pg_multitenant_schemas/migration_schema_operations.rb +54 -0
  23. data/lib/pg_multitenant_schemas/migration_status_reporter.rb +65 -0
  24. data/lib/pg_multitenant_schemas/migrator.rb +89 -0
  25. data/lib/pg_multitenant_schemas/schema_switcher.rb +40 -66
  26. data/lib/pg_multitenant_schemas/tasks/advanced_tasks.rake +21 -0
  27. data/lib/pg_multitenant_schemas/tasks/basic_tasks.rake +20 -0
  28. data/lib/pg_multitenant_schemas/tasks/pg_multitenant_schemas.rake +53 -143
  29. data/lib/pg_multitenant_schemas/tasks/tenant_tasks.rake +65 -0
  30. data/lib/pg_multitenant_schemas/tenant_task_helpers.rb +102 -0
  31. data/lib/pg_multitenant_schemas/version.rb +1 -1
  32. data/lib/pg_multitenant_schemas.rb +10 -5
  33. data/pg_multitenant_schemas.gemspec +10 -9
  34. data/rails_integration/app/controllers/application_controller.rb +6 -0
  35. data/rails_integration/app/models/tenant.rb +6 -0
  36. metadata +39 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e4486368a3eff30c0b78d763ea5240a9c53290124bc9c86db5a95d758097543
4
- data.tar.gz: 652ec19727ac61cb61306c50cf7cff6bc2813b35c849419299f3c07f70239e49
3
+ metadata.gz: bb953481e57f8425d7a272414d51e9225d224f6975f7e519051566f8e6c58406
4
+ data.tar.gz: 3512040a1448b3a8cca8f829717ecc373510234bc53e2d84243272ea16903846
5
5
  SHA512:
6
- metadata.gz: c1b96e168c0e3a6c9e80fea6d842aa8fd02e1d002681d6a075b7c90a2d2974dce0f2891a17f8b1081db10a48932b096db1152d1a7c55efe860f19ac80eea8068
7
- data.tar.gz: bbfaa928d0bbbe90bc03eddf06ab1467e072db15f2ac43522bd932eb1a2ea9fdc489a03aeb549a25480686c0854106c2e5cb1ffe5f3c7806ca0c73b991b07679
6
+ metadata.gz: c4e77e04b02112a32d8ac953ab0c88a662cc599ec1fc498f6c3205c3a4596ba74e26c514add5de50df58414ff4dfd62a65241e2dbe26f1dbfcdd3093eab25426
7
+ data.tar.gz: 267b65ce20ab82f817c1ecd959dcd3781ad7f0b00434a381cf3a7968cf1e5363bf57519d26e07cf3bc9d75b90797f2b394c2a3bca8ef060b52e01768ce8c10e4
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.3
data/CHANGELOG.md CHANGED
@@ -7,6 +7,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### ๐Ÿš€ **Migration System Overhaul**
11
+ - **NEW: Automated Migration Management**: Complete migration system for multi-tenant schemas
12
+ - **NEW: PgMultitenantSchemas::Migrator**: Comprehensive migration management class
13
+ - **NEW: Simplified Rake Tasks**: Modern `tenants:*` namespace with intuitive commands
14
+ - **NEW: Bulk Operations**: Single-command migration across all tenant schemas
15
+ - **NEW: Enhanced Status Reporting**: Detailed migration status with progress indicators
16
+
17
+ ### โœจ **Enhanced Features**
18
+ - **Automated Tenant Setup**: `setup_tenant()` creates schema + runs migrations
19
+ - **Migration Status Tracking**: Real-time status across all tenant schemas
20
+ - **Error Resilience**: Graceful error handling per tenant during bulk operations
21
+ - **Tenant Creation Workflow**: `create_tenant_with_schema()` for complete tenant setup
22
+ - **Rollback Support**: Individual tenant rollback capabilities
23
+
24
+ ### ๐Ÿ”ง **Developer Experience**
25
+ - **Intuitive Commands**: `rails tenants:migrate`, `rails tenants:status`, `rails tenants:create`
26
+ - **Progress Feedback**: Visual progress indicators during migration operations
27
+ - **Safety Features**: Confirmation prompts for destructive operations
28
+ - **Legacy Compatibility**: Deprecated old commands with migration path
29
+ - **Example Scripts**: Complete workflow documentation and examples
30
+
31
+ ## [0.2.0] - 2025-09-06
32
+
33
+ ### ๐Ÿš€ **BREAKING CHANGES**
34
+ - **Modernized for Rails 8+ and Ruby 3.4+**: Removed backward compatibility
35
+ - **Simplified API**: Removed dual API support for cleaner codebase
36
+ - **Rails 8+ Only**: Updated dependencies to require ActiveRecord >= 8.0
37
+ - **Ruby 3.2+ Required**: Minimum Ruby version increased from 3.1.0 to 3.2.0
38
+
39
+ ### โœจ **Added**
40
+ - Modern Ruby 3.3+ features and performance optimizations
41
+ - Enhanced configuration defaults for Rails 8+ applications
42
+ - Improved error messages and developer experience
43
+
44
+ ### ๐Ÿ”ง **Changed**
45
+ - Simplified `SchemaSwitcher` API (removed connection parameter overloads)
46
+ - Updated default connection class to `ApplicationRecord`
47
+ - Enhanced excluded subdomains and TLD lists
48
+ - Automatic Rails logger integration
49
+
50
+ ### ๐Ÿ—‘๏ธ **Removed**
51
+ - Backward compatibility layers
52
+ - Dual API support (old conn parameter methods)
53
+ - Legacy Rails version compatibility code
54
+ - Ruby < 3.3 support
55
+
10
56
  ## [0.1.3] - 2025-09-03
11
57
 
12
58
  ### Added
data/README.md CHANGED
@@ -3,18 +3,27 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/pg_multitenant_schemas.svg)](https://badge.fury.io/rb/pg_multitenant_schemas)
4
4
  [![Ruby](https://github.com/yourusername/pg_multitenant_schemas/actions/workflows/main.yml/badge.svg)](https://github.com/yourusername/pg_multitenant_schemas/actions/workflows/main.yml)
5
5
 
6
- A Ruby gem that provides PostgreSQL schema-based multitenancy with automatic tenant resolution, schema switching, and Rails integration. Perfect for SaaS applications that need secure tenant isolation.
6
+ A modern Ruby gem that provides PostgreSQL schema-based multitenancy with automatic tenant resolution and schema switching. Built for Rails 8+ and Ruby 3.3+, focusing on security, performance, and developer experience.
7
7
 
8
- ## Features
8
+ ## โœจ Features
9
9
 
10
10
  - ๐Ÿข **Schema-based multitenancy** - Complete tenant isolation using PostgreSQL schemas
11
- - ๐Ÿ”„ **Automatic schema switching** - Seamlessly switch between tenant schemas
11
+ - ๐Ÿ”„ **Automatic schema switching** - Seamlessly switch between tenant schemas
12
12
  - ๐ŸŒ **Subdomain resolution** - Extract tenant from request subdomains
13
- - ๐Ÿ›ก๏ธ **Rails 8 compatible** - Works with Rails 7.x and 8.x
14
- - ๐Ÿš€ **Dual API support** - Backward compatible API design
13
+ - ๏ฟฝ **Rails 8+ optimized** - Built for modern Rails applications
14
+ - ๏ฟฝ๏ธ **Security-first design** - Database-level tenant isolation
15
15
  - ๐Ÿงต **Thread-safe** - Safe for concurrent operations
16
16
  - ๐Ÿ“ **Comprehensive logging** - Track schema operations
17
- - โšก **High performance** - Minimal overhead
17
+ - โšก **High performance** - Minimal overhead with clean API
18
+
19
+ ## ๐Ÿ“‹ Requirements
20
+
21
+ ## Requirements
22
+
23
+ - Ruby 3.4+
24
+ - Rails 8.0+
25
+ - PostgreSQL 12+
26
+ - **pg gem**: 1.5 or higher
18
27
 
19
28
  ## Installation
20
29
 
@@ -53,20 +62,90 @@ end
53
62
 
54
63
  ## Usage
55
64
 
56
- ### Basic Schema Operations
65
+ ### Migration Management
57
66
 
58
- ```ruby
59
- # Switch to a tenant schema
60
- PgMultitenantSchemas::SchemaSwitcher.switch_schema('tenant_123')
67
+ The gem provides automated migration management across all tenant schemas:
61
68
 
62
- # Create a new schema
63
- PgMultitenantSchemas::SchemaSwitcher.create_schema('tenant_456')
69
+ #### Running Migrations
64
70
 
65
- # Check if schema exists
66
- PgMultitenantSchemas::SchemaSwitcher.schema_exists?('tenant_123')
71
+ ```bash
72
+ # Migrate all tenant schemas at once (recommended)
73
+ rails tenants:migrate
74
+
75
+ # Migrate a specific tenant
76
+ rails tenants:migrate_tenant[acme_corp]
67
77
 
68
- # Drop a schema
69
- PgMultitenantSchemas::SchemaSwitcher.drop_schema('tenant_456')
78
+ # Check migration status across all tenants
79
+ rails tenants:status
80
+ ```
81
+
82
+ #### Setting Up New Tenants
83
+
84
+ ```bash
85
+ # Create new tenant with full setup (schema + migrations)
86
+ rails tenants:create[new_tenant]
87
+
88
+ # Create tenant with attributes using JSON
89
+ rails tenants:new['{"subdomain":"acme","name":"ACME Corp","domain":"acme.com"}']
90
+
91
+ # Setup schemas for all existing tenants (migration from single-tenant)
92
+ rails tenants:setup
93
+ ```
94
+
95
+ #### Migration Workflow
96
+
97
+ 1. **Create your migration** as usual:
98
+ ```bash
99
+ rails generate migration AddEmailToUsers email:string
100
+ ```
101
+
102
+ 2. **Deploy to all tenants** with a single command:
103
+ ```bash
104
+ rails tenants:migrate
105
+ ```
106
+
107
+ 3. **Check status** to verify migrations across tenants:
108
+ ```bash
109
+ rails tenants:status
110
+ ```
111
+
112
+ This shows detailed migration status:
113
+ ```
114
+ ๐Ÿ“Š Migration Status Report
115
+ โ–ธ acme_corp: โœ… Up to date (5 migrations)
116
+ โ–ธ beta_corp: โš ๏ธ 2 pending migrations
117
+ โ–ธ demo_corp: โœ… Up to date (5 migrations)
118
+
119
+ ๐Ÿ“ˆ Overall: 2/3 tenants current, 2 migrations pending
120
+ ```
121
+
122
+ The migrator automatically:
123
+ - Runs migrations across all tenant schemas
124
+ - Provides detailed progress feedback
125
+ - Handles errors gracefully per tenant
126
+ - Maintains migration version tracking per schema
127
+ - Supports rollbacks for individual tenants
128
+
129
+ #### Advanced Migration Operations
130
+
131
+ ```bash
132
+ # List all tenant schemas
133
+ rails tenants:list
134
+
135
+ # Rollback specific tenant
136
+ rails tenants:rollback[tenant_name,2] # rollback 2 steps
137
+
138
+ # Drop tenant schema (DANGEROUS - requires confirmation)
139
+ rails tenants:drop[old_tenant]
140
+ ```
141
+
142
+ #### Programmatic Access
143
+
144
+ ```ruby
145
+ # Use the Migrator directly in your code
146
+ PgMultitenantSchemas::Migrator.migrate_all
147
+ PgMultitenantSchemas::Migrator.setup_tenant('new_client')
148
+ PgMultitenantSchemas::Migrator.migration_status
70
149
  ```
71
150
 
72
151
  ### Tenant Resolution
@@ -130,6 +209,180 @@ class Tenant < ApplicationRecord
130
209
  end
131
210
  ```
132
211
 
212
+ ## ๐Ÿ—๏ธ Multi-Tenant Architecture Principles
213
+
214
+ ### Core Principle: Tenant Isolation
215
+
216
+ **In well-designed multi-tenant applications, tenants should NOT communicate with each other directly.** Each tenant operates in complete isolation for security, compliance, and data integrity.
217
+
218
+ ```ruby
219
+ # โœ… GOOD: Isolated tenant operations
220
+ PgMultitenantSchemas.with_tenant(tenant) do
221
+ # All operations are isolated to this tenant's schema
222
+ User.create!(name: "John", email: "john@example.com")
223
+ Order.where(status: "pending").update_all(status: "processed")
224
+ end
225
+
226
+ # โŒ BAD: Cross-tenant data sharing (security risk!)
227
+ # Never do: tenant_a.users.merge(tenant_b.users)
228
+ ```
229
+
230
+ ### When Cross-Schema Operations Are Appropriate
231
+
232
+ There are only **3 legitimate use cases** for cross-schema operations:
233
+
234
+ #### 1. **Platform Analytics & Reporting** (Admin-only)
235
+ ```ruby
236
+ # Platform owner needs aggregate statistics across all tenants
237
+ def platform_analytics
238
+ PgMultitenantSchemas::SchemaSwitcher.with_connection do |conn|
239
+ conn.execute(<<~SQL)
240
+ SELECT
241
+ schemaname as tenant,
242
+ COUNT(*) as total_users,
243
+ SUM(revenue) as total_revenue
244
+ FROM (
245
+ SELECT 'tenant_a' as schemaname, COUNT(*) as users,
246
+ (SELECT SUM(amount) FROM tenant_a.orders) as revenue
247
+ UNION ALL
248
+ SELECT 'tenant_b' as schemaname, COUNT(*) as users,
249
+ (SELECT SUM(amount) FROM tenant_b.orders) as revenue
250
+ ) stats
251
+ GROUP BY schemaname;
252
+ SQL
253
+ end
254
+ end
255
+ ```
256
+
257
+ #### 2. **Tenant Migration & Data Operations** (Admin-only)
258
+ ```ruby
259
+ # Moving data between environments or consolidating tenants
260
+ def migrate_tenant_data(from_tenant, to_tenant)
261
+ PgMultitenantSchemas.with_tenant(from_tenant) do
262
+ users = User.all.to_a
263
+ end
264
+
265
+ PgMultitenantSchemas.with_tenant(to_tenant) do
266
+ users.each { |user| User.create!(user.attributes.except('id')) }
267
+ end
268
+ end
269
+ ```
270
+
271
+ #### 3. **Shared Reference Data** (Read-only)
272
+ ```ruby
273
+ # Shared lookup tables that all tenants can read (e.g., countries, currencies)
274
+ class Country < ApplicationRecord
275
+ self.table_name = 'public.countries' # Shared across all schemas
276
+ end
277
+
278
+ # In tenant context, can still access shared data
279
+ PgMultitenantSchemas.with_tenant(tenant) do
280
+ user = User.create!(name: "John", country: Country.find_by(code: 'US'))
281
+ end
282
+ ```
283
+
284
+ ### ๐Ÿšซ Anti-Patterns to Avoid
285
+
286
+ ```ruby
287
+ # โŒ NEVER: Direct tenant-to-tenant communication
288
+ def share_data_between_tenants(tenant_a, tenant_b)
289
+ # This violates tenant isolation!
290
+ end
291
+
292
+ # โŒ NEVER: Cross-tenant user authentication
293
+ def authenticate_user_across_tenants(email)
294
+ # Users should only exist in their tenant's schema
295
+ end
296
+
297
+ # โŒ NEVER: Cross-tenant business logic
298
+ def process_order_with_other_tenant_data(order_id, other_tenant)
299
+ # Business logic should be isolated per tenant
300
+ end
301
+ ```
302
+
303
+ ### Why Tenant Isolation Matters
304
+
305
+ 1. **Security**: Prevents accidental data leaks between customers
306
+ 2. **Compliance**: GDPR, HIPAA, SOX require strict data separation
307
+ 3. **Performance**: Each tenant's queries are optimized for their data size
308
+ 4. **Reliability**: One tenant's issues don't affect others
309
+ 5. **Scalability**: Easy to move tenants to different database servers
310
+
311
+ ### Architecture Recommendation
312
+
313
+ ```ruby
314
+ # โœ… Proper multi-tenant architecture
315
+ class ApplicationController < ActionController::Base
316
+ include PgMultitenantSchemas::Rails::ControllerConcern
317
+
318
+ before_action :authenticate_user!
319
+ before_action :resolve_tenant
320
+ before_action :ensure_user_belongs_to_tenant
321
+
322
+ private
323
+
324
+ def resolve_tenant
325
+ @tenant = resolve_tenant_from_subdomain
326
+ switch_to_tenant(@tenant) if @tenant
327
+ end
328
+
329
+ def ensure_user_belongs_to_tenant
330
+ # Ensure current user can only access their tenant's data
331
+ redirect_to_login unless current_user.tenant == @tenant
332
+ end
333
+ end
334
+ ```
335
+
336
+ **Bottom Line**: Cross-tenant operations should be **extremely rare**, **admin-only**, and **carefully audited**. The vast majority of your application should operate within a single tenant's schema.
337
+
338
+ ## ๐Ÿ“š Documentation
339
+
340
+ ### Complete Architecture Documentation
341
+
342
+ Detailed documentation for each core component:
343
+
344
+ - **[๐Ÿ“ Core Architecture Overview](docs/README.md)** - Complete system architecture
345
+ - **[๐Ÿ”ง Schema Switcher](docs/schema_switcher.md)** - Low-level PostgreSQL schema operations
346
+ - **[๐Ÿงต Context Management](docs/context.md)** - Thread-safe tenant context handling
347
+ - **[๐Ÿš€ Migration System](docs/migrator.md)** - Automated migration management
348
+ - **[โš™๏ธ Configuration](docs/configuration.md)** - Gem settings and customization
349
+ - **[๐Ÿ” Tenant Resolver](docs/tenant_resolver.md)** - Tenant identification strategies
350
+ - **[๐Ÿ›ค๏ธ Rails Integration](docs/rails_integration.md)** - Framework components and patterns
351
+ - **[๐Ÿšจ Error Handling](docs/errors.md)** - Exception classes and error management
352
+
353
+ ### Examples and Patterns
354
+
355
+ - **[Schema Operations](examples/schema_operations.rb)** - Core schema management
356
+ - **[Context Management](examples/context_management.rb)** - Thread-safe tenant switching
357
+ - **[Migration Workflow](examples/migration_workflow.rb)** - Automated migration examples
358
+ - **[Rails Controllers](examples/rails_integration/controller_examples.rb)** - Framework integration patterns
359
+
360
+ ## ๐Ÿงช Testing
361
+
362
+ This gem includes a comprehensive test suite with both unit and integration tests.
363
+
364
+ ### Running Tests
365
+
366
+ ```bash
367
+ # Run unit tests only (fast, no database required)
368
+ bundle exec rspec
369
+
370
+ # Run integration tests (requires PostgreSQL)
371
+ bundle exec rspec --tag integration
372
+
373
+ # Run all tests
374
+ bundle exec rspec --no-tag
375
+ ```
376
+
377
+ ### Test Categories
378
+
379
+ - **Unit Tests** (65 examples): Fast, isolated component testing
380
+ - **Integration Tests** (21 examples): Real PostgreSQL multi-schema operations
381
+ - **Performance Tests**: Memory usage and thread safety validation
382
+ - **Edge Cases**: Error handling and boundary condition testing
383
+
384
+ See [Testing Guide](docs/testing.md) for detailed information about the test suite and [Integration Testing Guide](docs/integration_testing.md) for PostgreSQL integration testing details.
385
+
133
386
  ## Development
134
387
 
135
388
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/docs/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # PG Multitenant Schemas - Core Architecture Documentation
2
+
3
+ This directory contains detailed documentation for each core component of the PG Multitenant Schemas gem.
4
+
5
+ ## ๐Ÿ“ Core Components Overview
6
+
7
+ | Component | Purpose | Documentation |
8
+ |-----------|---------|---------------|
9
+ | **SchemaSwitcher** | Low-level PostgreSQL schema operations | [schema_switcher.md](schema_switcher.md) |
10
+ | **Context** | Thread-safe tenant context management | [context.md](context.md) |
11
+ | **Migrator** | Automated migration management system | [migrator.md](migrator.md) |
12
+ | **Configuration** | Gem configuration and settings | [configuration.md](configuration.md) |
13
+ | **TenantResolver** | Tenant identification and resolution | [tenant_resolver.md](tenant_resolver.md) |
14
+ | **Rails Integration** | Rails framework integration components | [rails_integration.md](rails_integration.md) |
15
+ | **Errors** | Custom exception classes | [errors.md](errors.md) |
16
+ | **Testing** | RSpec test suite and testing guide | [testing.md](testing.md) |
17
+ | **Integration Testing** | PostgreSQL integration testing guide | [integration_testing.md](integration_testing.md) |
18
+
19
+ ## ๐Ÿ—๏ธ Architecture Flow
20
+
21
+ ```
22
+ HTTP Request
23
+ โ†“
24
+ TenantResolver (identifies tenant)
25
+ โ†“
26
+ Context (sets tenant context)
27
+ โ†“
28
+ SchemaSwitcher (switches PostgreSQL schema)
29
+ โ†“
30
+ Rails Application (executes in tenant schema)
31
+ ```
32
+
33
+ ## ๐Ÿ”ง Key Concepts
34
+
35
+ ### Schema-Based Multitenancy
36
+ - Each tenant gets their own PostgreSQL schema
37
+ - Complete data isolation between tenants
38
+ - Shared application code, separate data
39
+
40
+ ### Thread-Safe Context
41
+ - Tenant context is stored per thread
42
+ - Safe for concurrent requests
43
+ - Automatic context restoration
44
+
45
+ ### Automated Migrations
46
+ - Single command migrates all tenant schemas
47
+ - Error handling per tenant
48
+ - Progress tracking and status reporting
49
+
50
+ ## ๐Ÿ“– Getting Started
51
+
52
+ 1. **Read the [Configuration Guide](configuration.md)** to understand setup options
53
+ 2. **Explore [Schema Switcher](schema_switcher.md)** for core PostgreSQL operations
54
+ 3. **Learn [Context Management](context.md)** for tenant switching
55
+ 4. **Master [Migration System](migrator.md)** for database management
56
+ 5. **Understand [Rails Integration](rails_integration.md)** for framework features
57
+ 6. **Review [Testing Guide](testing.md)** for development and testing practices
58
+
59
+ ## ๐Ÿงช Testing and Development
60
+
61
+ - **[Testing Guide](testing.md)**: Comprehensive RSpec test suite documentation
62
+ - **[Integration Testing](integration_testing.md)**: PostgreSQL integration testing guide
63
+ - **Test Execution**: `bundle exec rspec` (unit tests) and `bundle exec rspec --tag integration` (integration tests)
64
+
65
+ ## ๐Ÿ” Debug and Troubleshooting
66
+
67
+ - Check [Errors Documentation](errors.md) for exception handling
68
+ - Review [TenantResolver](tenant_resolver.md) for tenant identification issues
69
+ - Examine Context state for switching problems
70
+ - Use [Testing Guide](testing.md) for debugging test failures
71
+
72
+ ## ๐Ÿ“š Additional Resources
73
+
74
+ - [Main README](../README.md) - Getting started guide
75
+ - [CHANGELOG](../CHANGELOG.md) - Version history
76
+ - [Examples](../examples/) - Usage examples
77
+ - [Specs](../spec/) - Test suite