rom-sql 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -1
- data/lib/rom/sql/gateway.rb +8 -0
- data/lib/rom/sql/version.rb +1 -1
- data/spec/unit/{repository_spec.rb → gateway_spec.rb} +9 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 092d7392edf6c7ee3ab5ae94c46642226cc9fe9c
|
4
|
+
data.tar.gz: 53c8bcf25ba8f8855b06e8e9f17e26c06c2ec359
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07fd1f32d6a6d81068434ed420be539ab0a6781b24cb1601dbffc9c3620d29b2b02201f90cb121f4d33afd03e91faa8f07c47e687af2ff45a9ef57e3d889a749
|
7
|
+
data.tar.gz: 4176a62ba46b000a5248a76cb06e355440e46532c9050199533add0e9c4a3009d56c9e5a137edc70c402ea2a092c68fdc81de2f6f00f817194beb300289447df
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## v0.6.1 2015-09-23
|
2
|
+
|
3
|
+
### Added
|
4
|
+
|
5
|
+
* `Gateway` accepts `:extensions` as an option (c0)
|
6
|
+
|
7
|
+
[Compare v0.6.0...v0.6.1](https://github.com/rom-rb/rom-sql/compare/v0.6.0...v0.6.1)
|
8
|
+
|
1
9
|
## v0.6.0 2015-08-19
|
2
10
|
|
3
11
|
Internal updates to fix deprecation warnings from ROM 0.9.0.
|
data/Gemfile
CHANGED
@@ -4,7 +4,7 @@ gemspec
|
|
4
4
|
|
5
5
|
group :test do
|
6
6
|
gem 'byebug', platforms: :mri
|
7
|
-
gem 'anima'
|
7
|
+
gem 'anima', '~> 0.2.0'
|
8
8
|
gem 'rom', github: 'rom-rb/rom', branch: 'master'
|
9
9
|
gem 'rom-support', github: 'rom-rb/rom-support', branch: 'master'
|
10
10
|
gem 'rom-mapper', github: 'rom-rb/rom-mapper', branch: 'master'
|
data/lib/rom/sql/gateway.rb
CHANGED
@@ -67,6 +67,7 @@ module ROM
|
|
67
67
|
|
68
68
|
@connection = connect(uri, conn_options)
|
69
69
|
@schema = connection.tables
|
70
|
+
add_extensions(Array(options[:extensions])) if options[:extensions]
|
70
71
|
|
71
72
|
super(uri, options.reject { |k,_| conn_options.keys.include?(k) })
|
72
73
|
end
|
@@ -161,6 +162,13 @@ module ROM
|
|
161
162
|
::Sequel.connect(uri.to_s, *args)
|
162
163
|
end
|
163
164
|
end
|
165
|
+
|
166
|
+
# Add extensions to the database connection
|
167
|
+
#
|
168
|
+
# @api private
|
169
|
+
def add_extensions(exts)
|
170
|
+
connection.extension(*exts)
|
171
|
+
end
|
164
172
|
end
|
165
173
|
end
|
166
174
|
end
|
data/lib/rom/sql/version.rb
CHANGED
@@ -35,6 +35,15 @@ describe ROM::SQL::Gateway do
|
|
35
35
|
|
36
36
|
expect(gateway.options).to eql(migrator: migrator)
|
37
37
|
end
|
38
|
+
|
39
|
+
it 'allows extensions' do
|
40
|
+
extensions = [:pg_array, :pg_enum]
|
41
|
+
connection = Sequel.connect uri
|
42
|
+
|
43
|
+
expect(connection).to receive(:extension).with(:pg_array, :pg_enum)
|
44
|
+
|
45
|
+
ROM::SQL::Gateway.new(connection, extensions: extensions)
|
46
|
+
end
|
38
47
|
end
|
39
48
|
|
40
49
|
describe '#disconnect' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- spec/support/rails_log_subscriber_spec.rb
|
159
159
|
- spec/unit/association_errors_spec.rb
|
160
160
|
- spec/unit/combined_associations_spec.rb
|
161
|
+
- spec/unit/gateway_spec.rb
|
161
162
|
- spec/unit/logger_spec.rb
|
162
163
|
- spec/unit/many_to_many_spec.rb
|
163
164
|
- spec/unit/many_to_one_spec.rb
|
@@ -166,7 +167,6 @@ files:
|
|
166
167
|
- spec/unit/one_to_many_spec.rb
|
167
168
|
- spec/unit/plugin/pagination_spec.rb
|
168
169
|
- spec/unit/relation_spec.rb
|
169
|
-
- spec/unit/repository_spec.rb
|
170
170
|
- spec/unit/schema_spec.rb
|
171
171
|
homepage: http://rom-rb.org
|
172
172
|
licenses:
|
@@ -208,6 +208,7 @@ test_files:
|
|
208
208
|
- spec/support/rails_log_subscriber_spec.rb
|
209
209
|
- spec/unit/association_errors_spec.rb
|
210
210
|
- spec/unit/combined_associations_spec.rb
|
211
|
+
- spec/unit/gateway_spec.rb
|
211
212
|
- spec/unit/logger_spec.rb
|
212
213
|
- spec/unit/many_to_many_spec.rb
|
213
214
|
- spec/unit/many_to_one_spec.rb
|
@@ -216,5 +217,4 @@ test_files:
|
|
216
217
|
- spec/unit/one_to_many_spec.rb
|
217
218
|
- spec/unit/plugin/pagination_spec.rb
|
218
219
|
- spec/unit/relation_spec.rb
|
219
|
-
- spec/unit/repository_spec.rb
|
220
220
|
- spec/unit/schema_spec.rb
|