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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3224a627fbfdb75b22aff61e35fce3def752d203da72e6cfc89a80c539cfd413
4
- data.tar.gz: 0b6102814d498c2fbf53b1b642f3d03b639af95514d5d1d9854d579deb79aee4
3
+ metadata.gz: 2d872ea15c372e83cf53ea750d274c5bae439323ed8ae27ca8bc74e9bdeef55c
4
+ data.tar.gz: a2ebaf2d1deddc6c34df6cd0b9fe38e161c790df31fac212254f10907beeddfa
5
5
  SHA512:
6
- metadata.gz: 6a622ef1f472136f5298a3fa4c37ba3b46f3265e7538c126ad2718e950db0e24fcfd65b49dad8eee47cf7fa699ca0623cc970cebbaabc89f327092ef5998b910
7
- data.tar.gz: 126036d892682c63236f01dec9152fdf8cbc66e58846e04ca2e4767a408409e1f154cf57104d8cc59b78f03310f359293856e987d1271ab4efdbd72867f97dc1
6
+ metadata.gz: b8c737e3faca0c83d76d2bf89a58a6cc2d72c5054ddd9f8a3b576b27a8f1fafd0d574276b6bd13a1b37684e001d78d0036e3373ff1070a5ca0f45703edab3f2e
7
+ data.tar.gz: bed77acf3c52539623139da8af8dfc55ce2637b757f979ddf6bdeb6aa0a47f256cde28e782261bb0df5f4e83212b3433c47ca8bc8b9b6571e88210bbd2097d7e
@@ -19,7 +19,7 @@ jobs:
19
19
  strategy:
20
20
  fail-fast: false
21
21
  matrix:
22
- ruby: ["3.0", "3.1", "3.2"]
22
+ ruby: ["3.2", "3.3"]
23
23
  gemfile:
24
24
  - Gemfile
25
25
 
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ inherit_gem:
4
4
 
5
5
  AllCops:
6
6
  NewCops: enable
7
- TargetRubyVersion: 3.0
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.instance_variable_get(:@connection)
45
+ connection = connection.raw_connection
46
46
 
47
47
  adapter = case connection.class.name
48
48
  when "PG::Connection"
@@ -12,7 +12,7 @@ module SQLRunner
12
12
  end
13
13
 
14
14
  def self.create_connection_pool(timeout:, size:, connection_string:)
15
- ConnectionPool.new(timeout: timeout, size: size) do
15
+ ConnectionPool.new(timeout:, size:) do
16
16
  new(connection_string)
17
17
  end
18
18
  end
@@ -12,7 +12,7 @@ module SQLRunner
12
12
  end
13
13
 
14
14
  def self.create_connection_pool(timeout:, size:, connection_string:)
15
- ConnectionPool.new(timeout: timeout, size: size) do
15
+ ConnectionPool.new(timeout:, size:) do
16
16
  new(connection_string)
17
17
  end
18
18
  end
@@ -12,7 +12,7 @@ module SQLRunner
12
12
  end
13
13
 
14
14
  def self.create_connection_pool(timeout:, size:, connection_string:)
15
- ConnectionPool.new(timeout: timeout, size: size) do
15
+ ConnectionPool.new(timeout:, size:) do
16
16
  new(connection_string)
17
17
  end
18
18
  end
@@ -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: connection_string
12
+ connection_string:
13
13
  )
14
14
  end
15
15
 
16
- def with_connection(&block)
17
- connection_pool.with(&block)
16
+ def with_connection(&)
17
+ connection_pool.with(&)
18
18
  end
19
19
 
20
20
  def connect(connection_string)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SQLRunner
4
- VERSION = "0.4.1"
4
+ VERSION = "1.0.0"
5
5
  end
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.0.0")
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.1
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: 2023-01-04 00:00:00.000000000 Z
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: '0'
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: '0'
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.0.0
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.4.1
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