b2w 0.2.1 → 0.2.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: 85df36ff3b4089babf80ba5bb63f05648a474f17
4
- data.tar.gz: 09cccac0ea03b1d4148c21523b7411adb444a256
3
+ metadata.gz: 394c50a1fc525543bfbc54cd5dc8cb781d7b0623
4
+ data.tar.gz: 94955ac1a1b3bf9afb2af9bbcf4839cf6e24f020
5
5
  SHA512:
6
- metadata.gz: e38007da2598c813bf1fd31da9f43a2b05181ecb4caaa72d4ef3238bf7c41b56e3129337bca4c3427ac6f50bc8100f1ebafd6f3a16d2d2abe5adedf7f05ea3ae
7
- data.tar.gz: 0c84c57c0e9cbd9139acbd579d227942f44fe1d84e90373850eeaadb05ba957f37de9a76c74114feacf6c98abe0a217c937fbd940d37af8788222cbdadb23bd4
6
+ metadata.gz: 1f7a4a5d16cdd7fd60c28619500aa57b9bdfc1b374cc0a116eddf0cbc0155f3bb1623a689bf03c812d7f99be286d17f57be8e7427c9cfc36cf1f86f56cca3383
7
+ data.tar.gz: e710d7e2b09236729630dce0e1bb77a0d1f244ca36d8273232240951c130bea31842897db1088fdb87309c2f3a9ef4a35672c3604b7294f17942c1e4e5d8d428
@@ -2,6 +2,7 @@ module B2W
2
2
  class Product < Base
3
3
  def self.create!(params)
4
4
  post(:product, params) do |body, request, result|
5
+ yield body, request, result if block_given?
5
6
  new persisted: result.is_a?(Net::HTTPCreated)
6
7
  end
7
8
  end
@@ -30,6 +31,8 @@ module B2W
30
31
  true
31
32
  rescue RestClient::ResourceNotFound
32
33
  false
34
+ rescue RestClient::UnprocessableEntity
35
+ false
33
36
  end
34
37
  end
35
38
 
@@ -1,3 +1,3 @@
1
1
  module B2W
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: b2w
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Carrion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-22 00:00:00.000000000 Z
11
+ date: 2016-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -177,3 +177,4 @@ test_files:
177
177
  - spec/product_spec.rb
178
178
  - spec/spec_helper.rb
179
179
  - spec/token
180
+ has_rdoc: