sequelizer 0.1.6 → 0.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +60 -0
- data/LICENSE +21 -0
- data/README.md +28 -14
- data/config/platforms/base.csv +5 -0
- data/config/platforms/rdbms/athena.csv +4 -0
- data/config/platforms/rdbms/postgres.csv +3 -0
- data/config/platforms/rdbms/snowflake.csv +1 -0
- data/config/platforms/rdbms/spark.csv +3 -0
- data/lib/sequel/extensions/cold_col.rb +41 -17
- data/lib/sequel/extensions/funky.rb +136 -0
- data/lib/sequel/extensions/make_readyable.rb +18 -10
- data/lib/sequel/extensions/platform.rb +300 -0
- data/lib/sequel/extensions/smart_select_remove.rb +101 -0
- data/lib/sequelizer/options.rb +15 -6
- data/lib/sequelizer/version.rb +1 -1
- data/lib/sequelizer/yaml_config.rb +0 -1
- metadata +90 -57
- data/.claude/settings.local.json +0 -64
- data/.devcontainer/.p10k.zsh +0 -1713
- data/.devcontainer/.zshrc +0 -29
- data/.devcontainer/Dockerfile +0 -137
- data/.devcontainer/copy-claude-credentials.sh +0 -32
- data/.devcontainer/devcontainer.json +0 -102
- data/.devcontainer/init-firewall.sh +0 -123
- data/.devcontainer/setup-credentials.sh +0 -95
- data/.github/workflows/test.yml +0 -14
- data/.gitignore +0 -40
- data/.overcommit.yml +0 -73
- data/.rubocop.yml +0 -167
- data/CLAUDE.md +0 -219
- data/Gemfile +0 -12
- data/Gemfile.lock +0 -158
- data/Guardfile +0 -28
- data/LICENSE.txt +0 -22
- data/Rakefile +0 -35
- data/examples/database.with_one_set_of_options.yml +0 -15
- data/examples/database.yml +0 -30
- data/examples/dot_env.txt +0 -10
- data/sequelizer.gemspec +0 -35
- data/test/lib/sequel/extensions/test_cold_col.rb +0 -251
- data/test/lib/sequel/extensions/test_db_opts.rb +0 -42
- data/test/lib/sequel/extensions/test_make_readyable.rb +0 -259
- data/test/lib/sequel/extensions/test_more_sql.rb +0 -132
- data/test/lib/sequel/extensions/test_settable.rb +0 -109
- data/test/lib/sequel/extensions/test_sql_recorder.rb +0 -231
- data/test/lib/sequel/extensions/test_unionize.rb +0 -76
- data/test/lib/sequel/extensions/test_usable.rb +0 -15
- data/test/lib/sequelizer/test_connection_maker.rb +0 -123
- data/test/lib/sequelizer/test_env_config.rb +0 -37
- data/test/lib/sequelizer/test_gemfile_modifier.rb +0 -88
- data/test/lib/sequelizer/test_options.rb +0 -83
- data/test/lib/sequelizer/test_yaml_config.rb +0 -83
- data/test/test_helper.rb +0 -44
data/.rubocop.yml
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
plugins:
|
|
2
|
-
- rubocop-minitest
|
|
3
|
-
|
|
4
|
-
AllCops:
|
|
5
|
-
TargetRubyVersion: 3.2
|
|
6
|
-
NewCops: enable
|
|
7
|
-
Exclude:
|
|
8
|
-
- 'vendor/**/*'
|
|
9
|
-
- 'bin/**/*'
|
|
10
|
-
- 'tmp/**/*'
|
|
11
|
-
|
|
12
|
-
# Style Configuration to match existing project standards
|
|
13
|
-
|
|
14
|
-
# Indentation: 2 spaces (matches existing code)
|
|
15
|
-
Layout/IndentationWidth:
|
|
16
|
-
Width: 2
|
|
17
|
-
|
|
18
|
-
# String quotes: prefer single quotes (matches existing code)
|
|
19
|
-
Style/StringLiterals:
|
|
20
|
-
EnforcedStyle: single_quotes
|
|
21
|
-
|
|
22
|
-
# Allow both single and double quotes in string interpolation contexts
|
|
23
|
-
Style/StringLiteralsInInterpolation:
|
|
24
|
-
EnforcedStyle: double_quotes
|
|
25
|
-
|
|
26
|
-
# Method definitions: allow no parentheses for no arguments (matches existing code)
|
|
27
|
-
Style/DefWithParentheses:
|
|
28
|
-
Enabled: false
|
|
29
|
-
|
|
30
|
-
# Method calls: allow no parentheses for no arguments (matches existing code)
|
|
31
|
-
Style/MethodCallWithoutArgsParentheses:
|
|
32
|
-
Enabled: true
|
|
33
|
-
|
|
34
|
-
# Hash syntax: prefer symbols (matches existing code)
|
|
35
|
-
|
|
36
|
-
# Line length: be reasonable but not too strict for a Ruby gem
|
|
37
|
-
Layout/LineLength:
|
|
38
|
-
Max: 120
|
|
39
|
-
AllowedPatterns: ['\A\s*#']
|
|
40
|
-
Exclude:
|
|
41
|
-
- '*.gemspec'
|
|
42
|
-
- 'test/**/*'
|
|
43
|
-
|
|
44
|
-
# Documentation: don't require class/module documentation for this gem type
|
|
45
|
-
Style/Documentation:
|
|
46
|
-
Enabled: false
|
|
47
|
-
|
|
48
|
-
# Frozen string literal: don't enforce for compatibility
|
|
49
|
-
Style/FrozenStringLiteralComment:
|
|
50
|
-
Enabled: false
|
|
51
|
-
|
|
52
|
-
# Allow both proc and lambda
|
|
53
|
-
Style/Lambda:
|
|
54
|
-
Enabled: false
|
|
55
|
-
|
|
56
|
-
# Allow multiple assignment
|
|
57
|
-
Style/ParallelAssignment:
|
|
58
|
-
Enabled: false
|
|
59
|
-
|
|
60
|
-
# Allow guard clauses
|
|
61
|
-
Style/GuardClause:
|
|
62
|
-
Enabled: true
|
|
63
|
-
|
|
64
|
-
# Allow both if and unless modifiers
|
|
65
|
-
Style/IfUnlessModifier:
|
|
66
|
-
Enabled: true
|
|
67
|
-
|
|
68
|
-
# Method length: be reasonable for small gem
|
|
69
|
-
Metrics/MethodLength:
|
|
70
|
-
Max: 25
|
|
71
|
-
|
|
72
|
-
# Class length: be reasonable for small gem
|
|
73
|
-
Metrics/ClassLength:
|
|
74
|
-
Max: 200
|
|
75
|
-
|
|
76
|
-
# Module length: be reasonable for small gem
|
|
77
|
-
Metrics/ModuleLength:
|
|
78
|
-
Max: 200
|
|
79
|
-
|
|
80
|
-
# Block length: allow longer blocks for tests and configuration
|
|
81
|
-
Metrics/BlockLength:
|
|
82
|
-
Max: 50
|
|
83
|
-
Exclude:
|
|
84
|
-
- 'test/**/*'
|
|
85
|
-
- '*.gemspec'
|
|
86
|
-
- 'Rakefile'
|
|
87
|
-
|
|
88
|
-
# Allow both foo.empty? and foo.size == 0
|
|
89
|
-
Style/ZeroLengthPredicate:
|
|
90
|
-
Enabled: false
|
|
91
|
-
|
|
92
|
-
# Allow memoized variables with different names (e.g., @_sequelizer_db for @db)
|
|
93
|
-
Naming/MemoizedInstanceVariableName:
|
|
94
|
-
Enabled: false
|
|
95
|
-
|
|
96
|
-
# Allow short parameter names (common in Ruby for simple methods)
|
|
97
|
-
Naming/MethodParameterName:
|
|
98
|
-
MinNameLength: 1
|
|
99
|
-
|
|
100
|
-
# Allow multi-line block chains (common in Ruby data processing)
|
|
101
|
-
Style/MultilineBlockChain:
|
|
102
|
-
Enabled: false
|
|
103
|
-
|
|
104
|
-
# Relax complexity metrics for existing code
|
|
105
|
-
Metrics/AbcSize:
|
|
106
|
-
Max: 35
|
|
107
|
-
Exclude:
|
|
108
|
-
- 'test/**/*'
|
|
109
|
-
|
|
110
|
-
Metrics/CyclomaticComplexity:
|
|
111
|
-
Max: 15
|
|
112
|
-
|
|
113
|
-
Metrics/PerceivedComplexity:
|
|
114
|
-
Max: 12
|
|
115
|
-
|
|
116
|
-
Metrics/BlockNesting:
|
|
117
|
-
Max: 4
|
|
118
|
-
|
|
119
|
-
# Allow set_ prefixed methods (common pattern)
|
|
120
|
-
Naming/AccessorMethodName:
|
|
121
|
-
Enabled: false
|
|
122
|
-
|
|
123
|
-
# Allow both string and symbol keys in same hash for configuration
|
|
124
|
-
Style/HashSyntax:
|
|
125
|
-
EnforcedStyle: ruby19
|
|
126
|
-
EnforcedShorthandSyntax: either
|
|
127
|
-
|
|
128
|
-
# Minitest specific rules
|
|
129
|
-
Minitest/AssertEqual:
|
|
130
|
-
Enabled: true
|
|
131
|
-
|
|
132
|
-
Minitest/RefuteEqual:
|
|
133
|
-
Enabled: true
|
|
134
|
-
|
|
135
|
-
# Layout rules that match existing code
|
|
136
|
-
Layout/EmptyLinesAroundClassBody:
|
|
137
|
-
EnforcedStyle: empty_lines_except_namespace
|
|
138
|
-
|
|
139
|
-
Layout/EmptyLinesAroundModuleBody:
|
|
140
|
-
EnforcedStyle: empty_lines_except_namespace
|
|
141
|
-
|
|
142
|
-
# Allow trailing commas in multiline structures
|
|
143
|
-
Style/TrailingCommaInArguments:
|
|
144
|
-
EnforcedStyleForMultiline: comma
|
|
145
|
-
|
|
146
|
-
Style/TrailingCommaInArrayLiteral:
|
|
147
|
-
EnforcedStyleForMultiline: comma
|
|
148
|
-
|
|
149
|
-
Style/TrailingCommaInHashLiteral:
|
|
150
|
-
EnforcedStyleForMultiline: comma
|
|
151
|
-
|
|
152
|
-
# Disable gemspec-specific rules that don't apply to this project
|
|
153
|
-
Gemspec/DevelopmentDependencies:
|
|
154
|
-
Enabled: false
|
|
155
|
-
|
|
156
|
-
# Disable some style rules for tests to allow more flexibility
|
|
157
|
-
Style/HashLikeCase:
|
|
158
|
-
Exclude:
|
|
159
|
-
- 'test/**/*'
|
|
160
|
-
|
|
161
|
-
Lint/DuplicateBranch:
|
|
162
|
-
Exclude:
|
|
163
|
-
- 'test/**/*'
|
|
164
|
-
|
|
165
|
-
Style/StringConcatenation:
|
|
166
|
-
Exclude:
|
|
167
|
-
- 'test/**/*'
|
data/CLAUDE.md
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
|
|
7
|
-
Sequelizer is a Ruby gem that simplifies database connections using Sequel. It allows users to configure database connections via config/database.yml or .env files, providing an easy-to-use interface for establishing database connections without hardcoding sensitive information.
|
|
8
|
-
|
|
9
|
-
The gem includes:
|
|
10
|
-
|
|
11
|
-
- A main module that provides `db` (cached connection) and `new_db` (fresh connection) methods
|
|
12
|
-
- CLI commands for configuration management and Gemfile updating
|
|
13
|
-
- Support for multiple database adapters including PostgreSQL, Impala, and Hive2
|
|
14
|
-
- Sequel extensions for enhanced functionality
|
|
15
|
-
|
|
16
|
-
## Development Commands
|
|
17
|
-
|
|
18
|
-
### Testing
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# Run all tests
|
|
22
|
-
bundle exec rake test
|
|
23
|
-
|
|
24
|
-
# Run tests with coverage report (generates coverage/index.html)
|
|
25
|
-
bundle exec rake coverage
|
|
26
|
-
|
|
27
|
-
# Run specific test file
|
|
28
|
-
bundle exec ruby -I lib test/lib/sequelizer/test_connection_maker.rb
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Linting and Formatting
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
# Check code style and lint issues
|
|
35
|
-
bundle exec rake lint
|
|
36
|
-
bundle exec rubocop
|
|
37
|
-
|
|
38
|
-
# Auto-fix safe linting issues
|
|
39
|
-
bundle exec rake lint_fix
|
|
40
|
-
bundle exec rubocop --auto-correct
|
|
41
|
-
|
|
42
|
-
# Auto-fix all issues (including unsafe corrections)
|
|
43
|
-
bundle exec rake format
|
|
44
|
-
bundle exec rubocop --auto-correct-all
|
|
45
|
-
|
|
46
|
-
# Run linter on specific files
|
|
47
|
-
bundle exec rubocop lib/sequelizer.rb
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Pre-commit Hooks
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
# Install pre-commit hooks (done automatically after bundle install)
|
|
54
|
-
bundle exec overcommit --install
|
|
55
|
-
|
|
56
|
-
# Sign configuration (if you modify .overcommit.yml)
|
|
57
|
-
bundle exec overcommit --sign
|
|
58
|
-
|
|
59
|
-
# Run pre-commit hooks manually
|
|
60
|
-
bundle exec overcommit --run
|
|
61
|
-
|
|
62
|
-
# Skip hooks for a specific commit (use sparingly)
|
|
63
|
-
git commit --no-verify -m "commit message"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
The pre-commit hooks automatically run:
|
|
67
|
-
|
|
68
|
-
- RuboCop linting with auto-correction
|
|
69
|
-
- Full test suite
|
|
70
|
-
- YAML/JSON syntax validation
|
|
71
|
-
- Trailing whitespace and merge conflict checks
|
|
72
|
-
- Commit message formatting validation
|
|
73
|
-
|
|
74
|
-
### Build and Release
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
# Build gem
|
|
78
|
-
bundle exec rake build
|
|
79
|
-
|
|
80
|
-
# Release gem
|
|
81
|
-
bundle exec rake release
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### CLI Commands
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
# Show current configuration
|
|
88
|
-
bundle exec sequelizer config
|
|
89
|
-
|
|
90
|
-
# Update Gemfile with database adapter
|
|
91
|
-
bundle exec sequelizer update_gemfile
|
|
92
|
-
|
|
93
|
-
# Initialize .env file
|
|
94
|
-
bundle exec sequelizer init_env --adapter postgres --host localhost --database mydb
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Architecture
|
|
98
|
-
|
|
99
|
-
### Core Components
|
|
100
|
-
|
|
101
|
-
- **Sequelizer module** (`lib/sequelizer.rb`): Main interface providing `db` and `new_db` methods
|
|
102
|
-
- **ConnectionMaker** (`lib/sequelizer/connection_maker.rb`): Handles database connection logic and adapter-specific configurations
|
|
103
|
-
- **Options** (`lib/sequelizer/options.rb`): Manages configuration from multiple sources with precedence order
|
|
104
|
-
- **CLI** (`lib/sequelizer/cli.rb`): Thor-based command line interface
|
|
105
|
-
|
|
106
|
-
### Configuration Sources (in precedence order)
|
|
107
|
-
|
|
108
|
-
1. Passed options
|
|
109
|
-
2. .env file
|
|
110
|
-
3. Environment variables
|
|
111
|
-
4. config/database.yml
|
|
112
|
-
5. ~/.config/sequelizer/database.yml
|
|
113
|
-
|
|
114
|
-
### Sequel Extensions
|
|
115
|
-
|
|
116
|
-
Located in `lib/sequel/extensions/`:
|
|
117
|
-
|
|
118
|
-
- **db_opts**: Database-specific options handling
|
|
119
|
-
- **make_readyable**: Readiness checking functionality
|
|
120
|
-
- **settable**: Dynamic property setting
|
|
121
|
-
- **sqls**: SQL statement management
|
|
122
|
-
- **usable**: Connection usability features
|
|
123
|
-
|
|
124
|
-
### Database Support
|
|
125
|
-
|
|
126
|
-
The gem supports various database adapters with special handling for:
|
|
127
|
-
|
|
128
|
-
- PostgreSQL (including search_path/schema management)
|
|
129
|
-
- JDBC-based connections (Hive2, Impala, PostgreSQL)
|
|
130
|
-
- Kerberos authentication for enterprise databases
|
|
131
|
-
|
|
132
|
-
### Test Structure
|
|
133
|
-
|
|
134
|
-
- Tests use Minitest framework
|
|
135
|
-
- Located in `test/` directory with subdirectories mirroring `lib/` structure
|
|
136
|
-
- Helper utilities in `test_helper.rb` including constant stubbing for testing
|
|
137
|
-
|
|
138
|
-
## Coding Standards
|
|
139
|
-
|
|
140
|
-
This project follows standard Ruby community conventions enforced by RuboCop, emphasizing readability, consistency, and Ruby idioms.
|
|
141
|
-
|
|
142
|
-
### Style Conventions
|
|
143
|
-
|
|
144
|
-
**Indentation & Formatting:**
|
|
145
|
-
|
|
146
|
-
- 2-space indentation (no tabs)
|
|
147
|
-
- Single-line method definitions when appropriate: `def e(v)`
|
|
148
|
-
- Method parameters without parentheses when no arguments: `def connection`
|
|
149
|
-
- Method parameters with parentheses when there are arguments: `def initialize(options = nil)`
|
|
150
|
-
|
|
151
|
-
**Naming:**
|
|
152
|
-
|
|
153
|
-
- Module/Class names: PascalCase (`Sequelizer`, `ConnectionMaker`)
|
|
154
|
-
- Method names: snake_case (`new_db`, `find_cached`, `after_connect`)
|
|
155
|
-
- Variable names: snake_case (`sequelizer_options`, `db_config`)
|
|
156
|
-
- Instance variables: snake_case with `@` prefix (`@options`, `@_sequelizer_db`)
|
|
157
|
-
- Constants: SCREAMING_SNAKE_CASE (`VERSION`)
|
|
158
|
-
|
|
159
|
-
**Strings:**
|
|
160
|
-
|
|
161
|
-
- Single quotes for simple strings: `'postgres'`, `'mock'`
|
|
162
|
-
- Double quotes for interpolation: `"SET #{key}=#{value}"`
|
|
163
|
-
|
|
164
|
-
### Code Organization
|
|
165
|
-
|
|
166
|
-
**File Structure:**
|
|
167
|
-
|
|
168
|
-
- One main class/module per file
|
|
169
|
-
- Nested modules follow directory structure: `lib/sequelizer/connection_maker.rb`
|
|
170
|
-
- Private methods grouped at bottom with `private` keyword
|
|
171
|
-
|
|
172
|
-
**Dependencies:**
|
|
173
|
-
|
|
174
|
-
- Use `require_relative` for internal dependencies: `require_relative 'sequelizer/version'`
|
|
175
|
-
- Use `require` for external gems: `require 'sequel'`, `require 'thor'`
|
|
176
|
-
- Group requires at top of files
|
|
177
|
-
|
|
178
|
-
### Documentation
|
|
179
|
-
|
|
180
|
-
**Comments:**
|
|
181
|
-
|
|
182
|
-
- Use `#` for single-line comments
|
|
183
|
-
- Extensive method documentation with parameter descriptions
|
|
184
|
-
- Minimal inline comments, used for clarification of complex logic
|
|
185
|
-
|
|
186
|
-
### Ruby Idioms
|
|
187
|
-
|
|
188
|
-
**Patterns Used:**
|
|
189
|
-
|
|
190
|
-
- Memoization: `@_sequelizer_db ||= new_db(options)`
|
|
191
|
-
- Conditional assignment: `||=` for defaults
|
|
192
|
-
- Metaprogramming with `define_method` for dynamic method creation
|
|
193
|
-
- Symbol keys in hashes: `{ adapter: 'postgres' }`
|
|
194
|
-
- Method chaining kept readable
|
|
195
|
-
|
|
196
|
-
**Testing Patterns:**
|
|
197
|
-
|
|
198
|
-
- Test methods prefixed with `test_`: `def test_accepts_options_as_params`
|
|
199
|
-
- Extensive use of stubbing and mocking for isolated testing
|
|
200
|
-
- Custom helper methods for common setup patterns
|
|
201
|
-
|
|
202
|
-
## Ruby Sequel as Lodestone
|
|
203
|
-
|
|
204
|
-
- Refer frequently to GitHub's jeremyevans/sequel repository for:
|
|
205
|
-
- Examples of great documenation
|
|
206
|
-
- Good code organization
|
|
207
|
-
- Great commit messages
|
|
208
|
-
- Wonderful changelog messages
|
|
209
|
-
|
|
210
|
-
## Development Memories
|
|
211
|
-
|
|
212
|
-
- Ensure that bundler is used for all ruby/rake related cli invocations
|
|
213
|
-
- Read-only operations (exploration, testing) can be done in main directory
|
|
214
|
-
- Refer to Ruby Sequel for code style, test frameworks, and general guidance
|
|
215
|
-
- To test CLI, just call bundle exec bin/sequelizer without installing binstubs
|
|
216
|
-
- **IMPORTANT**: Commands like `docker build`, `devcontainer build`, and `bundle install` can take more than 10 minutes to complete and should be run with extended timeout (e.g., 20 minutes / 1200000ms)
|
|
217
|
-
- **Wait for explicit instructions before reading files or creating plans - do not be proactive**
|
|
218
|
-
- When pushing to github or making pull requests, remember you have a PAT in GITHUB_TOKEN you can use for authentication
|
|
219
|
-
- When making a pull request, push to the "github" remote
|
data/Gemfile
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
# Specify your gem's dependencies in sequelizer.gemspec
|
|
4
|
-
gemspec
|
|
5
|
-
|
|
6
|
-
group :development do
|
|
7
|
-
gem 'overcommit', '~> 0.60'
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
group :test do
|
|
11
|
-
gem 'sequel-hexspace', github: 'outcomesinsights/sequel-hexspace', branch: 'master'
|
|
12
|
-
end
|
data/Gemfile.lock
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
GIT
|
|
2
|
-
remote: https://github.com/outcomesinsights/sequel-hexspace.git
|
|
3
|
-
revision: d041282798332227bbdf0a48a07c0494b2b54931
|
|
4
|
-
branch: master
|
|
5
|
-
specs:
|
|
6
|
-
sequel-hexspace (1.0.0)
|
|
7
|
-
hexspace
|
|
8
|
-
sequel (~> 5.0)
|
|
9
|
-
|
|
10
|
-
PATH
|
|
11
|
-
remote: .
|
|
12
|
-
specs:
|
|
13
|
-
sequelizer (0.1.6)
|
|
14
|
-
activesupport (~> 7.0)
|
|
15
|
-
dotenv (~> 2.1)
|
|
16
|
-
hashie (~> 3.2)
|
|
17
|
-
sequel (~> 5.93)
|
|
18
|
-
thor (~> 1.0)
|
|
19
|
-
|
|
20
|
-
GEM
|
|
21
|
-
remote: https://rubygems.org/
|
|
22
|
-
specs:
|
|
23
|
-
activesupport (7.2.2.1)
|
|
24
|
-
base64
|
|
25
|
-
benchmark (>= 0.3)
|
|
26
|
-
bigdecimal
|
|
27
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
28
|
-
connection_pool (>= 2.2.5)
|
|
29
|
-
drb
|
|
30
|
-
i18n (>= 1.6, < 2)
|
|
31
|
-
logger (>= 1.4.2)
|
|
32
|
-
minitest (>= 5.1)
|
|
33
|
-
securerandom (>= 0.3)
|
|
34
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
35
|
-
ast (2.4.3)
|
|
36
|
-
base64 (0.3.0)
|
|
37
|
-
benchmark (0.4.1)
|
|
38
|
-
bigdecimal (3.2.2)
|
|
39
|
-
childprocess (5.1.0)
|
|
40
|
-
logger (~> 1.5)
|
|
41
|
-
coderay (1.1.3)
|
|
42
|
-
concurrent-ruby (1.3.5)
|
|
43
|
-
connection_pool (2.5.3)
|
|
44
|
-
docile (1.4.1)
|
|
45
|
-
dotenv (2.7.5)
|
|
46
|
-
drb (2.2.3)
|
|
47
|
-
ffi (1.16.3)
|
|
48
|
-
formatador (1.1.0)
|
|
49
|
-
guard (2.18.1)
|
|
50
|
-
formatador (>= 0.2.4)
|
|
51
|
-
listen (>= 2.7, < 4.0)
|
|
52
|
-
lumberjack (>= 1.0.12, < 2.0)
|
|
53
|
-
nenv (~> 0.1)
|
|
54
|
-
notiffany (~> 0.0)
|
|
55
|
-
pry (>= 0.13.0)
|
|
56
|
-
shellany (~> 0.0)
|
|
57
|
-
thor (>= 0.18.1)
|
|
58
|
-
guard-compat (1.2.1)
|
|
59
|
-
guard-minitest (2.4.6)
|
|
60
|
-
guard-compat (~> 1.2)
|
|
61
|
-
minitest (>= 3.0)
|
|
62
|
-
hashie (3.6.0)
|
|
63
|
-
hexspace (0.2.1)
|
|
64
|
-
thrift (>= 0.18)
|
|
65
|
-
i18n (1.14.7)
|
|
66
|
-
concurrent-ruby (~> 1.0)
|
|
67
|
-
iniparse (1.5.0)
|
|
68
|
-
json (2.12.2)
|
|
69
|
-
language_server-protocol (3.17.0.5)
|
|
70
|
-
lint_roller (1.1.0)
|
|
71
|
-
listen (3.8.0)
|
|
72
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
73
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
|
74
|
-
logger (1.7.0)
|
|
75
|
-
lumberjack (1.2.10)
|
|
76
|
-
method_source (1.0.0)
|
|
77
|
-
minitest (5.21.2)
|
|
78
|
-
nenv (0.3.0)
|
|
79
|
-
notiffany (0.1.3)
|
|
80
|
-
nenv (~> 0.1)
|
|
81
|
-
shellany (~> 0.0)
|
|
82
|
-
overcommit (0.67.1)
|
|
83
|
-
childprocess (>= 0.6.3, < 6)
|
|
84
|
-
iniparse (~> 1.4)
|
|
85
|
-
rexml (>= 3.3.9)
|
|
86
|
-
parallel (1.27.0)
|
|
87
|
-
parser (3.3.8.0)
|
|
88
|
-
ast (~> 2.4.1)
|
|
89
|
-
racc
|
|
90
|
-
pg (1.6.2-x86_64-linux)
|
|
91
|
-
prism (1.4.0)
|
|
92
|
-
pry (0.14.2)
|
|
93
|
-
coderay (~> 1.1)
|
|
94
|
-
method_source (~> 1.0)
|
|
95
|
-
racc (1.8.1)
|
|
96
|
-
rainbow (3.1.1)
|
|
97
|
-
rake (12.3.3)
|
|
98
|
-
rb-fsevent (0.11.2)
|
|
99
|
-
rb-inotify (0.10.1)
|
|
100
|
-
ffi (~> 1.0)
|
|
101
|
-
regexp_parser (2.10.0)
|
|
102
|
-
rexml (3.4.1)
|
|
103
|
-
rubocop (1.76.2)
|
|
104
|
-
json (~> 2.3)
|
|
105
|
-
language_server-protocol (~> 3.17.0.2)
|
|
106
|
-
lint_roller (~> 1.1.0)
|
|
107
|
-
parallel (~> 1.10)
|
|
108
|
-
parser (>= 3.3.0.2)
|
|
109
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
110
|
-
regexp_parser (>= 2.9.3, < 3.0)
|
|
111
|
-
rubocop-ast (>= 1.45.1, < 2.0)
|
|
112
|
-
ruby-progressbar (~> 1.7)
|
|
113
|
-
unicode-display_width (>= 2.4.0, < 4.0)
|
|
114
|
-
rubocop-ast (1.45.1)
|
|
115
|
-
parser (>= 3.3.7.2)
|
|
116
|
-
prism (~> 1.4)
|
|
117
|
-
rubocop-minitest (0.38.1)
|
|
118
|
-
lint_roller (~> 1.1)
|
|
119
|
-
rubocop (>= 1.75.0, < 2.0)
|
|
120
|
-
rubocop-ast (>= 1.38.0, < 2.0)
|
|
121
|
-
ruby-progressbar (1.13.0)
|
|
122
|
-
securerandom (0.4.1)
|
|
123
|
-
sequel (5.93.0)
|
|
124
|
-
bigdecimal
|
|
125
|
-
shellany (0.0.1)
|
|
126
|
-
simplecov (0.22.0)
|
|
127
|
-
docile (~> 1.1)
|
|
128
|
-
simplecov-html (~> 0.11)
|
|
129
|
-
simplecov_json_formatter (~> 0.1)
|
|
130
|
-
simplecov-html (0.13.1)
|
|
131
|
-
simplecov_json_formatter (0.1.4)
|
|
132
|
-
thor (1.3.0)
|
|
133
|
-
thrift (0.19.0)
|
|
134
|
-
tzinfo (2.0.6)
|
|
135
|
-
concurrent-ruby (~> 1.0)
|
|
136
|
-
unicode-display_width (3.1.4)
|
|
137
|
-
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
138
|
-
unicode-emoji (4.0.4)
|
|
139
|
-
|
|
140
|
-
PLATFORMS
|
|
141
|
-
x86_64-linux
|
|
142
|
-
|
|
143
|
-
DEPENDENCIES
|
|
144
|
-
bundler (~> 2.0)
|
|
145
|
-
guard (~> 2.0)
|
|
146
|
-
guard-minitest (~> 2.3)
|
|
147
|
-
minitest (~> 5.3)
|
|
148
|
-
overcommit (~> 0.60)
|
|
149
|
-
pg (~> 1.0)
|
|
150
|
-
rake (~> 12.0)
|
|
151
|
-
rubocop (~> 1.0)
|
|
152
|
-
rubocop-minitest (~> 0.25)
|
|
153
|
-
sequel-hexspace!
|
|
154
|
-
sequelizer!
|
|
155
|
-
simplecov (~> 0.22)
|
|
156
|
-
|
|
157
|
-
BUNDLED WITH
|
|
158
|
-
2.4.7
|
data/Guardfile
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# A sample Guardfile
|
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
|
3
|
-
|
|
4
|
-
guard :minitest do
|
|
5
|
-
# with Minitest::Unit
|
|
6
|
-
watch(%r{^test/(.*)/?test_(.*)\.rb$})
|
|
7
|
-
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
|
8
|
-
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
|
9
|
-
|
|
10
|
-
# with Minitest::Spec
|
|
11
|
-
# watch(%r{^spec/(.*)_spec\.rb$})
|
|
12
|
-
# watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
13
|
-
# watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
|
|
14
|
-
|
|
15
|
-
# Rails 4
|
|
16
|
-
# watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
|
17
|
-
# watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
|
|
18
|
-
# watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
|
|
19
|
-
# watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
|
|
20
|
-
# watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
|
|
21
|
-
# watch(%r{^test/.+_test\.rb$})
|
|
22
|
-
# watch(%r{^test/test_helper\.rb$}) { 'test' }
|
|
23
|
-
|
|
24
|
-
# Rails < 4
|
|
25
|
-
# watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
|
|
26
|
-
# watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
|
|
27
|
-
# watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
|
|
28
|
-
end
|
data/LICENSE.txt
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2014 Outcomes Insights, Inc.
|
|
2
|
-
|
|
3
|
-
MIT License
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
require 'bundler/gem_tasks'
|
|
2
|
-
require 'rake/testtask'
|
|
3
|
-
|
|
4
|
-
Rake::TestTask.new do |t|
|
|
5
|
-
t.libs = %w[lib test]
|
|
6
|
-
t.warning = true
|
|
7
|
-
t.test_files = FileList['test/**/test_*.rb']
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
begin
|
|
11
|
-
require 'rubocop/rake_task'
|
|
12
|
-
|
|
13
|
-
RuboCop::RakeTask.new(:lint) do |task|
|
|
14
|
-
task.options = ['--display-cop-names']
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
RuboCop::RakeTask.new(:format) do |task|
|
|
18
|
-
task.options = ['--auto-correct-all']
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
desc 'Run RuboCop with safe autocorrect'
|
|
22
|
-
task :lint_fix do
|
|
23
|
-
system('bundle exec rubocop --autocorrect')
|
|
24
|
-
end
|
|
25
|
-
rescue LoadError
|
|
26
|
-
# RuboCop not available
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
desc 'Run tests with coverage report'
|
|
30
|
-
task :coverage do
|
|
31
|
-
ENV['COVERAGE'] = 'true'
|
|
32
|
-
Rake::Task[:test].invoke
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
task default: :test
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# A normal database.yml file contains a file with many different database
|
|
2
|
-
# configurations specified, one for each "environment".
|
|
3
|
-
#
|
|
4
|
-
# This is a Rails convention, but frankly, most of the time I have a single
|
|
5
|
-
# environment in my one-off scripts and don't want to bother with specifying
|
|
6
|
-
# different environments.
|
|
7
|
-
#
|
|
8
|
-
# So I can just define my database options like so:
|
|
9
|
-
---
|
|
10
|
-
adapter: postgres # Note: postgresql also works, but Sequel prefers postgres
|
|
11
|
-
database: my_database
|
|
12
|
-
host: localhost
|
|
13
|
-
username: my_user
|
|
14
|
-
password: my_great_password
|
|
15
|
-
|
data/examples/database.yml
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# An example of a database.yml file that is very much like the kind we'd
|
|
2
|
-
# find in a Rails app.
|
|
3
|
-
#
|
|
4
|
-
# There are three environments defined.
|
|
5
|
-
#
|
|
6
|
-
# Sequelizer will look for which environment to use by reading the contents
|
|
7
|
-
# of your environment variables in the following order:
|
|
8
|
-
# SEQUELIZER_ENV
|
|
9
|
-
# RAILS_ENV
|
|
10
|
-
# RACK_ENV
|
|
11
|
-
#
|
|
12
|
-
# If all of those are nil, we'll default to development
|
|
13
|
-
common: &common
|
|
14
|
-
adapter: postgres
|
|
15
|
-
host: localhost
|
|
16
|
-
username: my_username
|
|
17
|
-
password: my_password
|
|
18
|
-
schema_search_path: list,of,schemas
|
|
19
|
-
|
|
20
|
-
development:
|
|
21
|
-
<<: *common
|
|
22
|
-
database: dev_database
|
|
23
|
-
|
|
24
|
-
test:
|
|
25
|
-
adapter: sqlite
|
|
26
|
-
database: test.sqlite
|
|
27
|
-
|
|
28
|
-
production:
|
|
29
|
-
<<: *common
|
|
30
|
-
database: production_database
|
data/examples/dot_env.txt
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Normally you'd name this file '.env' and place it in
|
|
2
|
-
# the root of your project's directoryo
|
|
3
|
-
#
|
|
4
|
-
# Then you'd specify your database options like so:
|
|
5
|
-
SEQUELIZER_ADAPTER=postgres
|
|
6
|
-
SEQUELIZER_USERNAME=my_username
|
|
7
|
-
SEQUELIZER_PASSWORD=super_secret_password
|
|
8
|
-
SEQUELIZER_DATABASE=name_of_database
|
|
9
|
-
SEQUELIZER_HOST=localhost
|
|
10
|
-
SEQUELIZER_SEARCH_PATH=list,of,schemas
|