sql_runner 0.4.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/.rubocop.yml +4 -1
- data/README.md +1 -0
- data/lib/sql_runner/adapters/active_record.rb +1 -1
- data/lib/sql_runner/adapters/mysql.rb +1 -1
- data/lib/sql_runner/adapters/postgresql.rb +1 -1
- data/lib/sql_runner/adapters/sqlite.rb +1 -1
- data/lib/sql_runner/connection.rb +3 -3
- data/lib/sql_runner/version.rb +1 -1
- data/sql_runner.gemspec +2 -3
- metadata +8 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d872ea15c372e83cf53ea750d274c5bae439323ed8ae27ca8bc74e9bdeef55c
|
4
|
+
data.tar.gz: a2ebaf2d1deddc6c34df6cd0b9fe38e161c790df31fac212254f10907beeddfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c737e3faca0c83d76d2bf89a58a6cc2d72c5054ddd9f8a3b576b27a8f1fafd0d574276b6bd13a1b37684e001d78d0036e3373ff1070a5ca0f45703edab3f2e
|
7
|
+
data.tar.gz: bed77acf3c52539623139da8af8dfc55ce2637b757f979ddf6bdeb6aa0a47f256cde28e782261bb0df5f4e83212b3433c47ca8bc8b9b6571e88210bbd2097d7e
|
data/.github/workflows/test.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -4,7 +4,7 @@ inherit_gem:
|
|
4
4
|
|
5
5
|
AllCops:
|
6
6
|
NewCops: enable
|
7
|
-
TargetRubyVersion: 3.
|
7
|
+
TargetRubyVersion: 3.2
|
8
8
|
|
9
9
|
Metrics/MethodLength:
|
10
10
|
Enabled: false
|
@@ -15,3 +15,6 @@ Metrics/AbcSize:
|
|
15
15
|
Style/OpenStructUse:
|
16
16
|
Exclude:
|
17
17
|
- test/**/*.rb
|
18
|
+
|
19
|
+
Minitest/UnspecifiedException:
|
20
|
+
Enabled: false
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# SQLRunner
|
2
2
|
|
3
|
+
[![ruby-tests](https://github.com/fnando/sql_runner/actions/workflows/test.yml/badge.svg)](https://github.com/fnando/sql_runner/actions/workflows/test.yml)
|
3
4
|
[![Gem](https://img.shields.io/gem/v/sql_runner.svg)](https://rubygems.org/gems/sql_runner)
|
4
5
|
[![Gem](https://img.shields.io/gem/dt/sql_runner.svg)](https://rubygems.org/gems/sql_runner)
|
5
6
|
|
@@ -42,7 +42,7 @@ module SQLRunner
|
|
42
42
|
class ConnectionPool
|
43
43
|
def with
|
44
44
|
::ActiveRecord::Base.connection_pool.with_connection do |connection|
|
45
|
-
connection = connection.
|
45
|
+
connection = connection.raw_connection
|
46
46
|
|
47
47
|
adapter = case connection.class.name
|
48
48
|
when "PG::Connection"
|
@@ -9,12 +9,12 @@ module SQLRunner
|
|
9
9
|
adapter.create_connection_pool(
|
10
10
|
timeout: SQLRunner.timeout,
|
11
11
|
size: SQLRunner.pool,
|
12
|
-
connection_string:
|
12
|
+
connection_string:
|
13
13
|
)
|
14
14
|
end
|
15
15
|
|
16
|
-
def with_connection(&
|
17
|
-
connection_pool.with(&
|
16
|
+
def with_connection(&)
|
17
|
+
connection_pool.with(&)
|
18
18
|
end
|
19
19
|
|
20
20
|
def connect(connection_string)
|
data/lib/sql_runner/version.rb
CHANGED
data/sql_runner.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = SQLRunner::VERSION
|
8
8
|
spec.authors = ["Nando Vieira"]
|
9
9
|
spec.email = ["me@fnando.com"]
|
10
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 3.
|
10
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.2.0")
|
11
11
|
spec.metadata = {"rubygems_mfa_required" => "true"}
|
12
12
|
|
13
13
|
spec.summary = <<~TEXT.tr("\n", " ")
|
@@ -34,10 +34,9 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_development_dependency "mocha"
|
35
35
|
spec.add_development_dependency "mysql2"
|
36
36
|
spec.add_development_dependency "pg"
|
37
|
-
spec.add_development_dependency "pry-meta"
|
38
37
|
spec.add_development_dependency "rake"
|
39
38
|
spec.add_development_dependency "rubocop"
|
40
39
|
spec.add_development_dependency "rubocop-fnando"
|
41
40
|
spec.add_development_dependency "simplecov"
|
42
|
-
spec.add_development_dependency "sqlite3"
|
41
|
+
spec.add_development_dependency "sqlite3", "~> 1.7"
|
43
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sql_runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: pry-meta
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: rake
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,16 +168,16 @@ dependencies:
|
|
182
168
|
name: sqlite3
|
183
169
|
requirement: !ruby/object:Gem::Requirement
|
184
170
|
requirements:
|
185
|
-
- - "
|
171
|
+
- - "~>"
|
186
172
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
173
|
+
version: '1.7'
|
188
174
|
type: :development
|
189
175
|
prerelease: false
|
190
176
|
version_requirements: !ruby/object:Gem::Requirement
|
191
177
|
requirements:
|
192
|
-
- - "
|
178
|
+
- - "~>"
|
193
179
|
- !ruby/object:Gem::Version
|
194
|
-
version: '
|
180
|
+
version: '1.7'
|
195
181
|
description: SQLRunner allows you to load your queries out of SQL files, without using
|
196
182
|
ORMs.
|
197
183
|
email:
|
@@ -248,14 +234,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
248
234
|
requirements:
|
249
235
|
- - ">="
|
250
236
|
- !ruby/object:Gem::Version
|
251
|
-
version: 3.
|
237
|
+
version: 3.2.0
|
252
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
239
|
requirements:
|
254
240
|
- - ">="
|
255
241
|
- !ruby/object:Gem::Version
|
256
242
|
version: '0'
|
257
243
|
requirements: []
|
258
|
-
rubygems_version: 3.
|
244
|
+
rubygems_version: 3.5.9
|
259
245
|
signing_key:
|
260
246
|
specification_version: 4
|
261
247
|
summary: SQLRunner allows you to load your queries out of SQL files, without using
|