xsys 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 119cba2e61e9571d1825e78544448a39288d0dff
4
- data.tar.gz: 3576092d342a0cb04b3057bee775530aa47b39e2
3
+ metadata.gz: 84e530464b5e72393630467f4e2f79e495b6e4d5
4
+ data.tar.gz: bdfa2f7f6dbebb5fc356e42b4a71226c6356c2ce
5
5
  SHA512:
6
- metadata.gz: 72e5a6dc1e8d2c77b9e2d48cd29bef74db1d7c17acb5aa2dc842493ceae0ed0a193fca255569c476fe4714773c5655d751637a85b129490bd93b3cc11a7492a8
7
- data.tar.gz: 1b8efa551f5dcadaa372dc897b89352086d549082d7fb3144179ebfcf39831c17eeeeec9a6a3adf1cc232b0f5278a633c16ccfdd5beea631908018f94d74f33e
6
+ metadata.gz: a460c5892ba725349f078a065942f367503f81a5c7122fe093ed14bdd772008cb800588d4bad5c6b913bb5a20c0badd58de81881b5972f98c75c1008142f2b5d
7
+ data.tar.gz: d437cb489e927793c1d9122facb68db2258e27c43792adc8c0142de2b2b218abc4de7be4aad9c6571956c4119530fb7f42f4e24e6b555f415e905a1b44e9994b
data/CHANGELOG.md CHANGED
@@ -185,3 +185,7 @@
185
185
  ## v0.3.1
186
186
 
187
187
  * Return null if product not existing
188
+
189
+ ## v0.3.2
190
+
191
+ * Fixed cases when nil product provider or product category
@@ -13,11 +13,11 @@ module Xsys
13
13
  def initialize(attributes={})
14
14
  attributes.each do |k, v|
15
15
  if k.to_s == 'category'
16
- @category = ProductCategory.new(v)
16
+ @category = ProductCategory.new(v) unless v.nil?
17
17
  elsif k.to_s == 'provider'
18
- @provider = ProductProvider.new(v)
18
+ @provider = ProductProvider.new(v) unless v.nil?
19
19
  elsif k.to_s == 'stocks'
20
- @stocks = v.map { |s| Stock.new(s) }
20
+ @stocks = v.map { |s| Stock.new(s) } unless v.nil?
21
21
  elsif k.to_s == 'prices'
22
22
  @prices = v.map { |s| ProductPriceList.new(s) }
23
23
  elsif ['cost_updated_at', 'last_cost_updated_at', 'price_updated_at'].include?(k.to_s)
data/lib/xsys/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xsys
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xsys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Hick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2015-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.2.2
99
+ rubygems_version: 2.2.3
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Get data from xsys api