imperium 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/imperium/kv.rb +9 -4
- data/lib/imperium/transaction.rb +1 -1
- data/lib/imperium/version.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: 779a566e5bf928898b95b22d1068425f92d0861729ddf040629a684aa264bf54
|
4
|
+
data.tar.gz: b104cfaf6aa9520897a329ac5901c6d81726d082029ddde6836f3d4433170f80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5f7e81607249b27cba23d86f4aaefb67e07eee51e990f57480c8220bd2ed3a0c2c70f16c68a7b49dd8ea7ec8e4d88324f892dcdc803d5a5c330a9450819a086
|
7
|
+
data.tar.gz: fddc23e4f857365440c4d70b621b6b15713097b44aa3b9ecb2eb1f42865bca70b8307643f8c6609c183140b9780f99729b1343e17c7e49d42931d85b53939c30
|
data/lib/imperium/kv.rb
CHANGED
@@ -132,13 +132,18 @@ module Imperium
|
|
132
132
|
# This is useful when having a number of statements that must be executed
|
133
133
|
# together or not at all.
|
134
134
|
#
|
135
|
-
#
|
136
|
-
#
|
135
|
+
# @param [Array<Symbol,String,Hash>] options The options for constructing
|
136
|
+
# the request
|
137
|
+
# @option options [String] :dc Specify the datacenter to use for the request
|
138
|
+
# @yieldparam [Transaction] a Transaction instance that can be used to
|
139
|
+
# perform operations in the transaction
|
137
140
|
# @return [TransactionResponse]
|
138
|
-
def transaction
|
141
|
+
def transaction(*options)
|
142
|
+
expanded_options = hashify_options(options)
|
143
|
+
query_params = extract_query_params(expanded_options)
|
139
144
|
tx = Imperium::Transaction.new
|
140
145
|
yield tx
|
141
|
-
response = @http_client.put('v1/txn', tx.body)
|
146
|
+
response = @http_client.put('v1/txn', tx.body, query: query_params)
|
142
147
|
Imperium::TransactionResponse.new(response)
|
143
148
|
end
|
144
149
|
|
data/lib/imperium/transaction.rb
CHANGED
data/lib/imperium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imperium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Pickett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|