Floppy-amee 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -271,9 +271,11 @@ module AMEE
271
271
  location = category.full_path + "/" + category.items[0][:path]
272
272
  end
273
273
  if get_item == true
274
- options = {}
275
- options[:format] = format if format
276
- return AMEE::Profile::Item.get(connection, location, options)
274
+ get_options = {}
275
+ get_options[:returnUnit] = options[:returnUnit] if options[:returnUnit]
276
+ get_options[:returnPerUnit] = options[:returnPerUnit] if options[:returnPerUnit]
277
+ get_options[:format] = format if format
278
+ return AMEE::Profile::Item.get(connection, location, get_options)
277
279
  else
278
280
  return location
279
281
  end
data/lib/amee/version.rb CHANGED
@@ -3,7 +3,7 @@ module AMEE
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 2
5
5
  MINOR = 0
6
- TINY = 4
6
+ TINY = 5
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
9
9
 
data/lib/amee.rb CHANGED
@@ -13,7 +13,7 @@ class String
13
13
  slice(0,1) == '{'
14
14
  end
15
15
  def is_v2_json?
16
- is_json? && match('"apiVersion".*?:.*?"2.0"')
16
+ is_json? && match('"apiVersion"\s?:\s?"2.0"')
17
17
  end
18
18
  def is_xml?
19
19
  slice(0,5) == '<?xml'
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: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith