Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Dennis Günnewig
@dg-ratiodata
Alternatively
git clone https://github.com/cucumber/aruba.git
cd aruba
grep -E "When|Given|Then" lib/aruba/cucumber/*.rb | awk -F ":" '{ $1 = ""; print $0}' |sort
Dennis Günnewig
@dg-ratiodata
Or have a look here https://github.com/cucumber/aruba/blob/master/features/steps/overview.feature I added those tips to the feature test suite of aruba
Evgeny Morozov
@evmorov
@dg-ratiodata thanks! It's what I need
Evgeny Morozov
@evmorov
Hi! I have another question. From the last question I've made a huge step and know Aruba better but can't solve one problem. I can't make to work "When I run cli interactively" with running a test "in-proccess". Interactively works without "in-proccess" but that's not a solution because I really need it for using webmock. My question is: should it work? If so I will be trying to do it more.
Dennis Günnewig
@maxmeyer
@evmorov Good question. :smile: Looking at the code it should work. But I have never used it this way myself. Do you get any errors or does it simply not work? Can you send me a PR adding a failing test for that to the aruba test suite? Somewhere here https://github.com/cucumber/aruba/blob/master/features/steps/commands/in_process.feature, have a look here as well for some examples https://github.com/cucumber/aruba/blob/master/features/commands/interactive.feature.
Evgeny Morozov
@evmorov
@maxmeyer Thanks! I've made a ticket cucumber/aruba#317. I hope it's not difficult to understand what I want to achieve and where is the problem.
Dennis Günnewig
@maxmeyer
Ok. I think I understood. Unfortunately this is not possible with aruba. At least from my understanding
Evgeny Morozov
@evmorov
Thanks to everyone!
Dennis Günnewig
@dg-ratiodata
@all I released v0.11.1of aruba, have a look at our history (1, 2) for more information on that . If you have got any problems with the new release, please create an issue here
I also added tons of feature tests, which can be used as documentation https://github.com/cucumber/aruba/tree/master/features Just look for feature files in the following directoriessteps, api.
Al Snow
@jasnow
Which branch should I base my changes on - master? Travis build is red.
Dennis Günnewig
@dg-ratiodata
@jasnow I do my best to keep master green. Unfortunately jruby fails for no obvious reason.

Which branch should I base my changes on - master?

Yes, please. master is the reference for all PRs.

Al Snow
@jasnow
@dg-ratiodata - I will patient.
Dennis Günnewig
@dg-ratiodata
@jasnow I think I found the problem. Running jruby with --debug and the like produces too much output which travis does not like. I fixed this and now CI is running. So please stay tuned and wait for the job to finish.
Al Snow
@jasnow
@dg-ratiodata - Thanks for the update.
Dennis Günnewig
@dg-ratiodata
Ok. It's green again
Al Snow
@jasnow
@dg-ratiodata - GREEN - Great - Watching #933 on Travis.
Al Snow
@jasnow
#327 - Question: How do I fix above appveyor/pr fail tests on this PR?
Dennis Günnewig
@dg-ratiodata
@jasnow Sorry was on vacation. I will have a look at this tomorrow or next week.
Al Snow
@jasnow
@dg-ratiodata - OK,
Dennis Günnewig
@maxmeyer
@jasnow Thanks for hint with the missing commits... Is fixed now.
mpjmpj
@mpjmpj
Quick question if anyone is around - should I expect cucumber/aruba to work with Windows? I have ruby 2.2.3p173 and aruba 0.13.0. When I try to have it run a command, it says that cmd is undefined in the Processes module. I see that he windows build hasn't worked in a while. Should I not be using this?
Dennis Günnewig
@dg-ratiodata
Mmmh, windows support has not been repaired yet. If you like, you can fix it. I'm happy to accept PRs for that.
mpjmpj
@mpjmpj
Ok, I'll check with the boss and see if I can spend the time on it. Do you have a notion of the scope of the problems with windows support? It'd help me sell it if I had an idea of how open ended the issues are.
Dennis Günnewig
@dg-ratiodata

Great! I think at best would be to have a look at the build logs on AppVeyor first and make sure all existing feature tests are green. A short list of issues I'm aware of.

  1. File System Modes: Windows only supports something like 644, 666 and so on. It's not that flexible like UNIX
  2. Runner: Make sure, that all commands can run on windows via cmd.exe (this is partially implemented) + bonus make sure, we can test powershell scripts on windows
  3. Environment variables: Windows is case in-sensitive regarding environment variables, that's "a problem" because we convert it via with #to_h. This is partially implemented and needs to be rebased.
  4. which command: Make sure command paths can be resolved - this is related to 2. and should be fixed first.
  5. Add some more documentation about how to use aruba on Windows if needed

I also added a platform tag to our issued tracker: https://github.com/cucumber/aruba/issues?q=is%3Aissue+is%3Aopen+label%3Aplatform%2Fwindows

Andrew Havens
@andrewhavens
I am creating a CLI app with Thor which asks the user to answer a few questions. How can I respond to these prompts with Aruba?
Paolo Ambrosio
@paoloambrosio

@dg-ratiodata Had a quick look at the failing Windows specs.

  1. File System Modes: what is your thought on that? Should we fail if specifying 666 or should it be automagically converted to 644? (BTW, the Windows FS has much better ACLs but they don't work like that)
  2. Runner: Why do they need to run with cmd.exe? The problem I see is that the tests use
    • echo: built-in command
    • true: AFAIK it does not exist, but it could be changed
    • env: built-in command called set
    • cat: AFAIK it does not exist
    • shell script to redirect the output of echo to stderr: cmd can do the same
  3. No comment
  4. Same as 2., the problem is that the commands do not exist or are built-in
  5. No comment
  6. NEW spec/aruba/api/environment/restore_env_spec.rb - wrong number of parameters for delete (2 specs out of 45): fixed in paoloambrosio/aruba@fix-windows-platform.
  7. NEW spec/aruba/aruba_path_spec.rb:101 - Windows filesystem does not support counting blocks

To fix 2. and 4. I was thinking of re-implementing those commands as Ruby scripts (they are 2 or 3 lines each) to be executed by the specs so that they work in the same way on all platforms.
I believe that 7. should return what Ruby does, so Nil on Windows, and it should be tested.

Jarl Friis
@jarl-dk
Be careful not mixing up OS specifics and filesystem specifics. All this file permission is file system specifics. Any way most filesystems mounted on POSIX compliant OS are mounted so file system features are mapped to comply with POSIX.
Paolo Ambrosio
@paoloambrosio
@jarl-dk good shout
For 7. I believe that stat on Windows does not expose the block size. From the macro hell that is the filesystem API on the MRI, this might be the data structure used: https://msdn.microsoft.com/en-us/library/14h5k7ff.aspx
Paolo Ambrosio
@paoloambrosio
About 1. instead as @jarl-dk says it depends on the FS, and not just on the OS. On Linux FAT32 and NTFS are even worse than on Windows! I believe that the Aruba specs should check that permissions can be changed, and not the behaviour of the RVM, the OS or the FS.
I would design the test suite assuming that it is run on the standard filesystem for the platform (any "standard" filesystem on Linux and OSX, and NTFS on Windows). For example I wouldn't do anything that might fail in the case-insensitive filesystem in OSX. We should be able to find a representative superset that works on all common combinations of FS and OS.
Paolo Ambrosio
@paoloambrosio
And again about 7. why was that functionality ever implemented? Should Aruba be concerned with those details?
Dennis Günnewig
@maxmeyer
@paoloambrosio Wow! :smile: Thanks a lot about getting into this. First one quick question: Where do 1., 2. ... refer to? Build errors? About 7: Normally I add things I need myself and think they're useful for others as well, but I can't remember for what project I added the block size thing. But I think I hat in mind, that windows does not support this kind of functionality and should raise "NoImplmented"-error or so.
If you like, send me a PR for your changes. We then can pair on this. Just push the branch to the aruba/repo.
I'm really glad that you found some time to have a look into this.
I hope we can fix the problems for windows once and for all... at least for the current functionality ;-)
Cezary Baginski
@e2
I'll just be sharing thoughts and feedback here - mostly on the recent PRs I've made.
First, I think Aruba tests shouldn't run any apps it doesn't own. This includes using bash, zsh, echo and related for shell. It would be much better to have ruby bash/zsh "shim" that just supports the given "OS feature". The other extreme would be to just run all tests in Docker - which would guarantee consistency without endless workarounds and issues related to "local setup". This is because Travis is not a good place for "development".
Cezary Baginski
@e2
I just added a PR with a Docker workflow: cucumber/aruba#353 . Ideally, there should be an "offical" Aruba base image for testing (all code up to the JDK install included) - and the one here would just include it and build off from there. (Provisioning with gems, etc.).
Dennis Günnewig
@maxmeyer
Sounds good. Will see what I can do. @mattwynne @aslakhellesoy Do we have a cucumber org on docker hub I can use for this?
Cezary Baginski
@e2
For blocks counting on Windows, I'd just either approximate it (cluster size * (1+file_size/cluster + file_count + dir_count)) or expect a tool like du.exe to be installed. (But, for the latter, there's a sever limit to the argument size for a command on Windows, so that complicates things). I'm sure users would prefer an approximation rather than a perfectly accurate implementation no one will ever implement in Ruby...
Dennis Günnewig
@dg-ratiodata
@e2 wee need to be careful otherwise merging all your work into release/1.0.0 will be really really hard and my not possible any more!
Cezary Baginski
@e2
@dg-ratiodata - it's mostly bugfixes and new features (like Docker), so there shouldn't be any conflicts. If that's an issue, it's best to switch master to 1.x, branch off 0.14 for backporting, and just focus on releasing 1.x ASAP. It's no problem to then work on 2.x a month from now - no one will complain because of "too many major releases". Aruba is complex, so learning is expected. And if learning is reflected in "multiple major releases", that's just an indication of how much learning (or rework) was needed, nothing else. I'm guessing it's actually more useful to just skip to 2.x (master - without releasing), branch off 1.x as unreleased as "work in progress" (too keep the branches). E.g. I'm (as a contributor) only interested in master and not backward compatibility or deprecations - so it makes no sense to add an artificial "burden" on master. You can always work on a "transition release" - but only if there's a genuine need in the community. Master branch should be optimized for quickly accepting PRs. (If PRs don't have priority over other work, contributing feels very discouraging - as if there's a ton of "bureaucracy"). It doesn't make sense to expect contributors to make backports of their own fixes (that they don't need themselves).
@dg-ratiodata - if there's a lot of scrunity for PRs on master (like now), there's no need for a release/1.0.0 branch. Release branches don't fix a discipline/quality problem, they only create a branch managing problem. (Especially if plans aren't communicated to contributors effectively).
Dennis Günnewig
@dg-ratiodata
@e2 I made an issue from your comment.
cucumber/aruba#363
Paolo Ambrosio
@paoloambrosio
re running tests in docker: are you expecting that to work for Linux only or to use a Windows container on Windows? I don't understand much what docker would solve