cloudscopes 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45334b219381b59598c77b06f98e6e5a8e27b4ca
4
- data.tar.gz: 9fdbe3a21de8584e7807b9d64859feda6ef4de91
3
+ metadata.gz: 29c742176d650ed007a12245e8df02ec9736b894
4
+ data.tar.gz: effeb7e2a0dae22ac33ff243f34d19e3a2139169
5
5
  SHA512:
6
- metadata.gz: 67be09c5d4dd518d4363025290b14844d8fa88545f26f6f0d56b5e0e72ffb8b3d94afb98a554f1247a9dd9e44344d352ff0dc4eccb5a4271bb574843748fa00e
7
- data.tar.gz: 473648b97e4824b79df85ca2e9a2ce07436f4e9f46298cde51cb6d8a02c5aff4cbd5e30f9329c1e745053966365912361dcee9c29ed5d7763040bd29533e0857
6
+ metadata.gz: 1df637739da6f4ec6ec280e8d2a0408fcc836bc65bfa1b0f26a2d186d53a3dc32ee02b65fa41f91812502f32737672ec9f560dc58115cf42a62cd7f550f1a834
7
+ data.tar.gz: 57a9859f94aa5c1244c0debcf3ac99350f8f9876e08be303191fc9333c6941cbd52cc7f0ccac17ee3067f4a05eabef3995bac72a22a204c32c3d695a1f8a4579
@@ -3,7 +3,7 @@ module Cloudscopes
3
3
  attr_reader :should_publish, :usage_requested
4
4
 
5
5
  def self.init
6
- @opts = Monitoring::Options.new
6
+ @opts = Cloudscopes::Options.new
7
7
  usage if usage_requested
8
8
  configuration = {}
9
9
  (@opts.files.empty?? [ STDIN ] : @opts.files.collect { |fn| File.new(fn) }).each do |configfile|
@@ -9,7 +9,7 @@ def publish(samples)
9
9
  valid_data = metric_samples.select(&:valid)
10
10
  next if valid_data.empty?
11
11
  valid_data.each_slice(4) do |slice| # slice metrics to chunks - the actual limit is 20, but CloudWatch starts misbehaving if I put too much data
12
- Monitoring.client.put_metric_data namespace: type,
12
+ Cloudscopes.client.put_metric_data namespace: type,
13
13
  metric_data: slice.collect(&:to_cloudwatch_metric_data)
14
14
  end
15
15
  rescue Exception => e
@@ -21,5 +21,5 @@ end
21
21
  def sample(category, *metrics)
22
22
  category, metrics = category if category.is_a? Array # sample may be passed the single yield variable of Hash#each
23
23
  metrics = [ metrics ] unless metrics.is_a? Array
24
- [ category, metrics.collect { |m| Monitoring::Sample.new(category, m) } ]
24
+ [ category, metrics.collect { |m| Cloudscopes::Sample.new(category, m) } ]
25
25
  end
@@ -13,8 +13,8 @@ module Cloudscopes
13
13
  @value = nil
14
14
 
15
15
  begin
16
- return if metric['requires'] and ! Monitoring.get_binding.eval(metric['requires'])
17
- @value = Monitoring.get_binding.eval(metric['value'])
16
+ return if metric['requires'] and ! Cloudscopes.get_binding.eval(metric['requires'])
17
+ @value = Cloudscopes.get_binding.eval(metric['value'])
18
18
  rescue => e
19
19
  STDERR.puts("Error evaluating #{@name}: #{e}")
20
20
  puts e.backtrace
@@ -1,3 +1,3 @@
1
1
  module Cloudscopes
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
data/lib/cloudscopes.rb CHANGED
@@ -24,7 +24,7 @@ module Cloudscopes
24
24
  end
25
25
 
26
26
  def self.method_missing(*args)
27
- Monitoring.const_get(args.shift.to_s.capitalize).new(*args)
27
+ Cloudscopes.const_get(args.shift.to_s.capitalize).new(*args)
28
28
  end
29
29
 
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudscopes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oded Arbel