Floppy-amee 0.4.20 → 0.4.21
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/amee/profile_category.rb +5 -4
- data/lib/amee/version.rb +1 -1
- metadata +2 -2
@@ -108,13 +108,13 @@ module AMEE
|
|
108
108
|
raise AMEE::BadData.new("Couldn't load ProfileCategory from XML data. Check that your URL is correct.")
|
109
109
|
end
|
110
110
|
|
111
|
-
def self.get_history(connection, path, num_months, end_date = Date.today)
|
111
|
+
def self.get_history(connection, path, num_months, end_date = Date.today, items_per_page = 10)
|
112
112
|
month = end_date.month
|
113
113
|
year = end_date.year
|
114
114
|
history = []
|
115
115
|
num_months.times do
|
116
116
|
date = Date.new(year, month)
|
117
|
-
data = self.get(connection, path, date)
|
117
|
+
data = self.get(connection, path, date, items_per_page)
|
118
118
|
# If we get no data items back, there is no data at all before this date, so don't bother fetching it
|
119
119
|
if data.items.empty?
|
120
120
|
(num_months - history.size).times do
|
@@ -154,8 +154,9 @@ module AMEE
|
|
154
154
|
AMEE::Profile::Category.get(connection, "#{full_path}/#{child_path}")
|
155
155
|
end
|
156
156
|
|
157
|
-
def item(
|
158
|
-
|
157
|
+
def item(options)
|
158
|
+
# Search fields - from most specific to least specific
|
159
|
+
item = items.find{ |x| x[:uid] == options[:uid] || x[:name] == options[:name] || x[:dataItemUid] == options[:dataItemUid] || x[:dataItemLabel] == options[:dataItemLabel] }
|
159
160
|
item ? AMEE::Profile::Item.get(connection, "#{full_path}/#{item[:path]}") : nil
|
160
161
|
end
|
161
162
|
|
data/lib/amee/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Floppy-amee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Smith
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-17 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|