vagrant-subutai 1.1.5 → 1.1.6
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 +4 -4
- data/CHANGELOG.md +5 -1
- data/build.sh +3 -3
- data/lib/vagrant-subutai/packer/subutai_config.rb +18 -0
- data/lib/vagrant-subutai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dcd1dde2de9a5a1d82686230743ce83bd9a4d41
|
4
|
+
data.tar.gz: 20d0f8c8072d0bd5a18134066092ed1fe3597c62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8447c74b8d66642b3b86974c487808c380b34b86ef981b669463148e5ef2c7763a411271707b4dc5e16a01882cb2e7d9efd3f0973863878de5870a939ed105c6
|
7
|
+
data.tar.gz: 9b714bd82b364da1ce2f46d47a2aed4710700e8f3851e813705e56238741f8c656dfef508e9185e446767e6bf05f20b483541dd26d10d054528b70fe417641b4
|
data/CHANGELOG.md
CHANGED
data/build.sh
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
rm
|
3
|
+
rm *.gem
|
4
4
|
gem build vagrant-subutai.gemspec
|
5
5
|
|
6
6
|
gem uninstall vagrant-subutai
|
7
|
-
gem install ./vagrant-subutai
|
7
|
+
gem install ./vagrant-subutai-*.gem
|
8
8
|
|
9
9
|
vagrant plugin uninstall vagrant-subutai
|
10
|
-
vagrant plugin install ./vagrant-subutai
|
10
|
+
vagrant plugin install ./vagrant-subutai-*.gem
|
@@ -16,6 +16,8 @@ module SubutaiConfig
|
|
16
16
|
CONF_FILE = File.expand_path('./vagrant-subutai.yml').freeze
|
17
17
|
USER_CONF_FILE = File.expand_path('~/.vagrant-subutai/vagrant-subutai.yml').freeze
|
18
18
|
SUBUTAI_ENVIRONMENTS = %i[prod master dev sysnet].freeze
|
19
|
+
SUBUTAI_SCOPES = %i[Public Private].freeze
|
20
|
+
SUBUTAI_ENV_TYPES = %i[bazaar peer].freeze
|
19
21
|
|
20
22
|
# Without a variable key listed here it will not get pulled in from
|
21
23
|
# the environment, or from any of the vagrant-subutai.yml conf files
|
@@ -250,6 +252,18 @@ module SubutaiConfig
|
|
250
252
|
@config.store(key, value)
|
251
253
|
end
|
252
254
|
|
255
|
+
def self.set_env_type(key, value)
|
256
|
+
raise "Invalid #{key} value of #{value}: use bazaar or peer" \
|
257
|
+
unless SUBUTAI_ENV_TYPES.include?(value.downcase)
|
258
|
+
@config.store(key, value.downcase)
|
259
|
+
end
|
260
|
+
|
261
|
+
def self.set_scope(key, value)
|
262
|
+
raise "Invalid #{key} value of #{value}: use public or private" \
|
263
|
+
unless SUBUTAI_SCOPES.include?(value.capitalize)
|
264
|
+
@config.store(key, value.capitalize)
|
265
|
+
end
|
266
|
+
|
253
267
|
def self.load_config_file(config_file)
|
254
268
|
temp = YAML.load_file(config_file)
|
255
269
|
temp.each_key do |key|
|
@@ -258,6 +272,10 @@ module SubutaiConfig
|
|
258
272
|
|
259
273
|
if key.to_sym == :SUBUTAI_ENV
|
260
274
|
set_env(key.to_sym, temp[key].to_sym)
|
275
|
+
elsif key.to_sym == :SUBUTAI_SCOPE
|
276
|
+
set_scope(key.to_sym, temp[key].to_sym)
|
277
|
+
elsif key.to_sym == :SUBUTAI_ENV_TYPE
|
278
|
+
set_env_type(key.to_sym, temp[key].to_sym)
|
261
279
|
elsif !temp[key].nil?
|
262
280
|
# TODO add double checks type
|
263
281
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-subutai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Subutai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|