foreman_ansible 2.2.5 → 2.2.6

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
- SHA1:
3
- metadata.gz: e462c3b9312bf42cb1f7a267edbe619aae3849dc
4
- data.tar.gz: 1cd77d5a1ab0047c0b25108a995c73790f92e774
2
+ SHA256:
3
+ metadata.gz: 4d5259c34f569a52fce421e5fea3256094bb90c70ca595c0b4aa483ec3374666
4
+ data.tar.gz: efa7a4f4b6525b9f3a95e8656139d398971eb181ead180c9e73c51ff335c0fdf
5
5
  SHA512:
6
- metadata.gz: e77318b028e35757faa9bc78b523edfba003bf15c4a687f1592c6d16e0191d1d2fa913da461e757f95118bc6bf0132a78f58381c1c10bcf9c2bd9ab94ee65da3
7
- data.tar.gz: d381adc5b3aaa880a0e71da579bb2f7f063bd76e8542500de92ed53ccb06443974e168e31a5588cb51f351c96416805f47146c17c406c75d0f249996ea327d71
6
+ metadata.gz: 6efb74bceb03772f6882aee0231e5dc1b7a5d8f8806b4b60c5918aa0dbc26108a01de3eb3fab9d8c34cafd6d8448590ee7d361234d772bd21c3530798de83099
7
+ data.tar.gz: '08596fb8fb3847f2c744cc5aa08552fd25769199d9ef1c202a9e38d24c06c10e014522c00346bb83b8dfd7bc125793f91ae106a5900f5b57c07dd5fcf9156d4e'
@@ -25,7 +25,7 @@ class AnsibleRolesController < ::ApplicationController
25
25
  def import
26
26
  changed = @importer.import!
27
27
  if changed.values.all?(&:empty?)
28
- notice no_changed_roles_message
28
+ success no_changed_roles_message
29
29
  redirect_to ansible_roles_path
30
30
  else
31
31
  render :locals => { :changed => changed }
@@ -33,8 +33,8 @@ class AnsibleRolesController < ::ApplicationController
33
33
  end
34
34
 
35
35
  def confirm_import
36
- @importer.finish_import(params[:changed])
37
- notice _('Import of roles successfully finished.')
36
+ @importer.finish_import(params[:changed].to_unsafe_h)
37
+ success _('Import of roles successfully finished.')
38
38
  redirect_to ansible_roles_path
39
39
  end
40
40
 
@@ -12,13 +12,13 @@ module ForemanAnsible
12
12
  end
13
13
 
14
14
  def create_new_roles(changes)
15
- changes.values.each do |new_role|
15
+ changes.each_value do |new_role|
16
16
  ::AnsibleRole.create(JSON.parse(new_role))
17
17
  end
18
18
  end
19
19
 
20
20
  def delete_old_roles(changes)
21
- changes.values.each do |old_role|
21
+ changes.each_value do |old_role|
22
22
  ::AnsibleRole.find(JSON.parse(old_role)['id']).destroy
23
23
  end
24
24
  end
@@ -2,5 +2,5 @@
2
2
  # This way other parts of Foreman can just call ForemanAnsible::VERSION
3
3
  # and detect what version the plugin is running.
4
4
  module ForemanAnsible
5
- VERSION = '2.2.5'.freeze
5
+ VERSION = '2.2.6'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_ansible
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-25 00:00:00.000000000 Z
11
+ date: 2018-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -265,43 +265,43 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  requirements: []
267
267
  rubyforge_project:
268
- rubygems_version: 2.6.8
268
+ rubygems_version: 2.7.6
269
269
  signing_key:
270
270
  specification_version: 4
271
271
  summary: Ansible integration with Foreman (theforeman.org)
272
272
  test_files:
273
- - test/unit/host_ansible_role_test.rb
274
- - test/unit/helpers/ansible_reports_helper_test.rb
275
- - test/unit/ansible_role_test.rb
273
+ - test/fixtures/report.json
274
+ - test/fixtures/sample_facts.json
275
+ - test/fixtures/insights_playbook.yaml
276
276
  - test/unit/concerns/config_reports_extensions_test.rb
277
- - test/unit/concerns/host_managed_extensions_test.rb
278
277
  - test/unit/concerns/hostgroup_extensions_test.rb
278
+ - test/unit/concerns/host_managed_extensions_test.rb
279
+ - test/unit/services/ansible_report_importer_test.rb
280
+ - test/unit/services/inventory_creator_test.rb
281
+ - test/unit/services/api_roles_importer_test.rb
282
+ - test/unit/services/fact_parser_test.rb
283
+ - test/unit/services/roles_importer_test.rb
284
+ - test/unit/services/fact_sparser_test.rb
285
+ - test/unit/services/structured_fact_importer_test.rb
286
+ - test/unit/services/ui_roles_importer_test.rb
287
+ - test/unit/services/insights_plan_runner_test.rb
288
+ - test/unit/services/fact_importer_test.rb
289
+ - test/unit/lib/proxy_api/ansible_test.rb
279
290
  - test/unit/lib/foreman_ansible_core/command_creator_test.rb
280
291
  - test/unit/lib/foreman_ansible_core/roles_reader_test.rb
281
292
  - test/unit/lib/foreman_ansible_core/playbook_runner_test.rb
282
- - test/unit/lib/proxy_api/ansible_test.rb
283
- - test/unit/ansible_provider_test.rb
293
+ - test/unit/host_ansible_role_test.rb
284
294
  - test/unit/hostgroup_ansible_role_test.rb
285
- - test/unit/services/fact_importer_test.rb
286
- - test/unit/services/ui_roles_importer_test.rb
287
- - test/unit/services/inventory_creator_test.rb
288
- - test/unit/services/roles_importer_test.rb
289
- - test/unit/services/insights_plan_runner_test.rb
290
- - test/unit/services/fact_parser_test.rb
291
- - test/unit/services/api_roles_importer_test.rb
292
- - test/unit/services/structured_fact_importer_test.rb
293
- - test/unit/services/fact_sparser_test.rb
294
- - test/unit/services/ansible_report_importer_test.rb
295
295
  - test/unit/actions/run_proxy_ansible_command_test.rb
296
296
  - test/unit/actions/run_ansible_job_test.rb
297
- - test/test_plugin_helper.rb
298
- - test/functional/hosts_controller_test.rb
299
- - test/functional/api/v2/hosts_controller_test.rb
297
+ - test/unit/ansible_provider_test.rb
298
+ - test/unit/ansible_role_test.rb
299
+ - test/unit/helpers/ansible_reports_helper_test.rb
300
300
  - test/functional/api/v2/ansible_roles_controller_test.rb
301
301
  - test/functional/api/v2/hostgroups_controller_test.rb
302
+ - test/functional/api/v2/hosts_controller_test.rb
302
303
  - test/functional/ansible_roles_controller_test.rb
304
+ - test/functional/hosts_controller_test.rb
303
305
  - test/factories/ansible_roles.rb
304
306
  - test/factories/ansible_proxy.rb
305
- - test/fixtures/report.json
306
- - test/fixtures/sample_facts.json
307
- - test/fixtures/insights_playbook.yaml
307
+ - test/test_plugin_helper.rb