vagrant-zones 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 (67) 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.yml +70 -0
  7. data/.github/workflows/ruby-lint.yml +35 -0
  8. data/.gitignore +35 -0
  9. data/.rspec +2 -0
  10. data/.rubocop.yml +143 -0
  11. data/CHANGELOG.md +0 -0
  12. data/CODE_OF_CONDUCT.md +128 -0
  13. data/CONTRIBUTING.md +96 -0
  14. data/Gemfile +14 -0
  15. data/LICENSE +651 -0
  16. data/PULL_REQUEST_TEMPLATE.md +39 -0
  17. data/README.md +81 -0
  18. data/RELEASE.md +15 -0
  19. data/Rakefile +32 -0
  20. data/SECURITY.md +19 -0
  21. data/docs/CNAME +1 -0
  22. data/docs/_config.yml +1 -0
  23. data/docs/css/main.css +55 -0
  24. data/docs/css/styles.css +8678 -0
  25. data/docs/index.html +127 -0
  26. data/lib/vagrant-zones/action/create.rb +29 -0
  27. data/lib/vagrant-zones/action/destroy.rb +27 -0
  28. data/lib/vagrant-zones/action/halt.rb +24 -0
  29. data/lib/vagrant-zones/action/import.rb +112 -0
  30. data/lib/vagrant-zones/action/is_created.rb +22 -0
  31. data/lib/vagrant-zones/action/network.rb +26 -0
  32. data/lib/vagrant-zones/action/not_created.rb +20 -0
  33. data/lib/vagrant-zones/action/package.rb +134 -0
  34. data/lib/vagrant-zones/action/prepare_nfs_valid_ids.rb +24 -0
  35. data/lib/vagrant-zones/action/restart.rb +53 -0
  36. data/lib/vagrant-zones/action/setup.rb +26 -0
  37. data/lib/vagrant-zones/action/shutdown.rb +47 -0
  38. data/lib/vagrant-zones/action/start.rb +25 -0
  39. data/lib/vagrant-zones/action/wait_till_boot.rb +59 -0
  40. data/lib/vagrant-zones/action/wait_till_up.rb +65 -0
  41. data/lib/vagrant-zones/action.rb +204 -0
  42. data/lib/vagrant-zones/command/configure_snapshots.rb +49 -0
  43. data/lib/vagrant-zones/command/console.rb +63 -0
  44. data/lib/vagrant-zones/command/create_snapshots.rb +46 -0
  45. data/lib/vagrant-zones/command/delete_snapshots.rb +38 -0
  46. data/lib/vagrant-zones/command/guest_power_controls.rb +58 -0
  47. data/lib/vagrant-zones/command/list_snapshots.rb +44 -0
  48. data/lib/vagrant-zones/command/restart_guest.rb +29 -0
  49. data/lib/vagrant-zones/command/shutdown_guest.rb +29 -0
  50. data/lib/vagrant-zones/command/vnc_console.rb +48 -0
  51. data/lib/vagrant-zones/command/webvnc_console.rb +49 -0
  52. data/lib/vagrant-zones/command/zfssnapshot.rb +67 -0
  53. data/lib/vagrant-zones/command/zlogin_console.rb +40 -0
  54. data/lib/vagrant-zones/command/zone.rb +73 -0
  55. data/lib/vagrant-zones/config.rb +78 -0
  56. data/lib/vagrant-zones/driver.rb +1710 -0
  57. data/lib/vagrant-zones/errors.rb +61 -0
  58. data/lib/vagrant-zones/executor.rb +38 -0
  59. data/lib/vagrant-zones/plugin.rb +79 -0
  60. data/lib/vagrant-zones/provider.rb +83 -0
  61. data/lib/vagrant-zones/util/subprocess.rb +31 -0
  62. data/lib/vagrant-zones/util/timer.rb +19 -0
  63. data/lib/vagrant-zones/version.rb +7 -0
  64. data/lib/vagrant-zones.rb +29 -0
  65. data/locales/en.yml +326 -0
  66. data/vagrant-zones.gemspec +51 -0
  67. metadata +412 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 252e5d0fcf47e65fed4ae27db3a3da4c648353060bd6d428e5d7310184cf14df
