carriage 0.3.0 → 1.0.0

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
  SHA256:
3
- metadata.gz: 25fe0daa076913620f277937c6f97adbf436f3ee9195e19501f6dc6cfa39f948
4
- data.tar.gz: b080bcbfa7a16433ec01c6b19989ecab73fef559fef0a7792e0044f6270b1551
3
+ metadata.gz: 2af9360776787d7e2a4e9f4f2317d77b310559699a9b7d7b923eacf1b198d822
4
+ data.tar.gz: dc7403b2856a523a108fc747a52a6951a321ddfe93e80212fb4de6ac830a38ae
5
5
  SHA512:
6
- metadata.gz: b630641b6be259bb65d63f79054bb28a68539475879bfd55a35a2c2c8c5e4a941570d1699cef65ecf567f11054123ea1b4749a898ac1d1440fb1a395c9943dd3
7
- data.tar.gz: 1967ba5454db65c7d074a1e28015808641026980973f682443134fe710b4a361ec934d14602f8152779e2324d7f4647f2e396164c5c7f0b1a5fddd9a16d79c6e
6
+ metadata.gz: caba7b6c2482adcc6a1c6c18cff1aa7cc5daefe206cab983931dac12718d48007c1fa6d7ad0e1bd36b207fc8740b01426f00ef8414e7304473e6d0f2f770b1b2
7
+ data.tar.gz: 6a3461068f08071bb4a686212794952426978ffd28a620ef138ebcf779bae22075b6ec2be7f1abee2a586800691999a4da8158dd8d1fbc09a1f944b1dece5d53
@@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ##[1.0]
8
+
9
+ - Finalize documentation
10
+ - Release 1 version to show completeness of api
11
+
7
12
  ##[0.3.0]
8
13
 
9
14
  ### Added
data/README.md CHANGED
@@ -27,7 +27,29 @@ Or install it yourself as:
27
27
 
28
28
  ## Usage
29
29
 
30
- TODO: Write usage instructions here
30
+ A lot of examples could be found [in tests](https://github.com/skatkov/carriage/blob/master/test/carriage_test.rb)
31
+
32
+ There are basically two ways to use this gem `bare metal` and with `builder`. Let's start off with baremetal:
33
+
34
+ ### Bare metal
35
+ ```
36
+ Carriage.call(:us, {AssociateTag:'tag', "OfferListingId.1": "B00WR23X5I", "Quantity.1": 1})
37
+ ```
38
+ The only thing it will validate, is a presence of locale. All other parameters will be converted without any verification. So be carefull
39
+
40
+ ### Builder
41
+ Library also offers a slightly simpler interface that tries to valide data.
42
+
43
+ ```
44
+ items = [
45
+ {OfferListingId: '123123'}.
46
+ {ASIN: '1231234', quantity: 2}
47
+ ]
48
+
49
+ Carriage.build(items, tag: 'my_attribution_tag', locale: :uk)
50
+ ```
51
+ * Every item should be a hash, with `ASIN` or `OfferListingId` keys provided. By default quantity is 1.
52
+ * Carriage.build also requires `:tag` attribute and defaults to `locale: :us` if nothing else was provided.
31
53
 
32
54
  ## Getting help
33
55
 
@@ -1,3 +1,3 @@
1
1
  module Carriage
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carriage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav (Stas) Katkov