sugarcube 2.12.3 → 3.0.0
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 +4 -4
- data/README.md +2 -2
- data/lib/all/sugarcube-repl/repl.rb +191 -0
- data/lib/all/sugarcube/log.rb +2 -2
- data/lib/android/sugarcube-repl/repl.rb +42 -0
- data/lib/android/sugarcube/log.rb +8 -0
- data/lib/cocoa/sugarcube-repl/repl.rb +48 -214
- data/lib/cocoa/sugarcube/log.rb +1 -1
- data/lib/ios/sugarcube-568/uiimage.rb +3 -0
- data/lib/ios/sugarcube-repl/repl.rb +27 -30
- data/lib/osx/sugarcube-repl/repl.rb +14 -25
- data/lib/sugarcube-568.rb +2 -9
- data/lib/sugarcube-animations.rb +2 -12
- data/lib/sugarcube-anonymous.rb +2 -9
- data/lib/sugarcube-appkit.rb +3 -12
- data/lib/sugarcube-attributedstring.rb +3 -12
- data/lib/sugarcube-awesome.rb +2 -9
- data/lib/sugarcube-color.rb +2 -9
- data/lib/sugarcube-constants.rb +2 -9
- data/lib/sugarcube-coregraphics.rb +3 -9
- data/lib/sugarcube-corelocation.rb +6 -9
- data/lib/sugarcube-events.rb +2 -9
- data/lib/sugarcube-factories.rb +2 -9
- data/lib/sugarcube-files.rb +2 -9
- data/lib/sugarcube-foundation.rb +3 -9
- data/lib/sugarcube-gestures.rb +2 -9
- data/lib/sugarcube-image.rb +2 -9
- data/lib/sugarcube-indexpath.rb +2 -9
- data/lib/sugarcube-legacy.rb +2 -18
- data/lib/sugarcube-localized.rb +2 -9
- data/lib/sugarcube-modal.rb +2 -9
- data/lib/sugarcube-notifications.rb +2 -9
- data/lib/sugarcube-nscoder.rb +3 -9
- data/lib/sugarcube-nsdata.rb +3 -12
- data/lib/sugarcube-nsdate.rb +3 -14
- data/lib/sugarcube-nsuserdefaults.rb +3 -9
- data/lib/sugarcube-numbers.rb +2 -15
- data/lib/sugarcube-pipes.rb +2 -9
- data/lib/sugarcube-pointer.rb +2 -9
- data/lib/sugarcube-repl.rb +2 -16
- data/lib/sugarcube-spritekit.rb +6 -12
- data/lib/sugarcube-timer.rb +2 -14
- data/lib/sugarcube-to_s.rb +2 -15
- data/lib/sugarcube-uikit.rb +3 -12
- data/lib/sugarcube-unholy.rb +2 -9
- data/lib/sugarcube.rb +33 -19
- data/lib/sugarcube_pre_setup.rb +44 -0
- data/lib/version.rb +1 -1
- data/spec/cocoa/nsindexpath_spec.rb +12 -0
- metadata +9 -6
- data/lib/ios/sugarcube/sugarcube_cleanup.rb +0 -16
@@ -0,0 +1,44 @@
|
|
1
|
+
|
2
|
+
module Motion module Project
|
3
|
+
class App
|
4
|
+
class << self
|
5
|
+
def pre_setup(&block)
|
6
|
+
config_without_setup.pre_setup_blocks << block
|
7
|
+
end
|
8
|
+
def post_setup(&block)
|
9
|
+
config_without_setup.post_setup_blocks << block
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end end
|
14
|
+
|
15
|
+
module Motion; module Project
|
16
|
+
class Config
|
17
|
+
|
18
|
+
def pre_setup_blocks
|
19
|
+
@pre_setup_blocks ||= []
|
20
|
+
end
|
21
|
+
|
22
|
+
def post_setup_blocks
|
23
|
+
@post_setup_blocks ||= []
|
24
|
+
end
|
25
|
+
|
26
|
+
alias sugarcube_old_setup setup
|
27
|
+
def setup
|
28
|
+
app_files = @files.flatten.select { |file| file.start_with?('app/')}
|
29
|
+
@files = @files - app_files
|
30
|
+
if @pre_setup_blocks
|
31
|
+
@pre_setup_blocks.each { |b| b.call(self) }
|
32
|
+
@pre_setup_blocks = nil
|
33
|
+
end
|
34
|
+
@files.concat(app_files)
|
35
|
+
|
36
|
+
sugarcube_old_setup.tap do
|
37
|
+
if @post_setup_blocks
|
38
|
+
@post_setup_blocks.each { |b| b.call(self) }
|
39
|
+
@post_setup_blocks = nil
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end end
|
data/lib/version.rb
CHANGED
@@ -11,4 +11,16 @@ describe NSIndexPath do
|
|
11
11
|
b.should == 3
|
12
12
|
end
|
13
13
|
|
14
|
+
it 'should support indexPathForRow(inSection:)' do
|
15
|
+
path = NSIndexPath.indexPathForRow(1, inSection: 3).to_a
|
16
|
+
path[0].should == 3
|
17
|
+
path[1].should == 1
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should support indexPathForItem(inSection:)' do
|
21
|
+
path = NSIndexPath.indexPathForItem(1, inSection: 3).to_a
|
22
|
+
path[0].should == 3
|
23
|
+
path[1].should == 1
|
24
|
+
end
|
25
|
+
|
14
26
|
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:
|
4
|
+
version: 3.0.0
|
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-12-
|
14
|
+
date: 2014-12-11 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: |
|
17
17
|
== Description
|
@@ -37,7 +37,10 @@ files:
|
|
37
37
|
- lib/all/sugarcube-numbers/fixnum.rb
|
38
38
|
- lib/all/sugarcube-numbers/numeric.rb
|
39
39
|
- lib/all/sugarcube-numbers/time.rb
|
40
|
+
- lib/all/sugarcube-repl/repl.rb
|
40
41
|
- lib/all/sugarcube-unholy/ivar.rb
|
42
|
+
- lib/android/sugarcube/log.rb
|
43
|
+
- lib/android/sugarcube-repl/repl.rb
|
41
44
|
- lib/cocoa/sugarcube/log.rb
|
42
45
|
- lib/cocoa/sugarcube-animations/caanimation.rb
|
43
46
|
- lib/cocoa/sugarcube-animations/calayer.rb
|
@@ -89,7 +92,6 @@ files:
|
|
89
92
|
- lib/cocoa/sugarcube-to_s/nsnotification.rb
|
90
93
|
- lib/cocoa/sugarcube-to_s/nsset.rb
|
91
94
|
- lib/cocoa/sugarcube-to_s/nsurl.rb
|
92
|
-
- lib/ios/sugarcube/sugarcube_cleanup.rb
|
93
95
|
- lib/ios/sugarcube-568/uiimage.rb
|
94
96
|
- lib/ios/sugarcube-animations/animation_chain.rb
|
95
97
|
- lib/ios/sugarcube-animations/uiview.rb
|
@@ -210,6 +212,7 @@ files:
|
|
210
212
|
- lib/sugarcube-uikit.rb
|
211
213
|
- lib/sugarcube-unholy.rb
|
212
214
|
- lib/sugarcube.rb
|
215
|
+
- lib/sugarcube_pre_setup.rb
|
213
216
|
- lib/version.rb
|
214
217
|
- README.md
|
215
218
|
- spec/all/anonymous_spec.rb
|
@@ -294,17 +297,17 @@ require_paths:
|
|
294
297
|
- lib
|
295
298
|
required_ruby_version: !ruby/object:Gem::Requirement
|
296
299
|
requirements:
|
297
|
-
- -
|
300
|
+
- - ">="
|
298
301
|
- !ruby/object:Gem::Version
|
299
302
|
version: '0'
|
300
303
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
301
304
|
requirements:
|
302
|
-
- -
|
305
|
+
- - ">="
|
303
306
|
- !ruby/object:Gem::Version
|
304
307
|
version: '0'
|
305
308
|
requirements: []
|
306
309
|
rubyforge_project:
|
307
|
-
rubygems_version: 2.0.
|
310
|
+
rubygems_version: 2.0.14
|
308
311
|
signing_key:
|
309
312
|
specification_version: 4
|
310
313
|
summary: Extensions for Ruby to make Rubymotion development more enjoyable, and hopefully
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class UIViewController
|
2
|
-
|
3
|
-
def sugarcube_cleanup
|
4
|
-
NSLog("Good news! The sugarcube_cleanup method is no longer needed.")
|
5
|
-
end
|
6
|
-
|
7
|
-
end
|
8
|
-
|
9
|
-
|
10
|
-
class UIView
|
11
|
-
|
12
|
-
def sugarcube_cleanup
|
13
|
-
NSLog("Good news! The sugarcube_cleanup method is no longer needed.")
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|