serverspec 2.41.1 → 2.41.6

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
- SHA1:
3
- metadata.gz: ee1ffbf9f76b242c5d94fa558aef06b8980c8f0d
4
- data.tar.gz: f76a2dcaefdc35264c98011acb254833c175b634
2
+ SHA256:
3
+ metadata.gz: c055c97caf2f1a49b8a9636f73ecfe4b9b63ee7c03fbee33e61bc4a3bf3c03b3
4
+ data.tar.gz: aabdb043508a030010e43e5da1a6d575a75de901c3c1e830e3afb2bf96aa6fdd
5
5
  SHA512:
6
- metadata.gz: e6b1728ab52ce056b9001b4edd4e2162b59c0f6de21463b79ba0dc41fbb74fa2d355466bbb0c71af67d71748ecf3bcfc82730b9e4a52462bbde4df562a671ab6
7
- data.tar.gz: 5bab9af35870d96a8a1f2766df08d78cdeafb5e49d854ef46da6118b38980762e6ac01e7ed54c1b321508fe4146b7e90d58414d23d07f169abc9e5db29956c91
6
+ metadata.gz: 2aca68fe8c54039f3a5187c20d69700dcbbf6fba3a57555c89cd13203bb8f2bc7c42fdb990252bf178b6402e894fa3fde552f9c7c5cb20f2e58c2f32be45ff7f
7
+ data.tar.gz: 2d2f0baa539f472927d5287d5b26f6d22395f183718305dd1a123b77538c815a94362e794b363d8413c28f9d9e13de0f9cbdcc03c223959ecf9220767d3b39c4
data/.github/stale.yml ADDED
@@ -0,0 +1,18 @@
1
+ # Number of days of inactivity before an issue becomes stale
2
+ daysUntilStale: 60
3
+ # Number of days of inactivity before a stale issue is closed
4
+ daysUntilClose: 7
5
+ # Issues with these labels will never be considered stale
6
+ exemptLabels:
7
+ - pinned
8
+ - security
9
+ # Label to use when marking an issue as stale
10
+ staleLabel: wontfix
11
+ # Comment to post when marking an issue as stale. Set to `false` to disable
12
+ markComment: >
13
+ This issue has been automatically marked as stale because it has not had
14
+ recent activity. It will be closed if no further activity occurs. Thank you
15
+ for your contributions.
16
+ # Comment to post when closing a stale issue. Set to `false` to disable
17
+ closeComment: false
18
+
data/.travis.yml CHANGED
@@ -1,19 +1,23 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 1.8.7
5
4
  - 1.9.3
6
5
  - 2.0.0
7
6
  - 2.1.1
8
7
  - 2.2.4
9
- - 2.3.0
8
+ - 2.3.6
9
+ - 2.4.3
10
+ - 2.5.0
10
11
 
11
12
  before_install:
12
- - gem update bundler
13
+ - travis_retry gem update --system 2.7.8
14
+ - travis_retry gem install bundler -v 1.17.3
15
+ - travis_retry gem uninstall -i /home/travis/.rvm/gems/ruby-2.3.7@global bundler || echo
13
16
 
14
17
  script:
15
18
  - bundle exec rake spec
16
19
 
20
+ dist: trusty
17
21
  sudo: false
18
22
  cache: bundler
19
23
  notifications:
data/WINDOWS_SUPPORT.md CHANGED
@@ -26,8 +26,21 @@ user = <username>
26
26
  pass = <password>
27
27
  endpoint = "http://#{ENV['TARGET_HOST']}:5985/wsman"
28
28
 
