scalr 0.1.0 → 0.1.1

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.
Files changed (5) hide show
  1. data/README.rdoc +39 -1
  2. data/VERSION +1 -1
  3. data/lib/scalr.rb +1 -1
  4. data/scalr.gemspec +2 -2
  5. metadata +2 -2
@@ -1,7 +1,45 @@
1
- = scalr
1
+ = Scalr Gem
2
2
 
3
3
  Scalr is a cloud infrastructure management provider. This gem is for interfacing with the Scalr.net API to obtain information about your instances and farms.
4
4
 
5
+ == Installing Scalr
6
+
7
+ First, if you haven't already:
8
+
9
+ $ gem install gemcutter
10
+ $ gem tumble
11
+
12
+ Then
13
+
14
+ $ gem install scalr
15
+
16
+ == Usage
17
+
18
+ First, include rubygems and scalr:
19
+
20
+ require 'rubygems'
21
+ require 'scalr'
22
+
23
+ Now, just initialize scalr with your api values (can be found in your system settings on scalr.net):
24
+
25
+ Scalr.key_id = "your_key_id"
26
+ Scalr.access_key = "your_access_key"
27
+
28
+ Like most rubyist, I can't stand camel case, so you make calls to the scalr API with their underscore equivalent names and parameters:
29
+
30
+ response = Scalr.list_dns_zone_records(:domain_name => 'domain.com')
31
+
32
+ All API calls return a Scalr::Response instance with the following attributes:
33
+
34
+ response.code # the HTTP response code from the API request
35
+ response.message # the HTTP response message
36
+ response.value # the value returned from the API as a hash
37
+ response.error # if the requests returns an API error it is stored here for easy access
38
+
39
+ Just like the actions and inputs, all returned values are put in the response.value hash as underscored symbols (converted from the camel case returned by the gateway).
40
+
41
+ I recommend opening up an irb session and making test calls to figure out the response structures.
42
+
5
43
  == Note on Patches/Pull Requests
6
44
 
7
45
  * Fork the project.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -18,7 +18,7 @@ module Scalr
18
18
  @@access_key = nil
19
19
 
20
20
  mattr_accessor :version
21
- @@version = "2009-05-07"
21
+ @@version = "2009-08-14"
22
22
 
23
23
  class << self
24
24
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{scalr}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Hodgson"]
12
- s.date = %q{2010-02-06}
12
+ s.date = %q{2010-02-07}
13
13
  s.description = %q{Scalr is a cloud infrastructure management provider. This gem is for interfacing with the Scalr.net API to obtain information about your instances and farms.}
14
14
  s.email = %q{mhodgson@youcastr.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scalr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Hodgson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-06 00:00:00 -05:00
12
+ date: 2010-02-07 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency