rsconn 0.0.7 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8efc5478617476c1839a7262f46c8db28e7252b
4
- data.tar.gz: c74faacb72b72f2b2a3f719cea2524f76418643e
3
+ metadata.gz: fa485e1c849b20144e1c556fc6e6be7bf3b5916f
4
+ data.tar.gz: 2204eeb90cbcbb79f63291f8084c76f493e75138
5
5
  SHA512:
6
- metadata.gz: ba10402a26b2a326109e4c7c9a37f8505eb53223d1f944c67457f7b2e7aa81e539e9dff14a2ae743721177a6be1e54c45b39e2670831a497dd2323596752f002
7
- data.tar.gz: 47acaefb06bd0802384fde2b6c98c78478d98cbda90bad1aafe49b76ab0b973cc9671272d271d05c8de4eb5d272df240970c279b2ee2da903005f8531331921a
6
+ metadata.gz: fb3e23a5a8561b0308765783cfdc6f0b9b6ec8a9f524f94fd021fc56392227dedee45cbebca66a977fa47df6954cb8a69b846c48bb31d1800ffabca7c5a22cf6
7
+ data.tar.gz: 4bc9703e8326a7173f7ab07f8ebf7883fa642ac12ec4a7d207841dcd069aea287db80fef67c34e8da25f960108b432de854ef40103d25bf8a2001453d04a17fd
@@ -10,8 +10,8 @@ module Rsconn
10
10
 
11
11
  db_type = @url.split(':')[1]
12
12
 
13
- if db_type != 'postgresql'
14
- fail ArgumentError, 'Only works with a "postgresql" JDBC URL'
13
+ unless %w(redshift postgresql).include?(db_type)
14
+ fail ArgumentError, 'Only works with a "redshift" or "postgresql" JDBC URL'
15
15
  end
16
16
  end
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Rsconn
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -8,14 +8,23 @@ module Rsconn
8
8
  PORT = 5439
9
9
  DATABASE = 'dbname'
10
10
  OPTIONS = 'tcpKeepAlive=true'
11
- JDBC_URL = "jdbc:postgresql://#{HOST}:#{PORT}/#{DATABASE}?#{OPTIONS}"
11
+ REDSHIFT_URL = "jdbc:redshift://#{HOST}:#{PORT}/#{DATABASE}?#{OPTIONS}"
12
+ POSTGRESQL_URL = "jdbc:postgresql://#{HOST}:#{PORT}/#{DATABASE}?#{OPTIONS}"
12
13
  MYSQL_URL = "jdbc:mysql://#{HOST}:#{PORT}/#{DATABASE}"
13
14
 
14
15
  describe '#new' do
15
16
 
16
- context 'when a good url is given' do
17
- subject { JdbcUrl.new(JDBC_URL) }
18
- its(:url) { should eq(JDBC_URL) }
17
+ context 'when a redshift url is given' do
18
+ subject { JdbcUrl.new(REDSHIFT_URL) }
19
+ its(:url) { should eq(REDSHIFT_URL) }
20
+ its(:host) { should eq(HOST) }
21
+ its(:port) { should eq(PORT) }
22
+ its(:database) { should eq(DATABASE) }
23
+ end
24
+
25
+ context 'when a redshift url is given' do
26
+ subject { JdbcUrl.new(POSTGRESQL_URL) }
27
+ its(:url) { should eq(POSTGRESQL_URL) }
19
28
  its(:host) { should eq(HOST) }
20
29
  its(:port) { should eq(PORT) }
21
30
  its(:database) { should eq(DATABASE) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsconn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Morin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-19 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
- rubygems_version: 2.2.2
168
+ rubygems_version: 2.4.5
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: Redshift wrapper.