vagrant-cucumber-host 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +1 -0
- data/examples/MultiVagrantfile +16 -0
- data/examples/Vagrantfile +12 -0
- data/lib/vagrant-cucumber-host/config.rb +31 -0
- data/lib/vagrant-cucumber-host/plugin.rb +20 -0
- data/lib/vagrant-cucumber-host/provisioner.rb +16 -0
- data/lib/vagrant-cucumber-host/version.rb +5 -0
- data/lib/vagrant-cucumber-host.rb +13 -0
- data/locales/en.yml +9 -0
- data/vagrant-cucumber-host.gemspec +24 -0
- metadata +114 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NjVmNTMzMmUyZWIwNjJmNDM2YWFkODBkNjEwOGUxZjUxNjg3M2Q1ZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MmQ0MGFlNTBlM2M3YTZkZGI5YTlhYmFmNjgxZGU3NjFjNTNlYmQ2MA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
M2NhNzgyNGY2N2MxZjFmMjBhMWJhYzY3Mjg4M2RmODkwOTIzMDhkZjVmYWU1
|
10
|
+
MThkM2EwMjc2MzRhZDRlNWI3NDk4YzVmY2ZlNTg1MTk5YWJhOGU1NjZjNWIz
|
11
|
+
ZDRmMjVjNDBmMjZkNzMzZmJjMWE2OWJmZGI0ZGM1Mjg2Y2Y3MTU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OWRhMmE3OWZmZGI2MjdhMzQwYjAwMWQ2MzQwYzg4YzQxNjMxYWM3ODRmMjY2
|
14
|
+
M2JkNTc5M2ZmOGY0YWU4ODdlMTExMjQzYmRhODRmMDgwY2I2ZDc3NTQ4NTBk
|
15
|
+
MzUwOTRlMzlmNWE2ODhjNjY3MjJkN2ZmNTJkMTJhNmVmZWY1ZTg=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Gareth Rushgrove
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
A Vagrant plugin which allows running cucumber tests on the
|
2
|
+
local host as a provisioner.
|
3
|
+
|
4
|
+
This could be useful for running acceptance tests for a Vagrant setup,
|
5
|
+
including for a multibox setup.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Install this plugin via the `vagrant` command.
|
10
|
+
|
11
|
+
vagrant plugin install vagrant-cucumber-host
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
Vagrant.require_plugin "vagrant-cucumber-host"
|
17
|
+
|
18
|
+
Vagrant.configure("2") do |config|
|
19
|
+
config.vm.box = "precise64"
|
20
|
+
|
21
|
+
config.vm.provision :cucumber do |cucumber|
|
22
|
+
cucumber.features = []
|
23
|
+
end
|
24
|
+
end
|
25
|
+
```
|
26
|
+
|
27
|
+
See the examples folder for more.
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
1. Fork it
|
32
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
33
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
34
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
35
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
Vagrant.require_plugin "vagrant-cucumber-host"
|
5
|
+
|
6
|
+
Vagrant.configure('2') do |config|
|
7
|
+
config.vm.box = 'precise64'
|
8
|
+
|
9
|
+
['one', 'two'].each_with_index do |node_name, i|
|
10
|
+
config.vm.define node_name do |node|
|
11
|
+
node.vm.hostname = node_name
|
12
|
+
# only run the cucumber provisioner once
|
13
|
+
node.vm.provision :cucumber if i == nodes.size-1
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Cucumber
|
3
|
+
class Config < Vagrant.plugin('2', :config)
|
4
|
+
attr_accessor :features
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
super
|
8
|
+
@features = UNSET_VALUE
|
9
|
+
end
|
10
|
+
|
11
|
+
def pattern=(pat)
|
12
|
+
@features = Dir.glob(pat)
|
13
|
+
end
|
14
|
+
|
15
|
+
def finalize!
|
16
|
+
@features = [] if @features == UNSET_VALUE
|
17
|
+
end
|
18
|
+
|
19
|
+
def validate(machine)
|
20
|
+
errors = _detected_errors
|
21
|
+
|
22
|
+
missing_files = @features.select { |path| !File.file?(path) }
|
23
|
+
unless missing_files.empty?
|
24
|
+
errors << I18n.t('vagrant.config.cucumber.missing_features', files: missing_files.join(', '))
|
25
|
+
end
|
26
|
+
|
27
|
+
{ 'cucumber provisioner' => errors }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Cucumber
|
3
|
+
class Plugin < Vagrant.plugin('2')
|
4
|
+
name 'cucumber'
|
5
|
+
description <<-DESC
|
6
|
+
This plugin executes a cucumber suite on the host running Vagrant.
|
7
|
+
DESC
|
8
|
+
|
9
|
+
config(:cucumber, :provisioner) do
|
10
|
+
require_relative 'config'
|
11
|
+
Config
|
12
|
+
end
|
13
|
+
|
14
|
+
provisioner(:cucumber) do
|
15
|
+
require_relative 'provisioner'
|
16
|
+
Provisioner
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'cucumber'
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module Cucumber
|
5
|
+
class Provisioner < Vagrant.plugin('2', :provisioner)
|
6
|
+
def initialize(machine, config)
|
7
|
+
super(machine, config)
|
8
|
+
@features = config.features
|
9
|
+
end
|
10
|
+
def provision
|
11
|
+
runtime = ::Cucumber::Runtime.new
|
12
|
+
::Cucumber::Cli::Main.new(@features).execute!(runtime)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require "vagrant-cucumber-host/plugin"
|
2
|
+
require "vagrant-cucumber-host/version"
|
3
|
+
|
4
|
+
module VagrantPlugins
|
5
|
+
module Cucumber
|
6
|
+
def self.source_root
|
7
|
+
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
|
8
|
+
end
|
9
|
+
|
10
|
+
I18n.load_path << File.expand_path('locales/en.yml', source_root)
|
11
|
+
I18n.reload!
|
12
|
+
end
|
13
|
+
end
|
data/locales/en.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vagrant-cucumber-host/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "vagrant-cucumber-host"
|
8
|
+
spec.version = VagrantPlugins::Cucumber::VERSION
|
9
|
+
spec.authors = ["Gareth Rushgrove"]
|
10
|
+
spec.email = ["gareth@morethanseven.net"]
|
11
|
+
spec.description = %q{Run cucumber features as a Vagrant provisioner}
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_dependency 'cucumber', '~> 1.3.0'
|
20
|
+
spec.add_dependency 'httparty', '~> 0.10.0'
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-cucumber-host
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.14
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Gareth Rushgrove
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: cucumber
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.3.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.3.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httparty
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.10.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.10.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Run cucumber features as a Vagrant provisioner
|
70
|
+
email:
|
71
|
+
- gareth@morethanseven.net
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- Gemfile
|
78
|
+
- LICENSE.txt
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
81
|
+
- examples/MultiVagrantfile
|
82
|
+
- examples/Vagrantfile
|
83
|
+
- lib/vagrant-cucumber-host.rb
|
84
|
+
- lib/vagrant-cucumber-host/config.rb
|
85
|
+
- lib/vagrant-cucumber-host/plugin.rb
|
86
|
+
- lib/vagrant-cucumber-host/provisioner.rb
|
87
|
+
- lib/vagrant-cucumber-host/version.rb
|
88
|
+
- locales/en.yml
|
89
|
+
- vagrant-cucumber-host.gemspec
|
90
|
+
homepage:
|
91
|
+
licenses:
|
92
|
+
- MIT
|
93
|
+
metadata: {}
|
94
|
+
post_install_message:
|
95
|
+
rdoc_options: []
|
96
|
+
require_paths:
|
97
|
+
- lib
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - ! '>='
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
108
|
+
requirements: []
|
109
|
+
rubyforge_project:
|
110
|
+
rubygems_version: 2.1.11
|
111
|
+
signing_key:
|
112
|
+
specification_version: 4
|
113
|
+
summary: Run cucumber features as a Vagrant provisioner
|
114
|
+
test_files: []
|