simp-test 0.3.20 → 0.3.22

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: dd6caa278f12a93f0a889fee69d4ea84d7c409d0366cd97fc1f8dc5f74d7aa40
4
- data.tar.gz: 9e508e9bdf159ca928d2232c6394d650d4e4860d8f190d0713fabb59e0b3ac56
3
+ metadata.gz: 92dd023dfe9c8794387dfb5d49f29472eceded97ecb8125e51f9abeb0f0066cb
4
+ data.tar.gz: c804fecca73ed42aa639041103eb0e9bc1815bb218a86a808392f1497c83920a
5
5
  SHA512:
6
- metadata.gz: 0c29b341f02d8ed7367dc114bb94d872d7f6088bdf03813548d434b0485f6946e32546e4241e9dbe12f874ca86edf98470de6808d39353924453b26273cddfaf
7
- data.tar.gz: e7e4b138143bc3c61a46d942a0e5637f4533185efae5c3698d073e2ea0311ddfad8f1d8ede396aa848a09f25bd57b1ee7542ab890665047e2732db9445caffc0
6
+ metadata.gz: 77adaaaac39d83ee85d088f884bd40a419200b87868e9af52d2f0eb62b57ffead3c1854ed55d51187b055e6badf40442c84b06b669987d5d314ec74883d3cb78
7
+ data.tar.gz: da670b1a8374baec9a960aeaff7fd5efb1888933f4e736207cc4cc62e6ff6e36eff4cb5e1a6d2d9477e1784c325ab474cadfad991b953a1af8579b1e07973122
data/Rakefile CHANGED
@@ -1,145 +1,8 @@
1
- require 'rake/clean'
2
- require 'fileutils'
3
- require 'find'
4
- require 'rspec/core/rake_task'
5
-
6
- @package='simp-test'
7
- @rakefile_dir=File.dirname(__FILE__)
8
-
9
- CLEAN.include "#{@package}-*.gem"
10
- CLEAN.include 'pkg'
11
- CLEAN.include 'dist'
12
- CLEAN.include '.vendor'
13
- Find.find( @rakefile_dir ) do |path|
14
- if File.directory? path
15
- CLEAN.include path if File.basename(path) == 'tmp'
16
- else
17
- Find.prune
18
- end
19
- end
20
-
21
-
22
- desc 'Ensure gemspec-safe permissions on all files'
23
- task :chmod do
24
- gemspec = File.expand_path( "#{@package}.gemspec", @rakefile_dir ).strip
25
- spec = Gem::Specification::load( gemspec )
26
- spec.files.each do |file|
27
- FileUtils.chmod 'go=r', file unless File.symlink?(file)
28
- end
29
- end
30
-
31
- desc 'special notes about these rake commands'
32
- task :help do
33
- puts %Q{
34
- == environment variables ==
35
- SIMP_RPM_BUILD when set, alters the gem produced by pkg:gem to be RPM-safe.
36
- 'pkg:gem' sets this automatically.
37
- }
38
- end
39
-
40
- desc "Run spec tests"
41
- RSpec::Core::RakeTask.new(:spec) do |t|
42
- t.rspec_opts = ['--color']
43
- t.pattern = 'spec/lib/**/*_spec.rb'
44
- end
45
-
46
- desc %q{run all RSpec tests (alias of 'spec')}
47
- task :test => :spec
48
-
49
- desc "Run acceptance tests"
50
- RSpec::Core::RakeTask.new(:acceptance) do |t|
51
- t.pattern = 'spec/acceptance'
52
- end
53
-
54
- namespace :pkg do
55
- @specfile_template = "rubygem-#{@package}.spec.template"
56
- @specfile = "build/rubygem-#{@package}.spec"
57
-
58
- # ----------------------------------------
59
- # DO NOT UNCOMMENT THIS: the spec file requires a lot of tweaking
60
- # ----------------------------------------
61
- # desc "generate RPM spec file for #{@package}"
62
- # task :spec => [:clean, :gem] do
63
- # Dir.glob("pkg/#{@package}*.gem") do |pkg|
64
- # sh %Q{gem2rpm -t "#{@specfile_template}" "#{pkg}" > "#{@specfile}"}
65
- # end
66
- # end
1
+ # frozen_string_literal: true
67
2
 
68
- desc "build rubygem package for #{@package}"
69
- task :gem => :chmod do
70
- Dir.chdir @rakefile_dir
71
- Dir['*.gemspec'].each do |spec_file|
72
- rpm_build = ENV.fetch('SIMP_RPM_BUILD', '1')
73
- cmd = %Q{SIMP_RPM_BUILD=#{rpm_build} bundle exec gem build "#{spec_file}"}
74
- sh cmd
75
- FileUtils.mkdir_p 'dist'
76
- FileUtils.mv Dir.glob("#{@package}*.gem"), 'dist/'
77
- end
78
- end
79
-
80
-
81
- desc "build and install rubygem package for #{@package}"
82
- task :install_gem => [:clean, :gem] do
83
- Dir.chdir @rakefile_dir
84
- Dir.glob("dist/#{@package}*.gem") do |pkg|
85
- sh %Q{bundle exec gem install #{pkg}}
86
- end
87
- end
88
-
89
-
90
- desc "generate RPM for #{@package}"
91
- require 'tmpdir'
92
- task :rpm, [:mock_root] => [:clean, :gem] do |t, args|
93
- mock_root = args[:mock_root]
94
- # TODO : Get rid of this terrible code. Shoe-horned in until
95
- # we have a better idea for auto-decet
96
- if mock_root =~ /^epel-6/ then el_version = '6'
97
- elsif mock_root =~ /^epel-7/ then el_version = '7'
98
- else puts 'WARNING: Did not detect epel version'
99
- end
100
- tmp_dir = ''
101
-
102
- if tmp_dir = ENV.fetch( 'SIMP_MOCK_SIMPGEM_ASSETS_DIR', false )
103
- FileUtils.mkdir_p tmp_dir
104
- else
105
- tmp_dir = Dir.mktmpdir( "build_#{@package}" )
106
- end
107
-
108
- begin
109
- Dir.chdir tmp_dir
110
- specfile = "#{@rakefile_dir}/build/rubygem-#{@package}.el#{el_version}.spec"
111
- tmp_specfile = "#{tmp_dir}/rubygem-#{@package}.el#{el_version}.spec"
112
-
113
- # We have to copy to a local directory because mock bugs out in NFS
114
- # home directories (where SIMP devs often work)
115
- FileUtils.cp specfile, tmp_specfile, :preserve => true
116
- Dir.glob("#{@rakefile_dir}/dist/#{@package}*.gem") do |pkg|
117
- FileUtils.cp pkg, tmp_dir, :preserve => true
118
- end
119
-
120
- # Build SRPM from specfile
121
- sh %Q{mock -r #{mock_root} --buildsrpm --source="#{tmp_dir}" --spec="#{tmp_specfile}" --resultdir="#{tmp_dir}"}
122
-
123
- # Build RPM from SRPM
124
- Dir.glob("#{tmp_dir}/rubygem-#{@package}-*.el#{el_version}*.src.rpm") do |pkg|
125
- sh %Q{mock -r #{mock_root} --rebuild "#{pkg}" --resultdir=#{tmp_dir} --no-cleanup-after}
126
- end
127
-
128
- sh %Q{ls -l "#{tmp_dir}"}
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
129
5
 
130
- # copy RPM back into pkg/
131
- Dir.glob("#{tmp_dir}/rubygem-#{@package}-*.el#{el_version}*.rpm") do |pkg|
132
- sh %Q{cp "#{pkg}" "#{@rakefile_dir}/dist/"}
133
- FileUtils.cp pkg, "#{@rakefile_dir}/dist/"
134
- end
135
- ensure
136
- Dir.chdir @rakefile_dir
137
- # cleanup if needed
138
- if ! ENV.fetch( 'SIMP_MOCK_SIMPGEM_ASSETS_DIR', false )
139
- FileUtils.remove_entry_secure tmp_dir
140
- end
141
- end
142
- end
143
- end
6
+ RSpec::Core::RakeTask.new(:spec)
144
7
 
145
- # vim: syntax=ruby
8
+ task default: :spec
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Simp
4
4
  module Test
5
- VERSION = '0.3.20'
5
+ VERSION = '0.3.22'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.20
4
+ version: 0.3.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - SIMP Team
@@ -17,7 +17,6 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - ".github/workflows.local.json"
21
20
  - ".github/workflows/pr_glci.yml"
22
21
  - ".github/workflows/pr_glci_cleanup.yml"
23
22
  - ".github/workflows/pr_glci_manual.yml"
@@ -1,5 +0,0 @@
1
- {
2
- "gem_build_command": "bundle exec rake pkg:gem",
3
- "gem_release_command": "gem push dist/*.gem",
4
- "gem_pkg_dir": "dist"
5
- }