configspec 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/configspec/backend/dockerfile.rb +20 -0
- data/lib/configspec/backend.rb +1 -0
- data/lib/configspec/helper/dockerfile.rb +14 -0
- data/lib/configspec/helper.rb +1 -0
- data/lib/configspec/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02651d8341019f3bfd04d8e542fd625c153c61e1
|
4
|
+
data.tar.gz: 1126a417a1583fe98d2e8cbc63fb71e67d20d431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57bca32eef54e04bc2ea2eb214b827194f9b8915a1fe81d9235f4d2515ecd338510a82ae47d6c9ff53fce2000066fd4a2c38ca093b10e20867c1514d1ca9de15
|
7
|
+
data.tar.gz: aa1900c4e4ee7d77dc78031dccb61f8a9f813e0773680898b04ea8087eeca1d6be04d68bdd2e870e6157a4e413708a930fa8add8e22aec963f9760cb5cd02ce4
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
|
3
|
+
module Configspec
|
4
|
+
module Backend
|
5
|
+
class Dockerfile < Base
|
6
|
+
def initialize
|
7
|
+
@lines = []
|
8
|
+
ObjectSpace.define_finalizer(self) {
|
9
|
+
File.write("Dockerfile", @lines.join("\n"))
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
def run_command(cmd, opts={})
|
14
|
+
@lines << "RUN #{cmd}"
|
15
|
+
{ :stdout => nil, :stderr => nil,
|
16
|
+
:exit_status => 0, :exit_signal => nil }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/configspec/backend.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
module Configspec
|
2
|
+
module Helper
|
3
|
+
module Dockerfile
|
4
|
+
def backend(commands_object=nil)
|
5
|
+
if commands_object.nil? && ! respond_to?(:commands)
|
6
|
+
commands_object = Configspec::Commands::Base.new
|
7
|
+
end
|
8
|
+
instance = Configspec::Backend::Dockerfile.instance
|
9
|
+
instance.set_commands(commands_object || commands)
|
10
|
+
instance
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/configspec/helper.rb
CHANGED
data/lib/configspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: configspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- lib/configspec.rb
|
85
85
|
- lib/configspec/backend.rb
|
86
86
|
- lib/configspec/backend/base.rb
|
87
|
+
- lib/configspec/backend/dockerfile.rb
|
87
88
|
- lib/configspec/backend/exec.rb
|
88
89
|
- lib/configspec/backend/ssh.rb
|
89
90
|
- lib/configspec/commands/base.rb
|
@@ -93,6 +94,7 @@ files:
|
|
93
94
|
- lib/configspec/helper.rb
|
94
95
|
- lib/configspec/helper/configuration.rb
|
95
96
|
- lib/configspec/helper/detect_os.rb
|
97
|
+
- lib/configspec/helper/dockerfile.rb
|
96
98
|
- lib/configspec/helper/exec.rb
|
97
99
|
- lib/configspec/helper/properties.rb
|
98
100
|
- lib/configspec/helper/redhat.rb
|