jets 6.0.2 → 6.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 469bf41ff85a39ad660890d93dcc434ee0926d02d7eca5e50d341491fe484235
4
- data.tar.gz: 9f565593604d1224675e6096e6aec003783a38fe117eb2f97571112065deb017
3
+ metadata.gz: e63e03b5c6e874d66b030c95e0fe78008c242ba29190b342af6fb296216f8c30
4
+ data.tar.gz: 7890a095dc745f3bb2e141603c965272a22cc0d7517b997b1d25dc417caba2eb
5
5
  SHA512:
6
- metadata.gz: 3ea55a1776af192ea218bbcecb719a7d88090811ddab98fa3e6d539f7b36534f016c2b2b28ce4eb53e00a4a90f48e7f16d9ba8495b7d56af9c87ac694290bc94
7
- data.tar.gz: a6047cb5149aba3abf54d15ad62ec64503fbc87b0324aa910103e2a0218dd37e0aeca2435d5ebcef8c42ac712d5870e443fd3eb7e2a80b12b18d706d48e15598
6
+ metadata.gz: 10046fdb11e1faa30b29e3c695923661ad6d00c2888a1be9705c9d4b89fa0fb95dcc37720bd72fa87b1cab3e0db58af315388fcc28b6a7891eaeb93013504fbf
7
+ data.tar.gz: 8ebdfc0d5d5d7fe453d5b9a738704264f3c231ca580fabad286df7635e0407219ee8794ac307413294cbbfa6a3c9f42c3066bed0fb684f0906596d9aa8c21137
data/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [6.0.4] - 2024-11-13
7
+ - [#735](https://github.com/rubyonjets/jets/pull/735) fix du check for macosx
8
+ - [#736](https://github.com/rubyonjets/jets/pull/736) git commit check
9
+
10
+ ## [6.0.3] - 2024-05-30
11
+ - [#730](https://github.com/rubyonjets/jets/pull/730) scheduler translate scheduler.schedule key
12
+
6
13
  ## [6.0.2] - 2024-05-30
7
14
  - [#728](https://github.com/rubyonjets/jets/pull/728) jets git:push
8
15
  - [#729](https://github.com/rubyonjets/jets/pull/729) dont show queue url by default
@@ -17,9 +17,9 @@ class Jets::CLI::Schedule
17
17
  # Currently only sidekiq is supported
18
18
  sidekiq = YAML.load_file("config/sidekiq.yml")
19
19
  sidekiq = ActiveSupport::HashWithIndifferentAccess.new(sidekiq)
20
- schedule = sidekiq[:schedule]
20
+ schedule = sidekiq.dig(:scheduler, :schedule) || sidekiq[:schedule]
21
21
  unless schedule
22
- log.error "config/sidekiq.yml does not have a schedule key. Nothing to translate."
22
+ log.error "config/sidekiq.yml does not have a scheduler.schedule key. Nothing to translate."
23
23
  return false
24
24
  end
25
25
 
@@ -104,7 +104,11 @@ class Jets::Code
104
104
  def warn_large_codebase
105
105
  return unless Jets.bootstrap.code.copy.warn_large
106
106
  return unless system("type du > /dev/null 2>&1")
107
- bytes = `du -bs #{Jets.root}`.split("\t").first.to_i
107
+
108
+ # Use -k for cross-platform compatibility, multiply by 1024 to get bytes
109
+ # Works for both macOS and Linux
110
+ bytes = `du -ks #{Jets.root}`.split("\t").first.to_i * 1024
111
+
108
112
  if bytes > 1024 * 1024 * 1024 # 1GB
109
113
  size = ActiveSupport::NumberHelper.number_to_human_size(bytes)
110
114
  log.info <<~EOL
@@ -1,7 +1,7 @@
1
1
  module Jets::Git
2
2
  module GitCli
3
3
  def git?
4
- git_folder? && git_installed?
4
+ git_folder? && git_installed? && git_commits?
5
5
  end
6
6
 
7
7
  def git_folder?
@@ -12,6 +12,11 @@ module Jets::Git
12
12
  system "type git > /dev/null 2>&1"
13
13
  end
14
14
 
15
+ # Edge case: git init but no commits yet
16
+ def git_commits?
17
+ system "git rev-parse HEAD >/dev/null 2>&1"
18
+ end
19
+
15
20
  def git(args, on_error: :nil)
16
21
  out = `git #{args}`.strip
17
22
  unless $?.success?
data/lib/jets/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jets
2
- VERSION = "6.0.2"
2
+ VERSION = "6.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jets
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-30 00:00:00.000000000 Z
11
+ date: 2024-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-logs
@@ -990,7 +990,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
990
990
  - !ruby/object:Gem::Version
991
991
  version: '0'
992
992
  requirements: []
993
- rubygems_version: 3.4.19
993
+ rubygems_version: 3.5.23
994
994
  signing_key:
995
995
  specification_version: 4
996
996
  summary: Serverless Deployment Service