configspec 0.0.4 → 0.0.5

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: 02651d8341019f3bfd04d8e542fd625c153c61e1
4
- data.tar.gz: 1126a417a1583fe98d2e8cbc63fb71e67d20d431
3
+ metadata.gz: d51d99b53d90945b732ab98ff1bdc76601db7346
4
+ data.tar.gz: c40dc4f8d3ee83ae404852176f111704b8726b0e
5
5
  SHA512:
6
- metadata.gz: 57bca32eef54e04bc2ea2eb214b827194f9b8915a1fe81d9235f4d2515ecd338510a82ae47d6c9ff53fce2000066fd4a2c38ca093b10e20867c1514d1ca9de15
7
- data.tar.gz: aa1900c4e4ee7d77dc78031dccb61f8a9f813e0773680898b04ea8087eeca1d6be04d68bdd2e870e6157a4e413708a930fa8add8e22aec963f9760cb5cd02ce4
6
+ metadata.gz: bec1e4e9fa172bfe40641e0681f7a4d3cb66714b0486c14895abbc8ee0a1ec2e169c34bf8dc9b856fdd532322038bd6f7466a7a6c57d4dc70f24bb8b770882b5
7
+ data.tar.gz: 4554a6cf1271de53e05eb1bf31b210f07d35c58d8668b690149a0aec0106cddfc7fe264b7d552815b65e878a3fcc9cb32a655933e3eb46a7fe97b8ff879641e9
@@ -32,7 +32,7 @@ module Configspec
32
32
  print("Input target host name: ")
33
33
  @hostname = $stdin.gets.chomp
34
34
  end
35
- else
35
+ elsif @backend_type == 'Exec'
36
36
  @hostname = 'localhost'
37
37
  end
38
38
 
@@ -65,6 +65,7 @@ Select a backend type:
65
65
 
66
66
  1) SSH
67
67
  2) Exec (local)
68
+ 3) Dockerfile
68
69
 
69
70
  Select number:
70
71
  EOF
@@ -72,7 +73,7 @@ EOF
72
73
  num = $stdin.gets.to_i - 1
73
74
  puts
74
75
 
75
- @backend_type = [ 'Ssh', 'Exec' ][num] || 'Exec'
76
+ @backend_type = [ 'Ssh', 'Exec', 'Dockerfile' ][num] || 'Exec'
76
77
  end
77
78
 
78
79
  def self.ask_windows_backend
@@ -201,7 +202,7 @@ EOF
201
202
  def self.spec_helper_template
202
203
  template = <<-EOF
203
204
  require 'configspec'
204
- <% if @os_type == 'UN*X' -%>
205
+ <% if @os_type == 'UN*X' and @backend_type != 'Dockerfile' -%>
205
206
  require 'pathname'
206
207
  <% end -%>
207
208
  <% if @backend_type == 'Ssh' -%>
@@ -212,13 +213,13 @@ require 'winrm'
212
213
  <% end -%>
213
214
 
214
215
  include Configspec::Helper::<%= @backend_type %>
215
- <% if @os_type == 'UN*X' -%>
216
+ <% if @os_type == 'UN*X' && @backend_type != 'Dockerfile' -%>
216
217
  include Configspec::Helper::DetectOS
217
218
  <% else -%>
218
- include Configspec::Helper::Windows
219
+ include Configspec::Helper::RedHat
219
220
  <% end -%>
220
221
 
221
- <% if @os_type == 'UN*X' -%>
222
+ <% if @os_type == 'UN*X' && @backend_type != 'Dockerfile' -%>
222
223
  RSpec.configure do |c|
223
224
  if ENV['ASK_SUDO_PASSWORD']
224
225
  require 'highline/import'
@@ -1,3 +1,3 @@
1
1
  module Configspec
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita