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 +5 -5
- data/Gemfile +3 -1
- data/Gemfile.lock +71 -37
- data/README.rdoc +3 -0
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/ext/event_dispatcher/event_dispatcher.h +1 -1
- data/ext/event_dispatcher/extconf.rb +2 -1
- data/ext/util/extconf.rb +2 -1
- data/lib/mac-robot.rb +2 -2
- data/mac-robot.gemspec +0 -0
- data/spec/mac-robot_spec.rb +4 -1
- metadata +47 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a90d5f3016c0cc810bcaa51f9cb6949c7f9293661bcbaa1b7880e958d6a0e24e
|
4
|
+
data.tar.gz: 81f6896b40a2c5f9cfeb624ee6883f2f95aa9e4fcb4ec4e2678cfe4eb73dcdc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 "
|
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.
|
5
|
-
|
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 (
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
faraday (~>
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
25
|
-
git
|
42
|
+
bundler
|
43
|
+
git
|
26
44
|
github_api
|
27
|
-
highline
|
28
|
-
|
45
|
+
highline
|
46
|
+
kamelcase (~> 0)
|
47
|
+
nokogiri
|
48
|
+
psych
|
29
49
|
rake
|
30
50
|
rdoc
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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 (
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
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
|
-
|
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
data/Rakefile
CHANGED
@@ -11,8 +11,8 @@ rescue Bundler::BundlerError => e
|
|
11
11
|
end
|
12
12
|
require 'rake'
|
13
13
|
|
14
|
-
require '
|
15
|
-
|
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
|
-
|
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.
|
1
|
+
0.5.4
|
@@ -1,2 +1,2 @@
|
|
1
1
|
#include <ruby/ruby.h>
|
2
|
-
#import <
|
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(
|
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(
|
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
|
data/spec/mac-robot_spec.rb
CHANGED
@@ -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
|
-
|
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.
|
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:
|
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:
|
70
|
+
name: juwelier
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
|
-
- - ~>
|
73
|
+
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
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.
|
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
|
-
|
104
|
-
|
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: []
|