aruba 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -1
  3. data/lib/aruba/console/help.rb +3 -3
  4. data/lib/aruba/cucumber/command.rb +10 -18
  5. data/lib/aruba/matchers/base/message_indenter.rb +1 -1
  6. data/lib/aruba/matchers/path/have_permissions.rb +3 -2
  7. data/lib/aruba/platforms/announcer.rb +1 -1
  8. data/lib/aruba/platforms/command_monitor.rb +1 -3
  9. data/lib/aruba/processes/basic_process.rb +1 -1
  10. data/lib/aruba/version.rb +1 -1
  11. metadata +47 -62
  12. data/.cucumberproignore +0 -3
  13. data/.document +0 -5
  14. data/.github/ISSUE_TEMPLATE.md +0 -48
  15. data/.github/PULL_REQUEST_TEMPLATE.md +0 -41
  16. data/.gitignore +0 -38
  17. data/.rspec +0 -3
  18. data/.rubocop.yml +0 -52
  19. data/.rubocop_todo.yml +0 -216
  20. data/.simplecov +0 -36
  21. data/.travis.yml +0 -62
  22. data/.yardopts +0 -11
  23. data/Dockerfile +0 -67
  24. data/Gemfile +0 -14
  25. data/Rakefile +0 -82
  26. data/TODO.md +0 -13
  27. data/appveyor.yml +0 -28
  28. data/aruba.gemspec +0 -57
  29. data/bin/console +0 -7
  30. data/bin/test +0 -9
  31. data/config/.gitignore +0 -1
  32. data/cucumber.yml +0 -6
  33. data/docker-compose.yml +0 -26
  34. data/fixtures/cli-app/.gitignore +0 -9
  35. data/fixtures/cli-app/.rspec +0 -2
  36. data/fixtures/cli-app/README.md +0 -39
  37. data/fixtures/cli-app/Rakefile +0 -1
  38. data/fixtures/cli-app/bin/aruba-test-cli +0 -6
  39. data/fixtures/cli-app/cli-app.gemspec +0 -26
  40. data/fixtures/cli-app/features/support/aruba.rb +0 -1
  41. data/fixtures/cli-app/features/support/env.rb +0 -1
  42. data/fixtures/cli-app/lib/cli/app.rb +0 -9
  43. data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +0 -15
  44. data/fixtures/cli-app/lib/cli/app/version.rb +0 -5
  45. data/fixtures/cli-app/script/console +0 -14
  46. data/fixtures/cli-app/spec/spec_helper.rb +0 -8
  47. data/fixtures/cli-app/spec/support/aruba.rb +0 -1
  48. data/fixtures/copy/file.txt +0 -1
  49. data/fixtures/empty-app/.gitignore +0 -9
  50. data/fixtures/empty-app/.rspec +0 -2
  51. data/fixtures/empty-app/README.md +0 -24
  52. data/fixtures/empty-app/Rakefile +0 -1
  53. data/fixtures/empty-app/cli-app.gemspec +0 -26
  54. data/fixtures/empty-app/lib/cli/app.rb +0 -7
  55. data/fixtures/empty-app/lib/cli/app/version.rb +0 -5
  56. data/fixtures/getting-started-app/.gitignore +0 -4
  57. data/fixtures/getting-started-app/Gemfile +0 -4
  58. data/fixtures/getting-started-app/README.md +0 -3
  59. data/fixtures/getting-started-app/features/support/env.rb +0 -1
data/.yardopts DELETED
@@ -1,11 +0,0 @@
1
- --output doc/yard
2
- --exclude features/
3
- --exclude bin/bootstrap
4
- --exclude bin/test
5
- --exclude license
6
- --verbose
7
- --markup-provider kramdown
8
- --markup markdown
9
- -
10
- LICENSE
11
- README.md
data/Dockerfile DELETED
@@ -1,67 +0,0 @@
1
- FROM ubuntu:14.04
2
- MAINTAINER Aruba Maintainers <cukes-devs@googlegroups.com>
3
-
4
- # Packages needed to install RVM and run Bundler gem commands
5
- RUN apt-get update -qq \
6
- && apt-get -y install ca-certificates curl git-core --no-install-recommends \
7
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin
8
-
9
- # Create guest user early (before rvm) so uid:gid are 1000:000
10
- RUN useradd -m -s /bin/bash guest
11
-
12
- # Temporarily install RVM as root - just for requirements
13
- RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
14
- && curl -L get.rvm.io | bash -s stable \
15
- && bash -l -c 'rvm requirements 2.2.1' \
16
- && bash -l -c 'echo yes | rvm implode' \
17
-
18
- # Fix locale
19
- ENV DEBIAN_FRONTEND noninteractive
20
- RUN dpkg-reconfigure locales && locale-gen en_US.UTF-8 && /usr/sbin/update-locale LANG=en_US.UTF-8 \
21
- && echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
22
- ENV LC_ALL C.UTF-8
23
- ENV LANG C.UTF-8
24
- ENV LANGUAGE C.UTF-8
25
-
26
- # Zsh (just for the sake of a handful of Cucumber scenarios)
27
- RUN apt-get update -qq \
28
- && apt-get -y install zsh --no-install-recommends \
29
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin
30
-
31
- # Python (just for the sake of a handful of Cucumber scenarios)
32
- RUN apt-get update -qq \
33
- && apt-get -y install python --no-install-recommends \
34
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin
35
-
36
- # Java (for javac - also for just a few Cucumber scenarios)
37
- RUN apt-get update -qq \
38
- && apt-get -y install openjdk-7-jdk --no-install-recommends \
39
- && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin
40
-
41
- # Cache needed gems - for faster test reruns
42
- ADD Gemfile Gemfile.lock aruba.gemspec /home/guest/cache/aruba/
43
- ADD lib/aruba/version.rb /home/guest/cache/aruba/lib/aruba/version.rb
44
- RUN chown -R guest:guest /home/guest/cache
45
-
46
- USER guest
47
- ENV HOME /home/guest
48
- WORKDIR /home/guest
49
-
50
- # Install RVM as guest
51
- RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
52
- && /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" \
53
- && curl -L get.rvm.io | bash -s stable \
54
- && /bin/bash -l -c "rvm install 2.3.0 && rvm cleanup all" \
55
- && /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" \
56
- && echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc \
57
- && echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.zshrc
58
-
59
- # Download and install aruba + dependencies
60
- WORKDIR /home/guest/cache/aruba
61
- RUN bash -l -c "bundle install"
62
-
63
- # Default working directory
64
- RUN mkdir -p /home/guest/aruba
65
- WORKDIR /home/guest/aruba
66
-
67
- CMD ["bundle exec rake test"]
data/Gemfile DELETED
@@ -1,14 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Use dependencies from gemspec
4
- gemspec
5
-
6
- # Load local Gemfile
7
- if File.file? File.expand_path('Gemfile.local', __dir__)
8
- load File.expand_path('Gemfile.local', __dir__)
9
- end
10
-
11
- unless RUBY_PLATFORM.include?('java')
12
- gem 'byebug', '~> 11.0'
13
- gem 'pry-byebug', '~> 3.4'
14
- end
data/Rakefile DELETED
@@ -1,82 +0,0 @@
1
- $LOAD_PATH << File.expand_path(__dir__)
2
-
3
- require 'aruba/tasks/docker_helpers'
4
- require 'aruba/platform'
5
-
6
- require 'bundler'
7
- Bundler.setup
8
-
9
- task default: %w(spec cucumber cucumber:wip lint)
10
-
11
- desc 'Run all linters.'
12
- task lint: %w(lint:coding_guidelines lint:licenses)
13
-
14
- desc 'Run the whole test suite.'
15
- task test: %w(spec cucumber cucumber:wip)
16
-
17
- require 'cucumber/rake/task'
18
- require 'rspec/core/rake_task'
19
-
20
- Cucumber::Rake::Task.new do |t|
21
- t.cucumber_opts = %w(--format progress)
22
- end
23
-
24
- Cucumber::Rake::Task.new('cucumber:wip', 'Run Cucumber features '\
25
- 'which are "WORK IN PROGRESS" and '\
26
- 'are allowed to fail') do |t|
27
- t.cucumber_opts = %w(--format progress)
28
- t.profile = 'wip'
29
- end
30
-
31
- RSpec::Core::RakeTask.new
32
-
33
- namespace :lint do
34
- desc 'Lint our code with "rubocop"'
35
- task :coding_guidelines do
36
- sh 'bundle exec rubocop'
37
- end
38
-
39
- desc 'Check for relevant licenses in project'
40
- task :licenses do
41
- sh 'bundle exec license_finder'
42
- end
43
-
44
- require 'yard-junk/rake'
45
- YardJunk::Rake.define_task
46
- end
47
-
48
- Bundler::GemHelper.install_tasks
49
-
50
- namespace :docker do
51
- desc 'Build docker image'
52
- task :build, :cache, :version do |_, args|
53
- args.with_defaults(version: 'latest')
54
- args.with_defaults(cache: true)
55
-
56
- docker_compose_file =
57
- Aruba::DockerComposeFile.new(File.expand_path('docker-compose.yml', __dir__))
58
- docker_run_instance = Aruba::DockerRunInstance.new(docker_compose_file, :base)
59
-
60
- builder = Aruba::DockerBuildCommandLineBuilder.new(
61
- docker_run_instance,
62
- cache: args[:cache],
63
- version: args[:version]
64
- )
65
-
66
- sh builder.to_cli
67
- end
68
-
69
- desc 'Run docker container'
70
- task :run, :command do |_, args|
71
- docker_compose_file =
72
- Aruba::DockerComposeFile.new(File.expand_path('docker-compose.yml', __dir__))
73
- docker_run_instance = Aruba::DockerRunInstance.new(docker_compose_file, :base)
74
-
75
- builder = Aruba::DockerRunCommandLineBuilder.new(
76
- docker_run_instance,
77
- command: args[:command] || docker_run_instance.command
78
- )
79
-
80
- sh builder.to_cli
81
- end
82
- end
data/TODO.md DELETED
@@ -1,13 +0,0 @@
1
- * Replace check filesystem permissons through a better rspec matcher
2
- * Improve documentation for matchers in file
3
- * Cleanup stdout/stderr in spawn process:
4
- It should be enough to use 'open(@process.io.stdout).read' and 'open(@process.io.stderr).read'. There's no need to rewind them.
5
- * Ensure that all processes are kill after cucumber is finished
6
- * Add variation of check and stop of command if output contains
7
- Add something like `(?: of last command)?`. If this is true, just check the last command.
8
- * Use aruba.config.exit_timeout everywhere
9
- * Fix problem with long running commands in background:
10
-
11
- Since we need to stop all commands to access the status of the last command
12
- stopped, we have problems with long running commands
13
-
@@ -1,28 +0,0 @@
1
- version: "{build}"
2
-
3
- # This will build all PRs targeting matching branches.
4
- # Without this, each PR builds twice -- once for the PR branch HEAD,
5
- # and once for the merge commit that github creates for each mergeable PR.
6
- branches:
7
- only:
8
- - master
9
-
10
- # Disable normal Windows builds in favor of our test script.
11
- build: off
12
-
13
- install:
14
- - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
15
- - ruby --version
16
- - gem --version
17
- - bundler --version
18
- - bundle install
19
-
20
- test_script:
21
- - bundle exec rake spec --trace
22
-
23
- environment:
24
- matrix:
25
- - ruby_version: '24'
26
- - ruby_version: '25'
27
- - ruby_version: '26'
28
- # Note: ruby version 2.7 is not available as of 2019-12-31
@@ -1,57 +0,0 @@
1
- lib = ::File.expand_path('../lib', __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'aruba/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'aruba'
7
- spec.version = Aruba::VERSION
8
- spec.author = 'Aslak Hellesøy, Matt Wynne and other Aruba Contributors'
9
- spec.description = <<~TEXT
10
- Extension for popular TDD and BDD frameworks like "Cucumber", "RSpec" and "Minitest",
11
- to make testing commandline applications meaningful, easy and fun.
12
- TEXT
13
- spec.summary = "aruba-#{spec.version}"
14
- spec.license = 'MIT'
15
- spec.email = 'cukes@googlegroups.com'
16
- spec.homepage = 'https://github.com/cucumber/aruba'
17
-
18
- spec.metadata = {
19
- 'bug_tracker_uri' => 'https://github.com/cucumber/aruba/issues',
20
- 'changelog_uri' => 'https://www.rubydoc.info/gems/aruba/file/CHANGELOG.md',
21
- 'documentation_uri' => 'https://www.rubydoc.info/gems/aruba',
22
- 'homepage_uri' => spec.homepage,
23
- 'source_code_uri' => 'https://github.com/cucumber/aruba'
24
- }
25
-
26
- spec.add_runtime_dependency 'childprocess', ['>= 2.0', '< 5.0']
27
- spec.add_runtime_dependency 'contracts', '~> 0.16.0'
28
- spec.add_runtime_dependency 'cucumber', ['>= 2.4', '< 5.0']
29
- spec.add_runtime_dependency 'ffi', '~> 1.9'
30
- spec.add_runtime_dependency 'rspec-expectations', '~> 3.4'
31
- spec.add_runtime_dependency 'thor', '~> 1.0'
32
-
33
- spec.add_development_dependency 'json', '~> 2.1'
34
- spec.add_development_dependency 'license_finder', '~> 6.0'
35
- spec.add_development_dependency 'minitest', '~> 5.10'
36
- spec.add_development_dependency 'pry-doc', '~> 1.0'
37
- spec.add_development_dependency 'rake', '~> 13.0'
38
- spec.add_development_dependency 'rspec', '~> 3.6'
39
- spec.add_development_dependency 'rubocop', '~> 0.85'
40
- spec.add_development_dependency 'rubocop-performance', '~> 1.5'
41
- spec.add_development_dependency 'rubocop-rspec', '~> 1.39'
42
- spec.add_development_dependency 'simplecov', '~> 0.18.0'
43
- spec.add_development_dependency 'yard-junk', '~> 0.0.7'
44
-
45
- spec.rubygems_version = '>= 1.6.1'
46
- spec.required_ruby_version = '>= 2.4'
47
-
48
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
49
- f.match(%r{^(test|spec|features)/})
50
- end
51
-
52
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
53
- spec.rdoc_options = ['--charset', 'UTF-8', '--main', 'README.md']
54
- spec.extra_rdoc_files = ['CHANGELOG.md', 'CONTRIBUTING.md', 'README.md', 'LICENSE']
55
- spec.bindir = 'exe'
56
- spec.require_paths = ['lib']
57
- end
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
4
-
5
- require 'aruba/console'
6
-
7
- Aruba::Console.new.start
data/bin/test DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- : ${RUN_IN_DOCKER:='0'}
4
-
5
- if [ "$RUN_IN_DOCKER" == '1' ]; then
6
- bundle exec rake "docker:run[$*]"
7
- else
8
- bundle exec rake test $*
9
- fi
@@ -1 +0,0 @@
1
- aruba-rvm.yml
@@ -1,6 +0,0 @@
1
- <%
2
- std_opts = "--format pretty --color --exclude features/fixtures --require features --tags 'not @unsupported-on'"
3
- ignore_opts = "--tags 'not @ignore'"
4
- %>
5
- default: <%= std_opts %> --tags 'not @wip' <%= ignore_opts %>
6
- wip: <%= std_opts %> --wip --tags @wip:3 <%= ignore_opts %>
@@ -1,26 +0,0 @@
1
- # To build the base image (official Aruba base for this), run:
2
- #
3
- # $ docker-compose build base
4
- #
5
- # To run the tests, run:
6
- #
7
- # $ docker-compose run tests
8
- #
9
-
10
- version: '2'
11
- services:
12
- base:
13
- image: 'cucumber/aruba'
14
- container_name: 'cucumber-aruba-1'
15
- build:
16
- context: .
17
- dockerfile: Dockerfile
18
- args:
19
- http_proxy: "${http_proxy}"
20
- https_proxy: "${https_proxy}"
21
- HTTP_PROXY: "${HTTP_PROXY}"
22
- HTTPS_PROXY: "${HTTPS_PROXY}"
23
- working_dir: /home/guest/aruba
24
- command: /bin/bash -l -c "bundle exec rake test"
25
- volumes:
26
- - .:/home/guest/aruba
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
@@ -1,39 +0,0 @@
1
- # Simple Cli App
2
-
3
- This is a simple test cli app
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'cli-app'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install cli-app
20
-
21
- ## Usage
22
-
23
- Place files in `lib/cli/app/`. They are loaded automatically. If you need a
24
- specific load order, use `require` in your files.
25
-
26
- ### CLI
27
-
28
- ```
29
- cli
30
- ```
31
-
32
- ### Library
33
-
34
- You can use `script/console` to load your library.
35
-
36
- ### Fixture
37
-
38
- This fixture includes files for `cucumber`- and `rspec`-integration.
39
-
@@ -1 +0,0 @@
1
- require 'bundler/gem_tasks'
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH << File.expand_path('../lib', __dir__)
4
- require 'cli/app'
5
-
6
- exit 0
@@ -1,26 +0,0 @@
1
- lib = File.expand_path('lib', __dir__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'cli/app/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'cli-app'
7
- spec.version = Cli::App::VERSION
8
- spec.authors = ['Aruba Developers']
9
- spec.email = 'cukes@googlegroups.com'
10
-
11
- spec.summary = 'Summary'
12
- spec.description = 'Description'
13
- spec.homepage = 'http://example.com'
14
-
15
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
16
- # delete this section to allow pushing this gem to any host.
17
-
18
- spec.files = `git ls-files -z`.split("\x0")
19
- .reject { |f| f.match(%r{^(test|spec|features)/}) }
20
- spec.bindir = 'exe'
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ['lib']
23
-
24
- spec.add_development_dependency 'bundler', '~> 1.9'
25
- spec.add_development_dependency 'rake', '~> 13.0'
26
- end
@@ -1 +0,0 @@
1
- require 'aruba/cucumber'
@@ -1 +0,0 @@
1
- require_relative 'aruba'
@@ -1,9 +0,0 @@
1
- require 'cli/app/version'
2
-
3
- ::Dir.glob(File.expand_path('**/*.rb', __dir__)).each { |f| require_relative f }
4
-
5
- module Cli
6
- module App
7
- # Your code goes here...
8
- end
9
- end