whi-cassie 1.3.0 → 1.3.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
  SHA256:
3
- metadata.gz: 38924e7460050a72c231a359a4a07e1695349b55d24868ae8332a0ecbcf61356
4
- data.tar.gz: 69f5b3396cb45c8f3247ba377d456173ac114220b2247163bc74060e9cff921a
3
+ metadata.gz: fb2b6308396ee1aa3b56d2bbf5e8aac4c7761454f37054049619154362bca277
4
+ data.tar.gz: 884c1de5a55bc6a22d4a0acfebfea4c8fd1b6056c3794e69f06009eb4941992b
5
5
  SHA512:
6
- metadata.gz: 46242596cf88a2d0600be23bb25a5138c7090acc952ccdbab3344d36abb1cd94ef4aef85bae071f60275297f10571377704a7de7348875cd0984439c7a3aecfd
7
- data.tar.gz: d6e68b1ffd9a28cb27984e01bbce135502b4107d50be350d275dd745375fb5a2b90efa5384a4578c250654674b0ae7512bfe529fe3dc21f52c59b37b87e390e3
6
+ metadata.gz: 5594ac24a519edf94ae03a082a169c460344449c84028da950b0ddcdc521fd434b4601828df501132ef68bb1ec480aad2176312bea15ec4fd3daba34274d2e87
7
+ data.tar.gz: 6dd17634a7c1879d0b94730aad7d083546dabb03135b1c77f830a76d3a451a9c5b84bd5842f44660752484b4110c1b6b5c9682f50bba04ef49b5ea83313f77a2
@@ -13,6 +13,22 @@ env:
13
13
  BUNDLE_JOBS: 3
14
14
  BUNDLE_RETRY: 3
15
15
  jobs:
16
+ standard:
17
+ name: StandardRB
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: checkout
21
+ uses: actions/checkout@v2
22
+ - name: set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: 3.0
26
+ - name: install dependencies
27
+ run: bundle install
28
+ - name: standardrb
29
+ if: matrix.job == 'standardrb'
30
+ run: bundle exec rake standard
31
+
16
32
  specs:
17
33
  name: ${{ matrix.job }} ruby-${{ matrix.ruby }} ${{ matrix.activemodel && format('activemodel-{0}', matrix.activemodel) }} cassandra-${{ matrix.cassandra_version }}
18
34
  runs-on: ubuntu-latest
@@ -24,7 +40,7 @@ jobs:
24
40
  strategy:
25
41
  fail-fast: false
26
42
  matrix:
27
- ruby: ["3.0"]
43
+ ruby: ["3.1"]
28
44
  activemodel: ["original"]
29
45
  job: [rspec]
30
46
  cassandra_version: ["latest"]
@@ -40,7 +56,7 @@ jobs:
40
56
  - ruby: "2.7"
41
57
  activemodel: "6"
42
58
  - ruby: "3.0"
43
- job: standardrb
59
+ activemodel: "7"
44
60
  steps:
45
61
  - name: checkout
46
62
  uses: actions/checkout@v2
@@ -59,6 +75,3 @@ jobs:
59
75
  - name: specs
60
76
  if: matrix.job == 'rspec'
61
77
  run: bundle exec rake spec
62
- - name: standardrb
63
- if: matrix.job == 'standardrb'
64
- run: bundle exec rake standard
data/HISTORY.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.3.1
2
+
3
+ * Remove automatic reconnect on I/O errors.
4
+ * Handle race condition on connecting when already connected.
5
+
1
6
  ## 1.3.0
2
7
 
3
8
  * Add update, update!, primary_key, and reload methods to models.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
data/lib/cassie.rb CHANGED
@@ -102,8 +102,10 @@ class Cassie
102
102
  cluster = Cassandra.cluster(cluster_config)
103
103
  logger&.info("Cassie.connect with #{config.sanitized_cluster} in #{((Time.now - start_time) * 1000).round}ms")
104
104
  @monitor.synchronize do
105
- @session = cluster.connect(config.default_keyspace)
106
- @prepared_statements = {}
105
+ unless @session
106
+ @session = cluster.connect(config.default_keyspace)
107
+ @prepared_statements = {}
108
+ end
107
109
  end
108
110
  end
109
111
 
@@ -307,9 +309,6 @@ class Cassie
307
309
  end
308
310
 
309
311
  session.execute(statement, options || {})
310
- rescue Cassandra::Errors::IOError => e
311
- disconnect
312
- raise e
313
312
  ensure
314
313
  if statement.is_a?(Cassandra::Statement) && !subscribers.empty?
315
314
  payload = Message.new(statement, options, Time.now - start_time)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whi-cassie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - We Heart It
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-04 00:00:00.000000000 Z
12
+ date: 2022-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cassandra-driver