autoit 1.3.1 → 1.3.2

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: 8fc059b77cc8323c9b8aa6748736885f92848edee4c5f3dbfd3295ceb82aadcc
4
- data.tar.gz: 485d622411ba4cd04f7aa4969fad55e0b8bf874ed4a2386ba7ce90a83acab9c6
3
+ metadata.gz: adc8c643bd7f787b9860adf192276cbd43f6e9495ed1deb611244e4626461051
4
+ data.tar.gz: 9bbb6b07927c0202ce901b4c6c6c2470185c9063b5f1ed777d7bf13d1ee8dd24
5
5
  SHA512:
6
- metadata.gz: a4f0ab3685323c918b7aa7f3a188fa2d9895c96bde1896d8098888bef77c8dbb0f5448426d5297666365e1123903aa7e31c620470527a1edf0637a4df455d256
7
- data.tar.gz: f6729518b291fddcbd81470194f6e14fcf189467e5d70a67498fa747370a1451d5f6b9543c27f26e4fd4b47742d4441447152ca1057a913627e028a30d714cc7
6
+ metadata.gz: b04997bf28602f495aa0766dbf4c229791e9ffc57e4918c888c9d33dbb86f51e4c5000de21ba42b068281ce49a6a3b2a002214bea6b9e7a6d31c5efbc08e4bfb
7
+ data.tar.gz: ecae065440228393095fa27d6f54f67bb6386d1d9ba32b8b8e92c360a49e1656a96395304d4424b55fd45203e58fdf57bf72b04926fa413f72603a5e8b5ed7f4
data/.gitignore CHANGED
@@ -6,5 +6,6 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ Gemfile.lock
9
10
  /rubocop.html
10
11
  /.byebug_history
@@ -1,15 +1,15 @@
1
- ## 1.0.0 (2018-11-09)
1
+ ## 1.3.2 (2018-12-12)
2
2
 
3
3
  Changes:
4
4
 
5
- - Released first functional version using natives commands. Check this on README file.
6
- - Implemented a built-in executable to install AutoIt DLLS on your OS: autoit install
7
- - Wrapper methods to check texts and integers, to open app, close windows, open apps and clicks on
8
- - command method to run native AutoIt commands
5
+ - Bug fixes and documentation.
9
6
 
10
7
  Bugfixes:
11
8
 
12
- - Nothing
9
+ - Fixes the 'open_app' method passing empty string or nil resulting in
10
+ ruby interpreter crash. Now it has a treatment to check the arguments before
11
+ call the command. It works for open_app method and native commands.
12
+ - Fixes the broken URLS in README.
13
13
 
14
14
  Documentation:
15
15
 
data/README.md CHANGED
@@ -161,6 +161,15 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
161
161
 
162
162
  Bug reports and pull requests are welcome on GitHub at https://github.com/rpossan/autoit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
163
163
 
