mouse 2.0.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 012779d62f4cc3442b9aec5781d467c99ed8b6e0
4
- data.tar.gz: 999ab87ab259166319bcc255f5bb1b005c8ecc1a
3
+ metadata.gz: e81909b0a768cd68bb57c1fb51e957cc94d4a5dc
4
+ data.tar.gz: 20450a678f6e938de48df53e9d165832df06f5c3
5
5
  SHA512:
6
- metadata.gz: ee8c565db73a9691a8cdbdf9173a020249388c38d297b2ba9bd27c7ca2460cc91987868ab484a30d3d21e1aed2006c34744b325cace426eb84cbcccbfb75c3f3
7
- data.tar.gz: 70fe49ae68553f21f23a320e9f65ee286f894a5660fc82c3a71873798a240e1bdf3dcb3afab66216afcbdb4d87dba8244a96d23835de5988063475030bb7132d
6
+ metadata.gz: 6df452f27bff39f031bfcf620c19a1bcc7d07ead593d2bf0978865d6c0c7da079c80677f3851236457acae952ffe3c3284d49aae003dcb557a0c3042c46d8046
7
+ data.tar.gz: 04b9727b98e30a3594a664a675a8c87f3d4ccd951c3c376e71226e89c4dcbb02fdf4a87d12cd1a156aba758e81aa87c97863d61830d0ea7622202c81c515321d
data/History.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ # 3.0.0 - The death of MacRuby
2
+
3
+ * Remove MacRuby support (sort of)
4
+
1
5
  # 2.0.1 - Sea Lion compatability
2
6
 
3
7
  * Do not redefine constants Apple has exposed on Sea Lion (@tbartelmess)
data/lib/mouse.rb CHANGED
@@ -1,6 +1,56 @@
1
- require 'mouse/version'
2
- require 'mouse/core_extensions'
3
- require 'mouse/mouse'
1
+ ##
2
+ # A structure that contains a point in a two-dimensional coordinate system
3
+ CGPoint = Struct.new(:x, :y) unless defined? CGPoint
4
+
5
+ ##
6
+ # Mouse extensions to `CGPoint`
7
+ class CGPoint
8
+
9
+ # @param x [Number]
10
+ # @param y [Number]
11
+ def initialize x = 0.0, y = 0.0
12
+ super x.to_f, y.to_f
13
+ end
14
+
15
+ # @!attribute [rw] x
16
+ # The `x` co-ordinate of the screen point
17
+ # @return [Number]
18
+
19
+ # @!attribute [rw] y
20
+ # The `y` co-ordinate of the screen point
21
+ # @return [Number]
22
+
23
+ ##
24
+ # Return a nice string representation of the point
25
+ #
26
+ # Overrides `Object#inspect` to more closely mimic MacRuby `Boxed#inspect`.
27
+ #
28
+ # @return [String]
29
+ def inspect
30
+ "#<CGPoint x=#{self.x.to_f} y=#{self.y.to_f}>"
31
+ end
4
32
 
5
- module Mouse
33
+ ##
34
+ # Returns the receiver, since the receiver is already a {CGPoint}
35
+ #
36
+ # @return [CGPoint]
37
+ def to_point
38
+ self
39
+ end
40
+
41
+ end
42
+
43
+ ##
44
+ # Mouse extensions to `Array`
45
+ class Array
46
+ ##
47
+ # Coerce the first two elements of the receiver into a {CGPoint}
48
+ #
49
+ # @return [CGPoint]
50
+ def to_point
51
+ CGPoint.new self[0], self[1]
52
+ end
6
53
  end
54
+
55
+ require 'mouse/version'
56
+ require 'mouse/mouse'
data/lib/mouse/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Mouse
2
- VERSION = '2.0.1'
2
+ VERSION = '3.0.0'
3
3
  end
4
4
 
data/test/helper.rb CHANGED
@@ -1,4 +1,2 @@
1
1
  require 'minitest/autorun'
2
2
  require 'mouse'
3
-
4
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rada
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 0.8.4
19
+ version: 0.8.7
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 0.8.4
26
+ version: 0.8.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: kramdown
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 0.14.1
33
+ version: 1.2.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: 0.14.1
40
+ version: 1.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake-compiler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: 0.8.3
47
+ version: 0.9.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.8.3
54
+ version: 0.9.1
55
55
  description: |
56
56
  mouse is a rich, high level wrapper around OS X CGEvent APIs that allow
57
57
  programmatic manipulation of the mouse cursor.
@@ -63,9 +63,6 @@ extensions:
63
63
  - ext/mouse/extconf.rb
64
64
  extra_rdoc_files: []
65
65
  files:
66
- - lib/mouse/core_extensions/macruby.rb
67
- - lib/mouse/core_extensions/mri.rb
68
- - lib/mouse/core_extensions.rb
69
66
  - lib/mouse/version.rb
70
67
  - lib/mouse.rb
71
68
  - ext/mouse/mouse.c
@@ -1,29 +0,0 @@
1
- if RUBY_ENGINE == 'macruby'
2
- require 'mouse/core_extensions/macruby'
3
- else
4
- require 'mouse/core_extensions/mri'
5
- end
6
-
7
- ##
8
- # Mouse extensions to `CGPoint`
9
- class CGPoint
10
- ##
11
- # Returns the receiver, since the receiver is already a {CGPoint}
12
- #
13
- # @return [CGPoint]
14
- def to_point
15
- self
16
- end
17
- end
18
-
19
- ##
20
- # Mouse extensions to `Array`
21
- class Array
22
- ##
23
- # Coerce the first two elements of the receiver into a {CGPoint}
24
- #
25
- # @return [CGPoint]
26
- def to_point
27
- CGPoint.new self[0], self[1]
28
- end
29
- end
@@ -1,10 +0,0 @@
1
- framework 'AppKit'
2
-
3
- # A workaround that guarantees that `CGPoint` is defined
4
- unless defined? MOUNTAIN_LION_APPKIT_VERSION
5
- MOUNTAIN_LION_APPKIT_VERSION = 1187
6
- end
7
-
8
- if NSAppKitVersionNumber >= MOUNTAIN_LION_APPKIT_VERSION
9
- framework '/System/Library/Frameworks/CoreGraphics.framework'
10
- end
@@ -1,31 +0,0 @@
1
- ##
2
- # A structure that contains a point in a two-dimensional coordinate system
3
- CGPoint = Struct.new(:x, :y) unless defined? CGPoint
4
-
5
- class CGPoint
6
-
7
- # @param x [Number]
8
- # @param y [Number]
9
- def initialize x = 0.0, y = 0.0
10
- super x.to_f, y.to_f
11
- end
12
-
13
- # @!attribute [rw] x
14
- # The `x` co-ordinate of the screen point
15
- # @return [Number]
16
-
17
- # @!attribute [rw] y
18
- # The `y` co-ordinate of the screen point
19
- # @return [Number]
20
-
21
- ##
22
- # Return a nice string representation of the point
23
- #
24
- # Overrides `Object#inspect` to more closely mimic MacRuby `Boxed#inspect`.
25
- #
26
- # @return [String]
27
- def inspect
28
- "#<CGPoint x=#{self.x.to_f} y=#{self.y.to_f}>"
29
- end
30
-
31
- end