mkbrut 0.7.0 → 0.9.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: 1b20c910d831533825bfcf557c48c83a784f88edae4388474e8d57ea679761cf
4
- data.tar.gz: 4cd73cdd32849d7326b9c00dd106ff7cf5261b460ed51f2bf008972a6f99984b
3
+ metadata.gz: dbe2cf6d997397c741d9b27ca86ee986483ee39bf659504c3035d6e61db39305
4
+ data.tar.gz: 39e9e0d7bd3b4fd06ff558eeb2d17c35996976e5d30e354196a2a61a99179351
5
5
  SHA512:
6
- metadata.gz: 66ebd800640401590ba490e0535d0ebffdf98a8da432d77621fabc1cd4334d368720e48478a14a6d482438cb7f07e4e6da6cc268591dcebaf9766c46cdb5d910
7
- data.tar.gz: 9ce26f09d58918526e05d3dd8de1229cb0927c4f2281fba916afc59ad61369aa1ea8ec66c2c860087a86696084d246e89a78c79460a77f412c28318140455783
6
+ metadata.gz: 502e73d098c1c4c8e1dfda3faf1333b70815edf8b1a5b56cc0e4f32ea4730ae6127d58aeaa0ddd6f7b8d355335facedbe0f57b7ae6abb166c2c8cfca1ae8db7f
7
+ data.tar.gz: 0da67c35c1b15c0c039b4cda01fd3e6ed2a446a273e020b208ec4c8eb68a3b42dcb4ec1f3a9216a19d41550f27b3be6d03a9636d683dc571559f3147cdc9c90c
data/lib/mkbrut/app.rb CHANGED
@@ -34,7 +34,7 @@ module MKBrut
34
34
  app_options:,
35
35
  current_dir:,
36
36
  templates_dir:,
37
- )
37
+ ),
38
38
  ]
39
39
  if app_options.demo?
40
40
  @segments << MKBrut::Segments::Demo.new(
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
@@ -109,7 +100,7 @@ module MKBrut
109
100
  options[:app_name] = MKBrut::AppName.new(args.first)
110
101
  options[:app_id] = options[:'app-id']
111
102
  options[:dry_run] = !!options[:'dry-run']
112
- MKBrut::AppOptions.new(**options.merge(versions:))
103
+ MKBrut::AppOptions.new(**options, versions:)
113
104
  end
114
105
 
115
106
  end
@@ -24,7 +24,7 @@ class MKBrut::Segments::Heroku < MKBrut::Base
24
24
  # These are generated by bin/deploy
25
25
  deploy/Dockerfile.*
26
26
  }
27
- )
27
+ ),
28
28
  ]
29
29
  end
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module MKBrut
2
- VERSION = "0.7.0"
2
+ VERSION = "0.9.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
@@ -114,7 +114,7 @@
114
114
  has_interpolations: "Test %{interp} Test",
115
115
  has_pluralizations: {
116
116
  one: "Once!",
117
- other: "More than once!"
117
+ other: "More than once!",
118
118
  },
119
119
  has_pluralizations_and_zero: {
120
120
  zero: "ZERO",
@@ -123,6 +123,6 @@
123
123
  },
124
124
  simple1: "SIMPLE1",
125
125
  simple2: "SIMPLE2",
126
- }
126
+ },
127
127
  },
128
128
  }
@@ -12,7 +12,7 @@
12
12
  pages: { # Page-specific messages - this key is relied-upon by Brut to exist
13
13
  HomePage: {
14
14
  title: "Welcome!",
15
- }
15
+ },
16
16
  },
17
17
  components: { # Component-specific messages - this key is relied-upon by Brut to exist
18
18
  },
@@ -82,7 +82,7 @@ def setup(update_gems:,update_node:)
82
82
  help
83
83
  end
84
84
 
85
- def setup_dot_env_local()
85
+ def setup_dot_env_local
86
86
 
87
87
  dot_env = ROOT_DIR / ".env.development"
88
88
  if !File.exist?(dot_env)
@@ -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
@@ -12,7 +12,7 @@ class FlashComponent < AppComponent
12
12
  "pa-3",
13
13
  "ba",
14
14
  "br-3",
15
- "tc"
15
+ "tc",
16
16
  ]
17
17
  COLORS = [
18
18
  "%{color}-300",
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.7.0
4
+ version: 0.9.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
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.5.0",
9
- "brut-js": "~0.5.0"
10
- }
11
- }