foreman_bootdisk 14.0.0 → 15.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHORS +23 -0
  3. data/app/models/concerns/foreman_bootdisk/host_ext.rb +0 -4
  4. data/app/services/foreman_bootdisk/iso_generator.rb +19 -5
  5. data/app/services/foreman_bootdisk/renderer.rb +4 -3
  6. data/app/views/foreman_bootdisk/host.erb +6 -4
  7. data/lib/foreman_bootdisk/engine.rb +1 -1
  8. data/lib/foreman_bootdisk/version.rb +1 -1
  9. data/locale/ca/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  10. data/locale/ca/foreman_bootdisk.po +11 -13
  11. data/locale/de/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  12. data/locale/de/foreman_bootdisk.po +20 -20
  13. data/locale/en/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  14. data/locale/en/foreman_bootdisk.po +5 -8
  15. data/locale/en_GB/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  16. data/locale/en_GB/foreman_bootdisk.po +9 -12
  17. data/locale/es/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  18. data/locale/es/foreman_bootdisk.po +27 -30
  19. data/locale/foreman_bootdisk.pot +57 -53
  20. data/locale/fr/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  21. data/locale/fr/foreman_bootdisk.po +9 -12
  22. data/locale/it/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  23. data/locale/it/foreman_bootdisk.po +7 -10
  24. data/locale/ja/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  25. data/locale/ja/foreman_bootdisk.po +9 -12
  26. data/locale/ko/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  27. data/locale/ko/foreman_bootdisk.po +7 -10
  28. data/locale/pt_BR/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  29. data/locale/pt_BR/foreman_bootdisk.po +23 -25
  30. data/locale/ru/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  31. data/locale/ru/foreman_bootdisk.po +8 -11
  32. data/locale/sv_SE/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  33. data/locale/sv_SE/foreman_bootdisk.po +6 -9
  34. data/locale/zh_CN/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  35. data/locale/zh_CN/foreman_bootdisk.po +27 -30
  36. data/locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo +0 -0
  37. data/locale/zh_TW/foreman_bootdisk.po +7 -10
  38. data/release-gem +82 -0
  39. data/test/test_plugin_helper.rb +2 -0
  40. data/test/unit/iso_generator_test.rb +11 -1
  41. metadata +18 -2
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'test_helper'
4
+ require 'webmock/minitest'
5
+ require 'webmock'
4
6
 
5
7
  module ForemanBootdiskTestHelper
6
8
  def setup_bootdisk
@@ -14,7 +14,17 @@ module ForemanBootdisk
14
14
  let(:template) { FactoryBot.create(:provisioning_template, template: 'Fake kernel line <%= @kernel %> - <%= @initrd %>') }
15
15
 
16
16
  setup do
17
- host.expects(:provisioning_template).with(kind: :PXELinux).returns(template)
17
+ host.stubs(:provisioning_template).with(kind: :PXELinux).returns(template)
18
+ end
19
+
20
+ test 'fetch handles redirect' do
21
+ Dir.mktmpdir do |dir|
22
+ url = 'http://example.com/request'
23
+ redirection = 'http://example.com/redirect'
24
+ stub_request(:get, url).to_return(status: 301, headers: { 'Location' => redirection })
25
+ stub_request(:get, redirection)
26
+ ForemanBootdisk::ISOGenerator.fetch(File.join(dir, 'test'), url)
27
+ end
18
28
  end
19
29
 
20
30
  test 'generate_full_host creates with ISO-compatible file names' do
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: 14.0.0
4
+ version: 15.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-06 00:00:00.000000000 Z
11
+ date: 2019-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: webmock
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: Plugin for Foreman that creates iPXE-based boot disks to provision hosts
28
42
  without the need for PXE infrastructure.
29
43
  email: dcleal@redhat.com
@@ -35,6 +49,7 @@ extra_rdoc_files:
35
49
  - README.md
36
50
  files:
37
51
  - ".tx/config"
52
+ - AUTHORS
38
53
  - CHANGES.md
39
54
  - LICENSE
40
55
  - README.md
@@ -101,6 +116,7 @@ files:
101
116
  - locale/zh_CN/foreman_bootdisk.po
102
117
  - locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo
103
118
  - locale/zh_TW/foreman_bootdisk.po
119
+ - release-gem
104
120
  - test/functional/foreman_bootdisk/api/v2/disks_controller_test.rb
105
121
  - test/functional/foreman_bootdisk/api/v2/subnet_disks_controller_test.rb
106
122
  - test/functional/foreman_bootdisk/disks_controller_test.rb