chelsea 0.0.8 → 0.0.9

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: eee37ec30bb7ddc5a3817c2d966bce9b7cd3ab35cd711c5e2ab79a82bee3f8bd
4
- data.tar.gz: 31b9f377cf841c8c4e07580e6bc3a5a957baeac1ef6ddf0e019910c27c3213ee
3
+ metadata.gz: 58a886cb3027cb3bc967518797f7c2ecaf32c2ab86aa3dd71ac2df1e68baa85d
4
+ data.tar.gz: c7db2e33ca0e76d680c72c794b6bd57369ea792c3d5f98d983e4d1a49f26fe61
5
5
  SHA512:
6
- metadata.gz: aa2e1cde68d722b3d4adbaff36e8b25fe0175b208b20ca18a9a592259dd6445e3481401f2de7c5708c74c2bbf80b5c945f4f9f046c7f6b688e424404428cb246
7
- data.tar.gz: '019a53c49865e117967e9cbed7711e5b0b2d339bf5b3457e99440b118f7775a07505f2311fae4bb3ce9fa8c00e3c4187cc01cf1dd1a5718a3c74acda9b9a3fda'
6
+ metadata.gz: b40f3b9795326a48c105c8704a6c44d5357c521aadb4202d2929b156dc9f82013dd2d4143d886d0297d9d72673c737388c26e7a367e5618b2f960064d42070ee
7
+ data.tar.gz: 68e6f41c443ead6ee2842ddaf67a841972da49a570f84d5ba21493bc6a9269393bb5c16e25213ba485586e3cd5d4dfbb56911ef24eb9f3cbf2119371ab5d12e4
data/lib/chelsea/cli.rb CHANGED
@@ -22,8 +22,8 @@ module Chelsea
22
22
  if @opts.config?
23
23
  _set_config # move to init
24
24
  elsif @opts.file? # don't process unless there was a file
25
- _process_file
26
- _submit_sbom if @opts.sbom?
25
+ gems = _process_file
26
+ _submit_sbom(gems) if @opts.sbom?
27
27
  elsif @opts.help? # quit on opts.help earlier
28
28
  puts _cli_flags # this doesn't exist
29
29
  end
@@ -35,14 +35,16 @@ module Chelsea
35
35
 
36
36
  private
37
37
 
38
- def _submit_sbom
38
+ def _submit_sbom(gems)
39
39
  iq = Chelsea::IQClient.new(
40
- @opts[:application],
41
- @opts[:server],
42
- @opts[:iquser],
43
- @opts[:iqpass]
40
+ options: {
41
+ public_application_id: @opts[:application],
42
+ server_url: @opts[:server],
43
+ username: @opts[:iquser],
44
+ auth_token: @opts[:iqpass]
45
+ }
44
46
  )
45
- bom = Chelsea::Bom.new(@gems.deps)
47
+ bom = Chelsea::Bom.new(gems.deps.dependencies)
46
48
  iq.submit_sbom(bom)
47
49
  end
48
50
 
@@ -53,6 +55,7 @@ module Chelsea
53
55
  options: @opts
54
56
  )
55
57
  gems.execute # should be more like collect
58
+ gems
56
59
  end
57
60
 
58
61
  def _flags_error
@@ -89,7 +92,7 @@ module Chelsea
89
92
  end
90
93
 
91
94
  def _set_config
92
- Chelsea.oss_index_config_from_command_line
95
+ Chelsea.read_oss_index_config_from_command_line
93
96
  end
94
97
  end
95
98
  end
@@ -31,7 +31,7 @@ module Chelsea
31
31
  else
32
32
  conf_hash = YAML.safe_load(
33
33
  File.read(
34
- File.join(@@oss_index_config_location, @@oss_index_config_filename)
34
+ File.join(@oss_index_config_location, @oss_index_config_filename)
35
35
  )
36
36
  )
37
37
  {
data/lib/chelsea/gems.rb CHANGED
@@ -13,6 +13,7 @@ require_relative 'bom'
13
13
 
14
14
  module Chelsea
15
15
  class Gems
16
+ attr_accessor :deps
16
17
  def initialize(file:, quiet: false, options: {})
17
18
  @quiet = quiet
18
19
  unless File.file?(file) || file.nil?
@@ -38,7 +38,7 @@ module Chelsea
38
38
  user: @username,
39
39
  password: @auth_token
40
40
  )
41
- res = JSON.parse(resource.get(headers))
41
+ res = JSON.parse(resource.get(_headers))
42
42
  res['applications'][0]['id']
43
43
  end
44
44
 
@@ -1,3 +1,3 @@
1
1
  module Chelsea
2
- VERSION = '0.0.8'.freeze
2
+ VERSION = '0.0.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chelsea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allister Beharry