aruba 1.1.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +61 -3
- data/CONTRIBUTING.md +9 -2
- data/README.md +21 -18
- data/lib/aruba/api/bundler.rb +1 -0
- data/lib/aruba/api/commands.rb +0 -2
- data/lib/aruba/api/core.rb +15 -11
- data/lib/aruba/api/filesystem.rb +1 -7
- data/lib/aruba/api/text.rb +0 -12
- data/lib/aruba/console.rb +1 -1
- data/lib/aruba/contracts/enum.rb +1 -0
- data/lib/aruba/cucumber/command.rb +175 -119
- data/lib/aruba/cucumber/file.rb +2 -2
- data/lib/aruba/cucumber/parameter_types.rb +1 -0
- data/lib/aruba/cucumber.rb +1 -0
- data/lib/aruba/event_bus/name_resolver.rb +1 -1
- data/lib/aruba/matchers/command/be_successfully_executed.rb +0 -2
- data/lib/aruba/matchers/command/have_exit_status.rb +7 -13
- data/lib/aruba/matchers/command/have_finished_in_time.rb +0 -2
- data/lib/aruba/matchers/directory/be_an_existing_directory.rb +0 -2
- data/lib/aruba/matchers/directory/have_sub_directory.rb +0 -2
- data/lib/aruba/matchers/file/be_a_command_found_in_path.rb +0 -2
- data/lib/aruba/matchers/file/be_an_existing_executable.rb +0 -1
- data/lib/aruba/matchers/file/be_an_existing_file.rb +0 -2
- data/lib/aruba/matchers/file/have_file_content.rb +0 -2
- data/lib/aruba/matchers/file/have_file_size.rb +0 -2
- data/lib/aruba/matchers/file/have_same_file_content.rb +0 -1
- data/lib/aruba/matchers/path/a_path_matching_pattern.rb +0 -2
- data/lib/aruba/matchers/path/be_an_absolute_path.rb +0 -2
- data/lib/aruba/matchers/path/be_an_existing_path.rb +0 -2
- data/lib/aruba/matchers/path/have_permissions.rb +0 -2
- data/lib/aruba/platform.rb +2 -2
- data/lib/aruba/platforms/announcer.rb +0 -2
- data/lib/aruba/platforms/command_monitor.rb +2 -2
- data/lib/aruba/platforms/unix_environment_variables.rb +0 -2
- data/lib/aruba/platforms/unix_platform.rb +2 -1
- data/lib/aruba/platforms/windows_environment_variables.rb +1 -1
- data/lib/aruba/platforms/windows_platform.rb +1 -3
- data/lib/aruba/platforms/windows_which.rb +1 -1
- data/lib/aruba/processes/basic_process.rb +4 -0
- data/lib/aruba/version.rb +1 -1
- metadata +82 -26
- data/lib/aruba/matchers/base/base_matcher.rb +0 -87
- data/lib/aruba/matchers/base/object_formatter.rb +0 -104
- data/lib/aruba/matchers/collection/all.rb +0 -11
- data/lib/aruba/matchers/collection/include_an_object.rb +0 -120
- data/lib/aruba/matchers/collection.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc48eb26abb5d1e638537ed9eaf53f5758c541ca48e9f979da107bb8a7bdcf6c
|
4
|
+
data.tar.gz: 75d8cc6d3c52b62538f688949ee212abd5c3dad8aca20fd3007860757eaf830e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bece1031dfa68f1fa9a80854758558596cc48d073996fb5d3f6440226d18e68c7408d478ffa6a9f7881aa52e3d172c1acaa1bf3bae5948b07af363e6a456c75d
|
7
|
+
data.tar.gz: 7f68b65140bbe200235a6e23aac68a5f4da28ca9cf47171cd28d758a2b70aaa5645b7a45f739a1fa803d5c5770864196224d4797685c0de40328a71db7697d90
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,34 @@ This project adheres to [Semantic Versioning][1].
|
|
6
6
|
|
7
7
|
This document is formatted according to the principles of [Keep A CHANGELOG][2].
|
8
8
|
|
9
|
-
## [
|
9
|
+
## [2.0.1] / 2022-04-22
|
10
|
+
|
11
|
+
* Various cleanups of internal APIs ([#838] by [mvz])
|
12
|
+
* Make objects not pretend to be nil ([#843] by [mvz])
|
13
|
+
* Remove experimental variables replacement feature ([#846] by [mvz])
|
14
|
+
* Support Ruby 3.1 ([#850] by [mvz])
|
15
|
+
* Fix steps that wait for output from commands ([#856] by [mvz])
|
16
|
+
* Ensure `Gem.win_platform?` is available ([#858] by [mvz])
|
17
|
+
* Support JRuby 9.3 ([#867] by [mvz])
|
18
|
+
|
19
|
+
## [2.0.0] / 2021-07-26
|
20
|
+
|
21
|
+
Potentially breaking changes:
|
22
|
+
|
23
|
+
* Bump miminum cucumber version to 4 ([#814] by [mvz])
|
24
|
+
* Drop support for Ruby 2.4 ([#820] by [mvz])
|
25
|
+
* Remove deprecated ability to append to non-existent file ([#829] by [mvz])
|
26
|
+
* Make absolute file name warning an error ([#783] by [mvz])
|
27
|
+
|
28
|
+
Other changes
|
29
|
+
|
30
|
+
* Use Ruby's built-in windows platform detection ([#813] by [mvz])
|
31
|
+
* Update some step definitions to use Cucumber Expression syntax ([#822] by [mvz])
|
32
|
+
* Update cucumber dependency to allow use of cucumber 7 ([#828] by [dependabot])
|
33
|
+
|
34
|
+
## [1.1.2] / 2021-06-20
|
35
|
+
|
36
|
+
* Add Bundler as an explicit runtime dependency ([#810] by [luke-hill])
|
10
37
|
|
11
38
|
## [1.1.1] / 2021-05-14
|
12
39
|
|
@@ -977,8 +1004,36 @@ Note: These are changes w.r.t. Aruba version 0.14.1.
|
|
977
1004
|
|
978
1005
|
<!-- issues & pull requests -->
|
979
1006
|
|
1007
|
+
[#867]: https://github.com/cucumber/aruba/pull/867
|
1008
|
+
[#858]: https://github.com/cucumber/aruba/pull/858
|
1009
|
+
[#856]: https://github.com/cucumber/aruba/pull/856
|
1010
|
+
[#850]: https://github.com/cucumber/aruba/pull/850
|
1011
|
+
[#846]: https://github.com/cucumber/aruba/pull/846
|
1012
|
+
[#843]: https://github.com/cucumber/aruba/pull/843
|
1013
|
+
[#838]: https://github.com/cucumber/aruba/pull/838
|
1014
|
+
[#829]: https://github.com/cucumber/aruba/pull/829
|
1015
|
+
[#828]: https://github.com/cucumber/aruba/pull/828
|
1016
|
+
[#822]: https://github.com/cucumber/aruba/pull/822
|
1017
|
+
[#820]: https://github.com/cucumber/aruba/pull/820
|
1018
|
+
[#814]: https://github.com/cucumber/aruba/pull/814
|
1019
|
+
[#813]: https://github.com/cucumber/aruba/pull/813
|
1020
|
+
[#810]: https://github.com/cucumber/aruba/pull/810
|
980
1021
|
[#804]: https://github.com/cucumber/aruba/pull/804
|
981
1022
|
[#801]: https://github.com/cucumber/aruba/pull/801
|
1023
|
+
[#783]: https://github.com/cucumber/aruba/pull/783
|
1024
|
+
[#781]: https://github.com/cucumber/aruba/pull/781
|
1025
|
+
[#780]: https://github.com/cucumber/aruba/pull/780
|
1026
|
+
[#772]: https://github.com/cucumber/aruba/pull/772
|
1027
|
+
[#771]: https://github.com/cucumber/aruba/pull/771
|
1028
|
+
[#769]: https://github.com/cucumber/aruba/pull/769
|
1029
|
+
[#767]: https://github.com/cucumber/aruba/pull/767
|
1030
|
+
[#766]: https://github.com/cucumber/aruba/pull/766
|
1031
|
+
[#763]: https://github.com/cucumber/aruba/pull/763
|
1032
|
+
[#751]: https://github.com/cucumber/aruba/pull/751
|
1033
|
+
[#750]: https://github.com/cucumber/aruba/pull/750
|
1034
|
+
[#748]: https://github.com/cucumber/aruba/pull/748
|
1035
|
+
[#738]: https://github.com/cucumber/aruba/pull/738
|
1036
|
+
[#737]: https://github.com/cucumber/aruba/pull/737
|
982
1037
|
[#727]: https://github.com/cucumber/aruba/pull/727
|
983
1038
|
[#725]: https://github.com/cucumber/aruba/pull/725
|
984
1039
|
[#724]: https://github.com/cucumber/aruba/pull/724
|
@@ -1257,7 +1312,10 @@ Note: These are changes w.r.t. Aruba version 0.14.1.
|
|
1257
1312
|
|
1258
1313
|
<!-- Releases -->
|
1259
1314
|
|
1260
|
-
[Unreleased]: https://github.com/cucumber/aruba/compare/
|
1315
|
+
[Unreleased]: https://github.com/cucumber/aruba/compare/v2.0.1...main
|
1316
|
+
[2.0.1]: https://github.com/cucumber/aruba/compare/v2.0.0...v2.0.1
|
1317
|
+
[2.0.0]: https://github.com/cucumber/aruba/compare/v1.1.2...v2.0.0
|
1318
|
+
[1.1.2]: https://github.com/cucumber/aruba/compare/v1.1.1...v1.1.2
|
1261
1319
|
[1.1.1]: https://github.com/cucumber/aruba/compare/v1.1.0...v1.1.1
|
1262
1320
|
[1.1.0]: https://github.com/cucumber/aruba/compare/v1.0.4...v1.1.0
|
1263
1321
|
[1.0.4]: https://github.com/cucumber/aruba/compare/v1.0.3...v1.0.4
|
@@ -1364,4 +1422,4 @@ Note: These are changes w.r.t. Aruba version 0.14.1.
|
|
1364
1422
|
|
1365
1423
|
[1]: http://semver.org
|
1366
1424
|
[2]: http://keepachangelog.com
|
1367
|
-
[3]: https://github.com/cucumber/aruba/blob/
|
1425
|
+
[3]: https://github.com/cucumber/aruba/blob/main/CONTRIBUTING.md
|
data/CONTRIBUTING.md
CHANGED
@@ -73,7 +73,7 @@ Please...
|
|
73
73
|
|
74
74
|
* Use pull requests for larger or controversial changes made by yourself or
|
75
75
|
changes you might expected to break the build.
|
76
|
-
* Commit smaller changes directly to
|
76
|
+
* Commit smaller changes directly to `main`, e.g. fixing typos, adding tests or
|
77
77
|
adding documentation.
|
78
78
|
* Update [`CHANGELOG.md`][] when a pull request is merged.
|
79
79
|
* Make sure all tests are green before merging a pull request.
|
@@ -145,6 +145,14 @@ docker run -v $PWD:/aruba --rm -it test-aruba:latest bash
|
|
145
145
|
bundle exec rake
|
146
146
|
```
|
147
147
|
|
148
|
+
If you want to run the test suite against specific versions of Aruba's
|
149
|
+
dependencies, you can use [appraisal](https://github.com/thoughtbot/appraisal):
|
150
|
+
|
151
|
+
```bash
|
152
|
+
bundle exec appraisal cucumber_6 bundle install
|
153
|
+
bundle exec appraisal cucumber_6 bundle exec rake
|
154
|
+
```
|
155
|
+
|
148
156
|
### Installing your own gems used for development
|
149
157
|
|
150
158
|
A `Gemfile.local` file can be used, to have your own gems installed to support
|
@@ -153,7 +161,6 @@ your normal development workflow.
|
|
153
161
|
Example `Gemfile.local`:
|
154
162
|
|
155
163
|
```ruby
|
156
|
-
gem 'pry'
|
157
164
|
gem 'pry-byebug'
|
158
165
|
gem 'byebug'
|
159
166
|
```
|
data/README.md
CHANGED
@@ -1,11 +1,7 @@
|
|
1
|
-
[](https://raw.githubusercontent.com/cucumber/aruba/
|
2
|
-
[](https://app.cucumber.pro/projects/aruba)
|
1
|
+
[](https://raw.githubusercontent.com/cucumber/aruba/main/LICENSE)
|
3
2
|
[](http://badge.fury.io/rb/aruba)
|
4
|
-
[](https://codeclimate.com/github/cucumber/aruba)
|
5
3
|
[](https://cucumber.io/support)
|
6
|
-
|
7
|
-
[](https://travis-ci.org/cucumber/aruba)
|
8
|
-
[](https://ci.appveyor.com/project/cucumberbdd/aruba)
|
4
|
+
[](https://github.com/cucumber/aruba/actions/workflows/ruby.yml)
|
9
5
|
|
10
6
|
## Install
|
11
7
|
|
@@ -32,7 +28,7 @@ gem install aruba
|
|
32
28
|
### As a user getting started with Aruba
|
33
29
|
|
34
30
|
Our most current documentation to get started with Aruba as a user can be
|
35
|
-
found in [./features/](https://github.com/cucumber/aruba/tree/
|
31
|
+
found in [./features/](https://github.com/cucumber/aruba/tree/main/features/).
|
36
32
|
|
37
33
|
### As a user getting started with a ruby testing framework
|
38
34
|
|
@@ -57,15 +53,15 @@ A full documentation of the API for developers can be found on
|
|
57
53
|
|
58
54
|
## Support
|
59
55
|
|
60
|
-
### Channels
|
61
|
-
|
62
56
|
For support, please have a look at the [support website](https://cucumber.io/support)
|
63
57
|
of Cucumber. You have different options to reach out for help: Recommended for
|
64
58
|
Aruba are using the Slack channels — e.g. `committers-aruba` or `help-cucumber-ruby`
|
65
|
-
— ([register account](https://cucumberbdd-slack-invite.herokuapp.com/))
|
59
|
+
— ([register account](https://cucumberbdd-slack-invite.herokuapp.com/))
|
60
|
+
|
61
|
+
Concrete issues can be reported via the
|
66
62
|
[Issues page on GitHub](https://github.com/cucumber/aruba/issues).
|
67
63
|
|
68
|
-
|
64
|
+
## Maintainers
|
69
65
|
|
70
66
|
Currently, this gem is mainly maintained by this group of people:
|
71
67
|
|
@@ -73,12 +69,19 @@ Currently, this gem is mainly maintained by this group of people:
|
|
73
69
|
|
74
70
|
## Release Policy
|
75
71
|
|
76
|
-
We
|
72
|
+
We use [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html). We
|
73
|
+
depend on rubygems to ensure correct dependency versions, so dropping support
|
74
|
+
for older dependencies and Ruby versions will not result in a major version
|
75
|
+
bump.
|
77
76
|
|
78
77
|
## Supported Ruby versions
|
79
78
|
|
80
|
-
Aruba is supported on Ruby 2.
|
81
|
-
|
79
|
+
Aruba is supported on Ruby 2.5 and up, and tested against CRuby 2.5, 2.6, 2.7, 3.0 and
|
80
|
+
3.1, and JRuby 9.2 and 9.2.
|
81
|
+
|
82
|
+
## Supported Cucumber versions
|
83
|
+
|
84
|
+
Aruba is supported on and tested with Cucumber versions 4 through 7.
|
82
85
|
|
83
86
|
## Supported operating systems
|
84
87
|
|
@@ -91,10 +94,10 @@ Please see the [CONTRIBUTING](CONTRIBUTING.md) file.
|
|
91
94
|
|
92
95
|
## Code branches
|
93
96
|
|
94
|
-
Development takes place in the `
|
95
|
-
releases. If necessary, maintenance of the old
|
96
|
-
|
97
|
-
necessary.
|
97
|
+
Development takes place in the `main` branch and currently targets the 2.x
|
98
|
+
releases. If necessary, maintenance of the old 1.1.x releases will take place
|
99
|
+
in a `1-1-stable` branch, and of 0.14.x releases in the `0-14-stable` branch.
|
100
|
+
Stable branches will not be created until absolutely necessary.
|
98
101
|
|
99
102
|
## License
|
100
103
|
|
data/lib/aruba/api/bundler.rb
CHANGED
data/lib/aruba/api/commands.rb
CHANGED
data/lib/aruba/api/core.rb
CHANGED
@@ -117,34 +117,36 @@ module Aruba
|
|
117
117
|
#
|
118
118
|
# @example Single file name
|
119
119
|
#
|
120
|
-
# # => <path>/tmp/aruba/file
|
121
120
|
# expand_path('file')
|
121
|
+
# # => <path>/tmp/aruba/file
|
122
122
|
#
|
123
123
|
# @example Single Dot
|
124
124
|
#
|
125
|
-
# # => <path>/tmp/aruba
|
126
125
|
# expand_path('.')
|
126
|
+
# # => <path>/tmp/aruba
|
127
127
|
#
|
128
128
|
# @example using home directory
|
129
129
|
#
|
130
|
-
# # => <path>/home/<name>/file
|
131
130
|
# expand_path('~/file')
|
131
|
+
# # => <path>/home/<name>/file
|
132
132
|
#
|
133
133
|
# @example using fixtures directory
|
134
134
|
#
|
135
|
-
# # => <path>/test/fixtures/file
|
136
135
|
# expand_path('%/file')
|
136
|
+
# # => <path>/test/fixtures/file
|
137
137
|
#
|
138
|
-
# @example Absolute directory
|
138
|
+
# @example Absolute directory (requires aruba.config.allow_absolute_paths
|
139
|
+
# to be set)
|
139
140
|
#
|
140
|
-
# # => /foo/bar
|
141
141
|
# expand_path('/foo/bar')
|
142
|
+
# # => /foo/bar
|
142
143
|
#
|
143
144
|
def expand_path(file_name, dir_string = nil)
|
144
145
|
unless file_name.is_a?(String) && !file_name.empty?
|
145
146
|
message = "Filename #{file_name} needs to be a string." \
|
146
|
-
|
147
|
-
|
147
|
+
" It cannot be nil or empty either."\
|
148
|
+
" Please use `expand_path('.')` if you want" \
|
149
|
+
" the current directory to be expanded."
|
148
150
|
|
149
151
|
raise ArgumentError, message
|
150
152
|
end
|
@@ -152,12 +154,12 @@ module Aruba
|
|
152
154
|
unless Aruba.platform.directory? File.join(aruba.config.root_directory,
|
153
155
|
aruba.config.working_directory)
|
154
156
|
raise "Aruba's working directory does not exist." \
|
155
|
-
|
157
|
+
" Maybe you forgot to run `setup_aruba` before using its API."
|
156
158
|
end
|
157
159
|
|
158
160
|
prefix = file_name[0]
|
159
161
|
|
160
|
-
if aruba.config.fixtures_path_prefix
|
162
|
+
if prefix == aruba.config.fixtures_path_prefix
|
161
163
|
rest = file_name[2..-1]
|
162
164
|
path = File.join(*[aruba.fixtures_directory, rest].compact)
|
163
165
|
unless Aruba.platform.exist? path
|
@@ -189,11 +191,13 @@ module Aruba
|
|
189
191
|
unless aruba.config.allow_absolute_paths
|
190
192
|
caller_location = caller_locations(1, 1).first
|
191
193
|
caller_file_line = "#{caller_location.path}:#{caller_location.lineno}"
|
192
|
-
|
194
|
+
message =
|
193
195
|
"Aruba's `expand_path` method was called with an absolute path" \
|
194
196
|
" at #{caller_file_line}, which is not recommended." \
|
197
|
+
" The path passed was '#{file_name}'." \
|
195
198
|
" Change the call to pass a relative path or set "\
|
196
199
|
"`config.allow_absolute_paths = true` to silence this warning"
|
200
|
+
raise UserError, message
|
197
201
|
end
|
198
202
|
file_name
|
199
203
|
else
|
data/lib/aruba/api/filesystem.rb
CHANGED
@@ -326,12 +326,6 @@ module Aruba
|
|
326
326
|
def append_to_file(file_name, file_content)
|
327
327
|
file_name = expand_path(file_name)
|
328
328
|
|
329
|
-
unless File.exist? file_name
|
330
|
-
Aruba.platform.deprecated("The ability to call #append_to_file with a file that" \
|
331
|
-
" does not exist is deprecated and will be removed in" \
|
332
|
-
" Aruba 2.0.")
|
333
|
-
Aruba.platform.mkdir(File.dirname(file_name))
|
334
|
-
end
|
335
329
|
File.open(file_name, "a") { |f| f << file_content }
|
336
330
|
end
|
337
331
|
|
@@ -412,7 +406,7 @@ module Aruba
|
|
412
406
|
# Bytes on disk
|
413
407
|
def disk_usage(*paths)
|
414
408
|
paths = paths.flatten
|
415
|
-
expect(paths).to
|
409
|
+
expect(paths).to all be_an_existing_path
|
416
410
|
expanded = paths.map { |path| expand_path(path) }
|
417
411
|
|
418
412
|
Aruba.platform.determine_disk_usage(expanded)
|
data/lib/aruba/api/text.rb
CHANGED
@@ -45,18 +45,6 @@ module Aruba
|
|
45
45
|
|
46
46
|
text.chomp
|
47
47
|
end
|
48
|
-
|
49
|
-
# Replace variables in command string (experimental)
|
50
|
-
#
|
51
|
-
# @param [#to_s] text
|
52
|
-
# The text to parse
|
53
|
-
def replace_variables(text)
|
54
|
-
if text.include? "<pid-last-command-started>"
|
55
|
-
text = text.gsub(/<pid-last-command-started>/, last_command_started.pid.to_s)
|
56
|
-
end
|
57
|
-
|
58
|
-
text
|
59
|
-
end
|
60
48
|
end
|
61
49
|
end
|
62
50
|
end
|
data/lib/aruba/console.rb
CHANGED