foreman_supervisory_authority 0.0.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -5
- data/lib/foreman_supervisory_authority/engine.rb +7 -12
- data/lib/foreman_supervisory_authority/version.rb +1 -1
- data/lib/tasks/foreman_supervisory_authority_tasks.rake +5 -2
- metadata +24 -24
- data/test/test_plugin_helper.rb +0 -4
- data/test/unit/foreman_supervisory_authority_test.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 338286f228044a32cd31578dbb23d130d594e170f8ef3ac037d243e2f2f653d3
|
4
|
+
data.tar.gz: 0d66f361e0434269244d452e2c4c92a6cae5466c2e5a7136489ce5054ea6a988
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcb4f2d8ee0bdf31c03ec5b26e492d1b9adc283e0d8fbc14eedb5ffe763943b4e91d5575cbea38bffaa26fde1529f2f480c916cf77b089d8cd07b2c8198a3cfb
|
7
|
+
data.tar.gz: 85aceff62912603b36ef4b38535199e13ac5dc251007597d72cbd56e2fcfe0533e4e53b4181119506cf6e8a18878abb281abe93399cfee7663cb059762a8cfdc
|
data/README.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This Foreman plug-in adds support for reporting data to the Elastic APM.
|
4
4
|
|
5
|
+
## Compatibility
|
6
|
+
|
7
|
+
| Foreman Version | Plugin Version |
|
8
|
+
| --------------- | -------------- |
|
9
|
+
| >= 1.20 | ~> 0.0.2 |
|
10
|
+
| >= 3.0 | ~> 0.1.0 |
|
11
|
+
| >= 3.10 | ~> 0.2.0 |
|
12
|
+
|
5
13
|
## Installation
|
6
14
|
|
7
15
|
See [How_to_Install_a_Plugin](http://projects.theforeman.org/projects/foreman/wiki/How_to_Install_a_Plugin)
|
@@ -18,8 +26,8 @@ Below you can find an example config file. All the possible parameters are docum
|
|
18
26
|
```yaml
|
19
27
|
:foreman_supervisory_authority:
|
20
28
|
server_url: https://elastic-apm.example.com
|
21
|
-
secret_token:
|
22
|
-
service_name:
|
29
|
+
secret_token: "12345verysecret"
|
30
|
+
service_name: "foreman"
|
23
31
|
transaction_max_spans: 100
|
24
32
|
```
|
25
33
|
|
@@ -38,9 +46,8 @@ the Free Software Foundation, either version 3 of the License, or
|
|
38
46
|
|
39
47
|
This program is distributed in the hope that it will be useful,
|
40
48
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
41
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
49
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
42
50
|
GNU General Public License for more details.
|
43
51
|
|
44
52
|
You should have received a copy of the GNU General Public License
|
45
|
-
along with this program.
|
46
|
-
|
53
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
@@ -10,14 +10,11 @@ module ForemanSupervisoryAuthority
|
|
10
10
|
|
11
11
|
initializer 'foreman_supervisory_authority.register_plugin', before: :finisher_hook do
|
12
12
|
Foreman::Plugin.register :foreman_supervisory_authority do
|
13
|
-
requires_foreman '>=
|
13
|
+
requires_foreman '>= 3.10'
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
# https://github.com/elastic/apm-agent-ruby/issues/379
|
19
|
-
# for reasoning
|
20
|
-
config.elastic_apm.disabled_spies = %w[json net_http]
|
17
|
+
config.elastic_apm.disable_instrumentations = %w[json]
|
21
18
|
|
22
19
|
# map user context methods to what we use in Foreman
|
23
20
|
config.elastic_apm.current_user_email_method = :mail
|
@@ -27,13 +24,11 @@ module ForemanSupervisoryAuthority
|
|
27
24
|
|
28
25
|
# Include concerns in this config.to_prepare block
|
29
26
|
config.to_prepare do
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
Rails.logger.warn "ForemanSupervisoryAuthority: skipping engine hook (#{e})"
|
36
|
-
end
|
27
|
+
::ApplicationController.include ForemanSupervisoryAuthority::SetElasticApmContext
|
28
|
+
::Api::BaseController.include ForemanSupervisoryAuthority::SetElasticApmContext
|
29
|
+
::Api::GraphqlController.include ForemanSupervisoryAuthority::SetElasticApmContext
|
30
|
+
rescue StandardError => e
|
31
|
+
Rails.logger.warn "ForemanSupervisoryAuthority: skipping engine hook (#{e})"
|
37
32
|
end
|
38
33
|
end
|
39
34
|
|
@@ -15,7 +15,7 @@ namespace :test do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
namespace :foreman_supervisory_authority do
|
18
|
-
task :
|
18
|
+
task rubocop: :environment do
|
19
19
|
begin
|
20
20
|
require 'rubocop/rake_task'
|
21
21
|
RuboCop::RakeTask.new(:rubocop_foreman_supervisory_authority) do |task|
|
@@ -34,4 +34,7 @@ end
|
|
34
34
|
Rake::Task[:test].enhance ['test:foreman_supervisory_authority']
|
35
35
|
|
36
36
|
load 'tasks/jenkins.rake'
|
37
|
-
|
37
|
+
if Rake::Task.task_defined?(:'jenkins:unit')
|
38
|
+
Rake::Task['jenkins:unit'].enhance ['test:foreman_supervisory_authority',
|
39
|
+
'foreman_supervisory_authority:rubocop']
|
40
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_supervisory_authority
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Goebel
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elastic-apm
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '6.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '6.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: rubocop
|
42
|
+
name: theforeman-rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.1.2
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.1.2
|
55
55
|
description: This plug-in for Foreman sends data to Elastic APM.
|
56
56
|
email:
|
57
57
|
- mail@timogoebel.name
|
@@ -68,13 +68,13 @@ files:
|
|
68
68
|
- lib/foreman_supervisory_authority/engine.rb
|
69
69
|
- lib/foreman_supervisory_authority/version.rb
|
70
70
|
- lib/tasks/foreman_supervisory_authority_tasks.rake
|
71
|
-
|
72
|
-
- test/unit/foreman_supervisory_authority_test.rb
|
73
|
-
homepage: https://github.com/timogoebel/foreman_supervisory_authority
|
71
|
+
homepage: https://github.com/theforeman/foreman_supervisory_authority
|
74
72
|
licenses:
|
75
73
|
- GPL-3.0
|
76
|
-
metadata:
|
77
|
-
|
74
|
+
metadata:
|
75
|
+
rubygems_mfa_required: 'true'
|
76
|
+
is_foreman_plugin: 'true'
|
77
|
+
post_install_message:
|
78
78
|
rdoc_options: []
|
79
79
|
require_paths:
|
80
80
|
- lib
|
@@ -82,18 +82,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
85
|
+
version: '2.5'
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '4'
|
86
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
90
|
requirements:
|
88
91
|
- - ">="
|
89
92
|
- !ruby/object:Gem::Version
|
90
93
|
version: '0'
|
91
94
|
requirements: []
|
92
|
-
|
93
|
-
|
94
|
-
signing_key:
|
95
|
+
rubygems_version: 3.5.3
|
96
|
+
signing_key:
|
95
97
|
specification_version: 4
|
96
98
|
summary: This Foreman plug-in integrates with Elastic APM.
|
97
|
-
test_files:
|
98
|
-
- test/unit/foreman_supervisory_authority_test.rb
|
99
|
-
- test/test_plugin_helper.rb
|
99
|
+
test_files: []
|
data/test/test_plugin_helper.rb
DELETED