foreman_omaha 4.0.0 → 4.0.1

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: 2d18486e7d9ec48f38e24dc3230ac7952154b6368bb03b6200b530d40dfccb56
4
- data.tar.gz: a35576ff4b8182f2d12364c3440d8fea31e194f1c39e4b8ed9787a5f487fdb69
3
+ metadata.gz: 63dabb188c95da7706f66c9c5c768225966e51448ce7a40ad2fc1c89871a30ad
4
+ data.tar.gz: 972b61c7759fc488935792d55bf08aa7fa02a01e91ed14ed6a1d711ee4f51df2
5
5
  SHA512:
6
- metadata.gz: ea1a506216f9a64abe54920027716bfe31557db3d32b7cd867ad10c7bf6617f76413264be1b560bee338d6ece41c04b4752631cb773b27d53f664431b848fc5b
7
- data.tar.gz: 9209885e3ca0b369d6acca9de2b59fbca45ce5d97ab163aa9d922bf6091f81453609c4fe0764f3b57b02cb162d7a5a093ed814d533f7b6d786743e47e83f8447
6
+ metadata.gz: 0bf9bb1350fc0e429917e58b3f5c56cf1e01c44cfdb9a4f641e78fafca08d60b46e20f7abfcc0ad0500c8094b16814ab097811a9a93fb199f1b33c6d3990c068
7
+ data.tar.gz: 05d0c8e04d6edb7c71d3b9e9b861862fbfa7d4f41cff0c28147bce8f7a48e4571b4b5f568e69daeb921bb5feeebe050baac4dd9d6cd81877eae9c134ab22ca92
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Types
4
+ module Extensions
5
+ module ForemanOmaha
6
+ module HostExtensions
7
+ extend ActiveSupport::Concern
8
+
9
+ included do
10
+ has_many :omaha_reports, Types::OmahaReport
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Types
4
+ module Extensions
5
+ module ForemanOmaha
6
+ module QueryExtensions
7
+ extend ActiveSupport::Concern
8
+
9
+ included do
10
+ record_field :omaha_group, Types::OmahaGroup
11
+ collection_field :omaha_groups, Types::OmahaGroup
12
+
13
+ record_field :omaha_report, Types::OmahaReport
14
+ collection_field :omaha_reports, Types::OmahaReport
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -96,17 +96,6 @@ module ForemanOmaha
96
96
 
97
97
  # add renderer extensions
98
98
  allowed_template_helpers :transpile_container_linux_config
99
-
100
- # graphql extensions
101
- extend_graphql_type type: Types::Host do
102
- has_many :omaha_reports, Types::OmahaReport
103
- end
104
-
105
- register_graphql_query_field :omaha_group, '::Types::OmahaGroup', :record_field
106
- register_graphql_query_field :omaha_groups, '::Types::OmahaGroup', :collection_field
107
-
108
- register_graphql_query_field :omaha_report, '::Types::OmahaReport', :record_field
109
- register_graphql_query_field :omaha_reports, '::Types::OmahaReport', :collection_field
110
99
  end
111
100
 
112
101
  # Extend built in permissions
@@ -126,6 +115,8 @@ module ForemanOmaha
126
115
  ::Host::Managed.include(ForemanOmaha::OmahaFacetHostExtensions)
127
116
  ::HostsHelper.include(ForemanOmaha::HostsHelperExtensions)
128
117
  ::Foreman::Renderer::Scope::Base.include(ForemanOmaha::Renderer::Scope::Macros::Omaha)
118
+ ::Types::Query.include(Types::Extensions::ForemanOmaha::QueryExtensions)
119
+ ::Types::Host.include(Types::Extensions::ForemanOmaha::HostExtensions)
129
120
  rescue StandardError => e
130
121
  Rails.logger.warn "ForemanOmaha: skipping engine hook (#{e})"
131
122
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanOmaha
4
- VERSION = '4.0.0'
4
+ VERSION = '4.0.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_omaha
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.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: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2020-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-matchheight-rails
@@ -113,6 +113,8 @@ files:
113
113
  - app/controllers/omaha_groups_controller.rb
114
114
  - app/controllers/omaha_hosts_controller.rb
115
115
  - app/controllers/omaha_reports_controller.rb
116
+ - app/graphql/types/extensions/foreman_omaha/host_extensions.rb
117
+ - app/graphql/types/extensions/foreman_omaha/query_extensions.rb
116
118
  - app/graphql/types/omaha_group.rb
117
119
  - app/graphql/types/omaha_report.rb
118
120
  - app/graphql/types/omaha_report_status_enum.rb