From 1118bc5420afdc717f192900b3a28da45bde709c Mon Sep 17 00:00:00 2001 From: Kevin Olbrich Date: Thu, 12 Dec 2013 18:20:33 +0000 Subject: [PATCH] add support for 'metrics' --- lib/fog/joyent/analytics.rb | 3 +++ lib/fog/joyent/models/analytics/joyent_modules.rb | 1 - lib/fog/joyent/models/analytics/metric.rb | 13 +++++++++++++ lib/fog/joyent/models/analytics/metrics.rb | 0 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 lib/fog/joyent/models/analytics/metric.rb create mode 100644 lib/fog/joyent/models/analytics/metrics.rb diff --git a/lib/fog/joyent/analytics.rb b/lib/fog/joyent/analytics.rb index d8d1548d3..a4efc0140 100644 --- a/lib/fog/joyent/analytics.rb +++ b/lib/fog/joyent/analytics.rb @@ -24,6 +24,9 @@ module Fog collection :joyent_modules model :joyent_module + collection :metrics + model :metric + class Mock def self.data @data ||= Hash.new do |hash, key| diff --git a/lib/fog/joyent/models/analytics/joyent_modules.rb b/lib/fog/joyent/models/analytics/joyent_modules.rb index fdf7fac78..e2e9c4b3e 100644 --- a/lib/fog/joyent/models/analytics/joyent_modules.rb +++ b/lib/fog/joyent/models/analytics/joyent_modules.rb @@ -16,7 +16,6 @@ module Fog # { 'apache' => {'label' => 'Apache'}} # where the key is the name of the module def new(attributes = {}) - puts attributes.inspect name, other_attributes = attributes super(other_attributes.merge('name' => name)) end diff --git a/lib/fog/joyent/models/analytics/metric.rb b/lib/fog/joyent/models/analytics/metric.rb new file mode 100644 index 000000000..b3b934ad1 --- /dev/null +++ b/lib/fog/joyent/models/analytics/metric.rb @@ -0,0 +1,13 @@ +require 'fog/core/model' + +module Fog + module Joyent + class Analytics + class Metric < Fog::Model + attribute :name + attribute :label + + end + end + end +end diff --git a/lib/fog/joyent/models/analytics/metrics.rb b/lib/fog/joyent/models/analytics/metrics.rb new file mode 100644 index 000000000..e69de29bb