serverspec 2.1.0 → 2.2.0

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
  SHA1:
3
- metadata.gz: bd3bd738da245a8d57b9532757093bfc88d609af
4
- data.tar.gz: 7161e72b363e811889c2da3e9642e39bdbcaef5d
3
+ metadata.gz: 7f6d7aa27e722dbebd2e7c9052d267f2a790b4bc
4
+ data.tar.gz: c5dce829ed3872a406673ab8872c4dc6811374aa
5
5
  SHA512:
6
- metadata.gz: 87ace5e258793d1a52e02aa50f0030a8994cc9c51800e6fd7cddb491d165052ba247232f6981860187e30fc4cb9117981337b020233dc77732eccd1381ae656e
7
- data.tar.gz: fdf8b8ad55b7c3aa5803b27b1f476f949bf8469b082e0f38515839d4113804ad68ba8d922e1dcaa72a29ac999679de81278712443cf9b3835eaa03a102b85da1
6
+ metadata.gz: d45ded0ebc80ae93284eba93a1b1c47b37234aaa375312c0bc266f84afcad3a081a5551b4b5da95793f7b0985397299bbe1792730e238ecd0e927e0f337fe9cd
7
+ data.tar.gz: 798478850c32be2528c8bf14b7040f5d0c4869056241b06aa4f887bff4064ddfabf38d919cb8e862467b02afd65eaa2d5539fbe73df7d98d9a0e4b157d8babcc
data/lib/serverspec.rb CHANGED
@@ -9,6 +9,8 @@ require 'serverspec/setup'
9
9
  require 'serverspec/subject'
10
10
  require 'serverspec/commands/base'
11
11
  require 'rspec/core/formatters/base_formatter'
12
+ require 'specinfra/helper/set'
13
+ include Specinfra::Helper::Set
12
14
 
13
15
  module RSpec::Core::Notifications
14
16
  class FailedExampleNotification < ExampleNotification
@@ -0,0 +1,14 @@
1
+ require 'test/unit'
2
+ require 'specinfra'
3
+
4
+ require 'serverspec/helper/type'
5
+
6
+ PowerAssert.configure do |c|
7
+ c.lazy_inspection = true
8
+ end
9
+
10
+ class Serverspec::TestCase < Test::Unit::TestCase
11
+ extend Serverspec::Helper::Type
12
+ include Serverspec::Helper::Type
13
+ end
14
+
@@ -12,7 +12,13 @@ module Serverspec::Type
12
12
  %Q!#{type} "#{@name}"!
13
13
  end
14
14
 
15
- alias_method :inspect, :to_s
15
+ def inspect
16
+ if defined?(PowerAssert)
17
+ @inspection
18
+ else
19
+ to_s
20
+ end
21
+ end
16
22
 
17
23
  def to_ary
18
24
  to_s.split(" ")
@@ -5,6 +5,8 @@ module Serverspec::Type
5
5
  attr_accessor :content
6
6
 
7
7
  def file?
8
+ cmd = Specinfra.command.get(:check_file_is_file, @name)
9
+ @inspection = Specinfra.backend.build_command(cmd)
8
10
  @runner.check_file_is_file(@name)
9
11
  end
10
12
 
@@ -105,9 +107,3 @@ module Serverspec::Type
105
107
  end
106
108
  end
107
109
  end
108
-
109
-
110
-
111
-
112
-
113
-
@@ -1,7 +1,8 @@
1
1
  module Serverspec::Type
2
2
  class Package < Base
3
- def installed?(provider, version)
3
+ def installed?(provider=nil, version=nil)
4
4
  if provider.nil?
5
+ @inspection = Specinfra.command.get(:check_package_is_installed, @name, version)
5
6
  @runner.check_package_is_installed(@name, version)
6
7
  else
7
8
  check_method = "check_package_is_installed_by_#{provider}".to_sym
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_runtime_dependency "rspec", "~> 3.0"
22
22
  spec.add_runtime_dependency "rspec-its"
23
- spec.add_runtime_dependency "specinfra", "~> 2.1"
23
+ spec.add_runtime_dependency "specinfra", "~> 2.3"
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  spec.add_development_dependency "rake", "~> 10.1.1"
26
26
  end
@@ -1,9 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
+ property[:os] = nil
3
4
  set :os, {:family => 'linux'}
4
5
 
5
- property[:os_by_host] = nil
6
-
7
6
  describe file('/tmp') do
8
7
  it { should be_readable.by_user('mail') }
9
8
  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.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-05 00:00:00.000000000 Z
11
+ date: 2014-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.1'
47
+ version: '2.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.1'
54
+ version: '2.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -121,6 +121,7 @@ files:
121
121
  - lib/serverspec/matcher/have_site_application.rb
122
122
  - lib/serverspec/matcher/have_site_bindings.rb
123
123
  - lib/serverspec/matcher/have_virtual_dir.rb
124
+ - lib/serverspec/power_assert.rb
124
125
  - lib/serverspec/setup.rb
125
126
  - lib/serverspec/subject.rb
126
127
  - lib/serverspec/type/base.rb