sequel-rails 0.9.0 → 0.9.1

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
  SHA1:
3
- metadata.gz: 395942ff9378ccc865cd522cc7f9007900357a02
4
- data.tar.gz: f6f81cc77327938dd8a151e43f3c7edc9fd73b61
3
+ metadata.gz: 6ee4521d1afd135d7d65cc7ba45017216fd2f348
4
+ data.tar.gz: aff23da29a4c91b19ff7cfc4bdd293bfa48854c4
5
5
  SHA512:
6
- metadata.gz: a0bdf0d65e0b1bbb43b59db21e2522f00cea7627c6dd0c944a662c74696f1c30241f4324fc7675decbaa6e7ab48242785924c528b0d518763b25ec29d6f9fb7b
7
- data.tar.gz: 2f2159dbe2b44a605860661316f2e803975e21caf15fd4938c18cb12a9da6204dae1a1f8573078a4da7acaddf14ee9ae50ff32f3209ddd55d1b0a9465843457c
6
+ metadata.gz: 5e9eb46be203ba4ba9d45a67fb5d39db1ecdca29345c9c7077d7b0350e624a75c53ccc5ccce72656c7ae5f29f9ef64fe5cb5701fcaeb22b051b97879cf605570
7
+ data.tar.gz: 2132e25c69b9fb4504ae054344fea7113e349b6001408a375ba839119ccd6142ccd904edd2a95c45197e0c9d3e5851344b315f78a19cb516a3b8328566b887ea
data/.travis.yml CHANGED
@@ -1,9 +1,14 @@
1
1
  language: ruby
2
+ before_install:
3
+ - gem update --system 2.1.11
4
+ - gem --version
5
+ - gem install bundler -v 1.5.1
2
6
  rvm:
3
7
  - ree
4
8
  - 1.8.7
5
9
  - 1.9.3
6
10
  - 2.0.0
11
+ - 2.1.0
7
12
  - jruby-18mode
8
13
  - jruby-19mode
9
14
  - jruby-20mode
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 Version](https://badge.fury.io/rb/sequel-rails.png)][gem]
4
+ [![Build Status](https://secure.travis-ci.org/TalentBox/sequel-rails.png?branch=master)][travis]
5
+ [![Code Climate](https://codeclimate.com/github/TalentBox/sequel-rails.png)][codeclimate]
3
6
 
4
- [![Build Status](https://travis-ci.org/TalentBox/sequel-rails.png?branch=master)](https://travis-ci.org/TalentBox/sequel-rails)
5
- [![Code Climate](https://codeclimate.com/github/TalentBox/sequel-rails.png)](https://codeclimate.com/github/TalentBox/sequel-rails)
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
 
@@ -1,3 +1,3 @@
1
1
  module SequelRails
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
@@ -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.0
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-11-16 00:00:00.000000000 Z
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.0.3
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)