devfile 0.0.23.pre.alpha1 → 0.0.25.pre.alpha1

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: 37965c4032ca93bebd4c3b50456d6c9c64439631ea133f869652338ead542312
4
- data.tar.gz: eaf725e9575f7432d0fc52354970734345a2288f12e0af72028805545ee74403
3
+ metadata.gz: eb1af9d5990da6b4b865c7be788a93ff45ee2d1129b9e2ae235b7e39783e5ee6
4
+ data.tar.gz: 3298fcecfe8c4dce0fb2e90c4c3286043739e47ccf0fdeebae47f6d2f8c68521
5
5
  SHA512:
6
- metadata.gz: 5497f28bb1eaf1a507b783adf75eac908b3f60d521c1087fe3fb838101890ccf7c609c7f298066e9e64fc2540c9df2ac6ce19baf45b83b33ed0a9dcaf1bfb33c
7
- data.tar.gz: 0f9a351cb754537c173a9aa4273f0c0dd567e7ea3b76181ce9b33c14535bc670477be9f6c5795904f0500813e3b8ca85c52ede426098d2aba2855f9524d15854
6
+ metadata.gz: 869b5fa6750162c23de25dbaac75cb939b65da298aab1edae05da6d669c74b4103aca15d683c785964a2553414faab067067050d079572fb90f8bd0365337580
7
+ data.tar.gz: 708d7450d2bfc7d7708fc1c07fd8340db8e6c72f41caa48fb005a671ee945d270ad8d662a27dc9f1038e9995959dc25068f02548c8f3e24259fc4f3834a69a03
data/bin/devfile CHANGED
Binary file
data/ext/devfile.go CHANGED
@@ -306,7 +306,7 @@ func parseDevfile(content string) (Devfile, error) {
306
306
  Data: []byte(content),
307
307
  }
308
308
  // TODO: figure out how to handle warnings
309
- // https://gitlab.com/gitlab-org/remote-development/devfile-gem/-/issues/6
309
+ // https://gitlab.com/gitlab-org/ruby/gems/devfile-gem/-/issues/6
310
310
  devfileObj, _, err := devfile.ParseDevfileAndValidate(parserArgs)
311
311
  return Devfile{
312
312
  devfileObj: devfileObj,
data/ext/go.mod CHANGED
@@ -1,6 +1,6 @@
1
- module gitlab-org/remote-development/devfile-gem
1
+ module gitlab-org/ruby/gems/devfile-gem
2
2
 
3
- go 1.19
3
+ go 1.21
4
4
 
5
5
  require (
6
6
  github.com/devfile/api/v2 v2.2.0
data/lib/devfile.rb CHANGED
@@ -9,6 +9,8 @@ module Devfile
9
9
  # Set of services to parse a devfile and output k8s manifests
10
10
  class Parser
11
11
  FILE_PATH = File.expand_path('./../bin/devfile', File.dirname(__FILE__))
12
+ DEVFILE_GEMSPEC = Gem.loaded_specs['devfile']
13
+ SYSTEM_PLATFORM = "#{Gem::Platform.local.cpu}-#{Gem::Platform.local.os}"
12
14
 
13
15
  class << self
14
16
  def get_deployment(devfile, name, namespace, labels, annotations, replicas)
@@ -38,12 +40,20 @@ module Devfile
38
40
  private
39
41
 
40
42
  def call(*cmd)
43
+ warn_for_ruby_platform
44
+
41
45
  stdout, stderr, status = Open3.capture3({}, FILE_PATH, *cmd.map(&:to_s))
42
46
 
43
47
  raise(CliError, stderr) unless status.success?
44
48
 
45
49
  stdout
46
50
  end
51
+
52
+ def warn_for_ruby_platform
53
+ return unless DEVFILE_GEMSPEC && DEVFILE_GEMSPEC.platform == 'ruby' && SYSTEM_PLATFORM != 'arm64-darwin'
54
+
55
+ warn "devfile-gem only supports os: darwin and architecture: arm64 for 'ruby' platform"
56
+ end
47
57
  end
48
58
  end
49
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23.pre.alpha1
4
+ version: 0.0.25.pre.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-03 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Library used to generate kubernetes manifests from a Devfile.
14
14
  email:
@@ -30,8 +30,8 @@ homepage: https://gitlab.com
30
30
  licenses:
31
31
  - MIT
32
32
  metadata:
33
- source_code_uri: https://gitlab.com/gitlab-org/remote-development/devfile-gem
34
- post_install_message:
33
+ source_code_uri: https://gitlab.com/gitlab-org/ruby/gems/devfile-gem
34
+ post_install_message:
35
35
  rdoc_options: []
36
36
  require_paths:
37
37
  - lib
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
47
  version: 1.3.1
48
48
  requirements: []
49
49
  rubygems_version: 3.4.4
50
- signing_key:
50
+ signing_key:
51
51
  specification_version: 4
52
52
  summary: Parse and generate kubernetes manifests from a Devfile
53
53
  test_files: []