sugarcube 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/sugarcube-animations/caanimation.rb +0 -4
- data/lib/sugarcube-factories/uiactionsheet.rb +4 -4
- data/lib/sugarcube-factories/uialertview.rb +3 -3
- data/lib/sugarcube-localized/nsstring.rb +1 -1
- data/lib/sugarcube-repl/{kernel.rb → repl.rb} +39 -49
- data/lib/sugarcube/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d9eed068aefa36110d9d6c3ed2bc8112130cbf5
|
4
|
+
data.tar.gz: 5db0b4efefcc5461ee1c3acf98f7b6b9a414b4ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd9bee65e81c76b809712b67d0c6f5611375333a14cdd38ea1dab06b3fbe4bed2a03fbeef3f4caa20d249b98b85b1376c98484dd3b740722fb3fcfec35adaea5
|
7
|
+
data.tar.gz: dbe5117f12f8fdd0f907dfce17558b00112c36be5957ee1bf4c37b1d88028faacee6a2237735f2f70233f5a86d667e30b0603806243d56acfcf8984776084b72
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -297,7 +297,7 @@ button.on(:touch_up_outside, :touch_cancel) { |event|
|
|
297
297
|
|
298
298
|
# remove handlers
|
299
299
|
button.off(:touch, :touch_up_outside, :touch_cancel)
|
300
|
-
button.off
|
300
|
+
button.off # all events
|
301
301
|
```
|
302
302
|
|
303
303
|
You can only remove handlers by "type", not by the action. e.g. If you bind
|
@@ -44,10 +44,6 @@ class CAAnimation
|
|
44
44
|
elsif options.key?(:path)
|
45
45
|
path = options[:path]
|
46
46
|
if path.is_a?(UIBezierPath)
|
47
|
-
p = UIBezierPath.bezierPath
|
48
|
-
p.moveToPoint([0, 0])
|
49
|
-
p.addCurveToPoint([1, 0], controlPoint1: [0.9, 0], controlPoint2: [0.1, 0])
|
50
|
-
|
51
47
|
path = path.CGPath
|
52
48
|
end
|
53
49
|
animation.path = path
|
@@ -58,19 +58,19 @@ class UIActionSheet
|
|
58
58
|
if buttons.is_a?(NSDictionary)
|
59
59
|
button_titles = buttons.keys
|
60
60
|
if buttons.key?(:cancel)
|
61
|
-
args << (buttons[:cancel] && buttons[:cancel]
|
61
|
+
args << (buttons[:cancel] && NSBundle.mainBundle.localizedStringForKey(buttons[:cancel], value: nil, table: nil))
|
62
62
|
else
|
63
63
|
args << nil
|
64
64
|
end
|
65
65
|
if buttons.key?(:destructive)
|
66
|
-
args << (buttons[:destructive] && buttons[:destructive]
|
66
|
+
args << (buttons[:destructive] && NSBundle.mainBundle.localizedStringForKey(buttons[:destructive], value: nil, table: nil))
|
67
67
|
else
|
68
68
|
args << nil
|
69
69
|
end
|
70
|
-
args.concat(buttons.select { |k, m| k != :cancel && k != :destructive }.map { |k, m| m && m
|
70
|
+
args.concat(buttons.select { |k, m| k != :cancel && k != :destructive }.map { |k, m| m && NSBundle.mainBundle.localizedStringForKey(m, value: nil, table: nil) })
|
71
71
|
else
|
72
72
|
button_titles = buttons
|
73
|
-
args.concat(buttons.map { |m| m && m
|
73
|
+
args.concat(buttons.map { |m| m && NSBundle.mainBundle.localizedStringForKey(m, value: nil, table: nil) })
|
74
74
|
end
|
75
75
|
args << nil # otherButtonTitles:..., nil
|
76
76
|
|
@@ -67,14 +67,14 @@ class UIAlertView
|
|
67
67
|
if buttons.is_a?(NSDictionary)
|
68
68
|
button_titles = buttons.keys
|
69
69
|
if buttons.key?(:cancel)
|
70
|
-
args << (buttons[:cancel] && buttons[:cancel]
|
70
|
+
args << (buttons[:cancel] && NSBundle.mainBundle.localizedStringForKey(buttons[:cancel], value: nil, table: nil))
|
71
71
|
else
|
72
72
|
args << nil
|
73
73
|
end
|
74
|
-
args.concat(buttons.select { |k, m| k != :cancel }.map { |k, m| m && m
|
74
|
+
args.concat(buttons.select { |k, m| k != :cancel }.map { |k, m| m && NSBundle.mainBundle.localizedStringForKey(m, value: nil, table: nil) })
|
75
75
|
else
|
76
76
|
button_titles = buttons
|
77
|
-
args.concat(buttons.map { |m| m && m
|
77
|
+
args.concat(buttons.map { |m| m && NSBundle.mainBundle.localizedStringForKey(m, value: nil, table: nil) })
|
78
78
|
end
|
79
79
|
delegate.buttons = button_titles
|
80
80
|
args << nil # otherButtonTitles:..., nil
|
@@ -3,7 +3,7 @@ class NSString
|
|
3
3
|
# This can be called as `"Hello".localized` or `"Hello"._`. The `str._`
|
4
4
|
# syntax is meant to be reminiscent of gettext-style `_(str)`.
|
5
5
|
def localized(value=nil, table=nil)
|
6
|
-
@localized = NSBundle.mainBundle.localizedStringForKey(self, value:value, table:table)
|
6
|
+
@localized = NSBundle.mainBundle.localizedStringForKey(self, value: value, table: table)
|
7
7
|
end
|
8
8
|
alias _ localized
|
9
9
|
|
@@ -1,100 +1,90 @@
|
|
1
|
-
module
|
1
|
+
module MotionRepl
|
2
2
|
|
3
|
-
private
|
4
3
|
def adjust(*args)
|
5
4
|
SugarCube::Adjust.adjust(*args)
|
6
5
|
end
|
7
|
-
|
8
|
-
|
6
|
+
alias a adjust
|
7
|
+
|
8
|
+
def tree(*args)
|
9
|
+
SugarCube::Adjust.tree(*args)
|
9
10
|
end
|
10
|
-
|
11
|
-
|
11
|
+
|
12
|
+
def root(*args)
|
13
|
+
SugarCube::Adjust.root(*args)
|
12
14
|
end
|
13
|
-
|
15
|
+
|
16
|
+
def frame(*args)
|
14
17
|
SugarCube::Adjust.frame(*args)
|
15
18
|
end
|
19
|
+
alias f frame
|
20
|
+
|
16
21
|
def left(*args)
|
17
22
|
SugarCube::Adjust.left(*args)
|
18
23
|
end
|
19
|
-
|
20
|
-
|
21
|
-
end
|
24
|
+
alias l left
|
25
|
+
|
22
26
|
def right(*args)
|
23
27
|
SugarCube::Adjust.right(*args)
|
24
28
|
end
|
25
|
-
|
26
|
-
|
27
|
-
end
|
29
|
+
alias r right
|
30
|
+
|
28
31
|
def up(*args)
|
29
32
|
SugarCube::Adjust.up(*args)
|
30
33
|
end
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
+
alias u up
|
35
|
+
|
34
36
|
def down(*args)
|
35
37
|
SugarCube::Adjust.down(*args)
|
36
38
|
end
|
37
|
-
|
38
|
-
|
39
|
-
end
|
39
|
+
alias d down
|
40
|
+
|
40
41
|
def origin(*args)
|
41
42
|
SugarCube::Adjust.origin(*args)
|
42
43
|
end
|
43
|
-
|
44
|
-
|
45
|
-
end
|
44
|
+
alias o origin
|
45
|
+
|
46
46
|
def thinner(*args)
|
47
47
|
SugarCube::Adjust.thinner(*args)
|
48
48
|
end
|
49
|
-
|
50
|
-
|
51
|
-
end
|
49
|
+
alias n thinner
|
50
|
+
|
52
51
|
def wider(*args)
|
53
52
|
SugarCube::Adjust.wider(*args)
|
54
53
|
end
|
55
|
-
|
56
|
-
|
57
|
-
end
|
54
|
+
alias w wider
|
55
|
+
|
58
56
|
def shorter(*args)
|
59
57
|
SugarCube::Adjust.shorter(*args)
|
60
58
|
end
|
61
|
-
|
62
|
-
|
63
|
-
end
|
59
|
+
alias s shorter
|
60
|
+
|
64
61
|
def taller(*args)
|
65
62
|
SugarCube::Adjust.taller(*args)
|
66
63
|
end
|
67
|
-
|
68
|
-
|
69
|
-
end
|
64
|
+
alias t taller
|
65
|
+
|
70
66
|
def size(*args)
|
71
67
|
SugarCube::Adjust.size(*args)
|
72
68
|
end
|
73
|
-
|
74
|
-
|
75
|
-
end
|
69
|
+
alias z size
|
70
|
+
|
76
71
|
def center(*args)
|
77
72
|
SugarCube::Adjust.center(*args)
|
78
73
|
end
|
79
|
-
|
80
|
-
|
81
|
-
end
|
74
|
+
alias c center
|
75
|
+
|
82
76
|
def shadow(*args)
|
83
77
|
SugarCube::Adjust.shadow(*args)
|
84
78
|
end
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
def tree(*args)
|
89
|
-
SugarCube::Adjust.tree(*args)
|
90
|
-
end
|
91
|
-
def root(*args)
|
92
|
-
SugarCube::Adjust.root(*args)
|
93
|
-
end
|
79
|
+
alias h shadow
|
80
|
+
|
81
|
+
|
94
82
|
def restore(*args)
|
95
83
|
SugarCube::Adjust.restore(*args)
|
96
84
|
end
|
85
|
+
|
97
86
|
def blink(*args)
|
98
87
|
SugarCube::Adjust.blink(*args)
|
99
88
|
end
|
89
|
+
|
100
90
|
end
|
data/lib/sugarcube/version.rb
CHANGED
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: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin T.A. Gray
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-05-
|
14
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: |
|
17
17
|
== Description
|
@@ -145,7 +145,7 @@ files:
|
|
145
145
|
- lib/sugarcube-pointer.rb
|
146
146
|
- lib/sugarcube-pointer/nsarray.rb
|
147
147
|
- lib/sugarcube-repl.rb
|
148
|
-
- lib/sugarcube-repl/
|
148
|
+
- lib/sugarcube-repl/repl.rb
|
149
149
|
- lib/sugarcube-resources.rb
|
150
150
|
- lib/sugarcube-timer.rb
|
151
151
|
- lib/sugarcube-timer/timer.rb
|