mac-robot 0.5.0 → 0.5.1
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 +47 -34
- data/README.rdoc +3 -0
- data/Rakefile +5 -5
- data/VERSION +1 -1
- data/ext/event_dispatcher/extconf.rb +1 -1
- data/ext/util/extconf.rb +1 -1
- data/lib/mac-robot.rb +4 -4
- data/mac-robot.gemspec +0 -0
- data/spec/mac-robot_spec.rb +4 -1
- metadata +46 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 002b8be116c9feea37ae23ac55cc05911189dc7998108c2751a10bddb0c038bf
|
4
|
+
data.tar.gz: 4354f97d4b55d61741b99de682d1708a6aafdb737d1affaf24c92134c9334eb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 064d07a920fddc44e55647155c1cb26c9987878967688a233eed0036035afa702a6fa84a612216e97fced7cd940570d864196b5270aa32af50332d0eb80ae8cc
|
7
|
+
data.tar.gz: 4dc039577b578b06f705648690661931cc4c391765f76bb3b36104381244f72767302dfa229a47946f47fad4366382c33712f5395e923b5da05123942a1cd681
|
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.
|
13
|
+
gem "jeweler", "~> 2.3.9"
|
12
14
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,50 +1,57 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
addressable (2.
|
5
|
-
builder (3.2.
|
4
|
+
addressable (2.4.0)
|
5
|
+
builder (3.2.4)
|
6
6
|
descendants_tracker (0.0.4)
|
7
7
|
thread_safe (~> 0.3, >= 0.3.1)
|
8
8
|
diff-lcs (1.1.3)
|
9
|
-
faraday (0.
|
10
|
-
multipart-post (
|
11
|
-
git (1.
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
faraday (0.9.2)
|
10
|
+
multipart-post (>= 1.2, < 3)
|
11
|
+
git (1.8.1)
|
12
|
+
rchardet (~> 1.8)
|
13
|
+
github_api (0.16.0)
|
14
|
+
addressable (~> 2.4.0)
|
15
|
+
descendants_tracker (~> 0.0.4)
|
15
16
|
faraday (~> 0.8, < 0.10)
|
16
|
-
hashie (>=
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
jeweler (2.0.1)
|
17
|
+
hashie (>= 3.4)
|
18
|
+
mime-types (>= 1.16, < 3.0)
|
19
|
+
oauth2 (~> 1.0)
|
20
|
+
hashie (4.1.0)
|
21
|
+
highline (2.0.3)
|
22
|
+
jeweler (2.3.9)
|
23
23
|
builder
|
24
|
-
bundler
|
24
|
+
bundler
|
25
25
|
git (>= 1.2.5)
|
26
|
-
github_api
|
26
|
+
github_api (~> 0.16.0)
|
27
27
|
highline (>= 1.6.15)
|
28
28
|
nokogiri (>= 1.5.10)
|
29
|
+
psych
|
29
30
|
rake
|
30
31
|
rdoc
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
32
|
+
semver2
|
33
|
+
json (2.5.1)
|
34
|
+
jwt (2.2.2)
|
35
|
+
mime-types (2.99.3)
|
36
|
+
mini_portile2 (2.5.0)
|
37
|
+
multi_json (1.15.0)
|
38
|
+
multi_xml (0.6.0)
|
39
|
+
multipart-post (2.1.1)
|
40
|
+
nokogiri (1.11.3)
|
41
|
+
mini_portile2 (~> 2.5.0)
|
42
|
+
racc (~> 1.4)
|
43
|
+
oauth2 (1.4.7)
|
44
|
+
faraday (>= 0.8, < 2.0)
|
45
|
+
jwt (>= 1.0, < 3.0)
|
42
46
|
multi_json (~> 1.3)
|
43
47
|
multi_xml (~> 0.5)
|
44
|
-
rack (
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
+
rack (>= 1.2, < 3)
|
49
|
+
psych (3.3.1)
|
50
|
+
racc (1.5.2)
|
51
|
+
rack (2.2.3)
|
52
|
+
rake (10.5.0)
|
53
|
+
rchardet (1.8.0)
|
54
|
+
rdoc (6.3.0)
|
48
55
|
rspec (2.8.0)
|
49
56
|
rspec-core (~> 2.8.0)
|
50
57
|
rspec-expectations (~> 2.8.0)
|
@@ -53,12 +60,18 @@ GEM
|
|
53
60
|
rspec-expectations (2.8.0)
|
54
61
|
diff-lcs (~> 1.1.2)
|
55
62
|
rspec-mocks (2.8.0)
|
56
|
-
|
63
|
+
semver2 (3.4.2)
|
64
|
+
thread_safe (0.3.6)
|
57
65
|
|
58
66
|
PLATFORMS
|
59
67
|
ruby
|
60
68
|
|
61
69
|
DEPENDENCIES
|
62
70
|
bundler
|
63
|
-
jeweler (~> 2.
|
71
|
+
jeweler (~> 2.3.9)
|
72
|
+
json (~> 2.5.1)
|
73
|
+
rake (< 11.0)
|
64
74
|
rspec (~> 2.8.0)
|
75
|
+
|
76
|
+
BUNDLED WITH
|
77
|
+
2.1.4
|
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -32,10 +32,10 @@ ext_names = %w/event_dispatcher util/
|
|
32
32
|
ext_names.each do |ext_name|
|
33
33
|
CLEAN.include Dir.glob("ext/#{ext_name}/*{.o,.log}")
|
34
34
|
CLEAN.include "ext/#{ext_name}/Makefile"
|
35
|
-
CLOBBER.include "ext/#{ext_name}/#{ext_name}.bundle"
|
36
|
-
CLOBBER.include "lib/#{ext_name}.bundle"
|
35
|
+
CLOBBER.include "ext/#{ext_name}/#{ext_name}.h.bundle"
|
36
|
+
CLOBBER.include "lib/#{ext_name}.h.bundle"
|
37
37
|
|
38
|
-
file "lib/#{ext_name}.bundle" =>
|
38
|
+
file "lib/#{ext_name}.h.bundle" =>
|
39
39
|
Dir.glob("ext/#{ext_name}/*{.rb,.m}") do
|
40
40
|
Dir.chdir("ext/#{ext_name}") do
|
41
41
|
# this does essentially the same thing
|
@@ -43,10 +43,10 @@ ext_names.each do |ext_name|
|
|
43
43
|
ruby "extconf.rb"
|
44
44
|
sh "make"
|
45
45
|
end
|
46
|
-
cp "ext/#{ext_name}/#{ext_name}.bundle", "lib/"
|
46
|
+
cp "ext/#{ext_name}/#{ext_name}.h.bundle", "lib/"
|
47
47
|
end
|
48
48
|
|
49
|
-
task :spec => "lib/#{ext_name}.bundle"
|
49
|
+
task :spec => "lib/#{ext_name}.h.bundle"
|
50
50
|
end
|
51
51
|
|
52
52
|
require 'rspec/core'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/ext/util/extconf.rb
CHANGED
data/lib/mac-robot.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require 'event_dispatcher'
|
2
|
-
require 'util'
|
1
|
+
require 'event_dispatcher.h'
|
2
|
+
require 'util.h'
|
3
3
|
|
4
4
|
module Mac
|
5
5
|
class Robot
|
@@ -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.1
|
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-04-15 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
70
|
name: jeweler
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
|
-
- - ~>
|
73
|
+
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
75
|
+
version: 2.3.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.3.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: []
|