rm_vendor 0.3 → 0.3.1
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 +8 -8
- data/lib/Vendor.rb +2 -2
- data/lib/project/buy.rb +3 -3
- data/lib/project/info.rb +6 -4
- data/lib/project/products.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTllMzY5MjVmMzg5OGE2YzU2YTI1NjQxOTZkMDczNDQ1YzgxZjMyMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTJmOTI0MGUwYjBlZWQ5NDU0ZDkzN2M2YjFmZDllZWJiMWQ3NGNiZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTQ2Y2JmZTkwYWRmNGRmNmMyN2NmMTM3ZjcwZjZhMDVmYmY0MTBjNGM0Njgz
|
10
|
+
ZDQ2Yzc3ZmU2OTg1MmMzNGYzZWI0Yzg5ZTNlMmI4ZTFlZTExYzQ0YTJjNWE1
|
11
|
+
NDZlNWExNDQyM2M2ZThmODJkZDA1ODk4NjE5NjJlNDIyYTc5NDA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzllNzkzNTNjYWJlODRhM2NhMGI3MTNlY2ZhMWY0MjU4NmJkMzJmZDE3ZGNj
|
14
|
+
YTVhZDFmNzgyNDdjYjA4ODVmMTI0MTI2NmMxYWM2NzhkNmM1Y2FhZWVmMmU2
|
15
|
+
Yzg3ZjRmNzg5MDBlNDM0NDFhMjliYzU0YzdhNzA2N2ZkOGFhZmE=
|
data/lib/Vendor.rb
CHANGED
@@ -22,6 +22,6 @@ Motion::Project::App.setup do |app|
|
|
22
22
|
app.frameworks += ['StoreKit']
|
23
23
|
|
24
24
|
app.pods ||= Motion::Project::CocoaPods.new(app)
|
25
|
-
app.pods.pod 'CocoaSecurity'
|
26
|
-
app.pods.pod 'CargoBay',
|
25
|
+
app.pods.pod 'CocoaSecurity'
|
26
|
+
app.pods.pod 'CargoBay', '~> 2.0.2'
|
27
27
|
end
|
data/lib/project/buy.rb
CHANGED
@@ -47,11 +47,11 @@ module Vendor
|
|
47
47
|
def paymentQueue(queue, updatedTransactions:transactions)
|
48
48
|
transactions.each do |transaction|
|
49
49
|
case transaction.transactionState
|
50
|
-
when SKPaymentTransactionStatePurchased
|
50
|
+
when 1 #SKPaymentTransactionStatePurchased
|
51
51
|
completeTransaction(transaction)
|
52
|
-
when SKPaymentTransactionStateFailed
|
52
|
+
when 2 #SKPaymentTransactionStateFailed
|
53
53
|
failedTransaction(transaction)
|
54
|
-
when SKPaymentTransactionStateRestored
|
54
|
+
when 3 #SKPaymentTransactionStateRestored
|
55
55
|
restoreTransaction(transaction)
|
56
56
|
else
|
57
57
|
end
|
data/lib/project/info.rb
CHANGED
@@ -12,10 +12,12 @@ module Vendor
|
|
12
12
|
productsRequest.start
|
13
13
|
|
14
14
|
# Update receipt if bought and subscription
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
if bought? && subscription?
|
16
|
+
receipt = NSUserDefaults["#{@params.id}.receipt"]
|
17
|
+
decoder = CocoaSecurityDecoder.new
|
18
|
+
latest_receipt_data = decoder.base64(receipt[:latest_receipt])
|
19
|
+
Vendor::Receipt.new(latest_receipt_data, @params)
|
20
|
+
end
|
19
21
|
end
|
20
22
|
|
21
23
|
|
data/lib/project/products.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rm_vendor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Holger Sindbaek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|