serverspec 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,6 +53,7 @@ module Serverspec
53
53
 
54
54
  def check_readable(example, file, by_whom)
55
55
  mode = sprintf('%04s',do_check(commands.get_mode(file))[:stdout].strip)
56
+ mode = mode.split('')
56
57
  mode_octal = mode[0].to_i * 512 + mode[1].to_i * 64 + mode[2].to_i * 8 + mode[3].to_i * 1
57
58
  case by_whom
58
59
  when nil
@@ -68,6 +69,7 @@ module Serverspec
68
69
 
69
70
  def check_writable(example, file, by_whom)
70
71
  mode = sprintf('%04s',do_check(commands.get_mode(file))[:stdout].strip)
72
+ mode = mode.split('')
71
73
  mode_octal = mode[0].to_i * 512 + mode[1].to_i * 64 + mode[2].to_i * 8 + mode[3].to_i * 1
72
74
  case by_whom
73
75
  when nil
@@ -83,6 +85,7 @@ module Serverspec
83
85
 
84
86
  def check_executable(example, file, by_whom)
85
87
  mode = sprintf('%04s',do_check(commands.get_mode(file))[:stdout].strip)
88
+ mode = mode.split('')
86
89
  mode_octal = mode[0].to_i * 512 + mode[1].to_i * 64 + mode[2].to_i * 8 + mode[3].to_i * 1
87
90
  case by_whom
88
91
  when nil
@@ -101,7 +101,12 @@ require 'pathname'
101
101
  ### include requirements ###
102
102
 
103
103
  RSpec.configure do |c|
104
- c.sudo_password = ENV['SUDO_PASSWORD']
104
+ if ENV['ASK_SUDO_PASSWORD']
105
+ require 'highline/import'
106
+ c.sudo_password = ask("Enter sudo password: ") { |q| q.echo = false }
107
+ else
108
+ c.sudo_password = ENV['SUDO_PASSWORD']
109
+ end
105
110
  ### include backend helper ###
106
111
  ### include os helper ###
107
112
  ### include backend conf ###
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.2.10"
2
+ VERSION = "0.2.11"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency "net-ssh"
22
22
  spec.add_dependency "rspec"
23
+ spec.add_dependency "highline"
23
24
  spec.add_development_dependency "bundler", "~> 1.3"
24
25
  spec.add_development_dependency "rake"
25
26
  end
metadata CHANGED
@@ -1,89 +1,104 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: serverspec
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.10
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ hash: 1
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 11
10
+ version: 0.2.11
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Gosuke Miyashita
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-04-20 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2013-04-23 00:00:00 +09:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: net-ssh
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
- - !ruby/object:Gem::Dependency
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
31
36
  name: rspec
32
- requirement: !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
33
39
  none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
38
47
  type: :runtime
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: highline
39
51
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
52
+ requirement: &id003 !ruby/object:Gem::Requirement
41
53
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ type: :runtime
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
47
64
  name: bundler
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: '1.3'
54
- type: :development
55
65
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
66
+ requirement: &id004 !ruby/object:Gem::Requirement
57
67
  none: false
58
- requirements:
68
+ requirements:
59
69
  - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '1.3'
62
- - !ruby/object:Gem::Dependency
63
- name: rake
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
+ - !ruby/object:Gem::Version
71
+ hash: 9
72
+ segments:
73
+ - 1
74
+ - 3
75
+ version: "1.3"
70
76
  type: :development
77
+ version_requirements: *id004
78
+ - !ruby/object:Gem::Dependency
79
+ name: rake
71
80
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
81
+ requirement: &id005 !ruby/object:Gem::Requirement
73
82
  none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- description: RSpec tests for your servers provisioned by Puppet, Chef or anything
79
- else
80
- email:
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ hash: 3
87
+ segments:
88
+ - 0
89
+ version: "0"
90
+ type: :development
91
+ version_requirements: *id005
92
+ description: RSpec tests for your servers provisioned by Puppet, Chef or anything else
93
+ email:
81
94
  - gosukenator@gmail.com
82
- executables:
95
+ executables:
83
96
  - serverspec-init
84
97
  extensions: []
98
+
85
99
  extra_rdoc_files: []
86
- files:
100
+
101
+ files:
87
102
  - .gitignore
88
103
  - .travis.yml
89
104
  - Gemfile
@@ -151,32 +166,41 @@ files:
151
166
  - spec/solaris/matchers_spec.rb
152
167
  - spec/spec_helper.rb
153
168
  - spec/support/shared_matcher_examples.rb
169
+ has_rdoc: true
154
170
  homepage: http://serverspec.org/
155
- licenses:
171
+ licenses:
156
172
  - MIT
157
173
  post_install_message:
158
174
  rdoc_options: []
159
- require_paths:
175
+
176
+ require_paths:
160
177
  - lib
161
- required_ruby_version: !ruby/object:Gem::Requirement
178
+ required_ruby_version: !ruby/object:Gem::Requirement
162
179
  none: false
163
- requirements:
164
- - - ! '>='
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- required_rubygems_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ hash: 3
184
+ segments:
185
+ - 0
186
+ version: "0"
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
188
  none: false
169
- requirements:
170
- - - ! '>='
171
- - !ruby/object:Gem::Version
172
- version: '0'
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ hash: 3
193
+ segments:
194
+ - 0
195
+ version: "0"
173
196
  requirements: []
197
+
174
198
  rubyforge_project:
175
- rubygems_version: 1.8.25
199
+ rubygems_version: 1.3.7
176
200
  signing_key:
177
201
  specification_version: 3
178
202
  summary: RSpec tests for your servers provisioned by Puppet, Chef or anything else
179
- test_files:
203
+ test_files:
180
204
  - spec/debian/commands_spec.rb
181
205
  - spec/debian/matchers_spec.rb
182
206
  - spec/gentoo/commands_spec.rb