quandl_cassandra 1.2.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0ea7008c85dfdf613b3c4a832caebb39612d9e5
4
- data.tar.gz: 601fd551e63a0fe03f81717860856234e1de5ae5
3
+ metadata.gz: c1156756870d067c7a45b0adac3aeb28bb178341
4
+ data.tar.gz: 6694abc885d6f47089e18dd9835bce4376504b5c
5
5
  SHA512:
6
- metadata.gz: 12f33f521644c7c2d46e407b7d9de0066b4c420a755bcf932b5e911f85fd0bed72124d91bd3c4c54d8120a597141464c878727aeea02a8c2600405f4ffe6366d
7
- data.tar.gz: fee4eecf940a3eeceb6b82409a8c11f473b3822f9c30585188292991a3893839166d5118937ed93bc1a7771257ba7752db165d7ea77bd6a8878930ef46b45688
6
+ metadata.gz: 9c0e26bb8a9312686564243b4191d785034a8e14c60aa41ec3b85e365ea20c4e649e1bf5dce16f89b2709945d4b2c22c4e7b9d3f64dc1571b255c3a769ab5492
7
+ data.tar.gz: 36620d39a8e99e4996c1aabd84d2c11ebfd06eba5e7bb39eb0aba2ccb9d41b9752447750ad249f2352c0e50422cc5475b6ae00a405df2ef8a9ac1b59a91ab7d7
data/UPGRADE.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 1.2.1
2
+
3
+ * revise Cql::QueryError exception catching and reraise
4
+ * bump quandl_data
5
+ * catch errors and display useful messages
6
+
7
+
1
8
  ## 1.1.3
2
9
 
3
10
  * refactor batch#insert to batch#execute
@@ -27,7 +27,7 @@ module Quandl::Cassandra::Base::Connection
27
27
  c.async.execute( statement, query_consistency )
28
28
  end
29
29
  rescue Cql::QueryError => e
30
- raise "#{e.class} #{e.message} '#{statement}'"
30
+ raise $!, "#{statement} #{$!}", $!.backtrace
31
31
  end
32
32
 
33
33
  def execute(statement, qconsistency = nil)
@@ -36,7 +36,7 @@ module Quandl::Cassandra::Base::Connection
36
36
  c.execute( statement, qconsistency )
37
37
  end
38
38
  rescue Cql::QueryError => e
39
- raise "#{e.class} #{e.message} '#{statement}'"
39
+ raise $!, "#{statement} #{$!}", $!.backtrace
40
40
  end
41
41
 
42
42
  def with_connection(&block)
@@ -10,7 +10,7 @@ module Quandl::Cassandra::Batch::Execute
10
10
  def execute(rows, &block)
11
11
  execute_in_batches(rows, &block)
12
12
  rescue => e
13
- raise "#{e.class} #{e.message} '#{block.call(*rows.first)}'"
13
+ raise $!, "#{block.call(*rows.first)} #{$!}", $!.backtrace
14
14
  end
15
15
 
16
16
  def batch_size
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Cassandra
3
- VERSION = '1.2.0'
3
+ VERSION = '1.2.1'
4
4
  end
5
5
  end
@@ -3,9 +3,12 @@ require 'spec_helper'
3
3
  describe Quandl::Cassandra::Base::Connection do
4
4
 
5
5
  describe ".reset_connection" do
6
+
6
7
  it "should raise Cql::QueryError" do
7
- Quandl::Cassandra.configuration.keyspace = 'missing_keyspace'
8
- expect{ Post.reset_connection }.to raise_error(Cql::QueryError)
8
+ expect{
9
+ Quandl::Cassandra.configuration.keyspace = 'missing_keyspace'
10
+ Post.reset_connection
11
+ }.to raise_error(Cql::QueryError)
9
12
  end
10
13
  end
11
14
 
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,9 @@ require 'securerandom'
9
9
 
10
10
  require "quandl/cassandra"
11
11
  require "quandl/fabricate"
12
+
13
+ require "config/cassandra"
14
+
12
15
  require 'rspec/expectations'
13
16
 
14
17
  # require config
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_cassandra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher