vagrant-local 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. data/.github/dependabot.yml +6 -0
  5. data/.github/workflows/codeql-analysis.yml +72 -0
  6. data/.github/workflows/lint-release-and-publish-nightly.yml +73 -0
  7. data/.github/workflows/lint-release-and-publish.yml +71 -0
  8. data/.github/workflows/ruby-lint.yml +35 -0
  9. data/.gitignore +35 -0
  10. data/.rspec +2 -0
  11. data/.rubocop.yml +143 -0
  12. data/CHANGELOG.md +32 -0
  13. data/CODE_OF_CONDUCT.md +128 -0
  14. data/CONTRIBUTING.md +97 -0
  15. data/Gemfile +26 -0
  16. data/LICENSE +651 -0
  17. data/PULL_REQUEST_TEMPLATE.md +39 -0
  18. data/README.md +92 -0
  19. data/RELEASE.md +22 -0
  20. data/Rakefile +32 -0
  21. data/SECURITY.md +19 -0
  22. data/ansible.cfg +5 -0
  23. data/docs/CNAME +1 -0
  24. data/docs/_config.yml +1 -0
  25. data/docs/css/main.css +55 -0
  26. data/docs/css/styles.css +8678 -0
  27. data/docs/index.html +125 -0
  28. data/lib/vagrant-local/action/create.rb +27 -0
  29. data/lib/vagrant-local/action/destroy.rb +25 -0
  30. data/lib/vagrant-local/action/halt.rb +24 -0
  31. data/lib/vagrant-local/action/import.rb +27 -0
  32. data/lib/vagrant-local/action/is_created.rb +22 -0
  33. data/lib/vagrant-local/action/network.rb +24 -0
  34. data/lib/vagrant-local/action/network_cleanup.rb +26 -0
  35. data/lib/vagrant-local/action/not_created.rb +20 -0
  36. data/lib/vagrant-local/action/package.rb +135 -0
  37. data/lib/vagrant-local/action/restart.rb +27 -0
  38. data/lib/vagrant-local/action/setup.rb +24 -0
  39. data/lib/vagrant-local/action/shutdown.rb +47 -0
  40. data/lib/vagrant-local/action/start.rb +25 -0
  41. data/lib/vagrant-local/action/wait_till_boot.rb +47 -0
  42. data/lib/vagrant-local/action/wait_till_up.rb +65 -0
  43. data/lib/vagrant-local/action.rb +187 -0
  44. data/lib/vagrant-local/command/guest_power_controls.rb +58 -0
  45. data/lib/vagrant-local/command/local.rb +69 -0
  46. data/lib/vagrant-local/command/restart_guest.rb +29 -0
  47. data/lib/vagrant-local/command/shutdown_guest.rb +29 -0
  48. data/lib/vagrant-local/command/vnc_console.rb +48 -0
  49. data/lib/vagrant-local/command/webvnc_console.rb +49 -0
  50. data/lib/vagrant-local/config.rb +55 -0
  51. data/lib/vagrant-local/driver.rb +208 -0
  52. data/lib/vagrant-local/errors.rb +84 -0
  53. data/lib/vagrant-local/executor.rb +38 -0
  54. data/lib/vagrant-local/plugin.rb +76 -0
  55. data/lib/vagrant-local/provider.rb +83 -0
  56. data/lib/vagrant-local/util/subprocess.rb +31 -0
  57. data/lib/vagrant-local/util/timer.rb +19 -0
  58. data/lib/vagrant-local/version.rb +8 -0
  59. data/lib/vagrant-local.rb +29 -0
  60. data/locales/en.yml +187 -0
  61. data/vagrant-zones.gemspec +37 -0
  62. metadata +191 -0
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,97 @@
1
+ ## Contributing
2
+
3
+ 1. Fork it
4
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
5
+ 3. Commit your RuboCop-compliant and test-passing changes (`git commit -am 'Add
6
+ some feature'`)
7
+ 4. Push to the branch (`git push origin my-new-feature`)
8
+ 5. Create new Pull Request
9
+
10
+ ## Versioning
11
+
12
+ This plugin follows the principles of
13
+ [Semantic Versioning 2.0.0](http://semver.org/).
14
+
15
+ ## Unit Tests
16
+
17
+ Please run the unit tests to verify your changes. To do this simply run `rake`.
18
+ If you want a quick merge, write a spec that fails before your changes are
19
+ applied and that passes after.
20
+
21
+ If you don't have rake installed, first install [bundler](http://bundler.io/)
22
+ and run `bundle install`. Then you can run `bundle exec rake`, even if rake is
23
+ still not installed to your `PATH`.
24
+
25
+ ## RuboCop
26
+
27
+ Please make changes [RuboCop](https://github.com/bbatsov/rubocop)-compliant.
28
+
29
+ Changes that eliminate rules from
30
+ [`.rubocop_todo.yml`](https://github.com/nsidc/vagrant-local/blob/master/.rubocop_todo.yml)
31
+ are welcome.
32
+
33
+ ## Travis-CI
34
+
35
+ [Travis](https://travis-ci.org/nsidc/vagrant-local) will automatically run
36
+ RuboCop and the unit tests when you create a new pull request. If there are any
37
+ failures, a notification will appear on the pull request. To update your pull
38
+ request, simply create a new commit on the branch that fixes the failures, and
39
+ push to the branch.
40
+
41
+ ## Development Without Building the Plugin
42
+
43
+ To test your changes when developing the plugin, you have two main
44
+ options. First, you can build and install the plugin from source every time you
45
+ make a change:
46
+
47
+ 1. Make changes
48
+ 2. `rake build`
49
+ 3. `vagrant plugin install ./pkg/vagrant-local-$VERSION.gem`
50
+ 4. `vagrant up --provider=local`
51
+
52
+ Second, you can use Bundler and the Vagrant gem to execute vagrant commands,
53
+ saving time as you never have to wait for the plugin to build and install:
54
+
55
+ 1. Make changes
56
+ 2. `bundle exec vagrant up --provider=local`
57
+
58
+ This method uses the version of Vagrant specified in
59
+ [`Gemfile`](https://github.com/nsidc/vagrant-local/blob/master/Gemfile). It
60
+ will also cause Bundler and Vagrant to output warnings every time you run
61
+ `bundle exec vagrant`, because `Gemfile` lists **vagrant-local** twice (once
62
+ with `gemspec` and another time in the `group :plugins` block), and Vagrant
63
+ prefers to be run from the official installer rather than through the gem.
64
+
65
+ Despite those warning messages, this is the
66
+ [officially recommended](https://docs.vagrantup.com/v2/plugins/development-basics.html)
67
+ method for Vagrant plugin development.
68
+
69
+ ## Committing
70
+
71
+ The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.
72
+
73
+ * [Conventional Commits](https://github.com/conventional-commits/conventionalcommits.org/blob/master/content/v1.0.0/index.md)
74
+ * [SemVer](https://semver.org/)
75
+ * [Better Committing Practices](https://riptutorial.com/git/example/4729/good-commit-messages)
76
+
77
+ ## Releasing
78
+
79
+ 1) Ensure [travis-ci](https://travis-ci.org/github/nsidc/vagrant-local/) build is passing
80
+ 2) Ensure `CHANGELOG.md` is up-to-date with the changes to release
81
+ 3) Update version in the code, according to [semver](https://semver.org/)
82
+ * [bumpversion](https://github.com/peritus/bumpversion) can be used; if not,
83
+ the version needs to be manually updated in `.bumpversion.cfg`,
84
+ `README.md`, and `lib/local/version.rb` (e.g., as in
85
+ [`11eced2`](https://github.com/nsidc/vagrant-local/commit/11eced2))
86
+ 4) `bundle exec rake build`
87
+ * builds the plugin to `pkg/vagrant-local-$VERSION.gem`
88
+ * install to your system vagrant for further testing with `vagrant plugin
89
+ install ./pkg/vagrant-local-$VERSION.gem`
90
+ 5) `bundle exec rake release`
91
+ * creates the version tag and pushes it to GitHub
92
+ * pushes the built gem to
93
+ [RubyGems.org](https://rubygems.org/gems/vagrant-local/)
94
+ 6) Update the [Releases page](https://github.com/nsidc/vagrant-local/releases)
95
+ * the release name should match the version tag (e.g., `v1.2.3`)
96
+ * the release description can be the same as the `CHANGELOG.md` entry
97
+ * upload the `.gem` from RubyGems.org as an attached binary for the release
data/Gemfile ADDED
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ group :development do
6
+ # We depend on Vagrant for development, but we don't add it as a
7
+ # gem dependency because we expect to be installed within the
8
+ # Vagrant environment itself using `vagrant plugin`.
9
+ gem 'vagrant', github: 'hashicorp/vagrant', ref: 'v2.2.19'
10
+ end
11
+
12
+ group :plugins do
13
+ gemspec
14
+ gem 'bundler', '~> 2.2', '>= 2.2.3'
15
+ gem 'byebug'
16
+ gem 'code-scanning-rubocop', '~> 0.5', '>= 0.5.0'
17
+ gem 'rake', '~> 13.0', '>= 13.0.6'
18
+ gem 'rspec', '~> 3.4'
19
+ gem 'rspec-core', '~> 3.4'
20
+ gem 'rspec-expectations', '~> 3.10', '>= 3.10.0'
21
+ gem 'rspec-mocks', '~> 3.10', '>= 3.10.0'
22
+ gem 'rubocop', '~> 1.0'
23
+ gem 'rubocop-rake', '~> 0.6', '>= 0.6.0'
24
+ gem 'rubocop-rspec', '~> 2.4', '>= 2.4.0'
25
+ gem 'ruby-progressbar', '~> 1.11', '>= 1.11.0'
26
+ end