sugarcube 1.0.2 → 1.0.3

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sugarcube (1.0.2)
4
+ sugarcube (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -62,6 +62,11 @@ Installation
62
62
  gem 'sugarcube', :require => 'sugarcube-classic'
63
63
  # or for the bold:
64
64
  # gem 'sugarcube', :require => 'sugarcube-all'
65
+ # or for the picky:
66
+ # gem 'sugarcube', :require => [
67
+ # 'sugarcube',
68
+ # 'sugarcube-repl',
69
+ # ]
65
70
 
66
71
  # in terminal
67
72
  $ bundle install
@@ -0,0 +1,18 @@
1
+ unless defined?(Motion::Project::Config)
2
+ raise "The sugarcube gem must be required within a RubyMotion project Rakefile."
3
+ end
4
+
5
+
6
+ Motion::Project::App.setup do |app|
7
+ # scans app.files until it finds app/ (the default)
8
+ # if found, it inserts just before those files, otherwise it will insert to
9
+ # the end of the list
10
+ insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0
11
+
12
+ Dir.glob(File.join(File.dirname(__FILE__), 'sugarcube/**/*.rb')).reverse.each do |file|
13
+ app.files.insert(insert_point, file)
14
+ end
15
+ end
16
+
17
+ require File.join(File.dirname(__FILE__), "sugarcube-coregraphics.rb")
18
+ require File.join(File.dirname(__FILE__), "sugarcube-to_s.rb")
@@ -30,6 +30,17 @@ class UIView
30
30
  sugarcube_add_gesture(proc, recognizer)
31
31
  end
32
32
 
33
+ def off_gestures
34
+ if @sugarcube_recognizers
35
+ @sugarcube_recognizers.each do |recognizer, proc|
36
+ self.removeGestureRecognizer(recognizer)
37
+ end
38
+ @sugarcube_recognizers = nil
39
+ end
40
+
41
+ self
42
+ end
43
+
33
44
  # @yield [recognizer] Handles the gesture event, and passes the recognizer instance to the block.
34
45
  # @overload on_tap(taps)
35
46
  # @param taps [Fixnum] Number of taps
@@ -1,18 +1 @@
1
- unless defined?(Motion::Project::Config)
2
- raise "The sugarcube gem must be required within a RubyMotion project Rakefile."
3
- end
4
-
5
-
6
- Motion::Project::App.setup do |app|
7
- # scans app.files until it finds app/ (the default)
8
- # if found, it inserts just before those files, otherwise it will insert to
9
- # the end of the list
10
- insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0
11
-
12
- Dir.glob(File.join(File.dirname(__FILE__), 'sugarcube/**/*.rb')).reverse.each do |file|
13
- app.files.insert(insert_point, file)
14
- end
15
- end
16
-
17
- require File.join(File.dirname(__FILE__), "sugarcube-coregraphics.rb")
18
- require File.join(File.dirname(__FILE__), "sugarcube-to_s.rb")
1
+ require File.join(File.dirname(__FILE__), "sugarcube-core.rb")
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '1.0.2'
2
+ Version = '1.0.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: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -76,6 +76,7 @@ files:
76
76
  - lib/sugarcube-common.rb
77
77
  - lib/sugarcube-constants.rb
78
78
  - lib/sugarcube-constants/symbol.rb
79
+ - lib/sugarcube-core.rb
79
80
  - lib/sugarcube-coregraphics.rb
80
81
  - lib/sugarcube-coregraphics/core_graphics.rb
81
82
  - lib/sugarcube-corelocation.rb