gaptool-api 0.2.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/gaptool-api.gemspec +2 -2
  3. data/lib/gaptool-api.rb +23 -2
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.4
data/gaptool-api.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gaptool-api"
8
- s.version = "0.2.2"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Bailey"]
12
- s.date = "2013-01-07"
12
+ s.date = "2013-01-16"
13
13
  s.description = "gaptool-server ruby API"
14
14
  s.email = "m@mdb.io"
15
15
  s.extra_rdoc_files = [
data/lib/gaptool-api.rb CHANGED
@@ -10,19 +10,30 @@ module GTAPI
10
10
  GaptoolServer.base_uri uri
11
11
  end
12
12
 
13
+ def mongocollectioncount(hash)
14
+ options = {:body => hash, :headers => @auth}
15
+ JSON::parse self.class.post("/status/mongo/colcount", options)
16
+ end
17
+
13
18
  def remoteredisllen(list)
14
19
  options = {:body => list, :headers => @auth}
15
20
  JSON::parse self.class.post("/status/redis/llen", options)
16
21
  end
17
22
 
23
+ def remoteredislpush(list, value)
24
+ @body = {'list' => list, 'value' => value}.to_json
25
+ options = {:body => @body, :headers => @auth}
26
+ JSON::parse self.class.post("/status/redis/lpush", options)
27
+ end
28
+
18
29
  def redishash(hash)
19
30
  options = {:body => hash, :headers => @auth}
20
31
  JSON::parse self.class.post("/redishash", options)
21
32
  end
22
33
 
23
- def getonenode(role, environment, id)
34
+ def getonenode(id)
24
35
  options = {:headers => @auth}
25
- JSON::parse self.class.get("/host/#{role}/#{environment}/#{id}", options)
36
+ JSON::parse self.class.get("/instance/#{id}", options)
26
37
  end
27
38
 
28
39
  def getenvroles(role, environment)
@@ -106,6 +117,16 @@ module GTAPI
106
117
  JSON::parse self.class.get("/services", options)
107
118
  end
108
119
 
120
+ def getrolenodes(role)
121
+ options = { :headers => @auth}
122
+ JSON::parse self.class.get("/hosts/#{role}", options)
123
+ end
124
+
125
+ def getenvnodes(environment)
126
+ options = { :headers => @auth}
127
+ JSON::parse self.class.get("/hosts/ALL/#{environment}", options)
128
+ end
129
+
109
130
  def getallnodes()
110
131
  options = { :headers => @auth}
111
132
  JSON::parse self.class.get("/hosts", options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gaptool-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-07 00:00:00.000000000 Z
12
+ date: 2013-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -141,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  segments:
143
143
  - 0
144
- hash: -1047441457240443204
144
+ hash: 961325940291191669
145
145
  required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  none: false
147
147
  requirements: