Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circular dependency removed #7

Merged
merged 13 commits into from Apr 30, 2012
12 changes: 12 additions & 0 deletions Gemfile.lock
@@ -1,20 +1,32 @@
PATH
remote: .
specs:
<<<<<<< HEAD
gattica (0.5.1)
=======
gattica (0.6.0)
gattica
>>>>>>> upstream/master
hpricot
test-unit

GEM
remote: http://rubygems.org/
specs:
hpricot (0.8.6)
<<<<<<< HEAD
rake (0.9.2.2)
=======
>>>>>>> upstream/master
test-unit (2.4.5)

PLATFORMS
ruby

DEPENDENCIES
<<<<<<< HEAD
rake
=======
gattica!
>>>>>>> upstream/master
test-unit
32 changes: 32 additions & 0 deletions Gemfile.lock.orig
@@ -0,0 +1,32 @@
PATH
remote: .
specs:
<<<<<<< HEAD
gattica (0.5.1)
=======
gattica (0.6.0)
gattica
>>>>>>> upstream/master
hpricot
test-unit

GEM
remote: http://rubygems.org/
specs:
hpricot (0.8.6)
<<<<<<< HEAD
rake (0.9.2.2)
=======
>>>>>>> upstream/master
test-unit (2.4.5)

PLATFORMS
ruby

DEPENDENCIES
<<<<<<< HEAD
rake
=======
gattica!
>>>>>>> upstream/master
test-unit
12 changes: 12 additions & 0 deletions lib/gattica/data_point.rb
Expand Up @@ -55,6 +55,18 @@ def to_yaml
'dimensions' => @dimensions,
'metrics' => @metrics }.to_yaml
end

def to_hash

res_hash = {}

@dimensions.each{|d| res_hash.merge!(d) }
# output all metrics
@metrics.each{|m| res_hash.merge!(m) }
res_hash

end


end

Expand Down
4 changes: 4 additions & 0 deletions lib/gattica/data_set.rb
Expand Up @@ -48,6 +48,10 @@ def to_yaml
'points' => @points }.to_yaml
end

def to_hash
@points.map(&:to_hash)
end

end

end
2 changes: 1 addition & 1 deletion lib/gattica/engine.rb
Expand Up @@ -170,7 +170,7 @@ def do_http_get(query_string)
end
end

return data
return response.body
end


Expand Down