facter-statistax 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/acceptance/Gemfile +2 -1
  3. data/acceptance/log_performance/configuration.rb +65 -0
  4. data/acceptance/log_performance/custom_exceptions.rb +5 -0
  5. data/acceptance/log_performance/execute_beaker_tests/beaker.rb +77 -0
  6. data/acceptance/log_performance/execute_beaker_tests/command_logger.rb +24 -0
  7. data/acceptance/log_performance/execute_beaker_tests/ns_pooler.rb +60 -0
  8. data/acceptance/log_performance/execute_beaker_tests/output_parser.rb +40 -0
  9. data/acceptance/log_performance/execute_beaker_tests/run_command.rb +30 -0
  10. data/acceptance/log_performance/execute_beaker_tests/test_all_platforms.rb +99 -0
  11. data/acceptance/log_performance/execute_beaker_tests/vm_pooler.rb +7 -0
  12. data/acceptance/log_performance/get_supported_platforms.rb +1904 -0
  13. data/acceptance/log_performance/performance_times_logging/facter_performance_logs_parser.rb +65 -0
  14. data/acceptance/log_performance/performance_times_logging/google_sheets.rb +133 -0
  15. data/acceptance/log_performance/performance_times_logging/log_performance_times.rb +20 -0
  16. data/acceptance/log_performance/performance_times_logging/table_logging_utils.rb +55 -0
  17. data/acceptance/log_performance/performance_times_logging/write_facter_times_to_logger.rb +109 -0
  18. data/acceptance/log_performance/rspec/file_folder_utils_rspec.rb +12 -0
  19. data/acceptance/log_performance/utils.rb +41 -0
  20. data/acceptance/run/run_statistax.rb +45 -29
  21. data/lib/version.rb +1 -1
  22. data/scripts/benchmark_script.rb +9 -7
  23. metadata +21 -5
  24. data/acceptance/build_facter_ng_gem.sh +0 -1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FacterStatistax
4
- VERSION = '0.0.9'
4
+ VERSION = '0.0.10'
5
5
  end
@@ -3,6 +3,13 @@
3
3
  require 'benchmark'
4
4
  require 'open3'
5
5
 
6
+ def facter_path(gems_path)
7
+ ruby_version = Dir.entries(gems_path).select { |file| file =~ /[0-9]+.[0-9]+.[0-9]+/ }
8
+ facter_ng_path = File.join(gems_path, ruby_version, 'gems')
9
+ facter_ng_version = Dir.entries(facter_ng_path).select { |file| file =~ /facter-4/ }
10
+ return File.join(facter_ng_path, facter_ng_version, 'lib', 'facter.rb')
11
+ end
12
+
6
13
  if ARGV[0].to_s == 'false'
7
14
  if Gem.win_platform?
8
15
  facter_dir = 'C:/Program Files/Puppet Labs/Puppet/puppet/bin'
@@ -12,14 +19,9 @@ if ARGV[0].to_s == 'false'
12
19
  require '/opt/puppetlabs/puppet/lib/libfacter.so'
13
20
  end
14
21
  elsif Gem.win_platform?
15
- gems_path = 'C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/gems'
16
- ruby_version = Dir.entries(gems_path).select { |file| file =~ /[0-9]+.[0-9]+.[0-9]+/ }
17
- facter_ng_path = File.join(gems_path, ruby_version, 'gems')
18
- facter_ng_version = Dir.entries(facter_ng_path).select { |file| file =~ /facter-4/ }
19
- facter_ng_path = File.join(facter_ng_path, facter_ng_version, 'lib', 'facter.rb')
20
- require facter_ng_path
22
+ require facter_path('C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/gems')
21
23
  else
22
- require 'facter'
24
+ require facter_path('/opt/puppetlabs/puppet/lib/ruby/gems')
23
25
  end
24
26
 
25
27
  time = Benchmark.realtime do
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facter-statistax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-08-08 00:00:00.000000000 Z
@@ -84,10 +84,26 @@ files:
84
84
  - acceptance/.beaker.yml
85
85
  - acceptance/Gemfile
86
86
  - acceptance/README.md
87
- - acceptance/build_facter_ng_gem.sh
88
87
  - acceptance/config.json
89
88
  - acceptance/config/aio/options.rb
90
89
  - acceptance/lib/helper.rb
90
+ - acceptance/log_performance/configuration.rb
91
+ - acceptance/log_performance/custom_exceptions.rb
92
+ - acceptance/log_performance/execute_beaker_tests/beaker.rb
93
+ - acceptance/log_performance/execute_beaker_tests/command_logger.rb
94
+ - acceptance/log_performance/execute_beaker_tests/ns_pooler.rb
95
+ - acceptance/log_performance/execute_beaker_tests/output_parser.rb
96
+ - acceptance/log_performance/execute_beaker_tests/run_command.rb
97
+ - acceptance/log_performance/execute_beaker_tests/test_all_platforms.rb
98
+ - acceptance/log_performance/execute_beaker_tests/vm_pooler.rb
99
+ - acceptance/log_performance/get_supported_platforms.rb
100
+ - acceptance/log_performance/performance_times_logging/facter_performance_logs_parser.rb
101
+ - acceptance/log_performance/performance_times_logging/google_sheets.rb
102
+ - acceptance/log_performance/performance_times_logging/log_performance_times.rb
103
+ - acceptance/log_performance/performance_times_logging/table_logging_utils.rb
104
+ - acceptance/log_performance/performance_times_logging/write_facter_times_to_logger.rb
105
+ - acceptance/log_performance/rspec/file_folder_utils_rspec.rb
106
+ - acceptance/log_performance/utils.rb
91
107
  - acceptance/presuite/011_install_facter_ng.rb
92
108
  - acceptance/presuite/01_install_puppet_agent.rb
93
109
  - acceptance/presuite/02_install_facter_statistax.rb
@@ -108,7 +124,7 @@ files:
108
124
  homepage: ''
109
125
  licenses: []
110
126
  metadata: {}
111
- post_install_message:
127
+ post_install_message:
112
128
  rdoc_options:
113
129
  - "--title"
114
130
  - 'Facter-Statistax '
@@ -129,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
145
  version: '0'
130
146
  requirements: []
131
147
  rubygems_version: 3.0.6
132
- signing_key:
148
+ signing_key:
133
149
  specification_version: 4
134
150
  summary: Facter-Statistax, benchmark for facter
135
151
  test_files: []
@@ -1 +0,0 @@
1
- gem build ../../facter-ng/facter-ng.gemspec