costagent 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/costagent.rb +2 -1
  2. metadata +2 -2
data/lib/costagent.rb CHANGED
@@ -24,7 +24,8 @@ class CostAgent
24
24
 
25
25
  # Returns all projects
26
26
  def projects(filter = "active")
27
- @projects ||= (self.api("projects", {:view => filter})/"project").collect { |project| Project.new((project/"id").text.to_i, (project/"name").text, (project/"currency").text, (project/"normal-billing-rate").text.to_f) }
27
+ @projects ||= {}
28
+ @projects[filter] ||= (self.api("projects", {:view => filter})/"project").collect { |project| Project.new((project/"id").text.to_i, (project/"name").text, (project/"currency").text, (project/"normal-billing-rate").text.to_f) }
28
29
  end
29
30
 
30
31
  # This returns the specified project
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Elliott Draper