4
+ data.tar.gz: cf9c482c6eecbecccaa7cb184558f956580313e2c3601106e55fe1a94892da64
5
+ SHA512:
6
+ metadata.gz: d90805b8ca6ba9392519b810b6c50cbcd340c0a23ce936362898877199441afe54ccce01093620e7f12801aa42c165ad429d013e099826285f193e9098469915
7
+ data.tar.gz: 2e63e6673fe6de2fd30d7e96f75bc949e1d6d4a14ff2e8eccfa0700ff42d623ac6c79ae48190d8934167da698ec4405396d89d441eb4a377433860593b8b3ad1
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: "[BUG]"
5
+ labels: bug
6
+ assignees: MarkProminic
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Additional context**
27
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: MarkProminic
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'bundler'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'daily'
@@ -0,0 +1,72 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "main" ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ "main" ]
20
+ schedule:
21
+ - cron: '16 4 * * 5'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v3
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v2
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+
52
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
+ # queries: security-extended,security-and-quality
54
+
55
+
56
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57
+ # If this step fails, then you should remove it and run the build manually (see below)
58
+ - name: Autobuild
59
+ uses: github/codeql-action/autobuild@v2
60
+
61
+ # ℹ️ Command-line programs to run using the OS shell.
62
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
+
64
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
65
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66
+
67
+ # - run: |
68
+ # echo "Run, Build Application using script"
69
+ # ./location_of_script_within_repo/buildscript.sh
70
+
71
+ - name: Perform CodeQL Analysis
72
+ uses: github/codeql-action/analyze@v2
@@ -0,0 +1,70 @@
1
+ # .github/workflows/release.yml
2
+
3
+ name: Test, Lint, Release and Publish
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ release-please:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: GoogleCloudPlatform/release-please-action@v2
15
+ id: release
16
+ with:
17
+ release-type: ruby
18
+ package-name: vagrant-zones
19
+ bump-minor-pre-major: true
20
+ bump-patch-for-minor-pre-major: true
21
+ version-file: "lib/vagrant-zones/version.rb"
22
+
23
+ # Checkout code if release was created
24
+ - uses: actions/checkout@v2
25
+ if: ${{ steps.release.outputs.release_created }}
26
+
27
+ # Setup ruby if a release was created
28
+ - name: Set up Ruby 2.7
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: 2.7
32
+ if: ${{ steps.release.outputs.release_created }}
33
+
34
+ # Bundle install
35
+ - run: bundle install
36
+ if: ${{ steps.release.outputs.release_created }}
37
+
38
+ # Check if Passing Lint Requirements
39
+ - name: Run Rake tests
40
+ id: tests
41
+ run: bundle exec rake
42
+ if: ${{ steps.release.outputs.release_created }}
43
+
44
+
45
+ # Publish to GPR
46
+ - name: Publish to GPR
47
+ run: |
48
+ mkdir -p $HOME/.gem
49
+ touch $HOME/.gem/credentials
50
+ chmod 0600 $HOME/.gem/credentials
51
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
52
+ gem build *.gemspec
53
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
54
+ env:
55
+ GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
56
+ OWNER: ${{ github.repository_owner }}
57
+ if: steps.tests.outputs.exit_code == 0 && steps.release.outputs.release_created
58
+
59
+ # Publish to Ruby Gems
60
+ - name: Publish to RubyGems
61
+ run: |
62
+ mkdir -p $HOME/.gem
63
+ touch $HOME/.gem/credentials
64
+ chmod 0600 $HOME/.gem/credentials
65
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
66
+ gem build *.gemspec
67
+ gem push *.gem
68
+ env:
69
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
70
+ if: steps.tests.outputs.exit_code == 0 && steps.release.outputs.release_created
@@ -0,0 +1,35 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby-lint
9
+
10
+ on:
11
+ push:
12
+ branches: [ main ]
13
+ pull_request:
14
+ branches: [ main ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ ruby-version: ['2.6', '2.7', '3.0']
23
+
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - name: Set up Ruby
27
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
+ # uses: ruby/setup-ruby@v1
30
+ uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
31
+ with:
32
+ ruby-version: ${{ matrix.ruby-version }}
33
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34
+ - name: Run tests
35
+ run: bundle exec rake
data/.gitignore ADDED
@@ -0,0 +1,35 @@
1
+ .bundle
2
+ vendor
3
+ /vendor/
4
+ bin
5
+ *.lock
6
+ id_rsa
7
+ zone_config
8
+ *.zoneconfig
9
+ _tmp_package
10
+ package.box
11
+ Vagrantfile
12
+ exec
13
+ .vagrant/*
14
+ */.vagrant/*
15
+ example-box/homestead-example/.vagrant
16
+ InstalledFiles
17
+ _yardoc
18
+ coverage
19
+ doc/
20
+ lib/bundler/man
21
+ pkg
22
+ rdoc
23
+ spec/reports
24
+ test/tmp
25
+ test/version_tmp
26
+ tmp
27
+ .config
28
+ .yardoc
29
+ *.box
30
+ /synced_folders
31
+ .venv
32
+ .idea/
33
+ *.iml
34
+ *.rbc
35
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,143 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ Exclude:
4
+ - vendor/**/*
5
+ - bin/**/*
6
+
7
+ Metrics/MethodLength:
8
+ CountComments: false # count full line comments?
9
+ Enabled: false
10
+
11
+ Metrics/ClassLength:
12
+ Enabled: true
13
+ Exclude:
14
+ - lib/vagrant-zones/driver*
15
+
16
+ Naming/MethodName:
17
+ EnforcedStyle: snake_case
18
+
19
+ Naming/FileName:
20
+ Exclude:
21
+ - 'lib/vagrant-zones.rb'
22
+
23
+ Naming/AccessorMethodName:
24
+ Description: Check the naming of accessor methods for get_/set_.
25
+ Enabled: false
26
+
27
+ Style/Encoding:
28
+ Description: 'Use UTF-8 as the source file encoding.'
29
+ Enabled: true
30
+
31
+ Style/HashSyntax:
32
+ Description: >-
33
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
34
+ { :a => 1, :b => 2 }.
35
+ Enabled: false
36
+ EnforcedStyle: hash_rockets
37
+
38
+ Style/LineEndConcatenation:
39
+ Description: 'Use \\ instead of + to concatenate two string literals at line end.'
40
+ Enabled: true
41
+ AutoCorrect: true
42
+
43
+ Layout/LineLength:
44
+ Description: 'Limit lines to 139 characters.'
45
+ Enabled: true
46
+ Max: 139
47
+
48
+ Metrics/CyclomaticComplexity:
49
+ Description: 'Avoid complex methods.'
50
+ Enabled: false
51
+
52
+ Metrics/BlockLength:
53
+ Description: 'Limit Block to 139 Characters'
54
+ Max: 139
55
+
56
+ Metrics/ModuleLength:
57
+ Description: 'Limit Block to 150 Characters'
58
+ Max: 165
59
+
60
+ Metrics/AbcSize:
61
+ Description: >-
62
+ A calculated magnitude based on number of assignments,
63
+ branches, and conditions.
64
+ Reference: 'http://c2.com/cgi/wiki?AbcMetric'
65
+ Enabled: true
66
+ VersionAdded: '0.27'
67
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
68
+ # a Float.
69
+ Max: 90
70
+
71
+ Metrics/PerceivedComplexity:
72
+ Description: >-
73
+ A complexity metric geared towards measuring complexity for a
74
+ human reader.
75
+ Enabled: true
76
+ VersionAdded: '0.25'
77
+ Max: 30
78
+
79
+ Style/RedundantReturn:
80
+ Description: >-
81
+ ensure there are no redudant returns
82
+ Enabled: true
83
+ AutoCorrect: true
84
+
85
+ Style/SpecialGlobalVars:
86
+ Description: >-
87
+ Set Special Global vars
88
+ Enabled: true
89
+ AutoCorrect: true
90
+
91
+ Style/RedundantInterpolation:
92
+ Description: >-
93
+ Check for redudant interpolation
94
+ Enabled: true
95
+ AutoCorrect: true
96
+
97
+ Style/StringConcatenation:
98
+ Description: >-
99
+ Prefer to use String contactenation
100
+ Enabled: true
101
+ AutoCorrect: true
102
+
103
+ Style/IfUnlessModifier:
104
+ Description: >-
105
+ Used to check If/Unless should be used
106
+ Enabled: true
107
+ AutoCorrect: true
108
+
109
+ Layout/EmptyLineAfterGuardClause:
110
+ Description: >-
111
+ Empty line to show where clauses are
112
+ Enabled: true
113
+ AutoCorrect: true
114
+
115
+ Style/CaseLikeIf:
116
+ Description: >-
117
+ If if unles case styling
118
+ Enabled: true
119
+ AutoCorrect: true
120
+
121
+ Layout/CaseIndentation:
122
+ Description: >-
123
+ Enusures cases are Indented properly
124
+ Enabled: true
125
+ AutoCorrect: true
126
+
127
+ Layout/TrailingWhitespace:
128
+ Description: >-
129
+ Enusures cases are Indented properly
130
+ Enabled: true
131
+ AutoCorrect: true
132
+
133
+ Layout/EmptyLinesAroundBlockBody:
134
+ Description: >-
135
+ Enusures cases are Indented properly
136
+ Enabled: true
137
+ AutoCorrect: true
138
+
139
+ Layout/ElseAlignment:
140
+ Description: >-
141
+ Enusures cases are Indented properly
142
+ Enabled: true
143
+ AutoCorrect: true
data/CHANGELOG.md ADDED
File without changes
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ mark.gilbert@prominic.net.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,96 @@
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-zones/blob/master/.rubocop_todo.yml)
31
+ are welcome.
32
+
33
+ ## Travis-CI
34
+
35
+ [Travis](https://travis-ci.org/nsidc/vagrant-zones) 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-zones-$VERSION.gem`
50
+ 4. `vagrant up --provider=zones`
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=zones`
57
+
58
+ This method uses the version of Vagrant specified in
59
+ [`Gemfile`](https://github.com/nsidc/vagrant-zones/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-zones** 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
+ [Better Committing Practices](https://riptutorial.com/git/example/4729/good-commit-messages)
75
+
76
+ ## Releasing
77
+
78
+ 1) Ensure [travis-ci](https://travis-ci.org/github/nsidc/vagrant-zones/) build is passing
79
+ 2) Ensure `CHANGELOG.md` is up-to-date with the changes to release
80
+ 3) Update version in the code, according to [semver](https://semver.org/)
81
+ * [bumpversion](https://github.com/peritus/bumpversion) can be used; if not,
82
+ the version needs to be manually updated in `.bumpversion.cfg`,
83
+ `README.md`, and `lib/zones/version.rb` (e.g., as in
84
+ [`11eced2`](https://github.com/nsidc/vagrant-zones/commit/11eced2))
85
+ 4) `bundle exec rake build`
86
+ * builds the plugin to `pkg/vagrant-zones-$VERSION.gem`
87
+ * install to your system vagrant for further testing with `vagrant plugin
88
+ install ./pkg/vagrant-zones-$VERSION.gem`
89
+ 5) `bundle exec rake release`
90
+ * creates the version tag and pushes it to GitHub
91
+ * pushes the built gem to
92
+ [RubyGems.org](https://rubygems.org/gems/vagrant-zones/)
93
+ 6) Update the [Releases page](https://github.com/nsidc/vagrant-zones/releases)
94
+ * the release name should match the version tag (e.g., `v1.2.3`)
95
+ * the release description can be the same as the `CHANGELOG.md` entry
96
+ * upload the `.gem` from RubyGems.org as an attached binary for the release
data/Gemfile ADDED
@@ -0,0 +1,14 @@
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: 'mitchellh/vagrant', ref: 'v2.2.19'
10
+ end
11
+
12
+ group :plugins do
13
+ gemspec
14
+ end