lbhrr 2.36.0 → 2.37.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: beca5e85f59edc73f2961d757298f923cca445aeba9d285d40d12e145bdbd5c2
4
- data.tar.gz: f9472aee7667f0837a61b822867d16b6e5271966c1ca0fa9ed50f12b77c59a99
3
+ metadata.gz: 4eef3c61a2c26b9ed21dbcb220b7bad89e1a6ff319e73eb4a788dd7fdc644b7e
4
+ data.tar.gz: d5c893175d7195e35fd23b71344d34bebe3aa843299efb534f40f6d67ee8f70d
5
5
  SHA512:
6
- metadata.gz: 34d44da532f7c15df6b0b5aabc8a8d59d597b170176d3091cd70aadb622762e51aca53a6890a1d98d827a762d9b0aae1be10f52fa52201051ca8db28bb472488
7
- data.tar.gz: 8c26fb2b6ba57ce2186be2a913ec6b3005ad09d84a909dd7f8f9c4e26ffae9ca7bee098a7dcbd61920b842216f2c2f72354926898f6249ab54306962f7c866d8
6
+ metadata.gz: 23763cabc8e0d6149b4d1dcaa5b58bfd0850363bac739a6d70144c75c28ab4b5bddf2acb2947118d0d982a6b0ed06b1a0196fb89e30b52c59fe537f8964be590
7
+ data.tar.gz: 1674ddf6156d6fd5ac91f70fbc3f3094470c9141d030839ed96b5f836c375ea2f1e079a899e91e6f8cca4655f16e6355ff1c37a591267a2db3fb2d6b185270cb
data/exe/lbhrr CHANGED
@@ -6,6 +6,7 @@ require "erb"
6
6
  require "open3"
7
7
  require "io/console"
8
8
  require_relative "../lib/lbhrr"
9
+ require "pathname"
9
10
 
10
11
  class LbhrrCLI < Thor
11
12
  include Thor::Actions
@@ -23,6 +24,10 @@ class LbhrrCLI < Thor
23
24
  [21,34,55][n]
24
25
  end
25
26
 
27
+ def source_path(gemname)
28
+ Pathname("/root/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/#{gemname}/src")
29
+ end
30
+
26
31
  def ok(url,grace: 1,skip: false)
27
32
 
28
33
  yield if block_given? if skip
@@ -301,7 +306,7 @@ class LbhrrCLI < Thor
301
306
  end
302
307
  end
303
308
 
304
-
309
+
305
310
 
306
311
  end
307
312
 
@@ -415,7 +420,7 @@ class LbhrrCLI < Thor
415
420
  if Dir.exist?("build")
416
421
  FileUtils.rm_r("build")
417
422
  end
418
-
423
+
419
424
  config = load_configuration
420
425
 
421
426
  msg =nil
@@ -452,6 +457,18 @@ class LbhrrCLI < Thor
452
457
  assemble "next", version
453
458
  `lxc file push -rp build/#{gem} #{name}/var/gems/`
454
459
  `lxc exec #{name} -- /root/.rbenv/shims/gem install /var/gems/#{gem} --no-document`
460
+
461
+ src = source_path(version)
462
+
463
+ `lxc exec #{name} -- rm -rf /var/www/app/container/next/`
464
+ `lxc exec #{name} -- rsync #{src} /var/www/app/container/next/`
465
+
466
+ `lxc exec #{name} -- [ -d '/var/www/app/container/data/live' ] && cp -rf /var/www/app/container/data/live/*.* /var/www/app/container/data/next`
467
+ puts "data synced! - OK"
468
+
469
+ `lxc exec #{name} -- [ -d '/var/www/app/container/uploads/live' ] && cp -rf /var/www/app/container/uploads/live/*.* /var/www/app/container/uploads/next`
470
+ puts "uploads synced! - OK"
471
+
455
472
  `lxc exec #{name} -- sv restart next`
456
473
  `lxc exec #{name} -- sv restart next.ws`
457
474
 
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.36.0"
4
+ VERSION = "2.37.0"
5
5
  end
data/lib/source.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "pathname"
2
+
3
+ dewwf source_path(gemname)
4
+ Pathname("/root/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/#{gemname}/src")
5
+ end
@@ -17,17 +17,7 @@ Gem.post_install do |installer|
17
17
  destination = File.join(installer.spec.metadata.dig("destination"), env)
18
18
  src = File.expand_path(File.join(File.dirname(__FILE__), '..', 'src'))
19
19
 
20
- if env == "live"
21
- puts "copy files to #{destination}"
22
- system("cp -rf #{src}/ #{destination}")
23
- else
24
- puts "copy files #{destination}"
25
- system("cp -rf #{src}/ #{destination}")
26
- system " [ -d '/var/www/app/container/data/live' ] && cp -rf /var/www/app/container/data/live/*.* /var/www/app/container/data/next"
27
- puts "data synced! - OK"
28
- system "[ -d '/var/www/app/container/uploads/live' ] && cp -rf /var/www/app/container/uploads/live/*.* /var/www/app/container/uploads/next"
29
- puts "uploads synced! - OK"
30
- end
20
+ system("cp -rf #{src}/ #{destination}")
31
21
 
32
22
  if File.exist?("#{destination}/bin/hoisted")
33
23
  system("chmod +x #{destination}/bin/hoisted")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lbhrr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.36.0
4
+ version: 2.37.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke
@@ -56,6 +56,7 @@ files:
56
56
  - lib/.kafkr/message_queue.txt
57
57
  - lib/lbhrr.rb
58
58
  - lib/lbhrr/version.rb
59
+ - lib/source.rb
59
60
  - sig/lbhrr.rbs
60
61
  - templates/lib/panamax.rb.erb
61
62
  - templates/lib/rubygems_plugin.rb.erb