foreman_host_extra_validator 0.2.0 → 0.2.1

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: 2cd1faf2a634cac57b3603ab51bed47ca72cd9da17ed55d7497d9d108030b61e
4
- data.tar.gz: a4802142256b0e139ebc923b1d6615735f40aae117d3968cc0f2ac04bacf5441
3
+ metadata.gz: 8f63f5ef9b4443c4a4fa5de029faf95a398b04de7872698dc031ca4ce92c6763
4
+ data.tar.gz: 6586b166074731b6178d7b80eecc8f4284319e0233db05c29eb5e91498afe723
5
5
  SHA512:
6
- metadata.gz: b092cf27e78b4e20ef904026148bda130ab76b05d2d944581ade639c34e939009ffc38d8796971803b863311f123511c8c7787a69f4ce73435e9dc0bdccb439e
7
- data.tar.gz: e3fa88d65f80b9885e4c3209c0b29c28c5642d36c5ecb28958c6c812555bea96bfa7dc1fd70668247411b2faae3bb02d61f212a1db450bf34bcff155894b070a
6
+ metadata.gz: 289de1db84110f537572bb1b0dc9dc1cc156d6d61d7bccf20af34ed73d81261b3880fd528012bdb146822bbb8e205644b30048e2432eba19d60ae7380ede931e
7
+ data.tar.gz: 408256808741d275497f67c73f8ea9e97522fe35617954996769a845e20c05e18d4c2044f98970f7eaa0e1762e826a3f287852c9631850b31c484911a24d4052
@@ -4,6 +4,13 @@ module ForemanHostExtraValidator
4
4
 
5
5
  config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
6
6
 
7
+ # Add any db migrations
8
+ initializer 'foreman_host_extra_validator.load_app_instance_data' do |app|
9
+ ForemanHostExtraValidator::Engine.paths['db/migrate'].existent.each do |path|
10
+ app.config.paths['db/migrate'] << path
11
+ end
12
+ end
13
+
7
14
  initializer 'foreman_host_extra_validator.register_plugin', :before => :finisher_hook do |_app|
8
15
  Foreman::Plugin.register :foreman_host_extra_validator do
9
16
  requires_foreman '>= 3.0.0'
@@ -11,7 +18,7 @@ module ForemanHostExtraValidator
11
18
  settings do
12
19
  category(:host_extra_validator, N_('Host Extra Validator')) do
13
20
  setting('host_name_validation_regex',
14
- description: N_('Default regex the name of a host is validated against'),
21
+ description: N_('Default regex the name of a host is validated against'),
15
22
  type: :string,
16
23
  default: '^[a-zA-Z0-9\-_]+$',
17
24
  full_name: N_('Regular expresssion'))
@@ -1,3 +1,3 @@
1
1
  module ForemanHostExtraValidator
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -2,7 +2,6 @@ require 'test_plugin_helper'
2
2
 
3
3
  class ForemanHostExtraValidatorTest < ActiveSupport::TestCase
4
4
  setup do
5
- Setting::ForemanHostExtraValidator.load_defaults
6
5
  disable_orchestration
7
6
  User.current = FactoryBot.build(:user, :admin)
8
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_host_extra_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Goebel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-24 00:00:00.000000000 Z
11
+ date: 2022-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubygems_version: 3.1.6
83
+ rubygems_version: 3.3.7
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: This plugin adds extra validations to a host.