[DRE-commits] [ruby-serverspec] 03/09: New upstream version 2.39.1

Daisuke Higuchi dai at moszumanska.debian.org
Sun Aug 13 02:41:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

dai pushed a commit to branch master
in repository ruby-serverspec.

commit 23f2cd872c1c103f7c0bef769083ed13e483aae7
Author: HIGUCHI Daisuke (VDR dai) <dai at debian.org>
Date:   Sun Aug 13 11:28:49 2017 +0900

    New upstream version 2.39.1
---
 lib/serverspec/helper/type.rb           |  2 +-
 lib/serverspec/type/kvm.rb              | 19 +++++++++++++++++++
 lib/serverspec/type/x509_certificate.rb |  2 +-
 lib/serverspec/version.rb               |  2 +-
 serverspec.gemspec                      |  2 +-
 spec/type/linux/kvm_guest_spec.rb       | 15 +++++++++++++++
 wercker.yml                             |  6 +++++-
 7 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/lib/serverspec/helper/type.rb b/lib/serverspec/helper/type.rb
index aeb5cb3..71f2fe0 100644
--- a/lib/serverspec/helper/type.rb
+++ b/lib/serverspec/helper/type.rb
@@ -4,7 +4,7 @@ module Serverspec
       types = %w(
         base bridge bond cgroup command cron default_gateway file fstab
         group host iis_website iis_app_pool interface ipfilter ipnat
-        iptables ip6tables json_file kernel_module linux_kernel_parameter lxc
+        iptables ip6tables json_file kernel_module kvm linux_kernel_parameter lxc
         mail_alias mysql_config package php_config port ppa process
         routing_table selinux selinux_module service user yumrepo
         windows_feature windows_hot_fix windows_registry_key
diff --git a/lib/serverspec/type/kvm.rb b/lib/serverspec/type/kvm.rb
new file mode 100644
index 0000000..c3aa828
--- /dev/null
+++ b/lib/serverspec/type/kvm.rb
@@ -0,0 +1,19 @@
+module Serverspec::Type
+  class Kvm < Base
+    def exists?
+      @runner.check_kvm_guest_exists(@name)
+    end
+
+    def running?
+      @runner.check_kvm_guest_is_running(@name)
+    end
+
+    def enabled?
+      @runner.check_kvm_guest_is_enabled(@name)
+    end
+
+    def to_s
+      'KVM'
+    end
+  end
+end
diff --git a/lib/serverspec/type/x509_certificate.rb b/lib/serverspec/type/x509_certificate.rb
index 9c9ac49..b3c111a 100644
--- a/lib/serverspec/type/x509_certificate.rb
+++ b/lib/serverspec/type/x509_certificate.rb
@@ -64,7 +64,7 @@ module Serverspec::Type
       text = run_openssl_command_with('-text -noout').stdout
       # X509v3 Subject Alternative Name:
       #     DNS:*.example.com, DNS:www.example.net, IP:192.0.2.10
-      if text =~ /^ *X509v3 Subject Alternative Name: *\n *(.*)$/
+      if text =~ /^ *X509v3 Subject Alternative Name:.*\n *(.*)$/
         $1.split(/, +/)
       end
     end
diff --git a/lib/serverspec/version.rb b/lib/serverspec/version.rb
index 303be4a..47e97d1 100644
--- a/lib/serverspec/version.rb
+++ b/lib/serverspec/version.rb
@@ -1,3 +1,3 @@
 module Serverspec
-  VERSION = "2.38.0"
+  VERSION = "2.39.1"
 end
diff --git a/serverspec.gemspec b/serverspec.gemspec
index 514adb1..e416245 100644
--- a/serverspec.gemspec
+++ b/serverspec.gemspec
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
   spec.add_runtime_dependency "rspec", "~> 3.0"
   spec.add_runtime_dependency "rspec-its"
   spec.add_runtime_dependency "multi_json"
-  spec.add_runtime_dependency "specinfra", "~> 2.53"
+  spec.add_runtime_dependency "specinfra", "~> 2.68"
   spec.add_development_dependency "bundler", "~> 1.3"
   spec.add_development_dependency("json", "~> 1.8") if RUBY_VERSION < "1.9"
   spec.add_development_dependency "rake", "~> 10.1.1"
diff --git a/spec/type/linux/kvm_guest_spec.rb b/spec/type/linux/kvm_guest_spec.rb
new file mode 100644
index 0000000..0d4a1e5
--- /dev/null
+++ b/spec/type/linux/kvm_guest_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+set :os, :family => 'linux'
+
+describe kvm('ct01') do
+  it { should exist }
+end
+
+describe kvm('ct01') do
+  it { should be_running }
+end
+
+describe kvm('ct01') do
+  it { should be_enabled }
+end
diff --git a/wercker.yml b/wercker.yml
index ec0b07a..427d4b9 100644
--- a/wercker.yml
+++ b/wercker.yml
@@ -1,7 +1,11 @@
-box: mizzy/serverspec-base at 0.0.6
 build:
+  box:
+    id: mizzy/wercker-serverspec
   steps:
     - script:
+        name: initialize git submodules
+        code: git submodule update --init --recursive
+    - script:
         name: Run walter
         code: ./$WORKING_DIR/walter -config ./$WORKING_DIR/pipeline.yml -build
   after-steps:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-serverspec.git



More information about the Pkg-ruby-extras-commits mailing list