164
+ [![](https://sourcerer.io/fame/fabiosv/rpossan/autoit/images/0)](https://sourcerer.io/fame/fabiosv/rpossan/autoit/links/0)
165
+ [![](https://sourcerer.io/fame/fabiosv/rpossan/autoit/images/1)](https://sourcerer.io/fame/fabiosv/rpossan/autoit/links/1)
166
+ [![](https://sourcerer.io/fame/fabiosv/rpossan/autoit/images/2)](https://sourcerer.io/fame/fabiosv/rpossan/autoit/links/2)
167
+ [![](https://sourcerer.io/fame/fabiosv/rpossan/autoit/images/3)](https://sourcerer.io/fame/fabiosv/rpossan/autoit/links/3)
168
+ [![](https://sourcerer.io/fame/fabiosv/rpossan/autoit/images/4)](https://sourcerer.io/fame/fabiosv/rpossan/autoit/links/4)
169
+ [![](https://sourcerer.io/fame/fabiosv/rpossan/autoit/images/5)](https://sourcerer.io/fame/fabiosv/rpossan/autoit/links/5)
170
+ [![](https://sourcerer.io/fame/fabiosv/rpossan/autoit/images/6)](https://sourcerer.io/fame/fabiosv/rpossan/autoit/links/6)
171
+ [![](https://sourcerer.io/fame/fabiosv/rpossan/autoit/images/7)](https://sourcerer.io/fame/fabiosv/rpossan/autoit/links/7)
172
+
164
173
  ## 6 - License
165
174
 
166
175
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Binary file
@@ -2,27 +2,27 @@ lib = File.expand_path("../lib", __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "autoit/version"
4
4
  Gem::Specification.new do |spec|
5
- spec.name = "autoit"
5
+ spec.name = 'autoit'
6
6
  spec.version = Autoit::VERSION
7
- spec.authors = ["Ronaldo Possan"]
8
- spec.email = ["ronaldo.possan@gmail.com"]
9
- spec.summary = "A ruby gem to handle Windows objects with AutoIT for Automation and Tests projects."
7
+ spec.authors = ['Ronaldo Possan', 'Fabio Valonga']
8
+ spec.email = ['ronaldo.possan@gmail.com', 'fabiosv.etep@gmail.com']
9
+ spec.summary = 'A ruby gem wrapper to interface with AutoIt'
10
10
  spec.description = <<-EOF
11
- AutoIt is a gem to integrate in your automation project and tests using the AutoIt software for interact with Windows OLE
12
- bjects. With AutoIt gem you can run the easy wrapper methods or run natives AutoIt commands.
13
- EOF
14
- spec.homepage = "https://github.com/rpossan/autoit"
15
- spec.license = "MIT"
16
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
11
+ AutoIt is a gem to integrate in your automation project and tests using the AutoIt software for interact with
12
+ Windows OLE objects. With AutoIt gem you can run the easy wrapper methods or run natives AutoIt commands.
13
+ EOF
14
+ spec.homepage = 'https://github.com/rpossan/autoit'
15
+ spec.license = 'MIT'
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
17
  # to allow pushing to a single host or delete this section to allow pushing to any host.
18
18
  if spec.respond_to?(:metadata)
19
19
  #spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
20
- spec.metadata["homepage_uri"] = spec.homepage
21
- spec.metadata["source_code_uri"] = "https://github.com/rpossan/autoit"
22
- spec.metadata["changelog_uri"] = "https://github.com/rpossan/autoit/blob/master/CHANGELOG.md"
20
+ spec.metadata['homepage_uri'] = spec.homepage
21
+ spec.metadata['source_code_uri'] = "https://github.com/rpossan/autoit"
22
+ spec.metadata['changelog_uri'] = "https://github.com/rpossan/autoit/blob/master/CHANGELOG.md"
23
23
  else
24
- raise "RubyGems 2.0 or newer is required to protect against " \
25
- "public gem pushes."
24
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
25
+ 'public gem pushes.'
26
26
  end
27
27
  # Specify which files should be added to the gem when it is released.
28
28
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -8,6 +8,7 @@ module AutoIt
8
8
  attr_reader :win
9
9
 
10
10
  def initialize
11
+ # dll = RUBY_PLATFORM.include? 'x64' ? a : b
11
12
  @win = WIN32OLE.new('AutoItX3.Control')
12
13
  end
13
14
 
@@ -45,6 +46,34 @@ module AutoIt
45
46
  found.to_s.chomp == text.to_s
46
47
  end
47
48
 
49
+ # Use to activate an opened window
50
+ # title: The title/hWnd/class of the window to activate.
51
+ # text: [optional] The text of the window to activate. Default is an empty
52
+ # string.
53
+ def window_activate(title, text = nil)
54
+ win.WinActivate(title, text).nil?
55
+ end
56
+
57
+ # Check if a windows is active or not
58
+ # title: The title/hWnd/class of the window to activate.
59
+ # text: [optional] The text of the window to activate. Default is an empty
60
+ # string.
61
+ # return: true or false
62
+ def window_active?(title, text = '')
63
+ sleep 3
64
+ execute { win.WinActive(title, text) }
65
+ end
66
+
67
+ # Check if a windows exists or not
68
+ # title: The title/hWnd/class of the window to activate.
69
+ # text: [optional] The text of the window to activate. Default is an empty
70
+ # string.
71
+ # return: true or false
72
+ def window_exists?(title, text = '')
73
+ sleep 3
74
+ execute { win.WinExists(title, text) }
75
+ end
76
+
48
77
  private
49
78
 
50
79
  def execute
@@ -1,3 +1,3 @@
1
1
  module Autoit
2
- VERSION = '1.3.1'.freeze
2
+ VERSION = '1.3.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronaldo Possan
8
+ - Fabio Valonga
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
@@ -94,11 +95,12 @@ dependencies:
94
95
  - - ">="
95
96
  - !ruby/object:Gem::Version
96
97
  version: 0.49.0
97
- description: |
98
- AutoIt is a gem to integrate in your automation project and tests using the AutoIt software for interact with Windows OLE
99
- bjects. With AutoIt gem you can run the easy wrapper methods or run natives AutoIt commands.
98
+ description: |2
99
+ AutoIt is a gem to integrate in your automation project and tests using the AutoIt software for interact with
100
+ Windows OLE objects. With AutoIt gem you can run the easy wrapper methods or run natives AutoIt commands.
100
101
  email:
101
102
  - ronaldo.possan@gmail.com
103
+ - fabiosv.etep@gmail.com
102
104
  executables:
103
105
  - autoit
104
106
  extensions: []
@@ -115,6 +117,7 @@ files:
115
117
  - README.md
116
118
  - Rakefile
117
119
  - _config.yml
120
+ - autoit-1.3.1.gem
118
121
  - autoit.gemspec
119
122
  - bin/autoit
120
123
  - bin/console
@@ -154,6 +157,5 @@ rubyforge_project:
154
157
  rubygems_version: 2.7.6
155
158
  signing_key:
156
159
  specification_version: 4
157
- summary: A ruby gem to handle Windows objects with AutoIT for Automation and Tests
158
- projects.
160
+ summary: A ruby gem wrapper to interface with AutoIt
159
161
  test_files: []