GithubHelp home page GithubHelp logo

vagrant-cucumber's People

Contributors

jennyowen avatar jtopper avatar madandroid avatar mbevc1 avatar mrprimate avatar phyber avatar randomvariable avatar sftim avatar srbaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vagrant-cucumber's Issues

Add settings class singleton

We use a Ruby globals to handle vagrant-cucumber's debug mode across a few contexts.

We should instead use a settings class, instantiated as a singleton to handle vagrant-cucumber's global settings.

Tests!

The hacking instructions in #5 should ideally show me how to test the code so you can merge in my contribution knowing I haven't fucked anything up.

Even if this just has some manual steps and then tells you to run the examples, I think that's fine.

Vagrant Docker provider support?

Tried using Docker as a vagrant provider.
It breaks on:

    Given there is a running VM called "vm1"                         # vagrant-cucumber-0.0.8/lib/vagrant-cucumber/step_definitions.rb:3
      Rolling back VM states
      undefined method `has_snapshot?' for #<VagrantPlugins::DockerProvider::Driver:0x00000001eded00> (NoMethodError)
      features/process.feature:8:in `Given there is a running VM called "vm1"'
    Then there should not be a process called "i-dont-exist" running # features/step_definitions/process.rb:12
      Vagrant attempted to call the action 'snapshot_rollback' on the provider
      'Docker (0ba23f6d0ad2f4164a3345226d014214bc0c0a55ba5780f6819fad0dc6c0836e)', but this provider doesn't support this action. This
      is probably a bug in either the provider or the plugin calling this
      action, and should be reported. (Vagrant::Errors::UnimplementedProviderAction)
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:168:in `block in action'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:474:in `lock'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:161:in `call'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:161:in `action'
      /home/erik/.vagrant.d/gems/gems/vagrant-multiprovider-snap-0.0.14/lib/vagrant-multiprovider-snap/command/rollback.rb:31:in `block in execute'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:226:in `block in with_target_vms'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:220:in `each'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:220:in `with_target_vms'
      /home/erik/.vagrant.d/gems/gems/vagrant-multiprovider-snap-0.0.14/lib/vagrant-multiprovider-snap/command/rollback.rb:29:in `execute'
      /home/erik/.vagrant.d/gems/gems/vagrant-multiprovider-snap-0.0.14/lib/vagrant-multiprovider-snap/command/root.rb:50:in `execute'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:42:in `execute'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:292:in `cli'
      /home/erik/.vagrant.d/gems/gems/vagrant-cucumber-0.0.8/lib/vagrant-cucumber/step_definitions.rb:83:in `After'

Not sure if a Docker provider makes sense for vagrant-cucumber, but I am looking for something more efficient than Virtualbox or VMWare.

Hacking instructions

If I wanted to submit a pull request, I would like a CONTRIBUTING.md file to tell me how you like things done.

Push command execution into Glue / Support layer

The step def for running a shell command is quite long and gnarly, and you're using instance variables (e.g. @last_shell_command_output) to pass state to the subsequent step defs.

I would push this code down into the glue layer, maybe just make a method on that module like execute_on(machine, command) and have that wrap all the detail. You can then expose last_shell_command_output as another method / attribute on the glue module.

This will keep the step defs simpler and allow you to change the implementation of the glue layer without breaking the step defs.

Examples / canned step defs should use 'When' steps for actions

Idiomatic use of Cucumber is to use Given to set up context, When to carry out an action, and Then to inspect the state of the system after that action has happened in that context.

Cucumber doesn't care about which keyword you use in practice, but it helps for readability if the action that changes the state of the system is labelled with When.

I notice that the step def for running a shell command is a Then step. I would use a When step for this. In Aruba, we use a phrase like this:

When I successfully run `ls -la`

or just

When I run `ls -la`

And we then have other steps to check the output / exit status.

Formatter doesn't work with cucumber >= 2.0.0

We're seeing an old issue re-surface where the output for the cucumber run is delayed ... in these instances, it turns out that cucumber version 2.0.0 has been installed into ~/.vagrant.d/gems/gems .. not sure exactly why the formatter fails, haven't dug into it yet, but it may be prudent to pin the version in the gemspec to < 2.0.0 for now until we can fully support cucumber > 2.0.0

AWS Provider Support

Thanks for great tool, is there any word or time frame to support the vagrant-aws plugin?

Is the issue holding support back the ability to do snapshots and rollback? If so, I would be happy to have a feature to support running on AWS without the snaps....

Thanks again :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.