foreman_acd 0.0.1 → 0.0.2

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
2
  SHA256:
3
- metadata.gz: db7fd75fe9c7755f3749abee1272402ff8de3772d917055e216935ff86a37b77
4
- data.tar.gz: 5ecf8e9d4b8977e016db9e1dc949f3e4f1494d5adbbf692538cdac60e361d73c
3
+ metadata.gz: 91ccbadf60d3e30953d20270ca7a5b631f3c9961d4fb968ee5b6e6b1878da3c1
4
+ data.tar.gz: 072b5c71e1d7697e15049c01f8fa937d841be0ed968f76f36b0a40cd8368a1ac
5
5
  SHA512:
6
- metadata.gz: 2651b734f455104bc381b83817be194c71b98fbd5b8dd2e246fd8f59026c707606c21f4f61580671e7bb4ea1d7c3135b5baf5a3bb6e83ed1e8f1a40ceaba370e
7
- data.tar.gz: 82664730f1e902cf4a6c91bbbfd10a83cd6909e19a97fc7487a40d35daf8629d17ecb4a3dbf66647266a89088680c72e86ea5204f4689f8e86442b77f8ff54a7
6
+ metadata.gz: 4aea1cd1dfd9101fa1278f7252282a84692f33961d0058e7254022f936562c1cdfdf2b6a853466e13e8f04cd878bff0f1a85f9bf29b96936b2c3af88cbe4fc25
7
+ data.tar.gz: effc1cf35ed06a1fc72ef0d39f8fa140eb9e037147e7f07544bb1e7c5e99c7c8a88b1fbe529e8a802a054f24253aa901c6ca6f3f66940698c759f0efb2a6b7c0
@@ -23,7 +23,7 @@ class UiAcdController < ::Api::V2::BaseController
23
23
  :domains => Domain.all,
24
24
  :computeprofiles => ComputeProfile.all,
25
25
  :hostgroup_id => hg.id,
26
- :ptables => hg&.operatingsystem.ptables
26
+ :ptables => hg&.operatingsystem&.ptables
27
27
  )
28
28
  fdata
29
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanAcd
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
  require 'nokogiri'
3
5
 
@@ -14,9 +16,9 @@ module ForemanAcd
14
16
 
15
17
  test 'should destroy app definition' do
16
18
  assert_difference('AppDefinition.count', -1) do
17
- delete :destroy,
18
- :params => { :id => @model.id },
19
- :session => set_session_user
19
+ delete :destroy,
20
+ :params => { :id => @model.id },
21
+ :session => set_session_user
20
22
  end
21
23
  assert_redirected_to app_definitions_url
22
24
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
  require 'nokogiri'
3
5
 
@@ -14,9 +16,9 @@ module ForemanAcd
14
16
 
15
17
  test 'should destroy app instance' do
16
18
  assert_difference('AppInstance.count', -1) do
17
- delete :destroy,
18
- :params => { :id => @model.id },
19
- :session => set_session_user
19
+ delete :destroy,
20
+ :params => { :id => @model.id },
21
+ :session => set_session_user
20
22
  end
21
23
  assert_redirected_to app_instances_url
22
24
  end
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
  require 'nokogiri'
3
5
 
4
6
  class UiAcdControllerTest < ActionController::TestCase
5
7
  test 'get app json' do
6
8
  app_def = FactoryBot.create(:app_definition)
7
- get :app, params: { :id => app_def.id }, session: set_session_user
9
+ get :app, :params => { :id => app_def.id }, :session => set_session_user
8
10
  assert_response :success
9
11
 
10
12
  assert_equal app_def.name, json_response['app_definition']['name']
@@ -16,7 +18,7 @@ class UiAcdControllerTest < ActionController::TestCase
16
18
 
17
19
  test 'get fdata json' do
18
20
  hostgroup = FactoryBot.create(:hostgroup, :with_domain, :with_os, :with_environment)
19
- get :fdata, params: { :id => hostgroup.id }, session: set_session_user
21
+ get :fdata, :params => { :id => hostgroup.id }, :session => set_session_user
20
22
  assert_response :success
21
23
 
22
24
  assert_equal hostgroup.environment.name, json_response['environments'][0]['name']
@@ -3,15 +3,15 @@
3
3
  FactoryBot.define do
4
4
  factory :app_definition, :class => 'ForemanAcd::AppDefinition' do
5
5
  sequence(:name) { |n| "app_definition#{n}" }
6
- sequence(:description) {|n| "description#{n}" }
7
- hostgroup { FactoryBot.create(:hostgroup, :with_domain, :with_os, :with_environment ) }
8
- parameters { "[{\"id\":0,\"name\":\"Hostname\",\"description\":\"\",\"type\":\"hostname\",\"value\":\"mysqllinux\"},{\"id\":1,\"name\":\"RootPW\",\"description\":\"\",\"type\":\"password\",\"value\":\"sesam12345\"},{\"id\":2,\"name\":\"ansible_root\",\"description\":\"\",\"type\":\"hostparam\",\"value\":\"/root/ansible\"}]" }
6
+ sequence(:description) { |n| "description#{n}" }
7
+ hostgroup { FactoryBot.create(:hostgroup, :with_domain, :with_os, :with_environment) }
8
+ parameters { '[{"id":0,"name":"Hostname","description":"","type":"hostname","value":"mysqllinux"},{"id":1,"name":"RootPW","description":"","type":"password","value":"sesam12345"},{"id":2,"name":"ansible_root","description":"","type":"hostparam","value":"/root/ansible"}]' }
9
9
  end
10
10
 
11
11
  factory :app_instance, :class => 'ForemanAcd::AppInstance' do
12
12
  sequence(:name) { |n| "app_instance#{n}" }
13
13
  app_definition { FactoryBot.create(:app_definition) }
14
- sequence(:description) {|n| "description#{n}" }
15
- parameters { "[{\"id\":0,\"name\":\"Hostname\",\"description\":\"\",\"type\":\"hostname\",\"value\":\"mysqllinux\"},{\"id\":1,\"name\":\"RootPW\",\"description\":\"\",\"type\":\"password\",\"value\":\"sesam12345\"},{\"id\":2,\"name\":\"ansible_root\",\"description\":\"\",\"type\":\"hostparam\",\"value\":\"/root/ansible\"}]" }
14
+ sequence(:description) { |n| "description#{n}" }
15
+ parameters { '[{"id":0,"name":"Hostname","description":"","type":"hostname","value":"mysqllinux"},{"id":1,"name":"RootPW","description":"","type":"password","value":"sesam12345"},{"id":2,"name":"ansible_root","description":"","type":"hostparam","value":"/root/ansible"}]' }
16
16
  end
17
17
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
 
3
5
  module ForemanAcd
@@ -6,6 +8,5 @@ module ForemanAcd
6
8
  should validate_uniqueness_of(:name)
7
9
  should belong_to(:hostgroup)
8
10
  should have_many(:app_instances).dependent(:destroy)
9
-
10
11
  end
11
12
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'test_plugin_helper'
2
4
 
3
5
  module ForemanAcd
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_acd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ATIX AG
@@ -66,34 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.0.1
69
- - !ruby/object:Gem::Dependency
70
- name: foreman-tasks
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.10'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.10'
83
- - !ruby/object:Gem::Dependency
84
- name: rails
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '5.1'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '5.1'
97
69
  description: Application Centric Deployment.
98
70
  email:
99
71
  - info@atix.de