foreman-tasks 9.0.1 → 9.0.4

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: c07047587cf02128c555096e198c263c44e0309511968150c6ffad1014611ccc
4
- data.tar.gz: 0a67b8fa80f6a9c6ab2d15659adea5c067fc2ccff70ae1fab6df679580fc28cc
3
+ metadata.gz: 6e88541d169e078a42071bfc0d756e358d466ae258226ed6cee8dd983fc76584
4
+ data.tar.gz: d9f01f14d1c38e962d165109d9b9a9f90d65cc86c768efe7f759d8ce7ea573f1
5
5
  SHA512:
6
- metadata.gz: 1144a9f0f759891f5e99ecffbae42f9342f20eb6bd63adfeea0c7ded40cc38254be051024dbf344e3cebc40191098b4aa4ffe7d2d005c73e28b06fbd0e4a9349
7
- data.tar.gz: ba9a9c54f9c924a0ccb49f93b9cb22bad9132e4665b1d7a764667f3209d2cc26d6edff9d5e58a818b70500fe604d6074b2dc92a0aba3b0acdfab4b7078f3869e
6
+ metadata.gz: c27603a712c4b81186e512cb187df730a523dda3eea70c4efc48d46c9758f6e71d500dcbe94d52e96e99a7cb47b4d698aec9c435d84fa679e86675fa0c5dd2c0
7
+ data.tar.gz: 53e273339622e47f59b4074ff3f044dc2c79e673d6c113b47611be0c9ab5d77ae829d2349bcf8abf3e7058c883865fd3bc56a8bdf797c838309782c47b87f538
@@ -1,68 +1,20 @@
1
- name: Ruby Testing
2
- on: [pull_request]
3
- env:
4
- RAILS_ENV: test
5
- DATABASE_URL: postgresql://postgres:@localhost/test
6
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: true
7
- BUNDLE_WITHOUT: "journald:development:console:mysql2:sqlite:libvirt"
1
+ ---
2
+ name: CI
3
+
4
+ on: pull_request
5
+
8
6
  concurrency:
9
- group: ${{ github.workflow }}-${{ github.ref }}
7
+ group: ${{ github.ref_name }}-${{ github.workflow }}
10
8
  cancel-in-progress: true
9
+
11
10
  jobs:
12
11
  rubocop:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: actions/checkout@v2
16
- - name: Setup Ruby
17
- uses: ruby/setup-ruby@v1
18
- with:
19
- ruby-version: 2.7
20
- bundler-cache: true
21
- - name: Run rubocop
22
- run: bundle exec rubocop
23
- test_ruby:
24
- runs-on: ubuntu-latest
12
+ name: Rubocop
13
+ uses: theforeman/actions/.github/workflows/rubocop.yml@v0
14
+
15
+ test:
16
+ name: Ruby
25
17
  needs: rubocop
26
- timeout-minutes: 15
27
- services:
28
- postgres:
29
- image: postgres:12.1
30
- ports: ['5432:5432']
31
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
32
- strategy:
33
- fail-fast: false
34
- matrix:
35
- foreman-core-branch: [develop]
36
- ruby-version: [2.7]
37
- node-version: [12]
38
- steps:
39
- - run: sudo apt-get update
40
- - run: sudo apt-get install build-essential libcurl4-openssl-dev zlib1g-dev libpq-dev
41
- - uses: actions/checkout@v2
42
- with:
43
- repository: theforeman/foreman
44
- ref: ${{ matrix.foreman-core-branch }}
45
- - uses: actions/checkout@v2
46
- with:
47
- path: foreman-tasks
48
- - name: Setup Plugin in Foreman
49
- run: |
50
- echo "gem 'foreman-tasks', path: './foreman-tasks'" > bundler.d/foreman-tasks.local.rb
51
- echo "gem 'sqlite3'" >> bundler.d/foreman-tasks.local.rb
52
- - name: Setup Ruby
53
- uses: ruby/setup-ruby@v1
54
- with:
55
- ruby-version: ${{ matrix.ruby-version }}
56
- bundler-cache: true
57
- - name: Setup Node
58
- uses: actions/setup-node@v1
59
- with:
60
- node-version: ${{ matrix.node-version }}
61
- - name: Prepare test env
62
- run: |
63
- bundle exec rake db:create
64
- bundle exec rake db:migrate
65
- - name: Run plugin tests
66
- run: |
67
- bundle exec rake test:foreman_tasks
68
- bundle exec rake test TEST="test/unit/foreman/access_permissions_test.rb"
18
+ uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0
19
+ with:
20
+ plugin: foreman-tasks
@@ -42,6 +42,9 @@ module ForemanTasks
42
42
  end
43
43
 
44
44
  def update_from_batch_trigger(data, parent = {})
45
+ # The ID might get overwritten later, but it is a sane default in case of async
46
+ # triggering where we only get an id of a remote parent
47
+ self.remote_task_id = execution_plan_id
45
48
  if data['result'] == 'success'
46
49
  self.remote_task_id = data['task_id']
47
50
  self.state = 'triggered'
@@ -11,12 +11,12 @@ module ForemanTasks
11
11
  [:subnet, :fallback, :global]
12
12
  end
13
13
 
14
- def available_proxies(*_args)
14
+ def available_proxies(*_args, **_kwargs)
15
15
  raise NotImplementedError
16
16
  end
17
17
 
18
- def determine_proxy(*args)
19
- available_proxies = self.available_proxies(*args)
18
+ def determine_proxy(*args, **kwargs)
19
+ available_proxies = self.available_proxies(*args, **kwargs)
20
20
  return :not_defined if available_proxies.empty? || available_proxies.values.all?(&:empty?)
21
21
  proxy = nil
22
22
 
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = '9.0.1'.freeze
2
+ VERSION = '9.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.1
4
+ version: 9.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow
@@ -613,7 +613,7 @@ homepage: https://github.com/theforeman/foreman-tasks
613
613
  licenses:
614
614
  - GPL-3.0
615
615
  metadata: {}
616
- post_install_message:
616
+ post_install_message:
617
617
  rdoc_options: []
618
618
  require_paths:
619
619
  - lib
@@ -628,8 +628,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
628
628
  - !ruby/object:Gem::Version
629
629
  version: '0'
630
630
  requirements: []
631
- rubygems_version: 3.1.6
632
- signing_key:
631
+ rubygems_version: 3.3.26
632
+ signing_key:
633
633
  specification_version: 4
634
634
  summary: Foreman plugin for showing tasks information for resources and users
635
635
  test_files: