a_marmita 0.5.9 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/a_marmita/cart/base.rb +2 -1
- data/lib/a_marmita/helpers.rb +9 -0
- data/lib/a_marmita/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjNlZmJmYjIwY2YyMTE4ZDFlZTdmZGRkMjkyZmE2NDc2MmQ3MjgyNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWI4OTRhYmViYWY4YTY5Njg2MTUwZmQ0OTJmMjA5MGY1OTc5NWY2NQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGZlY2U0YWVhYTk1NmUwOWE1NzVlNWU4YTA0MzVmMDliZDNjNTVjNDAxYzhj
|
10
|
+
NTQ2MzBiYzdiNDU5NTE1NGFmMmIxZTdjZGY3OThiNTY0MTZkMTI5MTc2ZWUw
|
11
|
+
NWZhZDFkOTc3Mjc1YzFjODYyZWQ0NmM1MzlmYmE0NzFkMjZiZjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDI1MTZjY2I0YTcwMWU5MDQ5ZGQ0OTMyZDU0YTJlN2M1NTU0ZmFjY2UzZDVh
|
14
|
+
ZWRjNGY2N2M0M2QzZmZlYmViMmQ1Yzk1MmU5ZWMyYjQ2OGZiODU4NTkxOTdl
|
15
|
+
MmQ3NmQzOWRhMmExYTdlNWQxYjU0NmNjMjk5ZDlmMjUxZWJjMjA=
|
data/lib/a_marmita/cart/base.rb
CHANGED
@@ -21,9 +21,10 @@ module AMarmita
|
|
21
21
|
end.compact
|
22
22
|
end
|
23
23
|
|
24
|
-
def add_item(id, date = nil, quantity =
|
24
|
+
def add_item(id, date = nil, quantity = nil)
|
25
25
|
return :bad_login if cant_log_in?
|
26
26
|
|
27
|
+
quantity = 1 if Helpers.blank?(quantity)
|
27
28
|
date = Helpers.format_date(date)
|
28
29
|
|
29
30
|
server_response = get_page_body("http://www.amarmita.com/enc.php?id=#{id}&qtd=#{quantity}&data=#{date}&op=1")
|
data/lib/a_marmita/helpers.rb
CHANGED
data/lib/a_marmita/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: a_marmita
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João Gonçalves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|