vagrant-dummy-communicator 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/CHANGELOG.md +3 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/Gemfile +19 -0
- data/LICENSE +21 -0
- data/README.md +36 -0
- data/Rakefile +11 -0
- data/VERSION +1 -0
- data/lib/communicator.rb +32 -0
- data/lib/vagrant-dummy-communicator.rb +22 -0
- data/vagrant-dummy-communicator.gemspec +30 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 59acff69350add820035445fd04635cae03734b29dc73ede182716823961054e
|
4
|
+
data.tar.gz: ad2e7640fe9f767b3e2a07ad38ac17c8b1668b351b6d03f314cfb69a4db34be3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f86405fcf7c826a1bfd3839b3ca748877e25a1c68a10744b83bc10442a16edbe80a36d600778d3a51922ba888f9df442b09ea5be8242f5dac1cec64d89cc6c06
|
7
|
+
data.tar.gz: bd65b6f0cb5488fee748a93a17436a5bba96bec0bb854c6dc003cdd6d0ef5266d87be46ba1d393ea2e2bc28ca2c73de46b1d95b37d9c2a66a0a50b136ca85685
|
data/.gitignore
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
|
19
|
+
testdrive/.vagrant/
|
20
|
+
testdrive/.vagrant.d/
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at info@dotless.de. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/Gemfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
group :development do
|
4
|
+
# We depend on Vagrant for development, but we don't add it as a
|
5
|
+
# gem dependency because we expect to be installed within the
|
6
|
+
# Vagrant environment itself using `vagrant plugin`.
|
7
|
+
if ENV['VAGRANT_VERSION']
|
8
|
+
gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git', tag: "v#{ENV['VAGRANT_VERSION']}"
|
9
|
+
elsif ENV['VAGRANT_LOCAL']
|
10
|
+
gem 'vagrant', path: ENV['VAGRANT_LOCAL']
|
11
|
+
else
|
12
|
+
gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git', branch: "main"
|
13
|
+
end
|
14
|
+
gem 'rake', '>= 12.3.3'
|
15
|
+
end
|
16
|
+
|
17
|
+
group :plugins do
|
18
|
+
gem 'vagrant-dummy-communicator', path: '.'
|
19
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021 Bastiaan Schaap <bastiaan.schaap@siteminds.nl>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# vagrant-dummy-communicator
|
2
|
+
|
3
|
+
*vagrant-dummy-communicator* is a [Vagrant](http://vagrantup.com) plugin which disables communication with the guest VM, and allows Vagrant to continue without waiting for SSH/WinRM to be ready.
|
4
|
+
|
5
|
+
[![Code Climate](https://codeclimate.com/github/dotless-de/vagrant-dummy-communicator.svg)](https://codeclimate.com/github/dotless-de/vagrant-dummy-communicator)
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/vagrant-dummy-communicator.svg)](https://badge.fury.io/rb/vagrant-dummy-communicator)
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Requires vagrant 1.3 or later
|
11
|
+
|
12
|
+
### Vagrant ≥ 1.3
|
13
|
+
|
14
|
+
```bash
|
15
|
+
vagrant plugin install vagrant-dummy-communicator
|
16
|
+
```
|
17
|
+
|
18
|
+
## Configuration / Usage
|
19
|
+
|
20
|
+
This plugin does not require it's own configuration. You *do* however need to enable
|
21
|
+
it in your `Vagrantfile`:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
Vagrant.configure("2") do |config|
|
25
|
+
# Use an 'empty' box
|
26
|
+
config.vm.box = "q2p/empty"
|
27
|
+
|
28
|
+
# Disable shared folders
|
29
|
+
config.vm.synced_folder ".", "/vagrant", disabled: true
|
30
|
+
|
31
|
+
# Set dummy communicator
|
32
|
+
config.vm.communicator = "dummy"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
Now you can do `vagrant up --no-provision` to bring up your VM.
|
data/Rakefile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
# Immediately sync all stdout so that tools like buildbot can
|
5
|
+
# immediately load in the output.
|
6
|
+
$stdout.sync = true
|
7
|
+
$stderr.sync = true
|
8
|
+
|
9
|
+
# This installs the tasks that help with gem creation and
|
10
|
+
# publishing.
|
11
|
+
Bundler::GemHelper.install_tasks
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/lib/communicator.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module VagrantDummyCommunicator
|
3
|
+
class Communicator < Vagrant.plugin("2", :communicator)
|
4
|
+
|
5
|
+
def initialize(machine)
|
6
|
+
@env = machine.env
|
7
|
+
end
|
8
|
+
|
9
|
+
def ready?
|
10
|
+
sleep 2
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def wait_for_ready(duration)
|
15
|
+
sleep 2
|
16
|
+
return true
|
17
|
+
end
|
18
|
+
|
19
|
+
def execute(command, opts=nil)
|
20
|
+
0
|
21
|
+
end
|
22
|
+
|
23
|
+
def sudo(command, opts=nil)
|
24
|
+
execute(command, opts)
|
25
|
+
end
|
26
|
+
|
27
|
+
def test(command, opts=nil)
|
28
|
+
execute(command, opts)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
begin
|
2
|
+
require "vagrant"
|
3
|
+
rescue LoadError
|
4
|
+
raise "The Vagrant Dummy Communicator plugin must be run within Vagrant."
|
5
|
+
end
|
6
|
+
|
7
|
+
module VagrantPlugins
|
8
|
+
module VagrantDummyCommunicator
|
9
|
+
class Plugin < Vagrant.plugin("2")
|
10
|
+
name "vagrant-dummy-communicator"
|
11
|
+
description <<-DESC
|
12
|
+
Provides a dummy communicator that makes sure Vagrant boot
|
13
|
+
will continue without waiting for SSH/WinRM to be ready.
|
14
|
+
DESC
|
15
|
+
|
16
|
+
communicator("dummy") do
|
17
|
+
require_relative("communicator")
|
18
|
+
Communicator
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
Gem::Specification.new do |s|
|
3
|
+
s.name = "vagrant-dummy-communicator"
|
4
|
+
s.version = File.read('VERSION').chop
|
5
|
+
s.platform = Gem::Platform::RUBY
|
6
|
+
s.authors = ["Bastiaan Schaap"]
|
7
|
+
s.email = ["bastiaan.schaap@siteminds.nl"]
|
8
|
+
s.license = 'MIT'
|
9
|
+
s.homepage = "https://github.com/bjwschaap/vagrant-dummy-communicator"
|
10
|
+
s.summary = %q{A Vagrant plugin to disable communications with the guest VM}
|
11
|
+
s.description = %q{A Vagrant plugin that can be used when provisioning/communicating/ssh for the guest VM is not needed (e.g. PXE boot).}
|
12
|
+
|
13
|
+
s.required_ruby_version = ">= 2.0"
|
14
|
+
s.required_rubygems_version = ">= 1.3.6"
|
15
|
+
|
16
|
+
s.add_dependency "i18n"
|
17
|
+
s.add_dependency "log4r"
|
18
|
+
|
19
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|testdrive|\.github)/}) }
|
20
|
+
s.bindir = "exe"
|
21
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
s.require_paths = ["lib"]
|
23
|
+
|
24
|
+
s.metadata = {
|
25
|
+
"bug_tracker_uri" => "https://github.com/bjwschaap/vagrant-dummy-communicator/issues",
|
26
|
+
"changelog_uri" => "https://github.com/bjwschaap/vagrant-dummy-communicator/blob/main/CHANGELOG.md",
|
27
|
+
"documentation_uri" => "http://rubydoc.info/gems/vagrant-dummy-communicator",
|
28
|
+
"source_code_uri" => "https://github.com/bjwschaap/vagrant-dummy-communicator"
|
29
|
+
}
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-dummy-communicator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bastiaan Schaap
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: i18n
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: log4r
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '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'
|
41
|
+
description: A Vagrant plugin that can be used when provisioning/communicating/ssh
|
42
|
+
for the guest VM is not needed (e.g. PXE boot).
|
43
|
+
email:
|
44
|
+
- bastiaan.schaap@siteminds.nl
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- CHANGELOG.md
|
51
|
+
- CODE_OF_CONDUCT.md
|
52
|
+
- Gemfile
|
53
|
+
- LICENSE
|
54
|
+
- README.md
|
55
|
+
- Rakefile
|
56
|
+
- VERSION
|
57
|
+
- lib/communicator.rb
|
58
|
+
- lib/vagrant-dummy-communicator.rb
|
59
|
+
- vagrant-dummy-communicator.gemspec
|
60
|
+
homepage: https://github.com/bjwschaap/vagrant-dummy-communicator
|
61
|
+
licenses:
|
62
|
+
- MIT
|
63
|
+
metadata:
|
64
|
+
bug_tracker_uri: https://github.com/bjwschaap/vagrant-dummy-communicator/issues
|
65
|
+
changelog_uri: https://github.com/bjwschaap/vagrant-dummy-communicator/blob/main/CHANGELOG.md
|
66
|
+
documentation_uri: http://rubydoc.info/gems/vagrant-dummy-communicator
|
67
|
+
source_code_uri: https://github.com/bjwschaap/vagrant-dummy-communicator
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '2.0'
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 1.3.6
|
82
|
+
requirements: []
|
83
|
+
rubygems_version: 3.0.3
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: A Vagrant plugin to disable communications with the guest VM
|
87
|
+
test_files: []
|