cloudkick 0.2.11 → 0.2.12

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/cloudkick.gemspec +2 -2
  3. data/doc/example.rb +8 -8
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.11
1
+ 0.2.12
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cloudkick}
8
- s.version = "0.2.11"
8
+ s.version = "0.2.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Cloudkick"]
12
- s.date = %q{2010-04-23}
12
+ s.date = %q{2010-04-24}
13
13
  s.default_executable = %q{cloudkick}
14
14
  s.description = %q{Ruby interface to the Cloudkick API}
15
15
  s.email = %q{support@cloudkick.com}
@@ -1,22 +1,22 @@
1
1
  require 'rubygems'
2
2
  require 'cloudkick'
3
3
 
4
+ # your OAuth consumer credentials.
5
+ # https://support.cloudkick.com/API/Authentication#Generating_OAuth_Consumers
4
6
  CONSUMER_KEY = 'ENTER_KEY'
5
7
  CONSUMER_SECRET = 'ENTER_SECRET'
6
8
 
7
9
  client = Cloudkick::Base.new(CONSUMER_KEY,
8
10
  CONSUMER_SECRET)
9
11
 
10
- agent_nodes = client.get('nodes', 'tag:agent')
12
+ # get all nodes and print name and status
11
13
  nodes = client.get('nodes')
12
-
13
14
  nodes.each do |node|
14
15
  puts "#{node.name}: #{node.status}"
15
16
  end
16
17
 
17
- # puts
18
- # puts nodes.pssh('hostname')
19
-
20
- # agent_nodes do |node|
21
- # puts node.check('mem')
22
- # end
18
+ # get all nodes tagged "agent" and print memory information
19
+ agent_nodes = client.get('nodes', 'tag:agent')
20
+ agent_nodes do |node|
21
+ puts node.check('mem')
22
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudkick
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-23 00:00:00 -07:00
12
+ date: 2010-04-24 00:00:00 -07:00
13
13
  default_executable: cloudkick
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency