serfx 0.0.2 → 0.0.3

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: 8fc4921d5134cf839d21cf4ad57a23cb55147359
4
- data.tar.gz: cb1047f5ff43db315934db351ee08aa7b1518820
3
+ metadata.gz: 9a98baec5b14b9cd623e2196eaf2ec1db08df41a
4
+ data.tar.gz: 02919fe89d543b7771bcdbfbb77f08cfbfc5d467
5
5
  SHA512:
6
- metadata.gz: b4146f8211e7c20e55a1f12ca2ada7a94b1a615221ae7e83a4563c8c380ef2c54002293ecb1993df2b5064512a2ba1ba3adf403f25e5594f00525e114aebe4fd
7
- data.tar.gz: e123d303f6af8433a93f8c65ced93d5c5241c5958edd1046fec63fbda950f4c383683241ade956ad1f3fb1eae69a98866b8e720096f966f45fabc9530e19c5d7
6
+ metadata.gz: 9bb9c8afc5e2b491bb533f672667692a533f7d9639078e3d1b1e2f1996765d55449e3bfa25c5c3c72e7889f6b9ac5f61979ac191cfe7e79c02708460d4abcdb9
7
+ data.tar.gz: 30445ba217eda5ff981d06f9a47197b995736ea0904f3fec155574bbdf6614264ce93933a3db7cb44f95f5cd51aad77386399d836b516ddddbcaf3189a248933
@@ -198,5 +198,12 @@ module Serfx
198
198
  def list_keys
199
199
  request(:list_keys)
200
200
  end
201
+
202
+ # obtain stats about the agent(same as info command)
203
+ #
204
+ # @return [Response]
205
+ def stats
206
+ request(:stats)
207
+ end
201
208
  end
202
209
  end
@@ -31,7 +31,8 @@ module Serfx
31
31
  install_key: [:header, :body],
32
32
  use_key: [:header, :body],
33
33
  remove_key: [:header, :body],
34
- list_keys: [:header, :body]
34
+ list_keys: [:header, :body],
35
+ stats: [:header, :body]
35
36
  }
36
37
 
37
38
  include Serfx::Commands
@@ -2,5 +2,5 @@
2
2
  #
3
3
  # Provides version as a contsant for the serf gem
4
4
  module Serfx
5
- VERSION = '0.0.2'
5
+ VERSION = '0.0.3'
6
6
  end
@@ -142,4 +142,10 @@ describe Serfx do
142
142
  final_keys = @conn.list_keys.body['Keys'].keys
143
143
  expect(final_keys.first).to_not include('QHOYjmYlxSCBhdfiolhtDQ==')
144
144
  end
145
+
146
+ it '#stats' do
147
+ response = @conn.stats
148
+ expect(response.header.error).to be_empty
149
+ expect(response.body['serf']['members'].to_i).to eq(5)
150
+ end
145
151
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serfx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rnjib Dey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-28 00:00:00.000000000 Z
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack