foreman_bootdisk 21.0.1 → 21.0.2

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: 66231c8d3a35aa4ebbbe3ef624a629c309d74ea4d95a39a009b1b07b60f9ce3f
4
- data.tar.gz: 350ccaf1150dd3bfb2e6db920706f6f077783619b2a455f21b9f644a38bda4ca
3
+ metadata.gz: 1af794db64199b1cb16cc9ddc7c9effc086930bba2ce77ccb890a3db932f3450
4
+ data.tar.gz: 71645b371a4f7ada01b3630e977e5ffa109d2111845963569b46e88f8cab5923
5
5
  SHA512:
6
- metadata.gz: '082d9c32af3239beec631cccaf7ff418ce42b74dee910be2fa4ae28cb44fc94193a7d2c6ee3365611823e115f20ac4a311aa196eee3cf98beb4066c116fb2406'
7
- data.tar.gz: 8fb0981f8d0cd18d4b40aa7592f15d5f3be3f9acf7c71962491160e4d92527f747ccbb4dbb190c1c4d3b2a70142a1e4e857bae5b47eec321916af644dbc11f7a
6
+ metadata.gz: 274f768d29de9360586a51f07ae5f8c142457c0548a71438a7b136dc5dcb165eaa65def7fdb479fac5fead9bca0240deec1ca3f5ae55095198e06204eb6f9b0f
7
+ data.tar.gz: 29304e2d2a0048e22b6bc7027dd8135f27d9a65b25f26df293da4484cecb7917176771c732656897f192cf6da7cb5d0560f25e5161cfb7383bc410b82fa6fdab
@@ -14,10 +14,10 @@ module ForemanBootdisk
14
14
  skip_after_action :log_response_body
15
15
 
16
16
  # no-op, but required for apipie documentation
17
- api :GET, '', N_('Boot disks')
17
+ api :GET, '/bootdisk', N_('Boot disks')
18
18
  def index; end
19
19
 
20
- api :GET, '/generic', N_('Download generic image')
20
+ api :GET, '/bootdisk/generic', N_('Download generic image')
21
21
  def generic
22
22
  # EFI not supported for iPXE generic bootdisk
23
23
  tmpl = ForemanBootdisk::Renderer.new.generic_template_render
@@ -26,7 +26,7 @@ module ForemanBootdisk
26
26
  end
27
27
  end
28
28
 
29
- api :GET, '/hosts/:host_id', N_('Download host image')
29
+ api :GET, '/bootdisk/hosts/:host_id', N_('Download host image')
30
30
  param :full, :bool, required: false, desc: N_('True for full, false for basic reusable image')
31
31
  param :host_id, :identifier_dottable, required: true
32
32
  def host
@@ -16,10 +16,10 @@ module ForemanBootdisk
16
16
  skip_after_action :log_response_body
17
17
 
18
18
  # no-op, but required for apipie documentation
19
- api :GET, '', N_('Subnet boot disks')
19
+ api :GET, '/bootdisk', N_('Subnet boot disks')
20
20
  def index; end
21
21
 
22
- api :GET, '/subnets/:subnet_id', N_('Download subnet generic image')
22
+ api :GET, '/bootdisk/subnets/:subnet_id', N_('Download subnet generic image')
23
23
  param :subnet_id, :identifier_dottable, required: true
24
24
  def subnet
25
25
  subnet = @subnet_disk
data/config/routes.rb CHANGED
@@ -14,10 +14,12 @@ ForemanBootdisk::Engine.routes.draw do
14
14
 
15
15
  namespace :api, defaults: { format: 'json' } do
16
16
  scope '(:apiv)', module: :v2, defaults: { apiv: 'v2' }, apiv: /v1|v2/, constraints: ApiConstraints.new(version: 2, default: true) do
17
- get 'generic', to: 'disks#generic'
18
- constraints(id: %r{[^/]+}) do
19
- get 'hosts/:id', to: 'disks#host'
20
- get 'subnets/:id', to: 'subnet_disks#subnet'
17
+ scope :bootdisk do
18
+ get 'generic', to: 'disks#generic'
19
+ constraints(id: %r{[^/]+}) do
20
+ get 'hosts/:id', to: 'disks#host'
21
+ get 'subnets/:id', to: 'subnet_disks#subnet'
22
+ end
21
23
  end
22
24
  end
23
25
  end
@@ -10,7 +10,7 @@ module ForemanBootdisk
10
10
  isolate_namespace ForemanBootdisk
11
11
 
12
12
  config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
13
- config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
13
+ config.autoload_paths += Dir["#{config.root}/app/helpers"]
14
14
  config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
15
15
  config.autoload_paths += Dir["#{config.root}/app/lib"]
16
16
 
@@ -28,6 +28,12 @@ module ForemanBootdisk
28
28
  Apipie.configuration.checksum_path += ['/bootdisk/api/']
29
29
  end
30
30
 
31
+ # Temporary workaround fix for helpers
32
+ initializer 'foreman_bootdisk.rails_loading_workaround' do
33
+ HostsHelper.prepend ForemanBootdisk::HostsHelperExt
34
+ SubnetsHelper.include ForemanBootdisk::SubnetsHelperExt
35
+ end
36
+
31
37
  initializer 'foreman_bootdisk.register_plugin', before: :finisher_hook do |_app|
32
38
  Foreman::Plugin.register :foreman_bootdisk do
33
39
  requires_foreman '>= 3.4'
@@ -139,12 +145,6 @@ module ForemanBootdisk
139
145
  Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
140
146
  end
141
147
 
142
- # Temporary workaround fix for helpers
143
- initializer 'foreman_bootdisk.rails_loading_workaround' do
144
- HostsHelper.prepend ForemanBootdisk::HostsHelperExt
145
- SubnetsHelper.prepend ForemanBootdisk::SubnetsHelperExt
146
- end
147
-
148
148
  config.to_prepare do
149
149
  begin
150
150
  Host::Managed.prepend ForemanBootdisk::HostExt
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanBootdisk
4
- VERSION = '21.0.1'
4
+ VERSION = '21.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_bootdisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.0.1
4
+ version: 21.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-02 00:00:00.000000000 Z
11
+ date: 2022-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: theforeman-rubocop