vagrant-solidus 0.0.2 → 0.1.0
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 +8 -8
- data/README.md +1 -1
- data/lib/vagrant-solidus/provisioner.rb +4 -2
- data/lib/vagrant-solidus/site_helpers.rb +9 -7
- data/lib/vagrant-solidus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ZWZhZTFkNWJmNGMxY2ZmZGIxNmJlYTY1MzljMDY0NjY2MWU1N2M0NA==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MWM5Y2Y4NGY3ZDRkZjg5NGRiNjA4NTg3OWFmNzlkMjU5YmJiOGE3Yg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NTczZjRlYmEzMDMwNjEyMjFlNjhiMTU0MTQ2ZTkwNzI5NDg4NTRhMjk5NjFi
|
|
10
|
+
MzMyZWNhNTc3ZDM3N2ZhZmNmMTgxMmViNWRlZjNiN2UxODUzNzkxY2M5NDMz
|
|
11
|
+
NmY2ZDQwYjRlZjhmYWYwMjk2NDVkNjNmN2UwMGZmYjE1NTg1MGE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZmY2YzhiOTI0NjE0MDM0Y2I5MmNiOTMwMzhmY2M1MzQ0ZGU5NTNmZGVkYzll
|
|
14
|
+
ZTgyYzE1NzlkYmMxNmI5OTQ1ZWE2MGMxY2QwZjE0OWI2OWQ0OTVkMDYxNWQ2
|
|
15
|
+
MTc2MDY4ZjNlNTJlODk2Nzg2NmU2YzAwOWY3YmY3M2JmZjQ4YTk=
|
data/README.md
CHANGED
|
@@ -188,7 +188,7 @@ $ vagrant up
|
|
|
188
188
|
[vagrant]: http://www.vagrantup.com
|
|
189
189
|
[vagrantfile]: https://docs.vagrantup.com/v2/vagrantfile/
|
|
190
190
|
[vagrant-provider]: http://docs.vagrantup.com/v2/providers
|
|
191
|
-
[vagrant-install]: http://www.vagrantup.com/
|
|
191
|
+
[vagrant-install]: http://www.vagrantup.com/download-archive/v1.5.4.html
|
|
192
192
|
[vagrant-synced-folders]: http://docs.vagrantup.com/v2/synced-folders/index.html
|
|
193
193
|
[vagrant-networking]: http://docs.vagrantup.com/v2/networking/index.html
|
|
194
194
|
[vagrant-provisioning]: http://docs.vagrantup.com/v2/provisioning/index.html
|
|
@@ -9,8 +9,10 @@ module VagrantPlugins
|
|
|
9
9
|
port = VagrantPlugins::Solidus::SiteHelpers::BASE_PORT + i
|
|
10
10
|
root_config.vm.network :forwarded_port, guest: port, host: port
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
2.times do |j|
|
|
13
|
+
port = VagrantPlugins::Solidus::SiteHelpers::BASE_UTILS_PORT + (2 * i) + j
|
|
14
|
+
root_config.vm.network :forwarded_port, guest: port, host: port
|
|
15
|
+
end
|
|
14
16
|
end
|
|
15
17
|
end
|
|
16
18
|
|
|
@@ -2,7 +2,7 @@ module VagrantPlugins
|
|
|
2
2
|
module Solidus
|
|
3
3
|
module SiteHelpers
|
|
4
4
|
BASE_PORT = 8081
|
|
5
|
-
|
|
5
|
+
BASE_UTILS_PORT = 35730
|
|
6
6
|
SITE_TEMPLATE_GIT_URL = "https://github.com/solidusjs/solidus-site-template.git"
|
|
7
7
|
SITE_STATUS_WATCHER_POLLING_FREQUENCY = 1
|
|
8
8
|
PROVISION_ID = 20140502
|
|
@@ -73,14 +73,16 @@ module VagrantPlugins
|
|
|
73
73
|
if config = sites[@site_name]
|
|
74
74
|
@site_port = config['port']
|
|
75
75
|
@site_livereload_port = config['livereload-port']
|
|
76
|
+
@site_log_server_port = config['log-server-port']
|
|
76
77
|
end
|
|
77
78
|
|
|
78
|
-
@site_port ||= find_next_available_port(
|
|
79
|
-
@site_livereload_port ||= find_next_available_port(
|
|
79
|
+
@site_port ||= find_next_available_port(BASE_PORT)
|
|
80
|
+
@site_livereload_port ||= find_next_available_port(BASE_UTILS_PORT)
|
|
81
|
+
@site_log_server_port ||= find_next_available_port(BASE_UTILS_PORT)
|
|
80
82
|
end
|
|
81
83
|
|
|
82
|
-
def find_next_available_port(
|
|
83
|
-
ports = sites.values.map
|
|
84
|
+
def find_next_available_port(port)
|
|
85
|
+
ports = sites.values.map(&:values).flatten + [@site_port, @site_livereload_port, @site_log_server_port].compact
|
|
84
86
|
loop do
|
|
85
87
|
return port unless ports.index(port)
|
|
86
88
|
port += 1
|
|
@@ -94,7 +96,7 @@ module VagrantPlugins
|
|
|
94
96
|
end
|
|
95
97
|
|
|
96
98
|
def save_site
|
|
97
|
-
config = {'port' => @site_port, 'livereload-port' => @site_livereload_port}
|
|
99
|
+
config = {'port' => @site_port, 'livereload-port' => @site_livereload_port, 'log-server-port' => @site_log_server_port}
|
|
98
100
|
File.open(SITES_CONFIGS_FILE_HOST_PATH, 'w') do |file|
|
|
99
101
|
file.write(JSON.pretty_generate(sites.merge(@site_name => config)))
|
|
100
102
|
end
|
|
@@ -153,7 +155,7 @@ module VagrantPlugins
|
|
|
153
155
|
#########################################################################
|
|
154
156
|
|
|
155
157
|
def install_site_service
|
|
156
|
-
conf = "exec su - vagrant -c 'cd #{@site_guest_path} && grunt dev -port #{@site_port} -livereloadport #{@site_livereload_port} >> #{@site_log_file_guest_path} 2>&1'"
|
|
158
|
+
conf = "exec su - vagrant -c 'cd #{@site_guest_path} && grunt dev -port #{@site_port} -livereloadport #{@site_livereload_port} -logserverport #{@site_log_server_port} -loglevel 3 >> #{@site_log_file_guest_path} 2>&1'"
|
|
157
159
|
guest_exec(:log_on_error, "echo \"#{conf}\" > /etc/init/#{site_service_name}.conf", sudo: true)
|
|
158
160
|
end
|
|
159
161
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant-solidus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joannic Laborde
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-08-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|