ne_spat 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.ruby-version +1 -0
- data/.standard.yml +2 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +73 -0
- data/LICENSE.txt +21 -0
- data/README.md +45 -0
- data/exe/ne_spat +8 -0
- data/lefthook.yml +10 -0
- data/lib/ne_spat/executor.rb +18 -0
- data/lib/ne_spat/version.rb +5 -0
- data/lib/ne_spat.rb +9 -0
- data/ne_spat.gemspec +29 -0
- metadata +72 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 48c387f0676c2cfa0f0caadb3170c3c3f04250ede1418e0fd36448d536779cf4
|
4
|
+
data.tar.gz: da2ca7ed2ea7fe6afe17f8208a2edbb647eb0aa4f0233f3293047c790d814640
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 95d944a4c5cce4142155be131f5766a423e1808798683f6f9ade0b1e2db3ebbf9d117beb98c3997cbdbc9959b3c139a481d89a779b26f9a968f38e2c27c2e958
|
7
|
+
data.tar.gz: b8d210ebfec8b69af7d7c570899ad1f953b77637d54c4f9d34fccec76f0a74d8943a808638165d4ac832c4330896bfa9fa4e55bc3fff9df7b824bd176aeb3493
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|
data/.standard.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ne_spat (0.1.0)
|
5
|
+
rumouse (~> 0.0.7)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
coderay (1.1.3)
|
12
|
+
ffi (1.16.3)
|
13
|
+
json (2.6.3)
|
14
|
+
language_server-protocol (3.17.0.3)
|
15
|
+
lefthook (1.5.2)
|
16
|
+
lint_roller (1.1.0)
|
17
|
+
method_source (1.0.0)
|
18
|
+
parallel (1.23.0)
|
19
|
+
parser (3.2.2.4)
|
20
|
+
ast (~> 2.4.1)
|
21
|
+
racc
|
22
|
+
pry (0.14.2)
|
23
|
+
coderay (~> 1.1)
|
24
|
+
method_source (~> 1.0)
|
25
|
+
racc (1.7.3)
|
26
|
+
rainbow (3.1.1)
|
27
|
+
regexp_parser (2.8.2)
|
28
|
+
rexml (3.2.6)
|
29
|
+
rubocop (1.57.2)
|
30
|
+
json (~> 2.3)
|
31
|
+
language_server-protocol (>= 3.17.0)
|
32
|
+
parallel (~> 1.10)
|
33
|
+
parser (>= 3.2.2.4)
|
34
|
+
rainbow (>= 2.2.2, < 4.0)
|
35
|
+
regexp_parser (>= 1.8, < 3.0)
|
36
|
+
rexml (>= 3.2.5, < 4.0)
|
37
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
38
|
+
ruby-progressbar (~> 1.7)
|
39
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
40
|
+
rubocop-ast (1.30.0)
|
41
|
+
parser (>= 3.2.1.0)
|
42
|
+
rubocop-performance (1.19.1)
|
43
|
+
rubocop (>= 1.7.0, < 2.0)
|
44
|
+
rubocop-ast (>= 0.4.0)
|
45
|
+
ruby-progressbar (1.13.0)
|
46
|
+
rumouse (0.0.7)
|
47
|
+
ffi (>= 1.9.3)
|
48
|
+
standard (1.32.0)
|
49
|
+
language_server-protocol (~> 3.17.0.2)
|
50
|
+
lint_roller (~> 1.0)
|
51
|
+
rubocop (~> 1.57.2)
|
52
|
+
standard-custom (~> 1.0.0)
|
53
|
+
standard-performance (~> 1.2)
|
54
|
+
standard-custom (1.0.2)
|
55
|
+
lint_roller (~> 1.0)
|
56
|
+
rubocop (~> 1.50)
|
57
|
+
standard-performance (1.2.1)
|
58
|
+
lint_roller (~> 1.1)
|
59
|
+
rubocop-performance (~> 1.19.1)
|
60
|
+
unicode-display_width (2.5.0)
|
61
|
+
|
62
|
+
PLATFORMS
|
63
|
+
x86_64-darwin-22
|
64
|
+
|
65
|
+
DEPENDENCIES
|
66
|
+
lefthook (~> 1.5.2)
|
67
|
+
ne_spat!
|
68
|
+
pry (~> 0.14.2)
|
69
|
+
standard (~> 1.32.0)
|
70
|
+
standard-performance (~> 1.2.1)
|
71
|
+
|
72
|
+
BUNDLED WITH
|
73
|
+
2.4.19
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2023 Ar2emis
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# NeSpat
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Install `libxtst` first:
|
6
|
+
|
7
|
+
MacOS:
|
8
|
+
```bash
|
9
|
+
brew install libxtst
|
10
|
+
```
|
11
|
+
|
12
|
+
Others:
|
13
|
+
```bash
|
14
|
+
sudo apt install libxtst-dev
|
15
|
+
```
|
16
|
+
|
17
|
+
Install `ne_spat`:
|
18
|
+
|
19
|
+
```bash
|
20
|
+
gem install ne_spat
|
21
|
+
```
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Invoke `ne_spat` from terminal and enjoy:
|
26
|
+
|
27
|
+
```bash
|
28
|
+
ne_spat
|
29
|
+
```
|
30
|
+
|
31
|
+
## Development
|
32
|
+
```
|
33
|
+
|\ _,,,---,,_
|
34
|
+
ZZZzz /,`.-'`' -. ;-;;,_
|
35
|
+
|,4- ) )-,_. ,\ ( `'-'
|
36
|
+
'---''(_/--' `-'\\_)
|
37
|
+
```
|
38
|
+
|
39
|
+
## Contributing
|
40
|
+
|
41
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ar2em1s/ne_spat.
|
42
|
+
|
43
|
+
## License
|
44
|
+
|
45
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/exe/ne_spat
ADDED
data/lefthook.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NeSpat
|
4
|
+
class Executor
|
5
|
+
INTERVAL = 0.02
|
6
|
+
DELTA = [1, -1]
|
7
|
+
|
8
|
+
def self.call
|
9
|
+
mouse = RuMouse.new
|
10
|
+
|
11
|
+
loop do
|
12
|
+
sleep(INTERVAL)
|
13
|
+
position = mouse.position
|
14
|
+
mouse.move(position[:x] + DELTA.sample, position[:y] + DELTA.sample)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/ne_spat.rb
ADDED
data/ne_spat.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/ne_spat/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "ne_spat"
|
7
|
+
spec.version = NeSpat::VERSION
|
8
|
+
spec.authors = ["ar2em1s"]
|
9
|
+
spec.email = ["artemsheva0510@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "Do not let your machine fall asleep."
|
12
|
+
spec.homepage = "https://github.com/ar2em1s/ne_spat"
|
13
|
+
spec.license = "MIT"
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
18
|
+
|
19
|
+
spec.files = Dir.chdir(__dir__) do
|
20
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
21
|
+
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
spec.bindir = "exe"
|
25
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
26
|
+
spec.require_paths = ["lib"]
|
27
|
+
|
28
|
+
spec.add_dependency "rumouse", "~> 0.0.7"
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ne_spat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ar2em1s
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-11-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rumouse
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.7
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.7
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- artemsheva0510@gmail.com
|
30
|
+
executables:
|
31
|
+
- ne_spat
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- ".ruby-version"
|
36
|
+
- ".standard.yml"
|
37
|
+
- Gemfile
|
38
|
+
- Gemfile.lock
|
39
|
+
- LICENSE.txt
|
40
|
+
- README.md
|
41
|
+
- exe/ne_spat
|
42
|
+
- lefthook.yml
|
43
|
+
- lib/ne_spat.rb
|
44
|
+
- lib/ne_spat/executor.rb
|
45
|
+
- lib/ne_spat/version.rb
|
46
|
+
- ne_spat.gemspec
|
47
|
+
homepage: https://github.com/ar2em1s/ne_spat
|
48
|
+
licenses:
|
49
|
+
- MIT
|
50
|
+
metadata:
|
51
|
+
homepage_uri: https://github.com/ar2em1s/ne_spat
|
52
|
+
source_code_uri: https://github.com/ar2em1s/ne_spat
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.6.0
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
requirements: []
|
68
|
+
rubygems_version: 3.4.19
|
69
|
+
signing_key:
|
70
|
+
specification_version: 4
|
71
|
+
summary: Do not let your machine fall asleep.
|
72
|
+
test_files: []
|