boaw 0.1.2 → 0.1.3

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
2
  SHA256:
3
- metadata.gz: d072330b9683743c41def5c56521ebb3e665ee37b52d295d124cb4f3d3c24a36
4
- data.tar.gz: ec811345fcbca3e1d03c67d02bd74ff38e8c10da5bd83bd26fee8d650dad32db
3
+ metadata.gz: 9589def0d4516ac5801dc064a63f2cad6c432e481fef3a72536a75aa69063f65
4
+ data.tar.gz: 5439b451e676f20a13030e8173c5ed8e6f4b59376c7063ef0d22aed7a4eafcfb
5
5
  SHA512:
6
- metadata.gz: bd165843b1816f2156855b3ae4165a500945431cb6e180cf3dff2e94d9d93bbd49d68b94e258c5331c02990f7b9a5da92b2c955f38f95a366c77f0146aae16d2
7
- data.tar.gz: 9022a5d5cd5ae88c58565014ea64c74c34277e5d416d300a8f38e1bb00441c26a84e0aa5d2d5de2e1173175e9126f147a2d0c3ef8f9fca3e885dfe83c322dab0
6
+ metadata.gz: 9a45a798a136f4dd088e72cde60e7d71b5ac8ee270ced625036262083d55930d21ca8f2550ed29cdf8d4184c3912238c19bff5ff847558ef948da2d22312412f
7
+ data.tar.gz: 5447984fcc6c9cf7019ccaac42e9c4c8b56fce35e20e5cc9e785d0d4c787323c643b7c8ae5a9af4cfa713e1e8a48119c7697163a6a419d874e906f8d420e6eb5
data/lib/boaw/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Boaw
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
data/lib/boaw.rb CHANGED
@@ -8,14 +8,20 @@ class Boaw
8
8
  @adapter = Xdotool::Adapter.new
9
9
  end
10
10
 
11
+ # method returns the current cursor position
12
+ # { :x => 1, :y =>2 }
11
13
  def position
12
14
  adapter.position
13
15
  end
14
16
 
17
+ # clicks with the left mouse button,
18
+ # takes the position coordinates as input
15
19
  def left_click(position)
16
20
  adapter.left_click(position)
17
21
  end
18
22
 
23
+ # clicks with the right mouse button,
24
+ # takes the position coordinates as input
19
25
  def right_click(position)
20
26
  adapter.right_click(position)
21
27
  end
@@ -5,7 +5,7 @@ require_relative 'base_error'
5
5
 
6
6
  module Xdotool
7
7
  # Xdotool adapter for mouse control
8
- class Adapter
8
+ class Adapter # :nodoc: all
9
9
  def initialize
10
10
  result = Kernel.system('xdotool version')
11
11
  raise BaseError if result.nil?
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Xdotool
4
4
  # default error
5
- class BaseError < StandardError
5
+ class BaseError < StandardError # :nodoc: all
6
6
  def message
7
7
  'failed to initialize xdotool module'
8
8
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Xdotool
4
4
  # coordinate position parser from Xdotool
5
- class PositionParser
5
+ class PositionParser # :nodoc: all
6
6
  def self.parse(position)
7
7
  hash_position = position.scan(/(\w+):(\d+)/).to_h
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boaw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Leonov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-04 00:00:00.000000000 Z
11
+ date: 2023-11-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The library will allow you to create auto-clickers for Unix systems
14
14
  email: leonov7632@gmail.com
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  requirements: []
46
- rubygems_version: 3.4.21
46
+ rubygems_version: 3.4.22
47
47
  signing_key:
48
48
  specification_version: 4
49
49
  summary: Mouse manipulation library