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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f838cc67f6d01db95027bb369e9d33da53f64ad
4
- data.tar.gz: 007b0aba3c263825724012ccb16e251812f66767
3
+ metadata.gz: 02651d8341019f3bfd04d8e542fd625c153c61e1
4
+ data.tar.gz: 1126a417a1583fe98d2e8cbc63fb71e67d20d431
5
5
  SHA512:
6
- metadata.gz: 4d8d86507827945768db452c99230935c6d58462de6bada4a8259d91d28f31bc274f70d1991437820b926fed54a82c37a112aa166c252546e62c0bda9c7fb022
7
- data.tar.gz: a8e82c5c397d1a6953345e14782df588afa5ef1fdfe30b11757014ec6f810ba2c6928e8385502a600bc95a92c9ef08b23445bbdd3af0bc4af9ca7efdb6b397e3
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
@@ -1,3 +1,4 @@
1
1
  require 'configspec/backend/base'
2
2
  require 'configspec/backend/ssh'
3
3
  require 'configspec/backend/exec'
4
+ require 'configspec/backend/dockerfile'
@@ -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
@@ -1,5 +1,6 @@
1
1
  require 'configspec/helper/exec'
2
2
  require 'configspec/helper/ssh'
3
+ require 'configspec/helper/dockerfile'
3
4
  require 'configspec/helper/detect_os'
4
5
  require 'configspec/helper/redhat'
5
6
 
@@ -1,3 +1,3 @@
1
1
  module Configspec
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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-25 00:00:00.000000000 Z
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