mkbrut 0.5.0 → 0.7.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/package.json +2 -2
- 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
- data/templates/Base/dx/bash_customizations.local +4 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b20c910d831533825bfcf557c48c83a784f88edae4388474e8d57ea679761cf
|
4
|
+
data.tar.gz: 4cd73cdd32849d7326b9c00dd106ff7cf5261b460ed51f2bf008972a6f99984b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66ebd800640401590ba490e0535d0ebffdf98a8da432d77621fabc1cd4334d368720e48478a14a6d482438cb7f07e4e6da6cc268591dcebaf9766c46cdb5d910
|
7
|
+
data.tar.gz: 9ce26f09d58918526e05d3dd8de1229cb0927c4f2281fba916afc59ad61369aa1ea8ec66c2c860087a86696084d246e89a78c79460a77f412c28318140455783
|
data/lib/mkbrut/version.rb
CHANGED
data/package.json
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
|
@@ -2,3 +2,7 @@
|
|
2
2
|
# This file is not checked into version control, so you
|
3
3
|
# are safe to export EDITOR=vim and avoid any guff from
|
4
4
|
# co-workers.
|
5
|
+
|
6
|
+
# Sets up a multi-line prompt since the working directory
|
7
|
+
# may be very deep. Customize or change at your leisure.
|
8
|
+
PS1='\[\e[35m\]docker-container\[\e[0m\] - \[\e[37m\]\w\n\[\e[0m\]> '
|
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.7.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
|
@@ -203,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
204
|
- !ruby/object:Gem::Version
|
204
205
|
version: '0'
|
205
206
|
requirements: []
|
206
|
-
rubygems_version: 3.
|
207
|
+
rubygems_version: 3.7.1
|
207
208
|
specification_version: 4
|
208
209
|
summary: Create a new Brut App
|
209
210
|
test_files: []
|