mac-robot 0.5.0 → 0.5.4

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
- SHA1:
3
- metadata.gz: edc6e87fc1245c56f21333a503d6bf2c03d3e21f
4
- data.tar.gz: 02170c5fe27e1c2d2211728863f9e56e8e4011f3
2
+ SHA256:
3
+ metadata.gz: a90d5f3016c0cc810bcaa51f9cb6949c7f9293661bcbaa1b7880e958d6a0e24e
4
+ data.tar.gz: 81f6896b40a2c5f9cfeb624ee6883f2f95aa9e4fcb4ec4e2678cfe4eb73dcdc6
5
5
  SHA512:
6
- metadata.gz: f653d30947967f518872d69ed9954016db82db32eb07b0ff645d8f834e287f650bc44feccfd9303309f8f8a6cee72ede3bfb58520a1ece72b2ad864a268d4975
7
- data.tar.gz: 1bd8092214b9d1828145ad9dbadf1d269f3d199ddf57838aef36f836ef03eef4bfa48694f6c6c4dc9e1a53a80171e78703536e1248953645fd39abce482a6147
6
+ metadata.gz: c23a9f13609200d5dad63b928a9ca95fa49d524b202b8db2a9f73a8021dd97feecd4bcdec7beebdf5c36ccabb561e22de6f2af4b7654b61d10b8df9a6ca57f46
7
+ data.tar.gz: 8044b323b5ac28bf8a835eb0167990ea11063168a52a9b80a895fe0661c0029fb25ac2792dd7bd93b4413f41605312858fa30f9f2aab4e4a40e077b585ff525d
data/Gemfile CHANGED
@@ -6,7 +6,9 @@ source "http://rubygems.org"
6
6
  # Add dependencies to develop your gem here.
7
7
  # Include everything needed to run rake, tests, features, etc.
8
8
  group :development do
9
+ gem "rake", "< 11.0"
10
+ gem "json", "~> 2.5.1"
9
11
  gem "rspec", "~> 2.8.0"
10
12
  gem "bundler"
11
- gem "jeweler", "~> 2.0.0"
13
+ gem "juwelier", "~> 2.4.9"
12
14
  end
data/Gemfile.lock CHANGED
@@ -1,50 +1,77 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.5)
5
- builder (3.2.2)
4
+ addressable (2.8.0)
5
+ public_suffix (>= 2.0.2, < 5.0)
6
+ builder (3.2.4)
6
7
  descendants_tracker (0.0.4)
7
8
  thread_safe (~> 0.3, >= 0.3.1)
8
9
  diff-lcs (1.1.3)
9
- faraday (0.8.9)
10
- multipart-post (~> 1.2.0)
11
- git (1.2.5)
12
- github_api (0.11.3)
13
- addressable (~> 2.3)
14
- descendants_tracker (~> 0.0.1)
15
- faraday (~> 0.8, < 0.10)
16
- hashie (>= 1.2)
17
- multi_json (>= 1.7.5, < 2.0)
18
- nokogiri (~> 1.6.0)
19
- oauth2
20
- hashie (2.0.5)
21
- highline (1.6.21)
22
- jeweler (2.0.1)
10
+ faraday (1.8.0)
11
+ faraday-em_http (~> 1.0)
12
+ faraday-em_synchrony (~> 1.0)
13
+ faraday-excon (~> 1.1)
14
+ faraday-httpclient (~> 1.0.1)
15
+ faraday-net_http (~> 1.0)
16
+ faraday-net_http_persistent (~> 1.1)
17
+ faraday-patron (~> 1.0)
18
+ faraday-rack (~> 1.0)
19
+ multipart-post (>= 1.2, < 3)
20
+ ruby2_keywords (>= 0.0.4)
21
+ faraday-em_http (1.0.0)
22
+ faraday-em_synchrony (1.0.0)
23
+ faraday-excon (1.1.0)
24
+ faraday-httpclient (1.0.1)
25
+ faraday-net_http (1.0.1)
26
+ faraday-net_http_persistent (1.2.0)
27
+ faraday-patron (1.0.0)
28
+ faraday-rack (1.0.0)
29
+ git (1.9.1)
30
+ rchardet (~> 1.8)
31
+ github_api (0.19.0)
32
+ addressable (~> 2.4)
33
+ descendants_tracker (~> 0.0.4)
34
+ faraday (>= 0.8, < 2)
35
+ hashie (~> 3.5, >= 3.5.2)
36
+ oauth2 (~> 1.0)
37
+ hashie (3.6.0)
38
+ highline (2.0.3)
39
+ json (2.5.1)
40
+ juwelier (2.4.9)
23
41
  builder
24
- bundler (>= 1.0)
25
- git (>= 1.2.5)
42
+ bundler
43
+ git
26
44
  github_api
