sequel-vertica 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  require 'sequel-vertica/version'
2
- require './lib/sequel/adapters/vertica'
2
+ require 'sequel/adapters/vertica'
3
3
 
4
4
  Sequel::Database::ADAPTERS << 'vertica'
@@ -1,5 +1,5 @@
1
1
  module Sequel
2
2
  module Vertica
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -24,6 +24,8 @@ module Sequel
24
24
  res = conn.query(sql)
25
25
  res.each(&block)
26
26
  end
27
+ rescue ::Vertica::Error => e
28
+ raise_error(e)
27
29
  end
28
30
 
29
31
  def execute_insert(sql, opts = {}, &block)
@@ -1,9 +1,11 @@
1
1
  require 'rubygems'
2
2
  require 'logger'
3
- unless Object.const_defined?('Sequel')
3
+
4
+ unless Object.const_defined?('Sequel') && Sequel.const_defined?('Model')
4
5
  $:.unshift(File.join(File.dirname(File.expand_path(__FILE__)), "../../lib/"))
5
6
  require 'sequel'
6
7
  end
8
+
7
9
  begin
8
10
  require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), 'spec_config.rb')
9
11
  rescue LoadError
@@ -14,6 +16,7 @@ if ENV['SEQUEL_COLUMNS_INTROSPECTION']
14
16
  Sequel::Dataset.introspect_all_columns
15
17
  end
16
18
 
19
+
17
20
  Sequel::Model.cache_anonymous_models = false
18
21
 
19
22
  class Sequel::Database
@@ -166,7 +166,7 @@ describe "A Vertica database" do
166
166
  @db[:test2].first[:xyz].should == '000'
167
167
 
168
168
  @db[:test2].columns.should == [:name, :value, :xyz]
169
- proc{ @db.drop_column :test2, :xyz }.should raise_error(Vertica::Error::QueryError,
169
+ proc{ @db.drop_column :test2, :xyz }.should raise_error(Sequel::DatabaseError,
170
170
  /ALTER TABLE DROP COLUMN not supported/)
171
171
 
172
172
  @db[:test2].columns.should ==[:name, :value, :xyz]
@@ -184,7 +184,7 @@ describe "A Vertica database" do
184
184
  @db[:test2].delete
185
185
  @db[:test2] << {:name => 'mmm', :value => 111, :xyz => 56.78}
186
186
 
187
- proc{ @db.set_column_type :test2, :xyz, :integer }.should raise_error(Vertica::Error::QueryError,
187
+ proc{ @db.set_column_type :test2, :xyz, :integer }.should raise_error(Sequel::DatabaseError,
188
188
  /ALTER TABLE ALTER COLUMN not supported/)
189
189
  end
190
190
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-vertica
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-06 00:00:00.000000000Z
12
+ date: 2012-07-26 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70200730106740 !ruby/object:Gem::Requirement
16
+ requirement: &70231334656280 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70200730106740
24
+ version_requirements: *70231334656280
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sequel
27
- requirement: &70200730105120 !ruby/object:Gem::Requirement
27
+ requirement: &70231334655100 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.35.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70200730105120
35
+ version_requirements: *70231334655100
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: vertica
38
- requirement: &70200730104240 !ruby/object:Gem::Requirement
38
+ requirement: &70231334654060 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 0.9.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70200730104240
46
+ version_requirements: *70231334654060
47
47
  description: Sequel adapter for the Vertica database
48
48
  email:
49
49
  - camilo@camilolopez.com
@@ -75,12 +75,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
+ segments:
79
+ - 0
80
+ hash: -1597059176510367984
78
81
  required_rubygems_version: !ruby/object:Gem::Requirement
79
82
  none: false
80
83
  requirements:
81
84
  - - ! '>='
82
85
  - !ruby/object:Gem::Version
83
86
  version: '0'
87
+ segments:
88
+ - 0
89
+ hash: -1597059176510367984
84
90
  requirements: []
85
91
  rubyforge_project:
86
92
  rubygems_version: 1.8.10