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 +4 -4
- data/lib/b2w/product.rb +3 -0
- data/lib/b2w/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 394c50a1fc525543bfbc54cd5dc8cb781d7b0623
|
4
|
+
data.tar.gz: 94955ac1a1b3bf9afb2af9bbcf4839cf6e24f020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f7a4a5d16cdd7fd60c28619500aa57b9bdfc1b374cc0a116eddf0cbc0155f3bb1623a689bf03c812d7f99be286d17f57be8e7427c9cfc36cf1f86f56cca3383
|
7
|
+
data.tar.gz: e710d7e2b09236729630dce0e1bb77a0d1f244ca36d8273232240951c130bea31842897db1088fdb87309c2f3a9ef4a35672c3604b7294f17942c1e4e5d8d428
|
data/lib/b2w/product.rb
CHANGED
@@ -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
|
|
data/lib/b2w/version.rb
CHANGED
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.
|
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-
|
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:
|