29
- winrm = ::WinRM::WinRMWebService.new(endpoint, :ssl, :user => user, :pass => pass, :basic_auth_only => true)
30
- winrm.set_timeout 300 # 5 minutes max timeout for any operation
29
+ if Gem::Version.new(WinRM::VERSION) < Gem::Version.new('2')
30
+ winrm = ::WinRM::WinRMWebService.new(endpoint, :ssl, :user => user, :pass => pass, :basic_auth_only => true)
31
+ winrm.set_timeout 300 # 5 minutes max timeout for any operation
32
+ else
33
+ opts = {
34
+ user: user,
35
+ password: pass,
36
+ endpoint: endpoint,
37
+ operation_timeout: 300,
38
+ no_ssl_peer_verification: false,
39
+ }
40
+
41
+ winrm = ::WinRM::Connection.new(opts)
42
+ end
43
+
31
44
  Specinfra.configuration.winrm = winrm
32
45
  ```
33
46
 
data/appveyor.yml CHANGED
@@ -14,6 +14,9 @@ environment:
14
14
  - ruby_version: "21"
15
15
  - ruby_version: "22"
16
16
  - ruby_version: "23"
17
+ - ruby_version: "24"
18
+ - ruby_version: "25"
19
+ - ruby_version: "26"
17
20
 
18
21
  matrix:
19
22
  allow_failures:
@@ -32,6 +35,12 @@ cache:
32
35
  - C:\Ruby22\bin -> appveyor.yml
33
36
  - C:\Ruby23\lib\ruby\gems\2.2.0 -> appveyor.yml
34
37
  - C:\Ruby23\bin -> appveyor.yml
38
+ - C:\Ruby24\lib\ruby\gems\2.4.0 -> appveyor.yml
39
+ - C:\Ruby24\bin -> appveyor.yml
40
+ - C:\Ruby25\lib\ruby\gems\2.5.0 -> appveyor.yml
41
+ - C:\Ruby25\bin -> appveyor.yml
42
+ - C:\Ruby26\lib\ruby\gems\2.6.0 -> appveyor.yml
43
+ - C:\Ruby26\bin
35
44
 
36
45
  install:
37
46
  - git submodule update --init --recursive
@@ -46,10 +55,11 @@ install:
46
55
  - ruby --version
47
56
  - gem --version
48
57
  - appveyor DownloadFile -Url %bundler_url% -FileName bundler.gem
49
- - gem install --local bundler.gem --no-ri --no-rdoc ## appveyor often stops `gem install bundler`..?
58
+ - gem install --local bundler.gem --no-document --force ## appveyor often stops `gem install bundler`..?
50
59
  - ps: $PSVersionTable
51
60
 
52
61
  build_script:
62
+ - set SSL_CERT_FILE=C:/ruby24-x64/ssl/cert.pem
53
63
  - ruby -rfileutils -e 'FileUtils.rm_r(File.join(Gem.dir, "cache", "bundler")) if Dir.exists?(File.join(Gem.dir, "cache", "bundler"))'
54
64
  - bundle install --jobs 3 --retry 3
55
65
  - net user
data/lib/serverspec.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
- require 'specinfra'
3
2
  require 'rspec'
4
3
  require 'rspec/its'
4
+ require 'specinfra'
5
5
  require 'serverspec/version'
6
6
  require 'serverspec/matcher'
7
7
  require 'serverspec/helper'
@@ -1,9 +1,9 @@
1
1
  RSpec::Matchers.define :be_installed do
2
- match do |name|
2
+ match do |subject|
3
3
  if subject.class.name == 'Serverspec::Type::SelinuxModule'
4
- name.installed?(@version)
4
+ subject.installed?(@version)
5
5
  else
6
- name.installed?(@provider, @version)
6
+ subject.installed?(@provider, @version)
7
7
  end
8
8
  end
9
9
 
@@ -308,8 +308,21 @@ user = <username>
308
308
  pass = <password>
309
309
  endpoint = "http://#{ENV['TARGET_HOST']}:5985/wsman"
310
310
 
311
- winrm = ::WinRM::WinRMWebService.new(endpoint, :ssl, :user => user, :pass => pass, :basic_auth_only => true)
312
- winrm.set_timeout 300 # 5 minutes max timeout for any operation
311
+ if Gem::Version.new(WinRM::VERSION) < Gem::Version.new('2')
312
+ winrm = ::WinRM::WinRMWebService.new(endpoint, :ssl, :user => user, :pass => pass, :basic_auth_only => true)
313
+ winrm.set_timeout 300 # 5 minutes max timeout for any operation
314
+ else
315
+ opts = {
316
+ user: user,
317
+ password: pass,
318
+ endpoint: endpoint,
319
+ operation_timeout: 300,
320
+ no_ssl_peer_verification: false,
321
+ }
322
+
323
+ winrm = ::WinRM::Connection.new(opts)
324
+ end
325
+
313
326
  Specinfra.configuration.winrm = winrm
314
327
  <% end -%>
315
328
  EOF
@@ -1,7 +1,8 @@
1
1
  module Serverspec::Type
2
2
  class Service < Base
3
3
  def enabled?(level, under=nil)
4
- check_method = "check_service_is_enabled" + (under ? "_#{under}" : '')
4
+ under = under ? "_under_#{under.gsub(/^under_/, '')}" : ''
5
+ check_method = "check_service_is_enabled#{under}"
5
6
 
6
7
  if level
7
8
  @runner.send(check_method.to_sym, @name, level)
@@ -7,11 +7,11 @@ module Serverspec::Type
7
7
  end
8
8
 
9
9
  def subject
10
- run_openssl_command_with("-subject -noout").stdout.chomp.gsub(/^subject= */,'')
10
+ normalize_dn(run_openssl_command_with("-subject -noout").stdout.chomp.gsub(/^subject= */,''))
11
11
  end
12
12
 
13
13
  def issuer
14
- run_openssl_command_with("-issuer -noout").stdout.chomp.gsub(/^issuer= */,'')
14
+ normalize_dn(run_openssl_command_with("-issuer -noout").stdout.chomp.gsub(/^issuer= */,''))
15
15
  end
16
16
 
17
17
  def email
@@ -81,5 +81,12 @@ module Serverspec::Type
81
81
  res.merge({ kv_arr[0].to_sym => time })
82
82
  end
83
83
  end
84
+
85
+ # Normalize output between openssl versions.
86
+ def normalize_dn(dn)
87
+ return subject unless subject.start_with?('/')
88
+ # normalize openssl >= 1.1 to < 1.1 output
89
+ subject[1..-1].split('/').join(', ').gsub('=', ' = ')
90
+ end
84
91
  end
85
92
  end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.41.1"
2
+ VERSION = "2.41.6"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -22,7 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency "rspec-its"
23
23
  spec.add_runtime_dependency "multi_json"
24
24
  spec.add_runtime_dependency "specinfra", "~> 2.72"
25
- spec.add_development_dependency "bundler", "~> 1.3"
26
25
  spec.add_development_dependency("json", "~> 1.8") if RUBY_VERSION < "1.9"
27
26
  spec.add_development_dependency "rake", "~> 10.1.1"
28
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.41.1
4
+ version: 2.41.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-19 00:00:00.000000000 Z
11
+ date: 2021-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.72'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.3'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.3'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: rake
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +89,7 @@ executables:
103
89
  extensions: []
104
90
  extra_rdoc_files: []
105
91
  files:
92
+ - ".github/stale.yml"
106
93
  - ".gitignore"
107
94
  - ".gitmodules"
108
95
  - ".travis.yml"
@@ -319,7 +306,7 @@ homepage: http://serverspec.org/
319
306
  licenses:
320
307
  - MIT
321
308
  metadata: {}
322
- post_install_message:
309
+ post_install_message:
323
310
  rdoc_options: []
324
311
  require_paths:
325
312
  - lib
@@ -334,9 +321,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
334
321
  - !ruby/object:Gem::Version
335
322
  version: '0'
336
323
  requirements: []
337
- rubyforge_project:
338
- rubygems_version: 2.2.2
339
- signing_key:
324
+ rubygems_version: 3.1.2
325
+ signing_key:
340
326
  specification_version: 4
341
327
  summary: RSpec tests for your servers configured by Puppet, Chef, Itamae or anything
342
328
  else