knife-skeleton 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.travis.yml +1 -1
- data/Gemfile +1 -1
- data/files/Berksfile +1 -1
- data/files/Gemfile +6 -6
- data/files/Rakefile +54 -0
- data/files/travis.yml +1 -3
- data/knife_skeleton.gemspec +5 -4
- data/lib/chef/knife/cookbook_create_extension.rb +1 -1
- data/lib/knife_skeleton/version.rb +1 -1
- data/spec/chef/knife/knife_cookbook_create_extension_spec.rb +3 -3
- data/templates/spec/default_spec.rb.erb +1 -1
- metadata +27 -29
- data/files/Strainerfile +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e38c8fc5c6113d220180199fa12ad52f0452df8
|
4
|
+
data.tar.gz: 86fe00f3afd711cb4c9503d31a051f0db739325d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5dbd18a218c3296a41455abcfd1d1001acb482ce683b087626ae86229265c1896ed9ed1c9b43c1813966a856a73fe792b4673a419284837bcf02c8a02fea48a
|
7
|
+
data.tar.gz: 8bfcbeee06106d91094ec8ed972f628cf7b888d844a54118e8f33d6ec9fcb609091dc8e2e6b947fd3edbae9ae6c2d12bddbfbef80f1ad88537a6c76e7e368fc1
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/files/Berksfile
CHANGED
data/files/Gemfile
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
# -*-
|
1
|
+
# -*- coding: utf-8 -*-
|
2
2
|
source 'https://rubygems.org'
|
3
3
|
|
4
|
-
gem 'chef'
|
5
|
-
gem 'berkshelf'
|
4
|
+
gem 'chef'
|
5
|
+
gem 'berkshelf'
|
6
6
|
|
7
7
|
group :integration do
|
8
8
|
gem 'rubocop'
|
9
|
-
gem '
|
10
|
-
gem 'test-kitchen'
|
9
|
+
gem 'rake'
|
10
|
+
gem 'test-kitchen'
|
11
11
|
gem 'kitchen-vagrant'
|
12
12
|
gem 'kitchen-openstack'
|
13
13
|
gem 'serverspec'
|
14
14
|
gem 'chefspec'
|
15
|
-
gem 'foodcritic'
|
15
|
+
gem 'foodcritic'
|
16
16
|
end
|
data/files/Rakefile
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
|
16
|
+
def bundle_exec(command)
|
17
|
+
sh "bundle exec #{command}"
|
18
|
+
end
|
19
|
+
|
20
|
+
task :vendor do
|
21
|
+
sh 'test -d cookbooks && rm -r cookbooks || exit 0'
|
22
|
+
bundle_exec 'berks vendor cookbooks'
|
23
|
+
end
|
24
|
+
|
25
|
+
namespace :test do
|
26
|
+
desc 'Tests suites runner'
|
27
|
+
|
28
|
+
task :checkstyle do
|
29
|
+
Rake::Task['test:foodcritic'].invoke
|
30
|
+
Rake::Task['test:rubocop'].invoke
|
31
|
+
end
|
32
|
+
|
33
|
+
task :specs do
|
34
|
+
Rake::Task['test:chefspec'].invoke
|
35
|
+
end
|
36
|
+
|
37
|
+
task :foodcritic do
|
38
|
+
bundle_exec 'foodcritic -f any .'
|
39
|
+
end
|
40
|
+
|
41
|
+
task :rubocop do
|
42
|
+
bundle_exec :rubocop
|
43
|
+
end
|
44
|
+
|
45
|
+
task :chefspec do
|
46
|
+
bundle_exec 'rspec spec --color --format documentation'
|
47
|
+
end
|
48
|
+
|
49
|
+
task :kitchen do
|
50
|
+
bundle_exec 'kitchen test'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
task default: ['test:checkstyle', 'test:specs']
|
data/files/travis.yml
CHANGED
data/knife_skeleton.gemspec
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
# -*-
|
1
|
+
# -*- coding: utf-8 -*-
|
2
2
|
require File.expand_path('../lib/knife_skeleton/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.authors = ['Pierre Rambaud', 'Antoine Rouyer']
|
6
6
|
s.email = ['pierre.rambaud@numergy.com', 'antoine.rouyer@numergy.com']
|
7
7
|
s.description = <<-eos
|
8
|
-
Knife plugin to create skeleton with rubocop, chefspec, kitchen,
|
9
|
-
strainer, etc...
|
8
|
+
Knife plugin to create skeleton with rubocop, chefspec, kitchen, etc...
|
10
9
|
eos
|
11
10
|
s.summary = s.description
|
12
11
|
s.homepage = 'https://github.com/Numergy/knife-skeleton'
|
@@ -19,7 +18,9 @@ eos
|
|
19
18
|
s.require_paths = ['lib']
|
20
19
|
s.version = KnifeSkeleton::VERSION
|
21
20
|
|
22
|
-
s.
|
21
|
+
s.required_ruby_version = '>=2.0.0'
|
22
|
+
|
23
|
+
s.add_dependency 'chef'
|
23
24
|
s.add_dependency 'erubis', '~> 2.7'
|
24
25
|
|
25
26
|
s.add_development_dependency 'rake', '~> 10'
|
@@ -170,7 +170,7 @@ describe Chef::Knife::CookbookCreate do
|
|
170
170
|
@knife.ui.should_receive(:msg).with("** Create '.travis.yml'")
|
171
171
|
@knife.ui.should_receive(:msg).with("** Create '.rubocop.yml'")
|
172
172
|
@knife.ui.should_receive(:msg).with("** Create '.kitchen.yml'")
|
173
|
-
@knife.ui.should_receive(:msg).with("** Create '
|
173
|
+
@knife.ui.should_receive(:msg).with("** Create 'Rakefile'")
|
174
174
|
@knife.ui.should_receive(:msg).with("** Create 'CHANGELOG.md'")
|
175
175
|
@knife.ui.should_receive(:msg).with("** Create 'metadata.rb'")
|
176
176
|
@knife.ui.should_receive(:msg).with("** Create 'README.md'")
|
@@ -191,7 +191,7 @@ describe Chef::Knife::CookbookCreate do
|
|
191
191
|
@knife.ui.should_receive(:warn).with("'.rubocop.yml' already exists")
|
192
192
|
@knife.ui.should_receive(:warn).with("'.kitchen.yml' already exists")
|
193
193
|
@knife.ui.should_receive(:warn).with("'.travis.yml' already exists")
|
194
|
-
@knife.ui.should_receive(:warn).with("'
|
194
|
+
@knife.ui.should_receive(:warn).with("'Rakefile' already exists")
|
195
195
|
@knife.ui.should_receive(:warn).with("'metadata.rb' already exists")
|
196
196
|
@knife.ui.should_receive(:warn).with("'CHANGELOG.md' already exists")
|
197
197
|
@knife.ui.should_receive(:warn).with("'README.md' already exists")
|
@@ -231,7 +231,7 @@ describe Chef::Knife::CookbookCreate do
|
|
231
231
|
.rubocop.yml
|
232
232
|
.travis.yml
|
233
233
|
.kitchen.yml
|
234
|
-
|
234
|
+
Rakefile
|
235
235
|
CHANGELOG.md
|
236
236
|
README.md
|
237
237
|
attributes/default.rb
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require_relative 'spec_helper'
|
4
4
|
|
5
5
|
describe '<%= cookbook_name %>::default' do
|
6
|
-
subject { ChefSpec::
|
6
|
+
subject { ChefSpec::ServerRunner.new.converge(described_recipe) }
|
7
7
|
|
8
8
|
# Write full examples using the `expect` syntax
|
9
9
|
it 'does includes recipes' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-skeleton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Rambaud
|
@@ -9,109 +9,108 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: erubis
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '2.7'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '2.7'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rake
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '10'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '10'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rspec
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '2.14'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '2.14'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rubocop
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - ~>
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0.25'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- - ~>
|
81
|
+
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0.25'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: simplecov
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - ~>
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0.9'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - ~>
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0.9'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: fakefs
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: 0.5.3
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- -
|
109
|
+
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: 0.5.3
|
112
112
|
description: |
|
113
|
-
Knife plugin to create skeleton with rubocop, chefspec, kitchen,
|
114
|
-
strainer, etc...
|
113
|
+
Knife plugin to create skeleton with rubocop, chefspec, kitchen, etc...
|
115
114
|
email:
|
116
115
|
- pierre.rambaud@numergy.com
|
117
116
|
- antoine.rouyer@numergy.com
|
@@ -119,16 +118,16 @@ executables: []
|
|
119
118
|
extensions: []
|
120
119
|
extra_rdoc_files: []
|
121
120
|
files:
|
122
|
-
- .gitignore
|
123
|
-
- .rubocop.yml
|
124
|
-
- .travis.yml
|
121
|
+
- ".gitignore"
|
122
|
+
- ".rubocop.yml"
|
123
|
+
- ".travis.yml"
|
125
124
|
- Gemfile
|
126
125
|
- LICENSE
|
127
126
|
- README.md
|
128
127
|
- Rakefile
|
129
128
|
- files/Berksfile
|
130
129
|
- files/Gemfile
|
131
|
-
- files/
|
130
|
+
- files/Rakefile
|
132
131
|
- files/gitignore
|
133
132
|
- files/licenses/apachev2
|
134
133
|
- files/licenses/gplv2
|
@@ -167,12 +166,12 @@ require_paths:
|
|
167
166
|
- lib
|
168
167
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
168
|
requirements:
|
170
|
-
- -
|
169
|
+
- - ">="
|
171
170
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
171
|
+
version: 2.0.0
|
173
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
173
|
requirements:
|
175
|
-
- -
|
174
|
+
- - ">="
|
176
175
|
- !ruby/object:Gem::Version
|
177
176
|
version: '0'
|
178
177
|
requirements: []
|
@@ -180,8 +179,7 @@ rubyforge_project:
|
|
180
179
|
rubygems_version: 2.0.14
|
181
180
|
signing_key:
|
182
181
|
specification_version: 4
|
183
|
-
summary: Knife plugin to create skeleton with rubocop, chefspec, kitchen,
|
184
|
-
etc...
|
182
|
+
summary: Knife plugin to create skeleton with rubocop, chefspec, kitchen, etc...
|
185
183
|
test_files:
|
186
184
|
- spec/chef/knife/knife_cookbook_create_extension_spec.rb
|
187
185
|
- spec/knife_skeleton/template_spec.rb
|
data/files/Strainerfile
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
# Strainerfile
|
2
|
-
rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK
|
3
|
-
knife: bundle exec knife cookbook test $COOKBOOK
|
4
|
-
foodcritic: bundle exec foodcritic -f any $SANDBOX/$COOKBOOK
|
5
|
-
chefspec: bundle exec rspec $SANDBOX/$COOKBOOK/spec --color
|
6
|
-
kitchen: bundle exec kitchen test
|