boaw 0.1.1 → 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: c45f33a18dfd24179ae9f97206c7ce088a07225baa5952c3660a0899cb1c2e15
4
- data.tar.gz: b41699d315b601e860b04dd37807e43f2a776e2a6e990e972d9c7ca0c92dda53
3
+ metadata.gz: 9589def0d4516ac5801dc064a63f2cad6c432e481fef3a72536a75aa69063f65
4
+ data.tar.gz: 5439b451e676f20a13030e8173c5ed8e6f4b59376c7063ef0d22aed7a4eafcfb
5
5
  SHA512:
6
- metadata.gz: f5fe0f13954305411ffec2f8452b7b8e7f55e31020a5775af2e8e002b54554b8d335682cbaff05bb4150d37b7bf93ebf110a6f0411d5f659e42fe37982fbaa54
7
- data.tar.gz: 59d4518058098aea546202c763954b1f08415854b1859f27ce15349a3ec69e3175811bae5b252d21994160bb2776703d281f4147562553fb852654f812aef77a
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.1'
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,9 +5,9 @@ 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
- result = Kernel.system('xdotool')
10
+ result = Kernel.system('xdotool version')
11
11
  raise BaseError if result.nil?
12
12
  end
13
13
 
@@ -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.1
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-03 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