helu 0.1 → 0.2

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.
Files changed (2) hide show
  1. data/lib/project/helu.rb +4 -7
  2. metadata +4 -4
data/lib/project/helu.rb CHANGED
@@ -17,19 +17,16 @@ class Helu
17
17
 
18
18
 
19
19
  def buy
20
- SKPaymentQueue.defaultQueue.addPayment(SKPayment.paymentWithProductIdentifier(product_id))
20
+ payment = SKPayment.paymentWithProductIdentifier(product_id)
21
+ SKPaymentQueue.defaultQueue.addPayment(payment)
21
22
  end
22
23
 
23
- private
24
+ # private
24
25
 
25
26
  def finishTransaction(transaction, wasSuccessful:wasSuccessful)
26
27
  SKPaymentQueue.defaultQueue.finishTransaction(transaction)
27
28
  produt_id = transaction.payment.productIdentifier
28
- if (wasSuccessful)
29
- @winning.call ; puts "Was suscessfull"
30
- else
31
- @fail.call ; puts "was unsuscessfull"
32
- end
29
+ wasSuccessful ? @winning.call : @fail.call
33
30
  end
34
31
 
35
32
  def completeTransaction(transaction)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helu
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-22 00:00:00.000000000 Z
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
- description: ! 'Ruby Motion :: StoreKit Wrapper :: Allows In App Purchases '
30
+ description: ! 'RubyMotion :: StoreKit Wrapper :: Allows In App Purchases '
31
31
  email:
32
32
  - ivan@bakedweb.net
33
33
  executables: []
@@ -61,5 +61,5 @@ rubyforge_project:
61
61
  rubygems_version: 1.8.24
62
62
  signing_key:
63
63
  specification_version: 3
64
- summary: Ruby Motion StoreKit Wrapper
64
+ summary: RubyMotion StoreKit Wrapper
65
65
  test_files: []