27
- highline (>= 1.6.15)
28
- nokogiri (>= 1.5.10)
45
+ highline
46
+ kamelcase (~> 0)
47
+ nokogiri
48
+ psych
29
49
  rake
30
50
  rdoc
31
- jwt (0.1.11)
32
- multi_json (>= 1.5)
33
- mini_portile (0.5.2)
34
- multi_json (1.8.4)
35
- multi_xml (0.5.5)
36
- multipart-post (1.2.0)
37
- nokogiri (1.6.1)
38
- mini_portile (~> 0.5.0)
39
- oauth2 (0.9.3)
40
- faraday (>= 0.8, < 0.10)
41
- jwt (~> 0.1.8)
51
+ semver2
52
+ jwt (2.3.0)
53
+ kamelcase (0.0.2)
54
+ semver2 (~> 3)
55
+ mini_portile2 (2.6.1)
56
+ multi_json (1.15.0)
57
+ multi_xml (0.6.0)
58
+ multipart-post (2.1.1)
59
+ nokogiri (1.12.5)
60
+ mini_portile2 (~> 2.6.1)
61
+ racc (~> 1.4)
62
+ oauth2 (1.4.7)
63
+ faraday (>= 0.8, < 2.0)
64
+ jwt (>= 1.0, < 3.0)
42
65
  multi_json (~> 1.3)
43
66
  multi_xml (~> 0.5)
44
- rack (~> 1.2)
45
- rack (1.5.2)
46
- rake (0.9.6)
47
- rdoc (4.0.0)
67
+ rack (>= 1.2, < 3)
68
+ psych (4.0.2)
69
+ public_suffix (4.0.6)
70
+ racc (1.6.0)
71
+ rack (2.2.3)
72
+ rake (10.5.0)
73
+ rchardet (1.8.0)
74
+ rdoc (6.3.3)
48
75
  rspec (2.8.0)
49
76
  rspec-core (~> 2.8.0)
50
77
  rspec-expectations (~> 2.8.0)
@@ -53,12 +80,19 @@ GEM
53
80
  rspec-expectations (2.8.0)
54
81
  diff-lcs (~> 1.1.2)
55
82
  rspec-mocks (2.8.0)
56
- thread_safe (0.3.3)
83
+ ruby2_keywords (0.0.5)
84
+ semver2 (3.4.2)
85
+ thread_safe (0.3.6)
57
86
 
58
87
  PLATFORMS
59
88
  ruby
60
89
 
61
90
  DEPENDENCIES
62
91
  bundler
63
- jeweler (~> 2.0.0)
92
+ json (~> 2.5.1)
93
+ juwelier (~> 2.4.9)
94
+ rake (< 11.0)
64
95
  rspec (~> 2.8.0)
96
+
97
+ BUNDLED WITH
98
+ 2.1.4
data/README.rdoc CHANGED
@@ -14,6 +14,9 @@ A Library to Automate User Interactions
14
14
  robot.mouse_move(250, 250)
15
15
  robot.mouse_drag(100, 200)
16
16
  robot.mouse_release
17
+
18
+ robot.mouse_current_location # => 100, 200
19
+
17
20
  robot.scroll_wheel(:x => 10, :y => -20, :z => 5)
18
21
 
19
22
  === Automate keyboard
data/Rakefile CHANGED
@@ -11,8 +11,8 @@ rescue Bundler::BundlerError => e
11
11
  end
12
12
  require 'rake'
13
13
 
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
14
+ require 'juwelier'
15
+ Juwelier::Tasks.new do |gem|
16
16
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
17
  gem.name = "mac-robot"
18
18
  gem.homepage = "http://github.com/youpy/mac-robot"
@@ -23,7 +23,7 @@ Jeweler::Tasks.new do |gem|
23
23
  gem.authors = ["youpy"]
24
24
  # dependencies defined in Gemfile
25
25
  end
26
- Jeweler::RubygemsDotOrgTasks.new
26
+ Juwelier::RubygemsDotOrgTasks.new
27
27
 
28
28
  # rule to build the extension: this says
29
29
  # that the extension should be rebuilt
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.4
@@ -1,2 +1,2 @@
1
1
  #include <ruby/ruby.h>
2
- #import <Foundation/Foundation.h>
2
+ #import <CoreGraphics/CoreGraphics.h>
@@ -6,6 +6,7 @@ require "mkmf"
6
6
 
7
7
  # Name your extension
8
8
  extension_name = 'event_dispatcher'
9
+ header_name = extension_name + '.h'
9
10
 
10
11
  # Set your target name
11
12
  dir_config(extension_name)
@@ -18,7 +19,7 @@ begin
18
19
  rescue
19
20
  end
20
21
 
21
- have_header(extension_name)
22
+ have_header(header_name)
22
23
 
