serverspec 2.37.2 → 2.38.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: c46a37f58e5d07f6871386bab92b1d9e5abd5360
4
- data.tar.gz: 13757dfd68c8ee14ca4f8d40b961c9dc9d566e8b
3
+ metadata.gz: faec0c12b4023e12d66df5650b3798025d102cb2
4
+ data.tar.gz: 45e5c00f4a9197f44e501d804e0840609269de23
5
5
  SHA512:
6
- metadata.gz: c57a59c16b479f1695b68d6d79f2b77cabf7d46b9bc5510417e3a6c3ca661b09f677e42db1caf93944445ceb1ddfbc5dbc9ed7cfe81a8a8a1f93759d1598c9a3
7
- data.tar.gz: 4ffcb0fc31285d2966b65370bb60f978ef8d1beaa5300543949d34c9011b625d049f3dba961e2a958eb232834a6809e63b9e1f414b16b2754b1b2122efaead33
6
+ metadata.gz: f74a943a7e8ef59b2a873f012c241e24d3cc2937252e077fcd25a8169ef3c26e3508a86d14fd0573e1a10563d7660a61087ae5871e498f8ced912aad1d58346e
7
+ data.tar.gz: 17a29cddc5877d239a3a437100126bd8fd31f18e347f94459a960e89ff300489888a1c5efdc229648f7b00965694c15f00c552b2f2a6978fa939ee8d65d086f9
@@ -15,6 +15,10 @@ environment:
15
15
  - ruby_version: "22"
16
16
  - ruby_version: "23"
17
17
 
18
+ matrix:
19
+ allow_failures:
20
+ - ruby_version: "193"
21
+
18
22
  clone_depth: 5
19
23
 
20
24
  cache:
@@ -1,9 +1,15 @@
1
+ require 'multi_json'
2
+
1
3
  module Serverspec::Type
2
4
  class Command < Base
3
5
  def stdout
4
6
  command_result.stdout
5
7
  end
6
8
 
9
+ def stdout_as_json
10
+ MultiJson.load(command_result.stdout)
11
+ end
12
+
7
13
  def stderr
8
14
  command_result.stderr
9
15
  end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.37.2"
2
+ VERSION = "2.38.0"
3
3
  end
@@ -65,3 +65,42 @@ EOF
65
65
  its(:stdout) { should contain('4260').before('home') }
66
66
  its(:stdout) { should_not contain('4260').before('bin') }
67
67
  end
68
+
69
+ describe command('curl http://localhost:8080/info') do
70
+ let(:stdout) { <<EOF
71
+ {
72
+ "sensu":{
73
+ "version":"0.26.5"
74
+ },
75
+ "transport":{
76
+ "keepalives":{
77
+ "messages":0,
78
+ "consumers":1
79
+ },
80
+ "results":{
81
+ "messages":0,
82
+ "consumers":1
83
+ },
84
+ "connected":true
85
+ },
86
+ "redis":{
87
+ "connected":true
88
+ },
89
+ "array":[
90
+ {
91
+ "title":"array 1"
92
+ },
93
+ {
94
+ "title":"array 2"
95
+ }
96
+ ]
97
+ }
98
+ EOF
99
+ }
100
+
101
+ its(:stdout_as_json) { should include('sensu') }
102
+ its(:stdout_as_json) { should include('sensu' => include('version' => '0.26.5')) }
103
+ its(:stdout_as_json) { should include('transport' => include('keepalives' => include('consumers' => 1))) }
104
+ its(:stdout_as_json) { should include('transport' => include('connected' => true)) }
105
+ its(:stdout_as_json) { should include('array' => include('title' => 'array 2')) }
106
+ end
@@ -3,7 +3,7 @@ build:
3
3
  steps:
4
4
  - script:
5
5
  name: Run walter
6
- code: ./$WORKING_DIR/walter -c ./$WORKING_DIR/pipeline.yml
6
+ code: ./$WORKING_DIR/walter -config ./$WORKING_DIR/pipeline.yml -build
7
7
  after-steps:
8
8
  - wantedly/pretty-slack-notify:
9
9
  webhook_url: $SLACK_WEBHOOK_URL
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.37.2
4
+ version: 2.38.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: 2016-10-14 00:00:00.000000000 Z
11
+ date: 2017-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec