aruba 1.0.0.pre.alpha.1 → 1.0.0.pre.alpha.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
  SHA1:
3
- metadata.gz: 8c62f9928322c0f6bf4fd32fd910f094462cff44
4
- data.tar.gz: 133388c045d615d2487e6b6fb242ca24484c67a4
3
+ metadata.gz: dec3a8796a3872177a32dbe51a56a7a01f0e3bcf
4
+ data.tar.gz: ff77b1f73face0704272353c2dd8e42a27ab9c3b
5
5
  SHA512:
6
- metadata.gz: 558945a1186295b2e4c5a1f4f7ff07d34fb0f8aa90bef9ffb4cd7cfc2c5e0591ca2b2cb1c95c83f0e1b3322a212e90a8f1256d8db9077ab62b9d7d23330135e6
7
- data.tar.gz: 55bcf35d60c156b3ecfba2a5ee6dec2fad9d5215789468eed2a798ee574fb3ab5ddcd93588f6bc7ee5079acfefd27b89d74cc9251c798d326e9b6000af1c3099
6
+ metadata.gz: 03a6bc22996a8e67e71ac9a2e23b0b365ec0afb2bb4194bcbeb16341515b24a9ffda9008ea3e31ac9e51bf4177edc38d8fbe1168352fdee300b1ffe9bd25c524
7
+ data.tar.gz: 0efce8bcec7f4c934870983171212023098b213d0cbec047ee0d80edf08e454cb542bc76f5b3930ec86c3528f62a718bab8fb92ea855381c2d18c77037dca563
@@ -29,6 +29,7 @@
29
29
  - [ ] Bug fix (non-breaking change which fixes an issue)
30
30
  - [ ] New feature (non-breaking change which adds functionality)
31
31
  - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
32
+ - [ ] Refactoring (cleanup of codebase withouth changing any existing functionality)
32
33
 
33
34
  ## Checklist:
34
35
 
@@ -5,29 +5,30 @@ install: bin/bootstrap --without development debug
5
5
  rvm:
6
6
  - 1.9.3
7
7
  - 2.0.0
8
- - 2.1.8
9
- - 2.2.4
10
- - 2.3.0
11
- - 2.4.0
8
+ - 2.1.10
9
+ - 2.2.7
10
+ - 2.3.4
11
+ - 2.4.1
12
12
  - ruby-head
13
13
  - jruby
14
14
  - jruby-20mode
15
15
  - jruby-21mode
16
+ - jruby-9.1.12.0
16
17
  matrix:
17
18
  include:
18
- - rvm: jruby-9.0.1.0
19
+ - rvm: jruby-9.1.12.0
19
20
  env: JRUBY_OPTS='--dev'
20
- - rvm: jruby-9.0.1.0-20mode
21
+ - rvm: jruby-9.1.12.0-20mode
21
22
  env: JRUBY_OPTS='--dev'
22
- - rvm: jruby-9.0.1.0-21mode
23
+ - rvm: jruby-9.1.12.0-21mode
23
24
  env: JRUBY_OPTS='--dev'
24
25
  allow_failures:
25
26
  - rvm: ruby-head
26
- - rvm: jruby-9.0.1.0
27
+ - rvm: jruby-9.1.12.0
27
28
  env: JRUBY_OPTS='--dev'
28
- - rvm: jruby-9.0.1.0-20mode
29
+ - rvm: jruby-9.1.12.0-20mode
29
30
  env: JRUBY_OPTS='--dev'
30
- - rvm: jruby-9.0.1.0-21mode
31
+ - rvm: jruby-9.1.12.0-21mode
31
32
  env: JRUBY_OPTS='--dev'
32
33
  fast_finish: true
33
34
  notifications:
data/Gemfile CHANGED
@@ -9,8 +9,8 @@ load File.expand_path('../Gemfile.local', __FILE__) if File.file? File.expand_pa
9
9
  # Debug aruba
10
10
  group :debug do
11
11
  if RUBY_VERSION >= '2' && !RUBY_PLATFORM.include?('java')
12
- gem 'byebug', '~> 4.0.5'
13
- gem 'pry-byebug', '~> 3.1.0'
12
+ gem 'byebug', '~> 9.0'
13
+ gem 'pry-byebug', '~> 3.4'
14
14
  end
15
15
 
16
16
  if RUBY_VERSION < '2' && !RUBY_PLATFORM.include?('java')
@@ -38,7 +38,7 @@ group :development, :test do
38
38
 
39
39
  # Reporting
40
40
  gem 'bcat', '~> 0.6.2'
41
- gem 'kramdown', '~> 1.7.0'
41
+ gem 'kramdown', '~> 1.14'
42
42
  end
43
43
 
44
44
  # Code Coverage
@@ -46,7 +46,7 @@ group :development, :test do
46
46
 
47
47
  # Test api
48
48
  gem 'rspec', '~> 3.4'
49
- gem 'fuubar', '~> 2.0.0'
49
+ gem 'fuubar', '~> 2.2.0'
50
50
 
51
51
  # using platform for this makes bundler complain about the same gem given
52
52
  # twice
@@ -58,14 +58,18 @@ group :development, :test do
58
58
  # gem 'cucumber-pro', '~> 0.0'
59
59
 
60
60
  # License compliance
61
- gem 'license_finder', '~> 2.0.4'
61
+ if RUBY_VERSION < '2.3'
62
+ gem 'license_finder', '~> 2.0'
63
+ else
64
+ gem 'license_finder', '~> 3.0'
65
+ end
62
66
 
63
67
  # Upload documentation
64
68
  # gem 'relish', '~> 0.7.1'
65
69
 
66
70
  gem 'minitest', '~> 5.8.0'
67
71
 
68
- gem 'json', '~>1.8'
72
+ gem 'json', '~>2.1'
69
73
  end
70
74
 
71
75
  platforms :rbx do
data/History.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [v1.0.0-alpha.2](https://github.com/cucumber/aruba/compare/v0.14.1...v1.0.0.alpha)
2
+
3
+ * Update examples for usage in README
4
+ * Fix environment manipulation (#442)
5
+ * Update supported ruby versions in .travis.yml (#449)
6
+ * Use license_finder version which is usable for rubies `< 2.3` (#451)
7
+ * Wrap test runners in `bundle exec` (#447)
8
+ * Fix wording in README (#445)
9
+ * Restructure README and upload feature files to cucumber.pro (#444)
10
+
1
11
  ## [v1.0.0-alpha.1](https://github.com/cucumber/aruba/compare/v0.14.1...v1.0.0.alpha)
2
12
 
3
13
  * Use new proposed structure for gems by bundler (#439)
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/cucumber/aruba/master/LICENSE)
2
- [![Docs](https://img.shields.io/badge/docs-build-blue.svg)](https://app.cucumber.pro/projects/aruba)
2
+ [![Docs](https://img.shields.io/badge/cucumber.pro-aruba-3d10af.svg)](https://app.cucumber.pro/projects/aruba)
3
3
  [![Gem Version](https://badge.fury.io/rb/aruba.svg)](http://badge.fury.io/rb/aruba)
4
4
  [![Dependency Status](https://gemnasium.com/cucumber/aruba.svg)](https://gemnasium.com/cucumber/aruba)
5
5
  [![Code Climate](https://codeclimate.com/github/cucumber/aruba.svg)](https://codeclimate.com/github/cucumber/aruba)
6
- [![Join the chat at https://gitter.im/cucumber/aruba](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cucumber/aruba?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6
+ [![Support](https://img.shields.io/badge/cucumber-support-orange.svg)](https://cucumber.io/support)
7
7
 
8
- **This is the [latest](https://github.com/cucumber/aruba/blob/master/README.md) version of our README.md. If you want to see the one of the last released version of "aruba", please have a look at this [one](https://github.com/cucumber/aruba/blob/still/README.md).**
8
+ **This is the [latest](https://github.com/cucumber/aruba/blob/master/README.md) version of our README.md. There is also [the README of the latest released version of "aruba"](https://github.com/cucumber/aruba/blob/still/README.md).**
9
9
 
10
10
  ## Install
11
11
 
@@ -31,15 +31,27 @@ $ gem install aruba
31
31
 
32
32
  ### As a user getting started with "aruba"
33
33
 
34
- Our most current documentation to get started with `aruba`, can be found on [![See our documentation on Cucumber Pro](https://github.com/cucumber-ltd/brand/raw/master/images/png/notm/cucumber-pro-black/cucumber-pro-black-32.png)](https://app.cucumber.pro/projects/aruba). It's based on our feature files describing the use of `aruba`.
34
+ Our most current documentation to get started with `aruba` can be found on [![See our documentation on Cucumber Pro](https://github.com/cucumber-ltd/brand/raw/master/images/png/notm/cucumber-pro-black/cucumber-pro-black-32.png)](https://app.cucumber.pro/projects/aruba). It is generated from our feature files describing the use of `aruba`.
35
35
 
36
- ### Release Policy
36
+ ## Support
37
37
 
38
- We try to be compliant to [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html).
38
+ ### Channels
39
39
 
40
- ### Supported ruby versions
40
+ For support, please have a look at the ["support website"](https://cucumber.io/support) of "Cucumber". You have different options to reach out for help: Recommended for `aruba` are using the "Slack" channels - e.g. "aruba-devs" or "general" ([Register account](https://cucumberbdd-slack-invite.herokuapp.com/)) and the "Issues" page on [GitHub](https://github.com/cucumber/aruba/issues). Addressing one of the maintainers directly would be helpful.
41
41
 
42
- For an up to date list of all supported ruby versions, please see our [`.travis.yml`](https://github.com/cucumber/aruba/blob/master/.travis.yml). We only test against the latest version of a version branch - most times.
42
+ ### Maintainers
43
+
44
+ Currently, this gem is mainly maintained by this group of people:
45
+
46
+ * [@maxmeyer](https://github.com/maxmeyer)
47
+
48
+ ## Release Policy
49
+
50
+ We try to comply with [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html).
51
+
52
+ ## Supported Ruby versions
53
+
54
+ For an up-to-date list of all supported Ruby versions, please see our [`.travis.yml`](https://github.com/cucumber/aruba/blob/master/.travis.yml). We only test against the latest version of a version branch - most times.
43
55
 
44
56
  ## Contributing
45
57
 
data/Rakefile CHANGED
@@ -34,17 +34,17 @@ end
34
34
  namespace :test do
35
35
  desc 'Run cucumber tests'
36
36
  task :cucumber do
37
- sh 'cucumber'
37
+ sh 'bundle exec cucumber'
38
38
  end
39
39
 
40
40
  desc 'Run cucumber tests which are "WORK IN PROGRESS" and are allowed to fail'
41
41
  task :cucumber_wip do
42
- sh 'cucumber -p wip'
42
+ sh 'bundle exec cucumber -p wip'
43
43
  end
44
44
 
45
45
  desc 'Run rspec tests'
46
46
  task :rspec do
47
- sh 'rspec'
47
+ sh 'bundle exec rspec'
48
48
  end
49
49
  end
50
50
 
@@ -63,12 +63,12 @@ namespace :lint do
63
63
 
64
64
  desc 'Lint our code with "rubocop"'
65
65
  task :coding_guidelines do
66
- sh 'rubocop --fail-level E'
66
+ sh 'bundle exec rubocop --fail-level E'
67
67
  end
68
68
 
69
69
  desc 'Check for relevant licenses in project'
70
70
  task :licenses do
71
- sh 'license_finder'
71
+ sh 'bundle exec license_finder'
72
72
  end
73
73
  end
74
74
 
@@ -101,7 +101,7 @@ namespace :docker do
101
101
 
102
102
  builder = Aruba::DockerRunCommandLineBuilder.new(
103
103
  docker_run_instance,
104
- command: args[:command] || docker_run_instance.command,
104
+ command: args[:command] || docker_run_instance.command
105
105
  )
106
106
 
107
107
  sh builder.to_cli
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'http://github.com/cucumber/aruba'
15
15
 
16
16
  spec.add_runtime_dependency 'cucumber', '~> 2.4', '>= 2.4.0'
17
- spec.add_runtime_dependency 'childprocess', '~> 0.5.6'
17
+ spec.add_runtime_dependency 'childprocess', '~> 0.7.1'
18
18
  spec.add_runtime_dependency 'ffi', '~> 1.9', '>= 1.9.10'
19
19
  spec.add_runtime_dependency 'rspec-expectations', '~> 3.4', '>= 3.4.0'
20
20
  spec.add_runtime_dependency 'contracts', '~> 0.14'
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  # spec.post_install_message = <<-EOS
28
28
  # EOS
29
29
 
30
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
30
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
31
31
  f.match(%r{^(test|spec|features)/})
32
32
  end
33
33
 
File without changes
@@ -2,4 +2,6 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
2
 
3
3
  require 'cli/app'
4
4
 
5
+ require_relative 'support/aruba'
6
+
5
7
  ::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
@@ -8,7 +8,7 @@ require 'aruba/platform'
8
8
  require 'aruba/api/core'
9
9
  require 'aruba/api/command'
10
10
 
11
- if Aruba::VERSION <= '1.0.0'
11
+ if Aruba::VERSION <= '1.1.0'
12
12
  require 'aruba/api/deprecated'
13
13
  end
14
14
 
@@ -28,7 +28,9 @@ module Aruba
28
28
  include Aruba::Api::Environment
29
29
  include Aruba::Api::Filesystem
30
30
  include Aruba::Api::Rvm
31
- include Aruba::Api::Deprecated
31
+ if Aruba::VERSION <= '1.1.0'
32
+ include Aruba::Api::Deprecated
33
+ end
32
34
  include Aruba::Api::Text
33
35
  end
34
36
  end
@@ -150,7 +150,9 @@ module Aruba
150
150
  startup_wait_time = opts[:startup_wait_time].nil? ? aruba.config.startup_wait_time : opts[:startup_wait_time]
151
151
  else
152
152
  if args.size > 1
153
+ # rubocop:disable Metrics/LineLength
153
154
  Aruba.platform.deprecated("Please pass options to `#run` as named parameters/hash and don\'t use the old style, e.g. `#run_command('cmd', :exit_timeout => 5)`.")
155
+ # rubocop:enable Metrics/LineLength
154
156
  end
155
157
 
156
158
  exit_timeout = args[0].nil? ? aruba.config.exit_timeout : args[0]
@@ -61,7 +61,7 @@ module Aruba
61
61
 
62
62
  Aruba.platform.chdir File.join(aruba.root_directory, aruba.current_directory)
63
63
 
64
- result = Aruba.platform.with_environment(
64
+ result = with_environment(
65
65
  'OLDPWD' => old_dir,
66
66
  'PWD' => File.expand_path(File.join(aruba.root_directory, aruba.current_directory)),
67
67
  &block
@@ -523,8 +523,6 @@ module Aruba
523
523
  end
524
524
 
525
525
  # @deprecated
526
- # rubocop:disable Metrics/CyclomaticComplexity
527
- # rubocop:disable Metrics/MethodLength
528
526
  def check_for_deprecated_variables
529
527
  if defined? @aruba_exit_timeout
530
528
  Aruba.platform.deprecated('The use of "@aruba_exit_timeout" is deprecated. Use "#aruba.config.exit_timeout = <numeric>" instead')
@@ -57,7 +57,6 @@ module Aruba
57
57
  # @option [Object] default
58
58
  # The default value
59
59
  #
60
- # rubocop:disable Metrics/CyclomaticComplexity
61
60
  def option_accessor(name, opts = {})
62
61
  contract = opts[:contract]
63
62
  default = opts[:default]
@@ -75,7 +74,6 @@ module Aruba
75
74
  # Add reader
76
75
  option_reader name, :contract => { None => contract.values.first }
77
76
  end
78
- # rubocop:enable Metrics/CyclomaticComplexity
79
77
 
80
78
  private
81
79
 
@@ -40,11 +40,8 @@ module Aruba
40
40
  option_accessor :remove_ansi_escape_sequences, :contract => { Bool => Bool }, :default => true
41
41
  # rubocop:disable Metrics/LineLength
42
42
  option_accessor :command_launcher, :contract => { Aruba::Contracts::Enum[:in_process, :spawn, :debug] => Aruba::Contracts::Enum[:in_process, :spawn, :debug] }, :default => :spawn
43
- # rubocop:enable Metrics/LineLength
44
43
  option_accessor :main_class, :contract => { Class => Maybe[Class] }, :default => nil
45
- # rubocop:disable Metrics/LineLength
46
44
 
47
- # rubocop:disable Metrics/LineLength
48
45
  if Aruba::VERSION >= '1.0.0'
49
46
  option_accessor :home_directory, :contract => { Or[Aruba::Contracts::AbsolutePath, Aruba::Contracts::RelativePath] => Or[Aruba::Contracts::AbsolutePath, Aruba::Contracts::RelativePath] } do |config|
50
47
  File.join(config.root_directory.value, config.working_directory.value)
@@ -52,11 +49,8 @@ module Aruba
52
49
  else
53
50
  option_accessor :home_directory, :contract => { Or[Aruba::Contracts::AbsolutePath, Aruba::Contracts::RelativePath] => Or[Aruba::Contracts::AbsolutePath, Aruba::Contracts::RelativePath] }, :default => ENV['HOME']
54
51
  end
55
- # rubocop:enable Metrics/LineLength
56
52
 
57
- # rubocop:disable Metrics/LineLength
58
53
  option_accessor :log_level, :contract => { Aruba::Contracts::Enum[:fatal, :warn, :debug, :info, :error, :unknown, :silent] => Aruba::Contracts::Enum[:fatal, :warn, :debug, :info, :error, :unknown, :silent] }, :default => :info
59
- # rubocop:enable Metrics/LineLength
60
54
 
61
55
  # TODO: deprecate this value and replace with "filesystem allocation unit"
62
56
  # equal to 4096 by default. "filesystem allocation unit" would represent
@@ -35,7 +35,6 @@ module Aruba
35
35
  IRB.conf[:SAVE_HISTORY] = 1000
36
36
  IRB.conf[:HISTORY_FILE] = Aruba.config.console_history_file
37
37
 
38
- # rubocop:disable Lint/NestedMethodDefinition
39
38
  context = Class.new do
40
39
  include Aruba::Api
41
40
  include Aruba::Console::Help
@@ -48,7 +47,6 @@ module Aruba
48
47
  'nil'
49
48
  end
50
49
  end
51
- # rubocop:enable Lint/NestedMethodDefinition
52
50
 
53
51
  irb = IRB::Irb.new(IRB::WorkSpace.new(context.new))
54
52
  IRB.conf[:MAIN_CONTEXT] = irb.context
@@ -5,7 +5,6 @@ World(Aruba::Api)
5
5
 
6
6
  require 'aruba/cucumber/hooks'
7
7
  require 'aruba/cucumber/command'
8
- require 'aruba/cucumber/core'
9
8
  require 'aruba/cucumber/environment'
10
9
  require 'aruba/cucumber/file'
11
10
  require 'aruba/cucumber/testing_frameworks'
@@ -1,6 +1,3 @@
1
- if Aruba::VERSION < '1.0.0'
2
- require 'aruba/cucumber/core'
3
- end
4
1
  require 'aruba/generators/script_file'
5
2
 
6
3
  When(/^I run "(.*)"$/)do |cmd|
@@ -5,7 +5,7 @@ World(Aruba::Api)
5
5
 
6
6
  if Aruba::VERSION >= '1.0.0'
7
7
  Around do |_, block|
8
- Aruba.platform.with_environment(&block)
8
+ with_environment(&block)
9
9
  end
10
10
  end
11
11
 
@@ -16,7 +16,6 @@ module Aruba
16
16
  # Thanks ActiveSupport
17
17
  # (Only needed to support Ruby 1.9.3 and JRuby)
18
18
  # rubocop:disable Metrics/CyclomaticComplexity
19
- # rubocop:disable Metrics/MethodLength
20
19
  def constantize(camel_cased_word)
21
20
  names = camel_cased_word.split('::')
22
21
 
@@ -52,7 +51,6 @@ module Aruba
52
51
  end
53
52
  end
54
53
  # rubocop:enable Metrics/CyclomaticComplexity
55
- # rubocop:enable Metrics/MethodLength
56
54
  end
57
55
 
58
56
  # @private
@@ -16,7 +16,7 @@ module Aruba
16
16
 
17
17
  def call
18
18
  Aruba.platform.write_file(path, "#{header}#{content}")
19
- Aruba.platform.chmod(0755, path, {})
19
+ Aruba.platform.chmod(0o755, path, {})
20
20
  end
21
21
 
22
22
  private
@@ -34,7 +34,6 @@ module Aruba
34
34
  end
35
35
  end
36
36
 
37
- # rubocop:disable Metrics/MethodLength
38
37
  def initialize(opts = {})
39
38
  @registered_commands = []
40
39
  @announcer = opts.fetch(:announcer)
@@ -204,9 +204,7 @@ module Aruba
204
204
 
205
205
  def prepared_environment
206
206
  if RUBY_VERSION == '1.9.3'
207
- # rubocop:disable Style/EachWithObject
208
207
  actions.inject(ENV.to_hash.merge(env)) { |a, e| e.call(a) }
209
- # rubocop:enable Style/EachWithObject
210
208
  else
211
209
  actions.each_with_object(ENV.to_hash.merge(env)) { |e, a| a = e.call(a) }
212
210
  end
@@ -36,8 +36,6 @@ module Aruba
36
36
  Aruba.platform.command?(program)
37
37
  end
38
38
 
39
- # rubocop:disable Metrics/CyclomaticComplexity
40
- # rubocop:disable Metrics/MethodLength
41
39
  def call(program, path)
42
40
  # Iterate over each path glob the dir + program.
43
41
  path.split(File::PATH_SEPARATOR).each do |dir|
@@ -50,8 +48,6 @@ module Aruba
50
48
 
51
49
  nil
52
50
  end
53
- # rubocop:enable Metrics/CyclomaticComplexity
54
- # rubocop:enable Metrics/MethodLength
55
51
  end
56
52
 
57
53
  private
@@ -16,8 +16,8 @@ module Aruba
16
16
 
17
17
  # Convert to array
18
18
  def to_a
19
- Shellwords.split( __getobj__.gsub('\\', 'ARUBA_TMP_PATHSEPARATOR') ).
20
- map { |w| w.gsub('ARUBA_TMP_PATHSEPARATOR', '\\') }
19
+ Shellwords.split( __getobj__.gsub('\\', 'ARUBA_TMP_PATHSEPARATOR') )
20
+ .map { |w| w.gsub('ARUBA_TMP_PATHSEPARATOR', '\\') }
21
21
  end
22
22
  end
23
23
  end
@@ -38,8 +38,6 @@ module Aruba
38
38
  Aruba.platform.command?(program)
39
39
  end
40
40
 
41
- # rubocop:disable Metrics/CyclomaticComplexity
42
- # rubocop:disable Metrics/MethodLength
43
41
  def call(program, path)
44
42
  # Iterate over each path glob the dir + program.
45
43
  path.split(File::PATH_SEPARATOR).each do |dir|
@@ -63,8 +61,6 @@ module Aruba
63
61
 
64
62
  nil
65
63
  end
66
- # rubocop:enable Metrics/CyclomaticComplexity
67
- # rubocop:enable Metrics/MethodLength
68
64
  end
69
65
 
70
66
  private
@@ -64,6 +64,9 @@ module Aruba
64
64
  @stdout_file.sync = true
65
65
  @stderr_file.sync = true
66
66
 
67
+ @stdout_file.binmode
68
+ @stderr_file.binmode
69
+
67
70
  @exit_status = nil
68
71
  @duplex = true
69
72
 
@@ -90,9 +93,8 @@ module Aruba
90
93
 
91
94
  yield self if block_given?
92
95
  end
93
- # rubocop:disable Metrics/MethodLength
94
96
 
95
- # Access to stdout of process
97
+ # Access to stdin of process
96
98
  def stdin
97
99
  return if @process.exited?
98
100
 
@@ -249,9 +251,7 @@ module Aruba
249
251
  # gather fully qualified path
250
252
  cmd = Aruba.platform.which(command, environment['PATH'])
251
253
 
252
- # rubocop:disable Metrics/LineLength
253
254
  fail LaunchError, %(Command "#{command}" not found in PATH-variable "#{environment['PATH']}".) if cmd.nil?
254
- # rubocop:enable Metrics/LineLength
255
255
 
256
256
  Aruba.platform.command_string.new(cmd)
257
257
  end
@@ -267,7 +267,7 @@ module Aruba
267
267
  data = file.read
268
268
  file.close
269
269
 
270
- data
270
+ data.force_encoding('UTF-8')
271
271
  end
272
272
  end
273
273
  end
@@ -4,12 +4,6 @@ require 'aruba'
4
4
  require 'aruba/api'
5
5
  require 'aruba/version'
6
6
 
7
- if Aruba::VERSION >= '1.0.0'
8
- Aruba.configure do |config|
9
- config.working_directory = 'tmp/rspec'
10
- end
11
- end
12
-
13
7
  RSpec.configure do |config|
14
8
  config.include Aruba::Api, :type => :aruba
15
9
 
@@ -18,6 +12,12 @@ RSpec.configure do |config|
18
12
  if self.class.include? Aruba::Api
19
13
  restore_env
20
14
  setup_aruba
15
+
16
+ # Modify PATH to include project/bin
17
+ prepend_environment_variable 'PATH', aruba.config.command_search_paths.join(':') + ':'
18
+
19
+ # Use configured home directory as HOME
20
+ set_environment_variable 'HOME', aruba.config.home_directory
21
21
  end
22
22
 
23
23
  example.run
@@ -28,7 +28,11 @@ RSpec.configure do |config|
28
28
 
29
29
  if Aruba::VERSION >= '1.0.0'
30
30
  config.around :each do |example|
31
- Aruba.platform.with_environment do
31
+ if self.class.include? Aruba::Api
32
+ with_environment do
33
+ example.run
34
+ end
35
+ else
32
36
  example.run
33
37
  end
34
38
  end
@@ -90,18 +94,4 @@ RSpec.configure do |config|
90
94
  aruba.announcer.activate(:command_filesystem_status)
91
95
  end
92
96
  end
93
-
94
- # Modify PATH to include project/bin
95
- config.before :each do
96
- next unless self.class.include? Aruba::Api
97
-
98
- prepend_environment_variable 'PATH', aruba.config.command_search_paths.join(':') + ':'
99
- end
100
-
101
- # Use configured home directory as HOME
102
- config.before :each do |example|
103
- next unless self.class.include? Aruba::Api
104
-
105
- set_environment_variable 'HOME', aruba.config.home_directory
106
- end
107
97
  end
@@ -49,11 +49,7 @@ module Aruba
49
49
 
50
50
  @environment.update(@config.command_runtime_environment)
51
51
 
52
- @command_monitor = if Aruba::VERSION < '1'
53
- opts.fetch(:command_monitor, Aruba.platform.command_monitor.new(:announcer => @announcer))
54
- else
55
- opts.fetch(:command_monitor, Aruba.platform.command_monitor.new)
56
- end
52
+ @command_monitor = opts.fetch(:command_monitor, Aruba.platform.command_monitor.new(:announcer => @announcer))
57
53
 
58
54
  @logger = opts.fetch(:logger, Aruba.platform.logger.new)
59
55
  @logger.mode = @config.log_level
@@ -145,10 +145,6 @@ module Aruba
145
145
  fetch(instance)['working_dir']
146
146
  end
147
147
 
148
- def command(instance)
149
- fetch(instance)['command']
150
- end
151
-
152
148
  private
153
149
 
154
150
  def fetch(instance)
@@ -1,3 +1,3 @@
1
1
  module Aruba
2
- VERSION = '1.0.0-alpha.1'.freeze
2
+ VERSION = '1.0.0-alpha.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aruba
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha.1
4
+ version: 1.0.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy, Matt Wynne and other Aruba Contributors
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-29 00:00:00.000000000 Z
11
+ date: 2017-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.5.6
39
+ version: 0.7.1
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.5.6
46
+ version: 0.7.1
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: ffi
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -129,7 +129,8 @@ dependencies:
129
129
  description: Extension for popular TDD and BDD frameworks like "Cucumber", "RSpec"
130
130
  and "Minitest" to make testing commandline applications meaningful, easy and fun.
131
131
  email: cukes@googlegroups.com
132
- executables: []
132
+ executables:
133
+ - aruba
133
134
  extensions: []
134
135
  extra_rdoc_files: []
135
136
  files:
@@ -162,7 +163,7 @@ files:
162
163
  - cucumber.yml
163
164
  - doc/dependency_decisions.yml
164
165
  - docker-compose.yml
165
- - exec/aruba
166
+ - exe/aruba
166
167
  - fixtures/cli-app/.gitignore
167
168
  - fixtures/cli-app/.rspec
168
169
  - fixtures/cli-app/README.md
@@ -216,7 +217,6 @@ files:
216
217
  - lib/aruba/contracts/relative_path.rb
217
218
  - lib/aruba/cucumber.rb
218
219
  - lib/aruba/cucumber/command.rb
219
- - lib/aruba/cucumber/core.rb
220
220
  - lib/aruba/cucumber/environment.rb
221
221
  - lib/aruba/cucumber/file.rb
222
222
  - lib/aruba/cucumber/hooks.rb
@@ -323,5 +323,5 @@ rubyforge_project:
323
323
  rubygems_version: 2.5.2
324
324
  signing_key:
325
325
  specification_version: 4
326
- summary: aruba-1.0.0.pre.alpha.1
326
+ summary: aruba-1.0.0.pre.alpha.2
327
327
  test_files: []
@@ -1,5 +0,0 @@
1
- if Aruba::VERSION >= '1.0.0'
2
- Aruba.configure do |config|
3
- config.working_directory = 'tmp/cucumber'
4
- end
5
- end