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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e21bf5141891cd7df596fa29fb4e3eaace5db13
4
- data.tar.gz: 2606421903e6d939ec21d5cab9d2b117b4ee037c
3
+ metadata.gz: 7e38c8fc5c6113d220180199fa12ad52f0452df8
4
+ data.tar.gz: 86fe00f3afd711cb4c9503d31a051f0db739325d
5
5
  SHA512:
6
- metadata.gz: 86aef585240e3d1cba71f0eea5888a6f6304b5847eb6711cd08e945ebc970c209b8812b66e977d37f187c875f5f523a531763e74746ae130e51282786fefa785
7
- data.tar.gz: ce1f1d4ca6ea9b7af009e99d95bb82e2fb7025356b6bab26882468079d8c7122177fcb374c09e080bd1783b9efa980f5c7a7289362ec05fbbc97f47586bcdc7e
6
+ metadata.gz: f5dbd18a218c3296a41455abcfd1d1001acb482ce683b087626ae86229265c1896ed9ed1c9b43c1813966a856a73fe792b4673a419284837bcf02c8a02fea48a
7
+ data.tar.gz: 8bfcbeee06106d91094ec8ed972f628cf7b888d844a54118e8f33d6ec9fcb609091dc8e2e6b947fd3edbae9ae6c2d12bddbfbef80f1ad88537a6c76e7e368fc1
data/.rubocop.yml CHANGED
@@ -16,3 +16,6 @@ ClassLength:
16
16
  ParameterLists:
17
17
  Exclude:
18
18
  - lib/**/*
19
+ Metrics/AbcSize:
20
+ Exclude:
21
+ - lib/**/*
data/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.0.0
4
+ - 2.1.0
5
5
 
6
6
  script: bundle exec rake
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- # -*- encoding: utf-8 -*-
1
+ # -*- coding: utf-8 -*-
2
2
  source 'https://rubygems.org/'
3
3
 
4
4
  gemspec
data/files/Berksfile CHANGED
@@ -1,4 +1,4 @@
1
- site :opscode
1
+ source 'https://supermarket.getchef.com'
2
2
 
3
3
  metadata
4
4
 
data/files/Gemfile CHANGED
@@ -1,16 +1,16 @@
1
- # -*- encoding: utf-8 -*-
1
+ # -*- coding: utf-8 -*-
2
2
  source 'https://rubygems.org'
3
3
 
4
- gem 'chef', '~> 11.12.2'
5
- gem 'berkshelf', '~> 2.0.16'
4
+ gem 'chef'
5
+ gem 'berkshelf'
6
6
 
7
7
  group :integration do
8
8
  gem 'rubocop'
9
- gem 'strainer', '~> 3.4.0'
10
- gem 'test-kitchen', '~> 1.2.1'
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', '~> 4.0.0'
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
@@ -2,6 +2,4 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
- before_script:
6
- - bundle exec berks install
7
- script: bundle exec strainer test --except kitchen
5
+ - 2.1.0
@@ -1,12 +1,11 @@
1
- # -*- encoding: utf-8 -*-
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.add_dependency 'chef', '~> 11'
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'
@@ -196,7 +196,7 @@ eos
196
196
  .gitignore
197
197
  .rubocop.yml
198
198
  .travis.yml
199
- Strainerfile
199
+ Rakefile
200
200
  ).each do |file_name|
201
201
  copy_file(cookbook_path, cookbook_name, file_name)
202
202
  end
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Knife skeleton version
3
3
  module KnifeSkeleton
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  MAJOR, MINOR, TINY = VERSION.split('.')
6
6
  end
@@ -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 'Strainerfile'")
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("'Strainerfile' already exists")
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
- Strainerfile
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::Runner.new.converge(described_recipe) }
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.2.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-10-14 00:00:00.000000000 Z
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: '11'
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: '11'
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/Strainerfile
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: '0'
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, strainer,
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