lbhrr 2.33.0 → 2.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/exe/lbhrr +60 -55
  3. data/lib/lbhrr/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a5a72e033c32aae92732521d690ca1bb95db44ffbea53d9be161f183e83b2bd
4
- data.tar.gz: d063d071b65b6a56d29774185d5a3f975cecd7d491e90344d3adf8e5c8fc2286
3
+ metadata.gz: 8afaaf726661bf972573ef79a48ad65865766f5a2a6424de544eb59333a5b4c8
4
+ data.tar.gz: f16f2426490ad0cd5d421a8c52e39895f122e57639e8b8482f03d1aeef36d546
5
5
  SHA512:
6
- metadata.gz: a4b0ec574e5d44c09db1ed6b91ea3267bf22a8d4dc382692f9984e53b63a095f216c2ec8c99be737299cc4e84a9791298d57af1e5d1f2c845b814e703e237ea1
7
- data.tar.gz: d174498ec46033204e0685b279b1e801b1812c3db81999d8bb732256caad47399b491abb7f3aa5d3408f30eaa3060b5767686beacd0728971b4d970d90e4eb9d
6
+ metadata.gz: 853ce291d84ddb4b3c1f772ce577375e66fcb5039343423c2a6983b81d752f5e011af67d48fcd8d69ad8da7a93870d6c7d01e2bac95e9d3ebb9ba90d6e7f3ddb
7
+ data.tar.gz: 26608ee6937224dff5b988c63ef45f2cedef97515b7453cd2aa31f721c28ecaf19ea9f5429fa6748826e68d2fab6d5e1c190efe6639210105478e44f94cf2faf
data/exe/lbhrr CHANGED
@@ -298,9 +298,63 @@ class LbhrrCLI < Thor
298
298
  end
299
299
  end
300
300
 
301
+
301
302
 
303
+ end
304
+
305
+
306
+ desc "assemble", "Build an application using the configuration from config/manifest.yml into a ruby gem"
307
+ def assemble(env = "next", version = nil)
308
+ config = load_configuration
309
+ name = config["name"]
310
+ image = config["image"]
311
+
312
+ containerize
313
+
314
+ # Check if we're in the root directory
315
+ if manifest?
316
+ # Create the build directory if it doesn't exist
317
+ if Dir.exist?("build")
318
+ FileUtils.rm_r("build")
319
+ end
320
+
321
+ FileUtils.mkdir_p("build/src")
322
+
323
+ # Copy all files and folders to the build directory
324
+ Dir.glob("*").each do |item|
325
+ next if item == "build" # Skip the build directory itself
326
+ next if item == ".git" # Skip the .git directory
327
+ next if item == "tmp" # Skip the config directory
328
+
329
+ FileUtils.cp_r(item, "build/src/#{item}")
330
+ end
302
331
 
332
+ # Parameters for gemspec
333
+ gem_name = config["name"]
334
+ gem_version = version.nil? ? config["version"] : version
335
+
336
+ # Ensure the build directory exists
337
+ FileUtils.mkdir_p("build/lib")
338
+
339
+ # Define the template files and their target locations
340
+ template_dir = File.expand_path(File.join(File.dirname(__FILE__), "../", "templates"))
341
+
342
+ templates = {
343
+ "#{template_dir}/lib/panamax.rb.erb" => "build/lib/#{gem_name}.rb",
344
+ "#{template_dir}/lib/rubygems_plugin.rb.erb" => "build/lib/rubygems_plugin.rb",
345
+ "#{template_dir}/panamax.gemspec.erb" => "build/#{gem_name}.gemspec"
346
+ }
303
347
 
348
+ # Process each template
349
+ templates.each do |template, target|
350
+ process_template(template, target, binding)
351
+ end
352
+
353
+ `cd build && gem build #{gem_name}.gemspec`
354
+ notify_terminal("Assembled #{name}", "Lbhhr")
355
+ else
356
+ puts "config/manifest file not found. Please ensure you are in the root directory of your project."
357
+ end
304
358
  end
305
359
 
306
360
 
@@ -351,6 +405,12 @@ class LbhrrCLI < Thor
351
405
  method_option :patch, type: :boolean, aliases: "-pa", desc: "Increment minor version"
352
406
  def hoist(name = nil)
353
407
  with_error_handling do
408
+
409
+ #clean up the build directory
410
+ if Dir.exist?("build")
411
+ FileUtils.rm_r("build")
412
+ end
413
+
354
414
  config = load_configuration
355
415
 
356
416
  msg =nil
@@ -432,61 +492,6 @@ class LbhrrCLI < Thor
432
492
  end
433
493
  end
434
494
 
435
- desc "assemble", "Build an application using the configuration from config/manifest.yml into a ruby gem"
436
- def assemble(env = "next", version = nil)
437
- config = load_configuration
438
- name = config["name"]
439
- image = config["image"]
440
-
441
- containerize
442
-
443
- # Check if we're in the root directory
444
- if manifest?
445
- # Create the build directory if it doesn't exist
446
- if Dir.exist?("build")
447
- FileUtils.rm_r("build")
448
- end
449
-
450
- FileUtils.mkdir_p("build/src")
451
-
452
- # Copy all files and folders to the build directory
453
- Dir.glob("*").each do |item|
454
- next if item == "build" # Skip the build directory itself
455
- next if item == ".git" # Skip the .git directory
456
- next if item == "tmp" # Skip the config directory
457
-
458
- FileUtils.cp_r(item, "build/src/#{item}")
459
- end
460
-
461
- # Parameters for gemspec
462
- gem_name = config["name"]
463
- gem_version = version.nil? ? config["version"] : version
464
-
465
- # Ensure the build directory exists
466
- FileUtils.mkdir_p("build/lib")
467
-
468
- # Define the template files and their target locations
469
- template_dir = File.expand_path(File.join(File.dirname(__FILE__), "../", "templates"))
470
-
471
- templates = {
472
- "#{template_dir}/lib/panamax.rb.erb" => "build/lib/#{gem_name}.rb",
473
- "#{template_dir}/lib/rubygems_plugin.rb.erb" => "build/lib/rubygems_plugin.rb",
474
- "#{template_dir}/panamax.gemspec.erb" => "build/#{gem_name}.gemspec"
475
- }
476
-
477
- # Process each template
478
- templates.each do |template, target|
479
- process_template(template, target, binding)
480
- end
481
-
482
- `cd build && gem build #{gem_name}.gemspec`
483
- notify_terminal("Assembled #{name}", "Lbhhr")
484
- else
485
- puts "config/manifest file not found. Please ensure you are in the root directory of your project."
486
- end
487
- end
488
-
489
-
490
495
  desc "version", "Display the version of Lbhrr"
491
496
  def version
492
497
  with_error_handling do
data/lib/lbhrr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lbhrr
4
- VERSION = "2.33.0"
4
+ VERSION = "2.34.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lbhrr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.33.0
4
+ version: 2.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-27 00:00:00.000000000 Z
11
+ date: 2024-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh