configspec 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4e192142e63c3c7ee1615c4fa86159ff5f669e87
4
+ data.tar.gz: cb35405627366fa081485c8370c044bfc01960c6
5
+ SHA512:
6
+ metadata.gz: e957acddf30b620bca39b3b58ad3ec157b031820d08ee22114da5a461badf635954f9ad395fd3468b88f822dd9bd964b6c805b5ff250d56e35ba203e86ed1926
7
+ data.tar.gz: f1400f8ffb53edb80bd071f942d48bd6868b217328e639ed751fd662bffc90c6c81256fdeb5a1e383222e66baaae6e0e35b54387e7df6ffaf3e78c18626d7059
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - 2.0.0
4
+
5
+ script: rake spec
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
  require 'rspec/core/rake_task'
3
3
 
4
+ task :default => :spec
4
5
  task :spec => 'spec:redhat'
5
6
 
6
7
  namespace :spec do
data/lib/configspec.rb CHANGED
@@ -4,4 +4,3 @@ require "specinfra"
4
4
  require "configspec/version"
5
5
  require "configspec/setup"
6
6
  require "configspec/helper"
7
- require "configspec/backend"
@@ -1,5 +1,3 @@
1
- require 'configspec/helper/dockerfile'
2
-
3
1
  require 'configspec/helper/type'
4
2
  include Configspec::Helper::Type
5
3
 
@@ -1,7 +1,7 @@
1
1
  module Configspec
2
2
  module Helper
3
3
  module Type
4
- types = %w( base package dockerfile )
4
+ types = %w( base package dockerfile file )
5
5
 
6
6
  types.each {|type| require "configspec/type/#{type}" }
7
7
 
@@ -0,0 +1,10 @@
1
+ module Configspec
2
+ module Type
3
+ class File < Base
4
+ def sourced_from?(from)
5
+ backend.copy_file(from, @name)
6
+ end
7
+ end
8
+ end
9
+ end
10
+
@@ -1,3 +1,3 @@
1
1
  module Configspec
2
- VERSION = "0.0.8"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,109 +1,95 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: configspec
3
- version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 8
10
- version: 0.0.8
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Gosuke Miyashita
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-12-04 00:00:00 +09:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
11
+ date: 2014-01-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
22
14
  name: net-ssh
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
33
20
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rspec
37
21
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 59
44
- segments:
45
- - 2
46
- - 13
47
- - 0
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
48
33
  version: 2.13.0
49
34
  type: :runtime
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: specinfra
53
35
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 19
60
- segments:
61
- - 0
62
- - 0
63
- - 6
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 2.13.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: specinfra
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
64
47
  version: 0.0.6
65
48
  type: :runtime
66
- version_requirements: *id003
67
- - !ruby/object:Gem::Dependency
68
- name: bundler
69
49
  prerelease: false
70
- requirement: &id004 !ruby/object:Gem::Requirement
71
- none: false
72
- requirements:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.6
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
73
59
  - - ~>
74
- - !ruby/object:Gem::Version
75
- hash: 9
76
- segments:
77
- - 1
78
- - 3
79
- version: "1.3"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
80
62
  type: :development
81
- version_requirements: *id004
82
- - !ruby/object:Gem::Dependency
83
- name: rake
84
63
  prerelease: false
85
- requirement: &id005 !ruby/object:Gem::Requirement
86
- none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- hash: 3
91
- segments:
92
- - 0
93
- version: "0"
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
94
76
  type: :development
95
- version_requirements: *id005
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
96
83
  description: A simple configuration management tool powered by RSpec
97
- email:
84
+ email:
98
85
  - gosukenator@gmail.com
99
- executables:
86
+ executables:
100
87
  - configspec-init
101
88
  extensions: []
102
-
103
89
  extra_rdoc_files: []
104
-
105
- files:
90
+ files:
106
91
  - .gitignore
92
+ - .travis.yml
107
93
  - Gemfile
108
94
  - LICENSE.txt
109
95
  - README.md
@@ -111,52 +97,40 @@ files:
111
97
  - bin/configspec-init
112
98
  - configspec.gemspec
113
99
  - lib/configspec.rb
114
- - lib/configspec/backend.rb
115
- - lib/configspec/backend/dockerfile.rb
116
100
  - lib/configspec/helper.rb
117
- - lib/configspec/helper/dockerfile.rb
118
101
  - lib/configspec/helper/type.rb
119
102
  - lib/configspec/setup.rb
120
103
  - lib/configspec/type/base.rb
121
104
  - lib/configspec/type/dockerfile.rb
105
+ - lib/configspec/type/file.rb
122
106
  - lib/configspec/type/package.rb
123
107
  - lib/configspec/version.rb
124
108
  - spec/redhat/package_spec.rb
125
109
  - spec/spec_helper.rb
126
- has_rdoc: true
127
110
  homepage: https://github.com/mizzy/configspec
128
- licenses:
111
+ licenses:
129
112
  - MIT
113
+ metadata: {}
130
114
  post_install_message:
131
115
  rdoc_options: []
132
-
133
- require_paths:
116
+ require_paths:
134
117
  - lib
135
- required_ruby_version: !ruby/object:Gem::Requirement
136
- none: false
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- hash: 3
141
- segments:
142
- - 0
143
- version: "0"
144
- required_rubygems_version: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ">="
148
- - !ruby/object:Gem::Version
149
- hash: 3
150
- segments:
151
- - 0
152
- version: "0"
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
153
128
  requirements: []
154
-
155
129
  rubyforge_project:
156
- rubygems_version: 1.6.2
130
+ rubygems_version: 2.0.3
157
131
  signing_key:
158
- specification_version: 3
132
+ specification_version: 4
159
133
  summary: A simple configuration management tool powered by RSpec
160
- test_files:
134
+ test_files:
161
135
  - spec/redhat/package_spec.rb
162
136
  - spec/spec_helper.rb
@@ -1 +0,0 @@
1
- require 'configspec/backend/dockerfile'
@@ -1,24 +0,0 @@
1
- require 'singleton'
2
-
3
- module Configspec
4
- module Backend
5
- class Dockerfile < SpecInfra::Backend::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
-
19
- def from(base)
20
- @lines << "FROM #{base}"
21
- end
22
- end
23
- end
24
- end
@@ -1,14 +0,0 @@
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