rscalr 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -24,11 +24,11 @@ Client Usage
24
24
 
25
25
  ```ruby
26
26
  require 'rscalr'
27
- scalr = Scalr.new { :key_id => 'your-key-id', :key_secret => 'your-key-secret' }
27
+ scalr = Scalr.new({ :key_id => 'your-key-id', :key_secret => 'your-key-secret' })
28
28
  # list all farms
29
29
  api_response = scalr.farms_list
30
30
  # Response objects exted REXML::Document, so you can work with them easily
31
- api_repsonse.write($stdout, 1)
31
+ api_repsonse.pretty_print # Pretty-prints the response XML to a stream ($stdout by default)
32
32
  ```
33
33
 
34
34
  Domain Model Usage
@@ -36,8 +36,7 @@ Domain Model Usage
36
36
 
37
37
  ```ruby
38
38
  require 'rscalr'
39
- scalr = Scalr.new { :key_id => 'your-key-id', :key_secret => 'your-key-secret' }
40
- dashboard = Dashboard.new scalr
39
+ dashboard = Dashboard.new({ :key_id => 'your-key-id', :key_secret => 'your-key-secret' })
41
40
  farm = dashboard.get_farm 'my-farm-name'
42
41
  script = dashboard.get_script 'my-script-name'
43
42
  # execute the script on all instances in the farm (see Script.rb for all options)
@@ -48,4 +47,4 @@ script.execute farm.id
48
47
  Caveats
49
48
  -------
50
49
 
51
- This client library is a work in progress and is not yet complete. Feel free to submit pull requests and/or suggestions. I am not an experienced Rubyist, so if you see anything in the source that makes you cringe, by all means let me know!
50
+ This client library contains the complete API, but has not been thoroughly tested. The domain model is incomplete and a work in progress. Feel free to submit pull requests and/or suggestions. I am not an experienced Rubyist, so if you see anything in the source that makes you cringe, by all means let me know!
@@ -230,9 +230,10 @@ class Scalr
230
230
  execute_api_call('FarmRoleUpdateParameterValue', { :FarmRoleID => farm_role_id, :ParamName => param_name, :ParamValue => param_value })
231
231
  end
232
232
 
233
- def scripting_logs_list(farm_id, server_id=nil, start=nil, limit=nil)
233
+ def scripting_logs_list(farm_id, server_id=nil, event_id=nil, start=nil, limit=nil)
234
234
  params = { :FarmID => farm_id }
235
235
  params[:ServerID] = server_id unless server_id.nil?
236
+ params[:EventID] = event_id unless event_id.nil?
236
237
  params[:StartFrom] = start unless start.nil?
237
238
  params[:RecordsLimit] = limit unless limit.nil?
238
239
 
@@ -278,6 +279,7 @@ class Scalr
278
279
  params[:EnvID] = @config[:env_id] unless @config[:env_id].nil?
279
280
 
280
281
  uri = URI("https://api.scalr.net/?" + hash_to_querystring(params))
282
+ $stdout.puts(uri) if @config[:verbose]
281
283
 
282
284
  response = Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
283
285
  request = Net::HTTP::Get.new uri.request_uri
@@ -1,3 +1,3 @@
1
1
  module Rscalr
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rscalr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-15 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 -07:00
13
+ default_executable:
13
14
  dependencies: []
14
15
  description: Rscalr is a Ruby implementation of the Scalr API, written to interface
15
16
  cleanly with Chef and other internal release management tasks.
@@ -39,6 +40,7 @@ files:
39
40
  - test_integration/test_client_farms.rb
40
41
  - test_integration/test_obj_environments.rb
41
42
  - test_integration/test_obj_logs.rb
43
+ has_rdoc: true
42
44
  homepage:
43
45
  licenses: []
44
46
  post_install_message:
@@ -59,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
61
  version: '0'
60
62
  requirements: []
61
63
  rubyforge_project:
62
- rubygems_version: 1.8.25
64
+ rubygems_version: 1.6.2
63
65
  signing_key:
64
66
  specification_version: 3
65
67
  summary: Ruby implementation of the Scalr API