sequel-rails 0.9.0 → 0.9.1
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/.travis.yml +5 -0
- data/History.md +7 -0
- data/README.md +9 -4
- data/lib/sequel_rails/configuration.rb +1 -0
- data/lib/sequel_rails/version.rb +1 -1
- data/spec/lib/sequel_rails/configuration_spec.rb +16 -0
- data/spec/lib/sequel_rails/railties/log_subscriber_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ee4521d1afd135d7d65cc7ba45017216fd2f348
|
4
|
+
data.tar.gz: aff23da29a4c91b19ff7cfc4bdd293bfa48854c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e9eb46be203ba4ba9d45a67fb5d39db1ecdca29345c9c7077d7b0350e624a75c53ccc5ccce72656c7ae5f29f9ef64fe5cb5701fcaeb22b051b97879cf605570
|
7
|
+
data.tar.gz: 2132e25c69b9fb4504ae054344fea7113e349b6001408a375ba839119ccd6142ccd904edd2a95c45197e0c9d3e5851344b315f78a19cb516a3b8328566b887ea
|
data/.travis.yml
CHANGED
data/History.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
0.9.1 (2013-12-31)
|
2
|
+
==================
|
3
|
+
|
4
|
+
* Map `ActiveRecord`'s `pool` key to `Sequel`'s `max_connections` in YAML
|
5
|
+
configuration [#59](https://github.com/TalentBox/sequel-rails/issues/59)
|
6
|
+
* Run tests on Ruby 2.1.0
|
7
|
+
|
1
8
|
0.9.0 (2013-11-16)
|
2
9
|
==================
|
3
10
|
|
data/README.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
sequel-rails
|
2
|
-
|
1
|
+
# sequel-rails
|
2
|
+
|
3
|
+
[][gem]
|
4
|
+
[][travis]
|
5
|
+
[][codeclimate]
|
3
6
|
|
4
|
-
[
|
5
|
-
[
|
7
|
+
[gem]: https://rubygems.org/gems/sequel-rails
|
8
|
+
[travis]: http://travis-ci.org/TalentBox/sequel-rails
|
9
|
+
[codeclimate]: https://codeclimate.com/github/TalentBox/sequel-rails
|
6
10
|
|
7
11
|
This gem provides the railtie that allows
|
8
12
|
[sequel](http://github.com/jeremyevans/sequel) to hook into
|
@@ -173,6 +177,7 @@ Here's some examples:
|
|
173
177
|
ctype: en_US.UTF-8 # Optional
|
174
178
|
template: template1 # Optional
|
175
179
|
tablespace: non_default_tablespace_name # Optional
|
180
|
+
max_connections: 20 # Optional, also accept 'pool' as key, if both are present 'max_connections' is used (default to nil, Sequel default is 4)
|
176
181
|
```
|
177
182
|
|
178
183
|
2. For MySQL:
|
@@ -87,6 +87,7 @@ module SequelRails
|
|
87
87
|
end
|
88
88
|
|
89
89
|
# override max connections if requested in app configuration
|
90
|
+
config['max_connections'] ||= config['pool']
|
90
91
|
config['max_connections'] = max_connections if max_connections
|
91
92
|
config['search_path'] = search_path if search_path
|
92
93
|
|
data/lib/sequel_rails/version.rb
CHANGED
@@ -142,6 +142,22 @@ describe SequelRails::Configuration do
|
|
142
142
|
subject.connect environment
|
143
143
|
end
|
144
144
|
end
|
145
|
+
|
146
|
+
context 'with pool configuration key' do
|
147
|
+
before do
|
148
|
+
environments[environment]['pool'] = 7
|
149
|
+
end
|
150
|
+
it 'uses the value' do
|
151
|
+
expect(::Sequel).to receive(:connect) do |hash_or_url, *_|
|
152
|
+
if hash_or_url.is_a? Hash
|
153
|
+
expect(hash_or_url['max_connections']).to eq(7)
|
154
|
+
else
|
155
|
+
expect(hash_or_url).to include('max_connections=7')
|
156
|
+
end
|
157
|
+
end
|
158
|
+
subject.connect environment
|
159
|
+
end
|
160
|
+
end
|
145
161
|
end
|
146
162
|
|
147
163
|
context 'for a postgres connection' do
|
@@ -3,7 +3,7 @@ require 'active_support/log_subscriber/test_helper'
|
|
3
3
|
|
4
4
|
describe SequelRails::Railties::LogSubscriber do
|
5
5
|
include ActiveSupport::LogSubscriber::TestHelper
|
6
|
-
def set_logger(logger)
|
6
|
+
def set_logger(logger) # rubocop:disable AccessorMethodName
|
7
7
|
SequelRails.configuration.logger = logger
|
8
8
|
ActiveSupport::LogSubscriber.logger = logger
|
9
9
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brasten Sager (brasten)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-12-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
requirements: []
|
260
260
|
rubyforge_project:
|
261
|
-
rubygems_version: 2.
|
261
|
+
rubygems_version: 2.1.11
|
262
262
|
signing_key:
|
263
263
|
specification_version: 4
|
264
264
|
summary: Use Sequel with Rails (3.x and 4.x)
|