sugarcube 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,9 @@ class UIAlertView
2
2
 
3
3
  # UIAlertView.alert("title",
4
4
  # message: "help!",
5
- # buttons: %w"OK Cancel No-way",
5
+ # # The first button is considered the 'cancel' button, for the purposes of
6
+ # # whether the cancel or success handler gets called
7
+ # buttons: %w"Cancel OK No-way",
6
8
  # cancel: proc{ puts "nevermind" },
7
9
  # success: proc{ |pressed| puts "pressed: #{pressed}" },
8
10
  # )
@@ -11,7 +13,7 @@ class UIAlertView
11
13
  puts block
12
14
  # create the delegate
13
15
  delegate = SugarCube::AlertViewDelegate.new
14
- delegate.on_success = block || options[:success]
16
+ delegate.on_success = options[:success] || block
15
17
  delegate.on_cancel = options[:cancel]
16
18
  delegate.send(:retain)
17
19
 
@@ -52,7 +54,7 @@ module SugarCube
52
54
  attr_accessor :on_success
53
55
 
54
56
  def alertView(alert, didDismissWithButtonIndex:index)
55
- if on_cancel
57
+ if index == 0 && on_cancel
56
58
  on_cancel.call
57
59
  elsif on_success
58
60
  if on_success.arity == 0
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '0.8.2'
2
+ Version = '0.8.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-30 00:00:00.000000000 Z
13
+ date: 2012-09-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
17
- requirement: !ruby/object:Gem::Requirement
17
+ requirement: &70317230120160 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,15 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
30
- version: '0'
25
+ version_requirements: *70317230120160
31
26
  - !ruby/object:Gem::Dependency
32
27
  name: rspec
33
- requirement: !ruby/object:Gem::Requirement
28
+ requirement: &70317230119540 !ruby/object:Gem::Requirement
34
29
  none: false
35
30
  requirements:
36
31
  - - ! '>='
@@ -38,12 +33,7 @@ dependencies:
38
33
  version: '0'
39
34
  type: :development
40
35
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
36
+ version_requirements: *70317230119540
47
37
  description: ! '== Description
48
38
 
49
39
 
@@ -129,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
119
  version: '0'
130
120
  requirements: []
131
121
  rubyforge_project:
132
- rubygems_version: 1.8.19
122
+ rubygems_version: 1.8.11
133
123
  signing_key:
134
124
  specification_version: 3
135
125
  summary: Extensions for Ruby to make Rubymotion development more enjoyable, and hopefully