sequelizer 0.1.4 → 0.1.6
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/.claude/settings.local.json +64 -0
- data/.devcontainer/.p10k.zsh +1713 -0
- data/.devcontainer/.zshrc +29 -0
- data/.devcontainer/Dockerfile +137 -0
- data/.devcontainer/copy-claude-credentials.sh +32 -0
- data/.devcontainer/devcontainer.json +102 -0
- data/.devcontainer/init-firewall.sh +123 -0
- data/.devcontainer/setup-credentials.sh +95 -0
- data/.github/workflows/test.yml +1 -1
- data/.gitignore +6 -1
- data/.overcommit.yml +73 -0
- data/.rubocop.yml +167 -0
- data/CHANGELOG.md +24 -0
- data/CLAUDE.md +219 -0
- data/Gemfile +6 -2
- data/Gemfile.lock +158 -0
- data/Guardfile +1 -1
- data/Rakefile +28 -3
- data/lib/sequel/extensions/cold_col.rb +436 -0
- data/lib/sequel/extensions/db_opts.rb +65 -4
- data/lib/sequel/extensions/make_readyable.rb +148 -30
- data/lib/sequel/extensions/more_sql.rb +76 -0
- data/lib/sequel/extensions/settable.rb +64 -0
- data/lib/sequel/extensions/sql_recorder.rb +85 -0
- data/lib/sequel/extensions/unionize.rb +169 -0
- data/lib/sequel/extensions/usable.rb +30 -1
- data/lib/sequelizer/cli.rb +61 -18
- data/lib/sequelizer/connection_maker.rb +54 -72
- data/lib/sequelizer/env_config.rb +6 -6
- data/lib/sequelizer/gemfile_modifier.rb +23 -21
- data/lib/sequelizer/monkey_patches/database_in_after_connect.rb +7 -5
- data/lib/sequelizer/options.rb +97 -18
- data/lib/sequelizer/options_hash.rb +2 -0
- data/lib/sequelizer/version.rb +3 -1
- data/lib/sequelizer/yaml_config.rb +9 -3
- data/lib/sequelizer.rb +65 -9
- data/sequelizer.gemspec +12 -7
- data/test/lib/sequel/extensions/test_cold_col.rb +251 -0
- data/test/lib/sequel/extensions/test_db_opts.rb +10 -8
- data/test/lib/sequel/extensions/test_make_readyable.rb +199 -28
- data/test/lib/sequel/extensions/test_more_sql.rb +132 -0
- data/test/lib/sequel/extensions/test_settable.rb +109 -0
- data/test/lib/sequel/extensions/test_sql_recorder.rb +231 -0
- data/test/lib/sequel/extensions/test_unionize.rb +76 -0
- data/test/lib/sequel/extensions/test_usable.rb +5 -2
- data/test/lib/sequelizer/test_connection_maker.rb +21 -17
- data/test/lib/sequelizer/test_env_config.rb +5 -2
- data/test/lib/sequelizer/test_gemfile_modifier.rb +7 -6
- data/test/lib/sequelizer/test_options.rb +14 -9
- data/test/lib/sequelizer/test_yaml_config.rb +13 -12
- data/test/test_helper.rb +36 -8
- metadata +107 -28
- data/lib/sequel/extensions/sqls.rb +0 -31
data/.rubocop.yml
ADDED
@@ -0,0 +1,167 @@
|
|
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/CHANGELOG.md
CHANGED
@@ -1,6 +1,30 @@
|
|
1
1
|
# Changelog
|
2
|
+
|
2
3
|
All notable changes to this project will be documented in this file.
|
3
4
|
|
5
|
+
## 0.1.6
|
6
|
+
|
7
|
+
### Removed
|
8
|
+
- JDBC adapter support (jdbc_hive2, jdbc_impala, jdbc_postgres) - not needed for foreseeable future
|
9
|
+
- Native Impala adapter support - not needed for foreseeable future
|
10
|
+
- Kerberos authentication functionality for enterprise databases
|
11
|
+
- CGI dependency used for URL escaping in JDBC connections
|
12
|
+
- 16 test methods related to JDBC and Impala adapters
|
13
|
+
|
14
|
+
### Added
|
15
|
+
- pg gem as development dependency to support PostgreSQL testing
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
- Simplified ConnectionMaker class by removing adapter-specific configuration methods
|
19
|
+
- Improved test coverage from 84.95% to 93.54% by removing unused code paths
|
20
|
+
- Updated documentation to reflect focus on standard Sequel adapters
|
21
|
+
|
22
|
+
## 0.1.5
|
23
|
+
|
24
|
+
### Changed
|
25
|
+
|
26
|
+
- Better handling of multiple directories of files for make_ready
|
27
|
+
|
4
28
|
## [0.1.0] - 2016-11-08
|
5
29
|
|
6
30
|
### Added
|
data/CLAUDE.md
ADDED
@@ -0,0 +1,219 @@
|
|
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
CHANGED
@@ -3,6 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in sequelizer.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
+
group :development do
|
7
|
+
gem 'overcommit', '~> 0.60'
|
8
|
+
end
|
9
|
+
|
6
10
|
group :test do
|
7
|
-
gem
|
8
|
-
end
|
11
|
+
gem 'sequel-hexspace', github: 'outcomesinsights/sequel-hexspace', branch: 'master'
|
12
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,158 @@
|
|
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
CHANGED
data/Rakefile
CHANGED
@@ -1,10 +1,35 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
3
|
|
4
4
|
Rake::TestTask.new do |t|
|
5
|
-
t.libs = [
|
5
|
+
t.libs = %w[lib test]
|
6
6
|
t.warning = true
|
7
7
|
t.test_files = FileList['test/**/test_*.rb']
|
8
8
|
end
|
9
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
|
+
|
10
35
|
task default: :test
|