devfile 0.4.4-arm64-darwin → 0.4.6-arm64-darwin

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: d8c796167623801b4c3d2c736f6c81236944a0dba178bcd6c7ea204f5fd54a43
4
- data.tar.gz: 43ada828a63fc789b60e24fc8ebbf875bd39709c2b04f4181bd10da42215fd7a
3
+ metadata.gz: 6e08ea7a255b1654079f2217047e77209a02d07874f304c8bf9cd4f1c4e3920a
4
+ data.tar.gz: 07a4a6452bc1084bd9c57b7aa4e338c900f327dc68e688caff519f4b07e4fac1
5
5
  SHA512:
6
- metadata.gz: d0057e3ea3c6ac602fa0f2947bf732d1bdc1b1519b97c5da765ff29510037d145719769a7ae966e05da2d78ac32da52112154dd0fc395e86fb0fc942c614ec72
7
- data.tar.gz: 8daa664e89d1aef70967d9489a466568d93683af47f8a4bf44460f2fcd78e63a103f848ee6f346815dce1bf5e741a3c99dec5259584caf0a16bc5a8a43963574
6
+ metadata.gz: e19ba8e5e73cea119a462250df41c9deabf8510d8e5600b605f177791e4e34f5ce82775e137562ea0186975353e8b9939c92dbd246f7b705e451ef66b789f0b5
7
+ data.tar.gz: 8f28f41ccec0a84b2901c3ff131c759972d615da34c183ecd35de8ef7a7b1aa2c9476a8e9cb80f0a3f7d2792c4ee10f8996415b6ea28c49ebc7dacec9d9678e1
data/lib/devfile.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'open3'
4
+ require_relative 'ruby_cpu_to_go_arch'
4
5
 
5
6
  # Module that works with the Devfile standard
6
7
  module Devfile
@@ -9,21 +10,10 @@ module Devfile
9
10
 
10
11
  # Set of services to parse a devfile and output k8s manifests
11
12
  class Parser
12
- FILE_PATH = File.expand_path('./../bin/devfile', File.dirname(__FILE__))
13
13
  DEVFILE_GEMSPEC = Gem.loaded_specs['devfile']
14
- RUBY_CPU_TO_GOARCH = {
15
- 'x86_64' => 'amd64',
16
- 'aarch64' => 'arm64',
17
- 'amd64' => 'amd64',
18
- 'arm64' => 'arm64',
19
- 'universal' => 'arm64'
20
- # This exist because if Rosetta is enabled on mac, it means both arm and amd64 bianries
21
- # can be run so the gem lib sets the CPU as "universal".
22
- # see: https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
23
- }.freeze
24
14
  ARCH = RUBY_CPU_TO_GOARCH[Gem::Platform.local.cpu] || Gem::Platform.local.cpu
25
15
  SYSTEM_PLATFORM = "#{ARCH}-#{Gem::Platform.local.os}"
26
- PLATFORM_SPECIFIC_BINARY_PATH = File.expand_path("./../bin/devfile-#{SYSTEM_PLATFORM}", File.dirname(__FILE__))
16
+ FILE_PATH = File.expand_path("./../out/devfile-#{SYSTEM_PLATFORM}", File.dirname(__FILE__))
27
17
 
28
18
  class << self
29
19
  def get_deployment(devfile, name, namespace, labels, annotations, replicas)
@@ -53,13 +43,9 @@ module Devfile
53
43
  private
54
44
 
55
45
  def call(*cmd)
56
- file_path = FILE_PATH
57
- if ruby_platform?
58
- raise_if_unsupported_system_platform!
59
- file_path = PLATFORM_SPECIFIC_BINARY_PATH
60
- end
46
+ raise_if_unsupported_system_platform! if ruby_platform?
61
47
 
62
- stdout, stderr, status = Open3.capture3({}, file_path, *cmd.map(&:to_s))
48
+ stdout, stderr, status = Open3.capture3({}, FILE_PATH, *cmd.map(&:to_s))
63
49
  raise(CliError, stderr) unless status.success?
64
50
 
65
51
  stdout
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.6
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - GitLab
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-06 00:00:00.000000000 Z
10
+ date: 2025-05-27 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Library used to generate kubernetes manifests from a Devfile.
13
13
  email:
@@ -18,13 +18,13 @@ executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - bin/devfile
22
21
  - ext/devfile.go
23
22
  - ext/go.mod
24
23
  - ext/go.sum
25
24
  - ext/main.go
26
25
  - ext/volume.go
27
26
  - lib/devfile.rb
27
+ - out/devfile-arm64-darwin
28
28
  homepage: https://gitlab.com
29
29
  licenses:
30
30
  - MIT