whi-cassie 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/continuous_integration.yml +4 -2
- data/HISTORY.md +4 -0
- data/VERSION +1 -1
- data/lib/cassie.rb +10 -2
- data/spec/cassie/model_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c87e681cda4e500a2f9cb34eee05a806525cce81305f2732ff6b33bd9c13170
|
4
|
+
data.tar.gz: 4edfe67aa1bba47bac102cd3b1b181240bab73469e45d16c0a1cc922467c74e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b1e1b1e0f674740d0f217a608ae1f024fff3c2529b6a29028b46cb6cbbbc6a077c2dc0b4fb8e2c0b0fa5dd6fa6cc233df74c76ce302378a738583c2fa3ea6a6
|
7
|
+
data.tar.gz: e192c9f23cd323468b47dbc20762e63dc891c6837e6863eb56ea2abee7611d5b50289795dc9da5b6061c9b62495833df5c61599ff7feec15ca00a31a89dbee83
|
@@ -28,13 +28,13 @@ jobs:
|
|
28
28
|
- name: standardrb
|
29
29
|
if: matrix.job == 'standardrb'
|
30
30
|
run: bundle exec rake standard
|
31
|
-
|
31
|
+
|
32
32
|
specs:
|
33
33
|
name: ${{ matrix.job }} ruby-${{ matrix.ruby }} ${{ matrix.activemodel && format('activemodel-{0}', matrix.activemodel) }} cassandra-${{ matrix.cassandra_version }}
|
34
34
|
runs-on: ubuntu-latest
|
35
35
|
services:
|
36
36
|
cassandra:
|
37
|
-
image: cassandra:${{ matrix.cassandra_version }}
|
37
|
+
image: cassandra:${{ matrix.cassandra_version || 'latest' }}
|
38
38
|
ports:
|
39
39
|
- 9042:9042
|
40
40
|
strategy:
|
@@ -55,8 +55,10 @@ jobs:
|
|
55
55
|
cassandra_version: "2"
|
56
56
|
- ruby: "2.7"
|
57
57
|
activemodel: "6"
|
58
|
+
job: rspec
|
58
59
|
- ruby: "3.0"
|
59
60
|
activemodel: "7"
|
61
|
+
job: rspec
|
60
62
|
steps:
|
61
63
|
- name: checkout
|
62
64
|
uses: actions/checkout@v2
|
data/HISTORY.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.2
|
data/lib/cassie.rb
CHANGED
@@ -128,7 +128,9 @@ class Cassie
|
|
128
128
|
# like passenger or unicorn you should call this method after forking.
|
129
129
|
def reconnect
|
130
130
|
disconnect
|
131
|
-
|
131
|
+
@monitor.synchronize do
|
132
|
+
connect unless connected?
|
133
|
+
end
|
132
134
|
end
|
133
135
|
|
134
136
|
# Prepare a CQL statement for repeate execution. Prepared statements
|
@@ -329,7 +331,13 @@ class Cassie
|
|
329
331
|
end
|
330
332
|
|
331
333
|
def session
|
332
|
-
|
334
|
+
unless connected?
|
335
|
+
# Check again inside the monitor lock so we don't get in a race condition
|
336
|
+
# where another thread has already established the connection.
|
337
|
+
@monitor.synchronize do
|
338
|
+
connect unless connected?
|
339
|
+
end
|
340
|
+
end
|
333
341
|
@session
|
334
342
|
end
|
335
343
|
|
data/spec/cassie/model_spec.rb
CHANGED
@@ -133,7 +133,7 @@ describe Cassie::Model do
|
|
133
133
|
describe "batch" do
|
134
134
|
it "should delegate to Cassie.batch using the write consistency" do
|
135
135
|
expect(Cassie::Thing.connection).to be_a(Cassie)
|
136
|
-
expect(Cassie::Thing.connection).to receive(:batch).
|
136
|
+
expect(Cassie::Thing.connection).to receive(:batch).and_call_original
|
137
137
|
Cassie::Thing.batch {}
|
138
138
|
end
|
139
139
|
end
|
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.
|
4
|
+
version: 1.3.2
|
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-05-
|
12
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cassandra-driver
|