Floppy-amee 0.4.13 → 0.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ module AMEE
6
6
  @values = data ? data[:values] : []
7
7
  @total_amount_per_month = data[:total_amount_per_month]
8
8
  @valid_from = data[:valid_from]
9
+ @data_item_uid = data[:data_item_uid]
9
10
  @end = data[:end]
10
11
  super
11
12
  end
@@ -14,12 +15,14 @@ module AMEE
14
15
  attr_reader :total_amount_per_month
15
16
  attr_reader :valid_from
16
17
  attr_reader :end
18
+ attr_reader :data_item_uid
17
19
 
18
20
  def self.from_json(json)
19
21
  # Parse json
20
22
  doc = JSON.parse(json)
21
23
  data = {}
22
24
  data[:profile_uid] = doc['profile']['uid']
25
+ data[:data_item_uid] = doc['profileItem']['dataItem']['uid']
23
26
  data[:uid] = doc['profileItem']['uid']
24
27
  data[:name] = doc['profileItem']['name']
25
28
  data[:path] = doc['path']
@@ -48,6 +51,7 @@ module AMEE
48
51
  doc = REXML::Document.new(xml)
49
52
  data = {}
50
53
  data[:profile_uid] = REXML::XPath.first(doc, "/Resources/ProfileItemResource/Profile/@uid").to_s
54
+ data[:data_item_uid] = REXML::XPath.first(doc, "/Resources/ProfileItemResource/DataItem/@uid").to_s
51
55
  data[:uid] = REXML::XPath.first(doc, "/Resources/ProfileItemResource/ProfileItem/@uid").to_s
52
56
  data[:name] = REXML::XPath.first(doc, '/Resources/ProfileItemResource/ProfileItem/Name').text
53
57
  data[:path] = REXML::XPath.first(doc, '/Resources/ProfileItemResource/Path').text || ""
data/lib/amee/version.rb CHANGED
@@ -3,7 +3,7 @@ module AMEE
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 4
6
- TINY = 13
6
+ TINY = 14
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
9
9
 
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.13
4
+ version: 0.4.14
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-10-03 00:00:00 -07:00
12
+ date: 2008-10-30 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15