mkbrut 0.6.0 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 635f737ab220cbf181b23c3852d8d1683a6b1d0cc2d2cefe496105d3495966e5
4
- data.tar.gz: 21ee357eb30e0b5626c43af73d0b438b4dfd9378dcaa908289931b17ac4dcbdf
3
+ metadata.gz: 570e390eea24269313599e548263d5ba468b8b9048bfd0c7d60db4aa4aee9819
4
+ data.tar.gz: c8d3ac5cecab0a1618ab9f33b098a26d0f7d30c3c492c2d03cacfcfd2e129fc0
5
5
  SHA512:
6
- metadata.gz: df92f5935742d37a62ff9688ba37c6ea28f4c85aa23933ab64aeb6502bdd57e8f1fb481e28c8841702b05e4d2f13d3d0cae754615b8776279709b5ea0c706307
7
- data.tar.gz: 1691f7280eab746527652a60d032119c138e1e241637c1bb74d2062ae09a4af59437dbb4cc237ce1f48aca69772f7de63444e0d9aeb625d37fefe9fe71eb0cb2
6
+ metadata.gz: 4857984702b915260ebbd9649b8d78b479a54bd8c7411b8989d75e7ac67e6649ca9542e3c7eeba7c1523ef51e4259811e472bd1dde9819a8a643e6f054dde786
7
+ data.tar.gz: 588b4ad9eb4209ae16de97ac77154cf9ec085e96548522f42c50df0ddfe7415866b44ee7f9aa9efc2d854bd7d10e9b86d7f65bf0e234435ae48e4033568b8ad4
data/lib/mkbrut/cli.rb CHANGED
@@ -39,15 +39,6 @@ module MKBrut
39
39
  @out.puts
40
40
  @out.puts " BRUT_CLI_RAISE_ON_ERROR - if set to 'true', any error will raise an exception instead of printing to stderr"
41
41
  @out.puts
42
- @out.puts "BRUT VERSIONS"
43
- @out.puts
44
- @out.puts " Your app will be set up to use these versions:"
45
- @out.puts
46
- @out.puts " BrutRB - #{versions.brut_version_specifier}"
47
- @out.puts " BrutJS - #{versions.brut_js_version_specifier}"
48
- @out.puts " BrutCSS - #{versions.brut_css_version_specifier}"
49
- @out.puts
50
-
51
42
  end
52
43
 
53
44
  private
@@ -1,3 +1,3 @@
1
1
  module MKBrut
2
- VERSION = "0.6.0"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -1,16 +1,13 @@
1
1
  require "pathname"
2
2
  require "json"
3
+ require_relative "version"
3
4
 
4
5
  class MKBrut::Versions
5
6
  def initialize
6
- @brut_version = Gem.loaded_specs["brut"].version.to_s
7
- package_json_file = Pathname(Gem::Specification.find_by_name("mkbrut").gem_dir) / "package.json"
8
- package_json = JSON.parse(File.read(package_json_file))
9
- @brut_js_version = package_json["devDependencies"]["brut-js"]
10
- @brut_css_version = package_json["devDependencies"]["brut-css"]
7
+ @brut_version = MKBrut::VERSION
11
8
  end
12
9
 
13
10
  def brut_version_specifier = "~> #{@brut_version}"
14
- def brut_css_version_specifier = @brut_css_version
15
- def brut_js_version_specifier = @brut_js_version
11
+ def brut_css_version_specifier = "~#{@brut_version}"
12
+ def brut_js_version_specifier = "~#{@brut_version}"
16
13
  end
@@ -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\]> '
@@ -34,35 +34,40 @@ setup_local_user_build_args() {
34
34
  log "Docker commands will not work"
35
35
  fi
36
36
  fi
37
- echo user_uid=${user_uid} >> "${SCRIPT_DIR}"/build.args
38
- echo user_gid=${user_gid} >> "${SCRIPT_DIR}"/build.args
39
- echo docker_gid=${docker_gid} >> "${SCRIPT_DIR}"/build.args
37
+ echo user_uid=${user_uid} >> "${SCRIPT_DIR}"/build.args
38
+ echo user_gid=${user_gid} >> "${SCRIPT_DIR}"/build.args
39
+ echo docker_gid=${docker_gid} >> "${SCRIPT_DIR}"/build.args
40
40
  echo sadly_user_must_be_added_to_root=${sadly_user_must_be_added_to_root} >> "${SCRIPT_DIR}"/build.args
41
41
  }
42
42
 
43
+ initialize_build_args() {
44
+ echo "# This is generated - see build.pre" > "${SCRIPT_DIR}"/build.args
45
+ }
46
+
43
47
  setup_playright_build_args() {
44
48
  require_command "grep"
45
49
  require_command "sed"
46
50
 
47
- echo "# This is generated - see build.pre" > "${SCRIPT_DIR}"/build.args
48
51
  if [ ! -e "${SCRIPT_DIR}"/Gemfile.lock ]; then
49
52
  log "Could not find Gemfile.lock, which is needed to determine the playwright-ruby-client version"
50
53
  log "Assuming your app is brand-new, this should be OK"
51
- echo "# When this file was created, there was no Gemfile.lock, so" >> "${SCRIPT_DIR}"/build.args
54
+ echo "# When this file was created, there was no Gemfile.lock, so" >> "${SCRIPT_DIR}"/build.args
52
55
  echo "# it was not possible to determine which version of Playright was set up." >> "${SCRIPT_DIR}"/build.args
53
- echo "# Once you've build your app and installed gems, you are " >> "${SCRIPT_DIR}"/build.args
54
- echo "# encouraged to re-run \`dx/build\` to address this issue." >> "${SCRIPT_DIR}"/build.args
55
- echo PLAYWRIGHT_VERSION=latest >> "${SCRIPT_DIR}"/build.args
56
+ echo "# Once you've build your app and installed gems, you are " >> "${SCRIPT_DIR}"/build.args
57
+ echo "# encouraged to re-run \`dx/build\` to address this issue." >> "${SCRIPT_DIR}"/build.args
58
+ echo PLAYWRIGHT_VERSION=latest >> "${SCRIPT_DIR}"/build.args
56
59
  else
57
60
  PLAYWRIGHT_VERSION=$(grep playwright-ruby-client Gemfile.lock | grep '(' | sed 's/^.*(//' | sed 's/).*$//' | grep -v ^=)
58
61
  if [ -z "${PLAYWRIGHT_VERSION}" ]; then
59
62
  log "Could not find precise version of playwright-ruby-client from Gemfile.lock"
60
63
  log "This means that your playwright-ruby-client version and playwright NPM modules may be out of sync and may not work"
61
- echo "# When this file was created, Gemfile.lock did not contain playwright-ruby-client" >> "${SCRIPT_DIR}"/build.args
62
- echo "# This means it was not possible to determine which version of Playright was set up." >> "${SCRIPT_DIR}"/build.args
63
- echo "# If you aren't using Playwright, that's fine, this won't cause issues" >> "${SCRIPT_DIR}"/build.args
64
+ echo "# When this file was created, Gemfile.lock did not" >> "${SCRIPT_DIR}"/build.args
65
+ echo "# contain playwrith-ruby-client. This means it" >> "${SCRIPT_DIR}"/build.args
66
+ echo "# it was not possible to determine which version of" >> "${SCRIPT_DIR}"/build.args
67
+ echo "# Playright was set up. If you aren't using Playwright," >> "${SCRIPT_DIR}"/build.args
68
+ echo "# that's fine, this won't cause issues" >> "${SCRIPT_DIR}"/build.args
64
69
  echo "# If you ARE using Playwright, something may be wrong with your setup" >> "${SCRIPT_DIR}"/build.args
65
- echo PLAYWRIGHT_VERSION=latest >> "${SCRIPT_DIR}"/build.args
70
+ echo PLAYWRIGHT_VERSION=latest >> "${SCRIPT_DIR}"/build.args
66
71
  else
67
72
  echo PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION} >> "${SCRIPT_DIR}"/build.args
68
73
  fi
@@ -80,6 +85,7 @@ if ! exec_hook_if_exists "build.pre" Dockerfile.dx "${IMAGE}"; then
80
85
  fi
81
86
  BUILD_ARGS=()
82
87
 
88
+ initialize_build_args
83
89
  setup_local_user_build_args
84
90
  setup_playright_build_args
85
91
  read_custom_build_args
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.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Copeland
@@ -9,20 +9,6 @@ bindir: exe
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: brut
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - ">="
17
- - !ruby/object:Gem::Version
18
- version: '0'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- version: '0'
26
12
  - !ruby/object:Gem::Dependency
27
13
  name: rake
28
14
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +66,6 @@ files:
80
66
  - lib/mkbrut/segments/sidekiq.rb
81
67
  - lib/mkbrut/version.rb
82
68
  - lib/mkbrut/versions.rb
83
- - package.json
84
69
  - templates/Base/.dockerignore
85
70
  - templates/Base/.env.development.erb
86
71
  - templates/Base/.env.development.local
@@ -204,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
189
  - !ruby/object:Gem::Version
205
190
  version: '0'
206
191
  requirements: []
207
- rubygems_version: 3.6.9
192
+ rubygems_version: 3.7.1
208
193
  specification_version: 4
209
194
  summary: Create a new Brut App
210
195
  test_files: []
data/package.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "name": "mkbrut",
3
- "version": "1.0.0-irrelevant",
4
- "description": "`mkbrut` is how you go from zero to having a Brut app where you can start working.",
5
- "author": "Irrelevant",
6
- "license": "Irrelevant",
7
- "devDependencies": {
8
- "brut-css": "~0.0.1",
9
- "brut-js": "~0.0.21"
10
- }
11
- }