vagrant-registration 0.0.13 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa760505439d0d6af37fe32571da569e85310ce2
4
- data.tar.gz: f801c7044b6aa979c8301b004eb1b691fc636dde
3
+ metadata.gz: 2af9192f2abd9ec96303436b364f4db50b7ae3ac
4
+ data.tar.gz: 2476fad812480a0c51256376450caaceedd8e8a1
5
5
  SHA512:
6
- metadata.gz: a8e77f4041f6fe2a130c89cdcf5a9c2be4d2771069700bdf659848b9758c7d5efa376aedcbde99f3cdef2dbc25b5af826926463aafc32bbbb9a8dbbd4cd9f823
7
- data.tar.gz: e3d06c84435f876373f9877119431d95b9639419a224e2c6ba9ac07e6952c20917814d437d1c5998d7685669fbb475b0086e2ab24304b4170ff5dae6d004443c
6
+ metadata.gz: 73f30cb1033ccfb9530912e7b5b29f47ab0cd061639d0a8758ea48d9c1cd3605c21eb98a4fbfbc5475a9c2e0e85ee732949e1272348d304114d4078b9c37d015
7
+ data.tar.gz: 4c0de9666ba6a07389f413be0e94648425db63c0b94e77eb2f026468f6c9539eccf495002165c9db3ed643cc3bcb87adcdd5b970ec1c4118149c69dca36badfd
@@ -5,16 +5,18 @@ module VagrantPlugins
5
5
  module Registration
6
6
  class Config < Vagrant.plugin("2", :config)
7
7
  def initialize(region_specific=false)
8
- @conf = OpenStruct.new
8
+ @conf = UNSET_VALUE
9
9
  @logger = Log4r::Logger.new("vagrant_registration::config")
10
10
  end
11
11
 
12
12
  def finalize!
13
+ get_config
13
14
  @conf.skip = false unless @conf.skip
14
15
  @logger.info "Final registration configuration: #{@conf.inspect}"
15
16
  end
16
17
 
17
18
  def method_missing(method_sym, *arguments, &block)
19
+ get_config
18
20
  command = "@conf.#{method_sym} #{adjust_arguments(arguments)}"
19
21
  @logger.info "Evaluating registration configuration: #{command}"
20
22
  eval command
@@ -22,6 +24,12 @@ module VagrantPlugins
22
24
 
23
25
  private
24
26
 
27
+ # Don't set @conf to OpenStruct in initialize
28
+ # to preserve config hierarchy
29
+ def get_config
30
+ @conf = OpenStruct.new if @conf == UNSET_VALUE
31
+ end
32
+
25
33
  def adjust_arguments(args)
26
34
  return '' if args.size < 1
27
35
  args.map{|a| a.is_a?(String) ? "'#{a}'" : a}.join(',')
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Registration
3
- VERSION = "0.0.13"
3
+ VERSION = "0.0.15"
4
4
  end
5
5
  end
@@ -37,19 +37,19 @@ module VagrantPlugins
37
37
  config.auto_attach = true unless config.auto_attach
38
38
 
39
39
  options = []
40
- options << "--username=#{config.username}"
41
- options << "--password=#{config.password}"
42
- options << "--serverurl=#{config.serverurl}" if config.serverurl
43
- options << "--baseurl=#{config.baseurl}" if config.baseurl
44
- options << "--org=#{config.org}" if config.org
45
- options << "--environment=#{config.environment}" if config.environment
46
- options << "--name=#{config.name}" if config.name
40
+ options << "--username='#{config.username}'"
41
+ options << "--password='#{config.password}'"
42
+ options << "--serverurl='#{config.serverurl}'" if config.serverurl
43
+ options << "--baseurl='#{config.baseurl}'" if config.baseurl
44
+ options << "--org='#{config.org}'" if config.org
45
+ options << "--environment='#{config.environment}'" if config.environment
46
+ options << "--name='#{config.name}'" if config.name
47
47
  options << "--auto-attach" if config.auto_attach
48
- options << "--activationkey=#{config.activationkey}" if config.activationkey
49
- options << "--servicelevel=#{config.servicelevel}" if config.servicelevel
50
- options << "--release=#{config.release}" if config.release
48
+ options << "--activationkey='#{config.activationkey}'" if config.activationkey
49
+ options << "--servicelevel='#{config.servicelevel}'" if config.servicelevel
50
+ options << "--release='#{config.release}'" if config.release
51
51
  options << "--force" if config.force
52
- options << "--type=#{config.type}" if config.type
52
+ options << "--type='#{config.type}'" if config.type
53
53
  options.join(' ')
54
54
  end
55
55
  end
@@ -6,15 +6,13 @@ Gem::Specification.new do |s|
6
6
  s.version = VagrantPlugins::Registration::VERSION
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.license = "GPL-2.0"
9
- s.authors = ["Langdon White", "et al"]
10
- s.email = "langdon@fedoraproject.org"
11
- s.summary = "Enables guests to have a registration capability"
12
- s.description = "Enables guests to have a registration capability, this is expecially useful on RHEL or SLES"
13
-
9
+ s.authors = ["Langdon White", "Josef Strzibny", "et al"]
10
+ s.email = ["langdon@fedoraproject.org", "strzibny@strzibny.name"]
11
+ s.summary = "Automatic guest registration for Vagrant"
12
+ s.description = "Enables guests to be registered automatically which is especially useful for RHEL or SLES guests."
13
+ s.homepage = "https://github.com/projectatomic/adb-vagrant-registration"
14
14
  s.required_rubygems_version = ">= 1.3.6"
15
- s.rubyforge_project = "vagrant-registration"
16
15
 
17
- # this gemspec is, and parsing out the ignored files from the gitignore.
18
16
  # Note that the entire gitignore(5) syntax is not supported, specifically
19
17
  # the "!" syntax, but it should mostly work correctly.
20
18
  root_path = File.dirname(__FILE__)
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-registration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Langdon White
8
+ - Josef Strzibny
8
9
  - et al
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2015-05-19 00:00:00.000000000 Z
13
+ date: 2015-06-12 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: yard
@@ -25,9 +26,11 @@ dependencies:
25
26
  - - ">="
26
27
  - !ruby/object:Gem::Version
27
28
  version: '0'
28
- description: Enables guests to have a registration capability, this is expecially
29
- useful on RHEL or SLES
30
- email: langdon@fedoraproject.org
29
+ description: Enables guests to be registered automatically which is especially useful
30
+ for RHEL or SLES guests.
31
+ email:
32
+ - langdon@fedoraproject.org
33
+ - strzibny@strzibny.name
31
34
  executables: []
32
35
  extensions: []
33
36
  extra_rdoc_files: []
@@ -64,7 +67,7 @@ files:
64
67
  - tests/vagrantfiles/Vagrantfile.rhel_multi_machine
65
68
  - tests/vagrantfiles/Vagrantfile.rhel_wrong_credentials
66
69
  - vagrant-registration.gemspec
67
- homepage:
70
+ homepage: https://github.com/projectatomic/adb-vagrant-registration
68
71
  licenses:
69
72
  - GPL-2.0
70
73
  metadata: {}
@@ -83,10 +86,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
86
  - !ruby/object:Gem::Version
84
87
  version: 1.3.6
85
88
  requirements: []
86
- rubyforge_project: vagrant-registration
89
+ rubyforge_project:
87
90
  rubygems_version: 2.2.2
88
91
  signing_key:
89
92
  specification_version: 4
90
- summary: Enables guests to have a registration capability
93
+ summary: Automatic guest registration for Vagrant
91
94
  test_files: []
92
95
  has_rdoc: