vagrant-recreate 0.1.3

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1ca8c2a56d08a4ee85b70f191613acb5c0c8a6d8
4
+ data.tar.gz: e1bc7f2a34552fbe5faf54e868373b1d211015c5
5
+ SHA512:
6
+ metadata.gz: b1ccd4e7ab6eba8f2c509ccf1e0bd1050de86d5d23f4437be61a6e2e10bf908b2d4ffa917ee85ca6558c534740bb8b532d7e370f6d408777565422e955f7741d
7
+ data.tar.gz: fb9e4db0e4321c51c80f49632052f85007664dfdc6828e228aeacfcdd8eb1598275c1574138a83698adc96e946219a1f42ac094fdc3680791c0304d35fa6205e
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /.vagrant
11
+ /Vagrantfile
12
+ /.idea
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in vagrant-recreate.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git'
8
+ end
9
+
10
+ group :plugins do
11
+ gem 'vagrant-recreate', path: '.'
12
+ end
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Vagrant-recreate
2
+
3
+ This plugin adds possibility to re-create your Vagrant environment with single command. It simply invokes `vagrant destroy` and `vagrant up`.
4
+
5
+ ## Installation
6
+
7
+ Like any other vagrant plugin, this can be done by invoking below command:
8
+
9
+ $ vagrant plugin install vagrant-recreate
10
+
11
+ ## Usage
12
+
13
+ Vagrant-recreate supports several options from both: `up` and `destroy` command.
14
+
15
+ * `-f, --force` - Destroy your environment without confirmation;
16
+ * `--[no-]provision` - Enable or disable provision on environment creation;
17
+ * `--provision-with x,y,z` - Enable only certain provisioners, by type or by name;
18
+ * `-h, --help` - print help message.
19
+
20
+ ## Development
21
+
22
+ After checking out the repo, run `bundle install` to install dependencies.
23
+
24
+ For more details on vagrant plugins please refer to official documentation at - [Vagrant plugins](https://www.vagrantup.com/docs/plugins/).
25
+
26
+ ## Contributing
27
+
28
+ Bug reports and pull requests are welcome on GitHub at https://github.com/m1ndful/vagrant-recreate .
29
+
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,44 @@
1
+ require Vagrant.source_root.join('plugins/commands/up/start_mixins')
2
+
3
+ module VagrantPlugins
4
+ module Recreate
5
+
6
+ class Command < Vagrant.plugin('2', :command)
7
+ include VagrantPlugins::CommandUp::StartMixins
8
+
9
+ def self.synopsis
10
+ "destroy and re-create Vagrant environment."
11
+ end
12
+
13
+ def execute
14
+
15
+ options = {}
16
+ options[:force] = false
17
+
18
+ opts = OptionParser.new do |o|
19
+ o.banner = "Usage: vagrant recreate [vm-name]"
20
+ o.separator ""
21
+
22
+ build_start_options(o, options)
23
+
24
+ o.on("-f", "--force", "Recreate without confirmation.") do |f|
25
+ options[:force] = f
26
+ end
27
+ end
28
+
29
+ # Parse the options
30
+ argv = parse_options(opts)
31
+ return if !argv
32
+
33
+ # Validate the provisioners
34
+ validate_provisioner_flags!(options, argv)
35
+
36
+ with_target_vms(argv, reverse: true) do |machine|
37
+ machine.action(:destroy, force_confirm_destroy: options[:force])
38
+ machine.action(:up, options)
39
+ end
40
+ end
41
+
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,15 @@
1
+ module VagrantPlugins
2
+ module Recreate
3
+ class Plugin < Vagrant.plugin('2')
4
+ name "recreate"
5
+ description <<-DESC
6
+ This command automates Vagrant environment re-creation. It simply runs 'vagrant destroy' and 'vagrant up' sequentially on target environment.
7
+ DESC
8
+
9
+ command "recreate" do
10
+ require_relative "command"
11
+ Command
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module VagrantPlugins
2
+ module Recreate
3
+ VERSION = "0.1.3"
4
+ end
5
+ end
@@ -0,0 +1,2 @@
1
+ require 'vagrant-recreate/version'
2
+ require 'vagrant-recreate/plugin'
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vagrant-recreate/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "vagrant-recreate"
8
+ spec.version = VagrantPlugins::Recreate::VERSION
9
+ spec.authors = ["Andrey Semenchenko"]
10
+ spec.email = ["m1ndful@protonmail.com"]
11
+ spec.summary = %q{vagrant plugin that helps re-create environment.}
12
+ spec.description = %q{This plugin automates vagrant environment re-createion by invoking up and destroy commands sequentially.}
13
+ spec.homepage = "https://github.com/m1ndful"
14
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
15
+ f.match(%r{^(test|spec|features)/})
16
+ end
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.12.5"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-recreate
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - Andrey Semenchenko
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-10-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.12.5
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.12.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: This plugin automates vagrant environment re-createion by invoking up
42
+ and destroy commands sequentially.
43
+ email:
44
+ - m1ndful@protonmail.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - README.md
52
+ - Rakefile
53
+ - lib/vagrant-recreate.rb
54
+ - lib/vagrant-recreate/command.rb
55
+ - lib/vagrant-recreate/plugin.rb
56
+ - lib/vagrant-recreate/version.rb
57
+ - vagrant-recreate.gemspec
58
+ homepage: https://github.com/m1ndful
59
+ licenses: []
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.4.8
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: vagrant plugin that helps re-create environment.
81
+ test_files: []