foreman-tasks 10.0.0 → 10.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/foreman_tasks/cleaner.rb +1 -1
- data/lib/foreman_tasks/tasks/export_tasks.rake +3 -3
- data/lib/foreman_tasks/version.rb +1 -1
- data/lib/tasks/gettext.rake +15 -9
- metadata +2 -3
- data/locale/action_names.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a7506ccab551c52f9408df7fcfca78e6a565753bc35ca7263bd2265a5aa95bf
|
4
|
+
data.tar.gz: 2a6a714e7cfc082139d7fd73f1f7c2547817e4e9ace0b02c681bad6b8f63043b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c1f0897789b528c739a77a21b39b2471f841759472c2755228b288e698485c11aee37224106c96725cd858d98c970fbe71948adceeb1553b83931a75e817676
|
7
|
+
data.tar.gz: fe5eb0b8a95b15ada47a46b4839c79e5b45d43042a28ca13fd1ad318a1dbeb7afe0257138eea96b3006613baf4fe0ec7d51c98854347b1a5f908cea6eefabf77
|
data/.gitignore
CHANGED
@@ -252,7 +252,7 @@ module ForemanTasks
|
|
252
252
|
|
253
253
|
def prepare_filter
|
254
254
|
filter_parts = [filter]
|
255
|
-
filter_parts << %(started_at < "#{after.ago.
|
255
|
+
filter_parts << %(started_at < "#{after.ago.to_formatted_s(:db)}") if after > 0
|
256
256
|
filter_parts << "state ^ (#{states.join(',')})" if states.any?
|
257
257
|
filter_parts.select(&:present?).map { |segment| "(#{segment})" }.join(' AND ')
|
258
258
|
end
|
@@ -310,15 +310,15 @@ namespace :foreman_tasks do
|
|
310
310
|
SKIP_ERRORS = ['true', '1', 'y', 'yes'].include? (ENV['SKIP_FAILED'] || '').downcase
|
311
311
|
|
312
312
|
filter = if ENV['TASK_SEARCH'].nil? && ENV['TASK_DAYS'].nil?
|
313
|
-
"started_at > \"#{7.days.ago.
|
314
|
-
"(result != success && started_at > \"#{60.days.ago.
|
313
|
+
"started_at > \"#{7.days.ago.to_formatted_s(:db)}\" || " \
|
314
|
+
"(result != success && started_at > \"#{60.days.ago.to_formatted_s(:db)})\""
|
315
315
|
else
|
316
316
|
ENV['TASK_SEARCH'] || ''
|
317
317
|
end
|
318
318
|
|
319
319
|
if (days = ENV['TASK_DAYS'])
|
320
320
|
filter += ' && ' unless filter == ''
|
321
|
-
filter += "started_at > \"#{days.to_i.days.ago.
|
321
|
+
filter += "started_at > \"#{days.to_i.days.ago.to_formatted_s(:db)}\""
|
322
322
|
end
|
323
323
|
|
324
324
|
format = ENV['TASK_FORMAT'] || 'html'
|
data/lib/tasks/gettext.rake
CHANGED
@@ -8,21 +8,27 @@ if gettext_find_task
|
|
8
8
|
namespace :gettext do
|
9
9
|
task :store_action_names => :environment do
|
10
10
|
storage_file = "#{locale_path}/action_names.rb"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
method_names = [:plan, :run, :finalize]
|
12
|
+
instances = Actions::EntryAction
|
13
|
+
.descendants
|
14
|
+
.uniq
|
15
|
+
.map(&:allocate)
|
16
|
+
.select do |action|
|
17
|
+
method_names.any? do |method_name|
|
18
|
+
if action.respond_to?(method_name)
|
19
|
+
src, = action.method(method_name).source_location
|
20
|
+
src.start_with? @engine.root.to_s
|
21
|
+
end
|
22
|
+
end
|
17
23
|
end
|
18
24
|
|
19
|
-
if
|
25
|
+
if instances.any?
|
20
26
|
puts "writing action translations to: #{storage_file}"
|
21
27
|
|
22
28
|
File.write storage_file,
|
23
29
|
"# Autogenerated!\n" +
|
24
|
-
|
25
|
-
.map { |
|
30
|
+
instances
|
31
|
+
.map { |instance| %[_("#{instance.humanized_name}")] }
|
26
32
|
.sort
|
27
33
|
.join("\n") + "\n"
|
28
34
|
elsif File.exist? storage_file
|
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: 10.0.
|
4
|
+
version: 10.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dynflow
|
@@ -318,7 +318,6 @@ files:
|
|
318
318
|
- lib/foreman_tasks/version.rb
|
319
319
|
- lib/tasks/gettext.rake
|
320
320
|
- locale/Makefile
|
321
|
-
- locale/action_names.rb
|
322
321
|
- locale/de/LC_MESSAGES/foreman_tasks.mo
|
323
322
|
- locale/de/foreman_tasks.po
|
324
323
|
- locale/en/LC_MESSAGES/foreman_tasks.mo
|