23
24
  # Do the work
24
25
  create_makefile(extension_name)
data/ext/util/extconf.rb CHANGED
@@ -6,6 +6,7 @@ require "mkmf"
6
6
 
7
7
  # Name your extension
8
8
  extension_name = 'util'
9
+ header_name = extension_name + '.h'
9
10
 
10
11
  # Set your target name
11
12
  dir_config(extension_name)
@@ -18,7 +19,7 @@ begin
18
19
  rescue
19
20
  end
20
21
 
21
- have_header(extension_name)
22
+ have_header(header_name)
22
23
 
23
24
  # Do the work
24
25
  create_makefile(extension_name)
data/lib/mac-robot.rb CHANGED
@@ -17,7 +17,7 @@ module Mac
17
17
  def initialize
18
18
  @x = 0
19
19
  @y = 0
20
-
20
+
21
21
  @state = :mouse_up
22
22
  @dispatcher = EventDispatcher.new
23
23
  end
@@ -45,7 +45,7 @@ module Mac
45
45
 
46
46
  mouse_event(:left, :mouse_drag)
47
47
  end
48
-
48
+
49
49
  def mouse_current_location
50
50
  loc = Util.get_mouse_current_location
51
51
  Struct.new(:x, :y).new(*loc)
data/mac-robot.gemspec CHANGED
Binary file
@@ -9,8 +9,11 @@ describe Mac::Robot do
9
9
  describe 'mouse event' do
10
10
  it 'should simulate mouse event' do
11
11
  subject.mouse_move(20, 0)
12
+ sleep 0.2
12
13
  subject.mouse_press(:left)
13
- subject.mouse_move(20, 250)
14
+ sleep 0.2
15
+ subject.mouse_move(20, 200)
16
+ sleep 0.2
14
17
  subject.mouse_release(:left)
15
18
  end
16
19
  end
metadata CHANGED
@@ -1,57 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mac-robot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - youpy
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-10 00:00:00.000000000 Z
11
+ date: 2021-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "<"
18
+ - !ruby/object:Gem::Version
19
+ version: '11.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "<"
25
+ - !ruby/object:Gem::Version
26
+ version: '11.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.5.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.5.1
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: rspec
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
- - - ~>
45
+ - - "~>"
18
46
  - !ruby/object:Gem::Version
19
47
  version: 2.8.0
20
48
  type: :development
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
- - - ~>
52
+ - - "~>"
25
53
  - !ruby/object:Gem::Version
26
54
  version: 2.8.0
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: bundler
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - '>='
59
+ - - ">="
32
60
  - !ruby/object:Gem::Version
33
61
  version: '0'
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - '>='
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
68
  version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
- name: jeweler
70
+ name: juwelier
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
- - - ~>
73
+ - - "~>"
46
74
  - !ruby/object:Gem::Version
47
- version: 2.0.0
75
+ version: 2.4.9
48
76
  type: :development
49
77
  prerelease: false
50
78
  version_requirements: !ruby/object:Gem::Requirement
51
79
  requirements:
52
- - - ~>
80
+ - - "~>"
53
81
  - !ruby/object:Gem::Version
54
- version: 2.0.0
82
+ version: 2.4.9
55
83
  description: A Library to Automate User Interactions
56
84
  email: youpy@buycheapviagraonlinenow.com
57
85
  executables: []
@@ -62,8 +90,8 @@ extra_rdoc_files:
62
90
  - LICENSE.txt
63
91
  - README.rdoc
64
92
  files:
65
- - .document
66
- - .rspec
93
+ - ".document"
94
+ - ".rspec"
67
95
  - Gemfile
68
96
  - Gemfile.lock
69
97
  - LICENSE.txt
@@ -85,24 +113,23 @@ homepage: http://github.com/youpy/mac-robot
85
113
  licenses:
86
114
  - MIT
87
115
  metadata: {}
88
- post_install_message:
116
+ post_install_message:
89
117
  rdoc_options: []
90
118
  require_paths:
91
119
  - lib
92
120
  required_ruby_version: !ruby/object:Gem::Requirement
93
121
  requirements:
94
- - - '>='
122
+ - - ">="
95
123
  - !ruby/object:Gem::Version
96
124
  version: '0'
97
125
  required_rubygems_version: !ruby/object:Gem::Requirement
98
126
  requirements:
99
- - - '>='
127
+ - - ">="
100
128
  - !ruby/object:Gem::Version
101
129
  version: '0'
102
130
  requirements: []
103
- rubyforge_project:
104
- rubygems_version: 2.0.14
105
- signing_key:
131
+ rubygems_version: 3.1.6
132
+ signing_key:
106
133
  specification_version: 4
107
134
  summary: A Library to Automate User Interactions
108
135
  test_files: []