vagrant-mos 0.8.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/CHANGELOG.md +92 -0
- data/Gemfile +12 -0
- data/LICENSE +8 -0
- data/README.md +292 -0
- data/Rakefile +21 -0
- data/Vagrantfile +1 -0
- data/dummy.box +0 -0
- data/example_box/README.md +13 -0
- data/example_box/Vagrantfile +8 -0
- data/example_box/metadata.json +3 -0
- data/lib/vagrant-mos.rb +18 -0
- data/lib/vagrant-mos/action.rb +212 -0
- data/lib/vagrant-mos/action/connect_mos.rb +51 -0
- data/lib/vagrant-mos/action/elb_deregister_instance.rb +24 -0
- data/lib/vagrant-mos/action/elb_register_instance.rb +24 -0
- data/lib/vagrant-mos/action/is_created.rb +18 -0
- data/lib/vagrant-mos/action/is_stopped.rb +19 -0
- data/lib/vagrant-mos/action/message_already_created.rb +16 -0
- data/lib/vagrant-mos/action/message_not_created.rb +16 -0
- data/lib/vagrant-mos/action/message_will_not_destroy.rb +16 -0
- data/lib/vagrant-mos/action/package_instance.rb +192 -0
- data/lib/vagrant-mos/action/read_ssh_info.rb +64 -0
- data/lib/vagrant-mos/action/read_state.rb +46 -0
- data/lib/vagrant-mos/action/run_instance.rb +287 -0
- data/lib/vagrant-mos/action/start_instance.rb +82 -0
- data/lib/vagrant-mos/action/stop_instance.rb +29 -0
- data/lib/vagrant-mos/action/terminate_instance.rb +52 -0
- data/lib/vagrant-mos/action/timed_provision.rb +21 -0
- data/lib/vagrant-mos/action/wait_for_state.rb +41 -0
- data/lib/vagrant-mos/action/warn_networks.rb +19 -0
- data/lib/vagrant-mos/config.rb +405 -0
- data/lib/vagrant-mos/errors.rb +43 -0
- data/lib/vagrant-mos/plugin.rb +73 -0
- data/lib/vagrant-mos/provider.rb +53 -0
- data/lib/vagrant-mos/util/elb.rb +56 -0
- data/lib/vagrant-mos/util/timer.rb +17 -0
- data/lib/vagrant-mos/version.rb +5 -0
- data/locales/en.yml +153 -0
- data/mos.box +0 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/vagrant-mos/config_spec.rb +225 -0
- data/templates/metadata.json.erb +3 -0
- data/templates/vagrant-aws_package_Vagrantfile.erb +5 -0
- data/vagrant-mos.gemspec +60 -0
- metadata +172 -0
data/vagrant-mos.gemspec
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
$:.unshift File.expand_path("../lib", __FILE__)
|
2
|
+
require "vagrant-mos/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "vagrant-mos"
|
6
|
+
s.version = VagrantPlugins::MOS::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.license = "MIT"
|
9
|
+
s.authors = "yangcs2009"
|
10
|
+
s.email = "yangchangsheng@meituan.com"
|
11
|
+
s.homepage = "http://www.vagrantup.com"
|
12
|
+
s.summary = "Enables Vagrant to manage machines in MOS."
|
13
|
+
s.description = "Enables Vagrant to manage machines in MOS."
|
14
|
+
|
15
|
+
s.required_rubygems_version = ">= 1.3.6"
|
16
|
+
s.rubyforge_project = "vagrant-mos"
|
17
|
+
|
18
|
+
s.add_runtime_dependency "fog", "~> 1.22"
|
19
|
+
s.add_runtime_dependency "mos_sdk", ">= 1.0.0"
|
20
|
+
|
21
|
+
s.add_runtime_dependency "crack", "~> 0.4.2"
|
22
|
+
s.add_development_dependency "rake"
|
23
|
+
s.add_development_dependency "rspec", "~> 2.12"
|
24
|
+
s.add_development_dependency "rspec-its"
|
25
|
+
|
26
|
+
# The following block of code determines the files that should be included
|
27
|
+
# in the gem. It does this by reading all the files in the directory where
|
28
|
+
# this gemspec is, and parsing out the ignored files from the gitignore.
|
29
|
+
# Note that the entire gitignore(5) syntax is not supported, specifically
|
30
|
+
# the "!" syntax, but it should mostly work correctly.
|
31
|
+
root_path = File.dirname(__FILE__)
|
32
|
+
all_files = Dir.chdir(root_path) { Dir.glob("**/{*,.*}") }
|
33
|
+
all_files.reject! { |file| [".", ".."].include?(File.basename(file)) }
|
34
|
+
gitignore_path = File.join(root_path, ".gitignore")
|
35
|
+
gitignore = File.readlines(gitignore_path)
|
36
|
+
gitignore.map! { |line| line.chomp.strip }
|
37
|
+
gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
|
38
|
+
|
39
|
+
unignored_files = all_files.reject do |file|
|
40
|
+
# Ignore any directories, the gemspec only cares about files
|
41
|
+
next true if File.directory?(file)
|
42
|
+
|
43
|
+
# Ignore any paths that match anything in the gitignore. We do
|
44
|
+
# two tests here:
|
45
|
+
#
|
46
|
+
# - First, test to see if the entire path matches the gitignore.
|
47
|
+
# - Second, match if the basename does, this makes it so that things
|
48
|
+
# like '.DS_Store' will match sub-directories too (same behavior
|
49
|
+
# as git).
|
50
|
+
#
|
51
|
+
gitignore.any? do |ignore|
|
52
|
+
File.fnmatch(ignore, file, File::FNM_PATHNAME) ||
|
53
|
+
File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
s.files = unignored_files
|
58
|
+
s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
|
59
|
+
s.require_path = 'lib'
|
60
|
+
end
|
metadata
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-mos
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.39
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- yangcs2009
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: fog
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.22'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.22'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mos_sdk
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: crack
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.4.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.4.2
|
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
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.12'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.12'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-its
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Enables Vagrant to manage machines in MOS.
|
98
|
+
email: yangchangsheng@meituan.com
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- .gitignore
|
104
|
+
- CHANGELOG.md
|
105
|
+
- Gemfile
|
106
|
+
- LICENSE
|
107
|
+
- README.md
|
108
|
+
- Rakefile
|
109
|
+
- Vagrantfile
|
110
|
+
- dummy.box
|
111
|
+
- example_box/README.md
|
112
|
+
- example_box/Vagrantfile
|
113
|
+
- example_box/metadata.json
|
114
|
+
- lib/vagrant-mos.rb
|
115
|
+
- lib/vagrant-mos/action.rb
|
116
|
+
- lib/vagrant-mos/action/connect_mos.rb
|
117
|
+
- lib/vagrant-mos/action/elb_deregister_instance.rb
|
118
|
+
- lib/vagrant-mos/action/elb_register_instance.rb
|
119
|
+
- lib/vagrant-mos/action/is_created.rb
|
120
|
+
- lib/vagrant-mos/action/is_stopped.rb
|
121
|
+
- lib/vagrant-mos/action/message_already_created.rb
|
122
|
+
- lib/vagrant-mos/action/message_not_created.rb
|
123
|
+
- lib/vagrant-mos/action/message_will_not_destroy.rb
|
124
|
+
- lib/vagrant-mos/action/package_instance.rb
|
125
|
+
- lib/vagrant-mos/action/read_ssh_info.rb
|
126
|
+
- lib/vagrant-mos/action/read_state.rb
|
127
|
+
- lib/vagrant-mos/action/run_instance.rb
|
128
|
+
- lib/vagrant-mos/action/start_instance.rb
|
129
|
+
- lib/vagrant-mos/action/stop_instance.rb
|
130
|
+
- lib/vagrant-mos/action/terminate_instance.rb
|
131
|
+
- lib/vagrant-mos/action/timed_provision.rb
|
132
|
+
- lib/vagrant-mos/action/wait_for_state.rb
|
133
|
+
- lib/vagrant-mos/action/warn_networks.rb
|
134
|
+
- lib/vagrant-mos/config.rb
|
135
|
+
- lib/vagrant-mos/errors.rb
|
136
|
+
- lib/vagrant-mos/plugin.rb
|
137
|
+
- lib/vagrant-mos/provider.rb
|
138
|
+
- lib/vagrant-mos/util/elb.rb
|
139
|
+
- lib/vagrant-mos/util/timer.rb
|
140
|
+
- lib/vagrant-mos/version.rb
|
141
|
+
- locales/en.yml
|
142
|
+
- mos.box
|
143
|
+
- spec/spec_helper.rb
|
144
|
+
- spec/vagrant-mos/config_spec.rb
|
145
|
+
- templates/metadata.json.erb
|
146
|
+
- templates/vagrant-aws_package_Vagrantfile.erb
|
147
|
+
- vagrant-mos.gemspec
|
148
|
+
homepage: http://www.vagrantup.com
|
149
|
+
licenses:
|
150
|
+
- MIT
|
151
|
+
metadata: {}
|
152
|
+
post_install_message:
|
153
|
+
rdoc_options: []
|
154
|
+
require_paths:
|
155
|
+
- lib
|
156
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - '>='
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 1.3.6
|
166
|
+
requirements: []
|
167
|
+
rubyforge_project: vagrant-mos
|
168
|
+
rubygems_version: 2.4.5
|
169
|
+
signing_key:
|
170
|
+
specification_version: 4
|
171
|
+
summary: Enables Vagrant to manage machines in MOS.
|
172
|
+
test_files: []
|