mouse 1.0.4 → 1.0.5

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.
data/History.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.0.5 - Tweaks for AXElements
2
+
3
+ * Coerce `CGPoint.new` arguments using `#to_f`
4
+ * Do not redefine `CGPoint` if it is already defined
5
+
1
6
  # 1.0.4 - Change the homepage
2
7
 
3
8
  * Moved github project to be under the AXElements organization
data/lib/mouse.rb CHANGED
@@ -15,14 +15,16 @@ if RUBY_ENGINE == 'macruby'
15
15
 
16
16
  else
17
17
 
18
+
18
19
  ##
19
20
  # A structure that contains a point in a two-dimensional coordinate system
20
- CGPoint = Struct.new(:x, :y) do
21
+ CGPoint = Struct.new(:x, :y) unless defined? CGPoint
22
+ class CGPoint
21
23
 
22
24
  # @param x [Number]
23
25
  # @param y [Number]
24
26
  def initialize x = 0.0, y = 0.0
25
- super
27
+ super x.to_f, y.to_f
26
28
  end
27
29
 
28
30
  # @!attribute [rw] x
data/lib/mouse/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Mouse
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
4
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: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-18 00:00:00.000000000 Z
12
+ date: 2012-12-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yard
@@ -100,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: -3725369419576116380
103
+ hash: -2345337379390693889
104
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  segments:
111
111
  - 0
112
- hash: -3725369419576116380
112
+ hash: -2345337379390693889
113
113
  requirements: []
114
114
  rubyforge_project:
115
115
  rubygems_version: 1.8.24