rm_vendor 0.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjUyYzdhMWQ5OTY1OTdmOGEyYmJlODQzYjk5ZmRhNDlhN2I4OWIzOQ==
4
+ YTllMzY5MjVmMzg5OGE2YzU2YTI1NjQxOTZkMDczNDQ1YzgxZjMyMA==
5
5
  data.tar.gz: !binary |-
6
- YjFlNDA4NTkyMjA3ZDAxYThmZmZiNTBhNDlhOTk2ODZlOGJiOTkxZQ==
6
+ NTJmOTI0MGUwYjBlZWQ5NDU0ZDkzN2M2YjFmZDllZWJiMWQ3NGNiZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjlkYWJiMDNmNjIwODVhYWIxM2ZlNjdhYWVkZWY4MjczZmJkNTUzOTZhMWMz
10
- NGNkYzBhMWU5ZmRmYzVlZDI3MTQxODE2YjVhODY1NTNjNWExYThhZThmOThj
11
- NTdkOTczY2U4ZWMxZTNmODhkMWYwNzY3OGNjYTMxMWZiMTg4NDQ=
9
+ MTQ2Y2JmZTkwYWRmNGRmNmMyN2NmMTM3ZjcwZjZhMDVmYmY0MTBjNGM0Njgz
10
+ ZDQ2Yzc3ZmU2OTg1MmMzNGYzZWI0Yzg5ZTNlMmI4ZTFlZTExYzQ0YTJjNWE1
11
+ NDZlNWExNDQyM2M2ZThmODJkZDA1ODk4NjE5NjJlNDIyYTc5NDA=
12
12
  data.tar.gz: !binary |-
13
- NWJiY2EwZGMwNjJhYTI5NGM2MjIzZDIwNDE1NzY3ZjExNjZhNGEyNWRjOGZj
14
- ZjQ5NjBmYTVkN2ZiMWJhNmE5NjM3ZTM2ZTczYmMxMTk0MjlkN2I5Y2I3ZDI5
15
- Yjk1NzA3OGQ2NDkyOGE1Nzc3OTEzMTk1Mjc5NjkzYzVjNTI3MDY=
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', '~> 1.2.1'
26
- app.pods.pod 'CargoBay', :git => 'https://github.com/holgersindbaek/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
- receipt = NSUserDefaults["#{@params.id}.receipt"]
16
- decoder = CocoaSecurityDecoder.new
17
- latest_receipt_data = decoder.base64(receipt[:latest_receipt])
18
- Vendor::Receipt.new(latest_receipt_data, @params) if bought? && subscription?
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
 
@@ -7,6 +7,7 @@ module Vendor
7
7
  end
8
8
 
9
9
  def initialize(products=[], &block)
10
+ NSLog "Products initialize"
10
11
  # Set up products array
11
12
  @products = []
12
13
 
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: '0.3'
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-01-27 00:00:00.000000000 Z
11
+ date: 2014-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake