mkbrut 0.5.0 → 0.6.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 +4 -4
- data/lib/mkbrut/version.rb +1 -1
- data/templates/Base/Procfile.development +5 -4
- data/templates/Base/app/src/front_end/css/index.css +0 -1
- data/templates/Base/app/src/front_end/images/apple-touch-icon-120x120.png +0 -0
- data/templates/Base/app/src/front_end/images/apple-touch-icon-152x152.png +0 -0
- data/templates/Base/app/src/front_end/images/apple-touch-icon-167x167.png +0 -0
- data/templates/Base/app/src/front_end/images/apple-touch-icon-180x180.png +0 -0
- data/templates/Base/app/src/front_end/images/favicon.ico +0 -0
- data/templates/Base/app/src/front_end/images/icon.png +0 -0
- data/templates/Base/bin/startup-message +65 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 635f737ab220cbf181b23c3852d8d1683a6b1d0cc2d2cefe496105d3495966e5
|
4
|
+
data.tar.gz: 21ee357eb30e0b5626c43af73d0b438b4dfd9378dcaa908289931b17ac4dcbdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df92f5935742d37a62ff9688ba37c6ea28f4c85aa23933ab64aeb6502bdd57e8f1fb481e28c8841702b05e4d2f13d3d0cae754615b8776279709b5ea0c706307
|
7
|
+
data.tar.gz: 1691f7280eab746527652a60d032119c138e1e241637c1bb74d2062ae09a4af59437dbb4cc237ce1f48aca69772f7de63444e0d9aeb625d37fefe9fe71eb0cb2
|
data/lib/mkbrut/version.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
web:
|
2
|
-
css:
|
3
|
-
js:
|
4
|
-
images:
|
1
|
+
web: PORT=6502 bin/run
|
2
|
+
css: bin/watch-and-build-assets css
|
3
|
+
js: bin/watch-and-build-assets js
|
4
|
+
images: bin/watch-and-build-assets images
|
5
|
+
startup_message: PORT=6502 bin/startup-message
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,65 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "pathname"
|
4
|
+
require "yaml"
|
5
|
+
require "optparse"
|
6
|
+
|
7
|
+
option_parser = OptionParser.new do |opts|
|
8
|
+
opts.banner = "Usage: bin/startup-message\n\n Outputs a message about where the dev server is running\n\nENVIRONMENT VARIABLES\n\n PORT - the port configured for bin/run"
|
9
|
+
end
|
10
|
+
option_parser.parse!
|
11
|
+
|
12
|
+
docker_compose_file = Pathname.new(__FILE__).dirname / ".." / "docker-compose.dx.yml"
|
13
|
+
|
14
|
+
port_config = nil
|
15
|
+
error = nil
|
16
|
+
|
17
|
+
if docker_compose_file.exist?
|
18
|
+
docker_compose = YAML.load_file(docker_compose_file)
|
19
|
+
|
20
|
+
docker_port = begin
|
21
|
+
ENV.fetch("PORT")
|
22
|
+
rescue KeyError
|
23
|
+
$stderr.puts "ERROR: The PORT environment variable is not set."
|
24
|
+
$stderr.puts " Please set it to the port your app is running on."
|
25
|
+
exit 1
|
26
|
+
end
|
27
|
+
|
28
|
+
ports_config = docker_compose.dig("services", "app", "ports")
|
29
|
+
error = nil
|
30
|
+
if ports_config
|
31
|
+
port_config = ports_config.detect { |port_mapping|
|
32
|
+
host_port, container_port = port_mapping.split(":")
|
33
|
+
container_port.to_s == docker_port
|
34
|
+
}
|
35
|
+
if !port_config
|
36
|
+
error = "#{docker_compose_file} does not expose the port #{docker_port} for the 'app' service."
|
37
|
+
end
|
38
|
+
else
|
39
|
+
error = "#{docker_compose_file} does not contain a 'ports' section for the 'app' service."
|
40
|
+
end
|
41
|
+
else
|
42
|
+
error = "#{docker_compose_file} does not exist. This is assumed to be in placefor your dev environment"
|
43
|
+
end
|
44
|
+
if !error
|
45
|
+
sleep 2 # allow all other initial output from bin/dev to happen first
|
46
|
+
|
47
|
+
host_port = port_config.split(":")[0]
|
48
|
+
|
49
|
+
url = "http://localhost:#{host_port}"
|
50
|
+
|
51
|
+
$stdout.puts "Your app is now running at"
|
52
|
+
$stdout.puts
|
53
|
+
$stdout.puts " #{url}"
|
54
|
+
$stdout.puts
|
55
|
+
$stdout.flush # ensure this output happens immediately
|
56
|
+
else
|
57
|
+
$stderr.puts "WARN: #{$0} could not figure out what port the app is exposed on"
|
58
|
+
$stderr.puts
|
59
|
+
$stderr.puts " #{error}"
|
60
|
+
$stderr.puts
|
61
|
+
$stderr.puts " This won't stop your app from running, but it does mean"
|
62
|
+
$stderr.puts " there is some issue with your dev environment"
|
63
|
+
$stderr.flush # ensure this error output happens immediately
|
64
|
+
end
|
65
|
+
sleep
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mkbrut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Copeland
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- templates/Base/bin/run
|
136
136
|
- templates/Base/bin/scaffold
|
137
137
|
- templates/Base/bin/setup
|
138
|
+
- templates/Base/bin/startup-message
|
138
139
|
- templates/Base/bin/test
|
139
140
|
- templates/Base/bin/test-server
|
140
141
|
- templates/Base/bin/watch-and-build-assets
|