foreman_remote_execution 1.6.3 → 1.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_remote_execution/template_input.js +0 -10
  3. data/app/assets/javascripts/foreman_remote_execution/template_invocation.js +1 -12
  4. data/app/assets/stylesheets/foreman_remote_execution/template_invocation.css.scss +1 -0
  5. data/app/controllers/api/v2/job_invocations_controller.rb +5 -1
  6. data/app/helpers/job_invocation_output_helper.rb +5 -4
  7. data/app/helpers/job_invocations_helper.rb +0 -29
  8. data/app/helpers/remote_execution_helper.rb +1 -24
  9. data/app/lib/foreman_remote_execution/renderer/scope/input.rb +28 -8
  10. data/app/models/concerns/foreman_remote_execution/template_extensions.rb +0 -12
  11. data/app/models/concerns/foreman_remote_execution/template_input_extensions.rb +9 -0
  12. data/app/models/concerns/foreman_remote_execution/template_overrides.rb +11 -0
  13. data/app/models/input_template_renderer.rb +16 -17
  14. data/app/models/job_invocation.rb +14 -4
  15. data/app/models/job_invocation_composer.rb +2 -6
  16. data/app/models/job_template.rb +23 -52
  17. data/app/models/template_invocation_input_value.rb +12 -1
  18. data/app/views/api/v2/smart_proxies/pubkey.json.rabl +1 -0
  19. data/app/views/job_invocations/_form.html.erb +1 -7
  20. data/app/views/job_templates/_custom_tabs.html.erb +0 -7
  21. data/app/views/template_invocations/_output_line_set.html.erb +2 -2
  22. data/app/views/templates/ssh/module_action.erb +67 -0
  23. data/app/views/templates/ssh/package_action.erb +39 -7
  24. data/app/views/templates/ssh/power_action.erb +2 -1
  25. data/app/views/templates/ssh/puppet_run_once.erb +1 -0
  26. data/app/views/templates/ssh/run_command.erb +1 -0
  27. data/app/views/templates/ssh/service_action.erb +9 -1
  28. data/config/routes.rb +0 -1
  29. data/lib/foreman_remote_execution/engine.rb +4 -0
  30. data/lib/foreman_remote_execution/version.rb +1 -1
  31. data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  32. data/locale/de/foreman_remote_execution.po +3 -72
  33. data/locale/en/foreman_remote_execution.po +3 -72
  34. data/locale/en_GB/foreman_remote_execution.po +3 -72
  35. data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  36. data/locale/es/foreman_remote_execution.po +3 -72
  37. data/locale/foreman_remote_execution.pot +124 -225
  38. data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  39. data/locale/fr/foreman_remote_execution.po +3 -72
  40. data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  41. data/locale/ja/foreman_remote_execution.po +3 -72
  42. data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  43. data/locale/ko/foreman_remote_execution.po +3 -72
  44. data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  45. data/locale/pt_BR/foreman_remote_execution.po +3 -72
  46. data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  47. data/locale/ru/foreman_remote_execution.po +3 -72
  48. data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  49. data/locale/zh_CN/foreman_remote_execution.po +3 -72
  50. data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  51. data/locale/zh_TW/foreman_remote_execution.po +3 -72
  52. data/test/factories/foreman_remote_execution_factories.rb +6 -5
  53. data/test/functional/api/v2/job_invocations_controller_test.rb +10 -0
  54. data/test/unit/input_template_renderer_test.rb +52 -21
  55. data/test/unit/job_invocation_composer_test.rb +2 -2
  56. data/test/unit/job_invocation_test.rb +36 -0
  57. metadata +6 -19
  58. data/app/controllers/api/v2/template_inputs_controller.rb +0 -92
  59. data/app/controllers/concerns/foreman/controller/parameters/template_input.rb +0 -17
  60. data/app/models/template_input.rb +0 -179
  61. data/app/views/api/v2/template_inputs/base.json.rabl +0 -3
  62. data/app/views/api/v2/template_inputs/create.json.rabl +0 -3
  63. data/app/views/api/v2/template_inputs/index.json.rabl +0 -3
  64. data/app/views/api/v2/template_inputs/main.json.rabl +0 -10
  65. data/app/views/api/v2/template_inputs/show.json.rabl +0 -3
  66. data/app/views/template_inputs/_form.html.erb +0 -25
  67. data/app/views/template_inputs/_invocation_form.html.erb +0 -7
  68. data/db/migrate/20150616080015_create_template_input.rb +0 -19
  69. data/db/migrate/20150827152730_add_options_to_template_input.rb +0 -5
  70. data/db/migrate/20160127134031_add_advanced_to_template_input.rb +0 -11
  71. data/test/functional/api/v2/template_inputs_controller_test.rb +0 -56
  72. data/test/unit/template_input_test.rb +0 -40
@@ -1,40 +0,0 @@
1
- require 'test_plugin_helper'
2
-
3
- class TemplateInputTest < ActiveSupport::TestCase
4
- let(:template_input) { FactoryBot.build(:template_input) }
5
-
6
- context 'export' do
7
- before do
8
- template_input.input_type = 'user'
9
- template_input.options = "foo\nbar\nbaz"
10
- end
11
-
12
- it 'exports type' do
13
- template_input.to_export['input_type'].must_equal template_input.input_type
14
- end
15
-
16
- it 'exports options' do
17
- template_input.to_export['options'].must_equal template_input.options
18
- end
19
- end
20
-
21
- context 'user input' do
22
- before { template_input.input_type = 'user' }
23
- it { assert template_input.user_template_input? }
24
- end
25
-
26
- context 'fact input' do
27
- before { template_input.input_type = 'fact' }
28
- it { assert template_input.fact_template_input? }
29
- end
30
-
31
- context 'variable input' do
32
- before { template_input.input_type = 'variable' }
33
- it { assert template_input.variable_template_input? }
34
- end
35
-
36
- context 'puppet parameter input' do
37
- before { template_input.input_type = 'puppet_parameter' }
38
- it { assert template_input.puppet_parameter_template_input? }
39
- end
40
- end