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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7231972c5ebe74723a4eeb085545b3e04829d9b090350dc4768544b432f55f9
4
- data.tar.gz: 3e7213cb2b41cacacad8124e232142b48906df5632b8d0e74e99b8d8387e5992
3
+ metadata.gz: 779a566e5bf928898b95b22d1068425f92d0861729ddf040629a684aa264bf54
4
+ data.tar.gz: b104cfaf6aa9520897a329ac5901c6d81726d082029ddde6836f3d4433170f80
5
5
  SHA512:
6
- metadata.gz: eb0f038f9476123ce5287d26095c7aa9fb6980a2349e063c1d9bdd284d2043a78776c79d036703c75e20573209a9ad7121263ea80d89d3101eabe01d75fe5b9b
7
- data.tar.gz: 487de77a4b1fcebff0b021cb0ba80233a4b3d4d759886bf044142bfdea64f6f4a7dada9ee17726e3232d16fff16121dd97367ca1dc9818bf009f3364cf284b8e
6
+ metadata.gz: d5f7e81607249b27cba23d86f4aaefb67e07eee51e990f57480c8220bd2ed3a0c2c70f16c68a7b49dd8ea7ec8e4d88324f892dcdc803d5a5c330a9450819a086
7
+ data.tar.gz: fddc23e4f857365440c4d70b621b6b15713097b44aa3b9ecb2eb1f42865bca70b8307643f8c6609c183140b9780f99729b1343e17c7e49d42931d85b53939c30
@@ -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
- # @yieldparam [Transaction] a Transaction instance that can be used to
136
- # perform operations in the transaction
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
 
@@ -1,7 +1,7 @@
1
1
  module Imperium
2
2
  # A Transaction support for KV API
3
3
  class Transaction
4
- # Initializa a new transaction containing an array of
4
+ # Initaialize a new transaction containing an array of
5
5
  # operations
6
6
  def initialize
7
7
  @operations = []
@@ -1,3 +1,3 @@
1
1
  module Imperium
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
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.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-03 00:00:00.000000000 Z
11
+ date: 2018-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable