helu 0.3.1 → 0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -5
- data/lib/project/helu.rb +8 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53f43e31068f822fdd48fcd78683624efc291a8f
|
4
|
+
data.tar.gz: ac30439197fac333ca4a18711f87d177926726aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56f60b03239a1888b33bc197a4006a8e8dcba34cd7c656b21d2f27d4c0f46c25868144735c3c39969bc1d8e867084af9e33c800a4c4b0b216dbca9a5c190363b
|
7
|
+
data.tar.gz: 98d623936e696e6e85682e41d72771dae04bfa6aef6d518f252bc2a1f3029295ce13f7410382ef3e271fe74131522e4143ddb16cda0a88bb08b8c9b97b17e9fb
|
data/README.md
CHANGED
@@ -36,11 +36,6 @@ The transaction object on the lambda is the one we get from Apple; Therefore, it
|
|
36
36
|
@helu.buy
|
37
37
|
|
38
38
|
|
39
|
-
Make sure that if your code ever throws out the Helu object, it better also close the store before doing so.
|
40
|
-
|
41
|
-
@helu.close_the_store
|
42
|
-
|
43
|
-
|
44
39
|
## Example App:
|
45
40
|
|
46
41
|
[You can find an example app here](https://github.com/ivanacostarubio/helu-example). Remember that for this to work properly, you must add your app identifier to the Rakefile.
|
data/lib/project/helu.rb
CHANGED
@@ -7,10 +7,6 @@ class Helu
|
|
7
7
|
SKPaymentQueue.defaultQueue.addTransactionObserver(self)
|
8
8
|
end
|
9
9
|
|
10
|
-
def close_the_store
|
11
|
-
SKPaymentQueue.defaultQueue.removeTransactionObserver(self)
|
12
|
-
end
|
13
|
-
|
14
10
|
def fail=(fail_block)
|
15
11
|
@fail = fail_block
|
16
12
|
end
|
@@ -56,16 +52,14 @@ class Helu
|
|
56
52
|
|
57
53
|
def paymentQueue(queue,updatedTransactions:transactions)
|
58
54
|
transactions.each do |transaction|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
else
|
68
|
-
end
|
55
|
+
case transaction.transactionState
|
56
|
+
when SKPaymentTransactionStatePurchased
|
57
|
+
completeTransaction(transaction)
|
58
|
+
when SKPaymentTransactionStateFailed
|
59
|
+
failedTransaction(transaction)
|
60
|
+
when SKPaymentTransactionStateRestored
|
61
|
+
restoreTransaction(transaction)
|
62
|
+
else
|
69
63
|
end
|
70
64
|
end
|
71
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Acosta-Rubio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|