vagrant-vmware-appcatalyst 1.0.3 → 1.1.0

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: 9ac73e1198470d2c1f15669ed6feefdc74bfb4d3
4
- data.tar.gz: 4857c6474445f588daf719aa8c9e5f09dead9c27
3
+ metadata.gz: d512e327deda40be3cc09299e5a5ceab80e01eb3
4
+ data.tar.gz: 6555b7d9a7239d1122c2b3dd4719d2e654f0e1a7
5
5
  SHA512:
6
- metadata.gz: 6e2ec3c215846e860da01bc631dc144cd84ebcd33d34f53c92a5c4b1dee298b5dc446925116ca7d1c30163e7e36bbac6ecaf6417e8d289e5adfeff63075af839
7
- data.tar.gz: 6e210113312d745143ede56ec30b5b2c843d2984c0b56afb2e8cc08cd0367c270189131abe3ea1d43db4d773c5b7d7c4d63d7d3576b6b21a08c279885b8e673e
6
+ metadata.gz: bffc37b6d4762f27be2af8425a2fc3f6b7d4d8af32960191755dcef9f040feae080cfc755e7afb97b7b92401fea09a7a448de8d6cb96c447e4eb2abe4c9d0a54
7
+ data.tar.gz: fe1e0026fb359954ec6495248347fbc2789a04765273a98b5886073da7cd8e6beab0f5c365b0a1cea0e22822650e76483458c907cb931055dcf402a2c4176596
data/Gemfile CHANGED
@@ -1,7 +1,11 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ group :plugins do
6
+ gem 'vagrant-vmware-appcatalyst' , path: '.'
7
+ end
8
+
5
9
  group :development do
6
- gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git'
10
+ gem 'vagrant', :git => 'https://github.com/mitchellh/vagrant.git'
7
11
  end
data/README.md CHANGED
@@ -14,6 +14,9 @@ Vagrant will download all the required gems during the installation process.
14
14
 
15
15
  After the install has completed a ```vagrant up --provider=vmware_appcatalyst``` will trigger the newly installed provider.
16
16
 
17
+ *Note: The AppCatalyst Daemon must be running before bringing up a new vagrant box:*
18
+ ```appcatalyst-daemon start```
19
+
17
20
  Upgrade
18
21
  -------------
19
22
 
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'rspec/core/rake_task'
4
+
5
+ Bundler::GemHelper.install_tasks
6
+ # RSpec::Core::RakeTask.new
7
+ # task :default => "spec"
@@ -79,13 +79,17 @@ module VagrantPlugins
79
79
 
80
80
  def self.action_suspend
81
81
  Vagrant::Action::Builder.new.tap do |b|
82
- b.use MessageNotSupported
82
+ b.use ConfigValidate
83
+ b.use ConnectAppCatalyst
84
+ b.use Suspend
83
85
  end
84
86
  end
85
87
 
86
88
  def self.action_resume
87
89
  Vagrant::Action::Builder.new.tap do |b|
88
- b.use MessageNotSupported
90
+ b.use ConfigValidate
91
+ b.use ConnectAppCatalyst
92
+ b.use Resume
89
93
  end
90
94
  end
91
95
 
@@ -226,6 +230,10 @@ module VagrantPlugins
226
230
  action_root.join('is_created')
227
231
  autoload :IsRunning,
228
232
  action_root.join('is_running')
233
+ autoload :Suspend,
234
+ action_root.join('suspend')
235
+ autoload :Resume,
236
+ action_root.join('resume')
229
237
  autoload :MessageAlreadyRunning,
230
238
  action_root.join('message_already_running')
231
239
  autoload :MessageNotRunning,
@@ -44,8 +44,8 @@ module VagrantPlugins
44
44
  @logger.info("VM [#{vm_name}] is running")
45
45
  return :running
46
46
  when 'powering off'
47
- @logger.info("VM [#{vm_name}] is stopped")
48
- return :stopped
47
+ @logger.info("VM [#{vm_name}] is stopping")
48
+ return :stopping
49
49
  when 'powered off'
50
50
  @logger.info("VM [#{vm_name}] is stopped")
51
51
  return :stopped
@@ -54,13 +54,13 @@ module VagrantPlugins
54
54
  return :suspended
55
55
  when 'suspending'
56
56
  @logger.info("VM [#{vm_name}] is suspended")
57
- return :suspended
57
+ return :suspending
58
58
  when 'tools_running'
59
59
  @logger.info("VM [#{vm_name}] is running")
60
60
  return :running
61
61
  when 'blocked on msg'
62
62
  @logger.info("VM [#{vm_name}] is stopped")
63
- return :stopped
63
+ return :blocked
64
64
  else
65
65
  @logger.info("VM [#{vm_name}] is in an unknown state")
66
66
  return :unknown
@@ -21,8 +21,15 @@ module VagrantPlugins
21
21
  end
22
22
 
23
23
  def call(env)
24
- env[:appcatalyst_cnx].set_vm_power(env[:machine].id, 'resume')
24
+ current_state = env[:machine].state.id
25
25
 
26
+ if current_state == :paused
27
+ env[:ui].info I18n.t('vagrant.actions.vm.resume.unpausing')
28
+ env[:appcatalyst_cnx].set_vm_power(env[:machine].id, 'unpause')
29
+ elsif current_state == :suspended
30
+ env[:ui].info I18n.t('vagrant.actions.vm.resume.resuming')
31
+ env[:appcatalyst_cnx].set_vm_power(env[:machine].id, 'on')
32
+ end
26
33
  @app.call(env)
27
34
  end
28
35
  end
@@ -21,7 +21,10 @@ module VagrantPlugins
21
21
  end
22
22
 
23
23
  def call(env)
24
- env[:appcatalyst_cnx].set_vm_power(env[:machine].id, 'suspend')
24
+ if env[:machine].state.id == :running
25
+ env[:ui].info I18n.t('vagrant.actions.vm.suspend.suspending')
26
+ env[:appcatalyst_cnx].set_vm_power(env[:machine].id, 'suspend')
27
+ end
25
28
 
26
29
  @app.call(env)
27
30
  end
@@ -34,7 +34,14 @@ module VagrantPlugins
34
34
  mount_gid_old = "`id -g #{options[:group]}`"
35
35
  end
36
36
 
37
- # First mount command uses getent to get the group
37
+ # First mount command uses vmhgfs FUSE which is the preferred mount
38
+ # style.
39
+ mount_options = "-o allow_other,uid=#{mount_uid},gid=#{mount_gid}"
40
+ mount_options += ",#{options[:mount_options].join(",")}" if options[:mount_options]
41
+ mount_commands << "/usr/bin/vmhgfs-fuse #{mount_options} .host:/#{name} #{expanded_guest_path}"
42
+
43
+ # second mount command fallsback to the kernel vmhgfs module and uses
44
+ # getent to get the group.
38
45
  mount_options = "-o uid=#{mount_uid},gid=#{mount_gid}"
39
46
  mount_options += ",#{options[:mount_options].join(",")}" if options[:mount_options]
40
47
  mount_commands << "mount -t vmhgfs #{mount_options} .host:/#{name} #{expanded_guest_path}"
@@ -47,6 +54,9 @@ module VagrantPlugins
47
54
  # Create the guest path if it doesn't exist
48
55
  machine.communicate.sudo("mkdir -p #{expanded_guest_path}")
49
56
 
57
+ # Get rid of the default /mnt/hgfs mount point
58
+ machine.communicate.sudo('umount /mnt/hgfs')
59
+
50
60
  # Attempt to mount the folder. We retry here a few times because
51
61
  # it can fail early on.
52
62
  attempts = 0
@@ -40,7 +40,7 @@ module VagrantPlugins
40
40
 
41
41
  # Translate into short/long descriptions
42
42
  short = state_id.to_s.gsub("_", " ")
43
- long = I18n.t("vagrant.commands.status.#{state_id}")
43
+ long = I18n.t("vagrant_appcatalyst.commands.status.#{state_id}")
44
44
 
45
45
  # If we're not created, then specify the special ID flag
46
46
  if state_id == :not_created
@@ -13,6 +13,6 @@
13
13
 
14
14
  module VagrantPlugins
15
15
  module AppCatalyst
16
- VERSION = '1.0.3'
16
+ VERSION = '1.1.0'
17
17
  end
18
18
  end
data/locales/en.yml CHANGED
@@ -11,6 +11,43 @@
11
11
  # the License.
12
12
  en:
13
13
  vagrant_appcatalyst:
14
+ commands:
15
+ status:
16
+ stopped: |-
17
+ The VM is powered off. To restart the VM, simply run `vagrant up`
18
+ stopping: |-
19
+ The VM is stopping.
20
+ not_created: |-
21
+ The environment has not yet been created. Run `vagrant up` to
22
+ create the environment. If a machine is not created, only the
23
+ default provider will be shown. So if a provider is not listed,
24
+ then the machine is not created for that environment.
25
+ running: |-
26
+ The VM is running. To stop this VM, you can run `vagrant halt` to
27
+ shut it down forcefully, or you can run `vagrant suspend` to simply
28
+ suspend the virtual machine. In either case, to restart it again,
29
+ simply run `vagrant up`.
30
+ suspending: |-
31
+ The VM is currently saving its state. In a few moments this state
32
+ should transition to "suspended." Please run `vagrant status` again
33
+ in a few seconds.
34
+ suspended: |-
35
+ To resume this VM, simply run `vagrant resume` or `vagrant up`.
36
+ output: |-
37
+ Current machine states:
38
+
39
+ %{states}
40
+
41
+ %{message}
42
+ blocked: |-
43
+ The VM is "blocked" This is a very rare state which means that
44
+ AppCatalyst is unable to start the VM as the VMX requires manual
45
+ intervention. The only known solution to this problem is to destroy
46
+ your machine, sorry.
47
+ listing: |-
48
+ This environment represents multiple VMs. The VMs are all listed
49
+ above with their current state. For more information about a specific
50
+ VM, run `vagrant status NAME`.
14
51
  vm:
15
52
  cloning: |-
16
53
  Cloning VM, this might take a while...
@@ -33,6 +33,9 @@ Gem::Specification.new do |s|
33
33
  s.add_development_dependency 'rspec-expectations', '~> 2.14'
34
34
  s.add_development_dependency 'rspec-mocks', '~> 2.14'
35
35
 
36
+ s.add_development_dependency 'bundler', '~> 1.3'
37
+ s.add_development_dependency 'rake'
38
+
36
39
  s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
37
40
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
38
41
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,99 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-vmware-appcatalyst
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rapposelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-06 00:00:00.000000000 Z
11
+ date: 2015-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: log4r
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: httpclient
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.6'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-core
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.14'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.14'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-expectations
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.14'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.14'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec-mocks
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '2.14'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '2.14'
97
+ - !ruby/object:Gem::Dependency
98
+ name: bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.3'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.3'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
97
125
  description: Enables Vagrant to manage machines with VMware AppCatalyst®.
98
126
  email:
99
127
  - fabio@vmware.com
@@ -101,11 +129,12 @@ executables: []
101
129
  extensions: []
102
130
  extra_rdoc_files: []
103
131
  files:
104
- - .gitignore
105
- - .rubocop.yml
132
+ - ".gitignore"
133
+ - ".rubocop.yml"
106
134
  - Gemfile
107
135
  - LICENSE
108
136
  - README.md
137
+ - Rakefile
109
138
  - lib/vagrant-vmware-appcatalyst.rb
110
139
  - lib/vagrant-vmware-appcatalyst/action.rb
111
140
  - lib/vagrant-vmware-appcatalyst/action/connect_appcatalyst.rb
@@ -148,17 +177,17 @@ require_paths:
148
177
  - lib
149
178
  required_ruby_version: !ruby/object:Gem::Requirement
150
179
  requirements:
151
- - - '>='
180
+ - - ">="
152
181
  - !ruby/object:Gem::Version
153
182
  version: '0'
154
183
  required_rubygems_version: !ruby/object:Gem::Requirement
155
184
  requirements:
156
- - - '>='
185
+ - - ">="
157
186
  - !ruby/object:Gem::Version
158
187
  version: '0'
159
188
  requirements: []
160
189
  rubyforge_project:
161
- rubygems_version: 2.0.14
190
+ rubygems_version: 2.2.3
162
191
  signing_key:
163
192
  specification_version: 4
164
193
  summary: VMware AppCatalyst® provider