meez 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.drone.yml +11 -0
- data/.rubocop.yml +19 -0
- data/Dockerfile +2 -2
- data/Gemfile +10 -1
- data/Guardfile +7 -0
- data/lib/meez/meez.rb +28 -23
- data/meez.gemspec +1 -1
- data/templates/.drone.yml.erb +7 -0
- data/templates/Guardfile.erb +7 -0
- metadata +9 -14
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTk1YTFjNzI3ZGVmYTk3OTQzMjhiYWJmMmIxOThjYzE4YjM5NmY0NA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MTAzOWRkNzUyMjZmNTRmZmM3ZmMyY2I4NDg0NWE2NTIyNWM0ZjVjOA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YzdhZmY1OGUyZGY3ZDgwZmU1YzEwZmY1MDZkYmRjZTc1YmFiODFiMjFhZWI3
|
10
|
+
NzYzZjc4NjU5ZWNmYmM3ZDExZGFjODRkNzU1NGVkMDE1ZmViMGI1MTk4MzM2
|
11
|
+
YTMxNmFmMTM1MzdhZmVlZjYyYjNkOWMwMDc5MzE5ZjI1NTJjZmE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZjcxZTNkYzRhN2IwNzY1MjU5ZjMxNjIxODA5YjcwOTI2MzlhZGJlMzc1MTZh
|
14
|
+
ZDYxOWM0MmM2MWE2NmU2ODNiYjU3NWJmYjM3ZDMzMTMxNWI4YjhkZWFhZWNk
|
15
|
+
YTg2NTkyN2RkZDY2OTEzMzg2MTFkZTZlOGE4MDEyOTc1YThlZDc=
|
data/.drone.yml
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
+
# on 2014-03-13 09:32:40 -0500 using RuboCop version 0.18.1.
|
3
|
+
# The point is for the user to remove these configuration records
|
4
|
+
# one by one as the offences are removed from the code base.
|
5
|
+
# Note that changes in the inspected code, or installation of new
|
6
|
+
# versions of RuboCop, may require this file to be generated again.
|
7
|
+
|
8
|
+
# Offence count: 13
|
9
|
+
LineLength:
|
10
|
+
Max: 200
|
11
|
+
|
12
|
+
# Offence count: 3
|
13
|
+
# Configuration parameters: CountComments.
|
14
|
+
MethodLength:
|
15
|
+
Max: 25
|
16
|
+
|
17
|
+
# Configuration parameters: CountComments.
|
18
|
+
ClassLength:
|
19
|
+
Max: 200
|
data/Dockerfile
CHANGED
@@ -8,6 +8,6 @@ RUN wget -q -O /tmp/vagrant.deb http://files.vagrantup.com/packages/a40522f5fabc
|
|
8
8
|
&& dpkg -i /tmp/vagrant.deb \
|
9
9
|
&& rm /tmp/vagrant.deb
|
10
10
|
|
11
|
-
ADD Gemfile /source/Gemfile
|
11
|
+
#ADD Gemfile /source/Gemfile
|
12
12
|
|
13
|
-
RUN cd /source && bundle install
|
13
|
+
#RUN cd /source && bundle install
|
data/Gemfile
CHANGED
@@ -7,5 +7,14 @@ gem 'chef', '~> 11.8'
|
|
7
7
|
gem 'berkshelf', '~> 2.0'
|
8
8
|
gem 'test-kitchen', '~> 1.1'
|
9
9
|
gem 'serverspec', '~> 0.14'
|
10
|
-
gem 'strainer', '~> 3.3'
|
11
10
|
gem 'rake'
|
11
|
+
|
12
|
+
group :development do
|
13
|
+
gem 'guard', '~> 1.8'
|
14
|
+
gem 'guard-rubocop', '~> 0.2'
|
15
|
+
end
|
16
|
+
|
17
|
+
group :infinite_loop_solver do
|
18
|
+
gem 'celluloid', '~> 0.14'
|
19
|
+
gem 'celluloid-io', '~> 0.14'
|
20
|
+
end
|
data/Guardfile
ADDED
data/lib/meez/meez.rb
CHANGED
@@ -14,12 +14,13 @@ class Meez
|
|
14
14
|
init_chefspec(cookbook_name, options)
|
15
15
|
init_serverspec(cookbook_name, options)
|
16
16
|
init_kitchenci(cookbook_name, options)
|
17
|
-
|
17
|
+
init_guard(cookbook_name, options)
|
18
|
+
init_drone(cookbook_name, options)
|
18
19
|
end
|
19
20
|
|
20
|
-
def self.write_template(name, path, cookbook_name, options)
|
21
|
+
def self.write_template(name, path, cookbook_name, options)
|
21
22
|
require 'erb'
|
22
|
-
template = File.join(File.dirname(__FILE__),
|
23
|
+
template = File.join(File.dirname(__FILE__), '../../templates', name)
|
23
24
|
target = File.join(path, File.basename(name, '.erb'))
|
24
25
|
puts "\tCreating #{target} from template"
|
25
26
|
content = ERB.new File.new(template).read
|
@@ -30,12 +31,12 @@ class Meez
|
|
30
31
|
File.open(file, 'a') { |f| f.write("#{content}\n") }
|
31
32
|
end
|
32
33
|
|
33
|
-
def self.add_gem(cookbook_path, name, version=nil)
|
34
|
+
def self.add_gem(cookbook_path, name, version = nil)
|
34
35
|
puts "adding #{name} gem to Gemfile"
|
35
36
|
if version
|
36
|
-
append_file(File.join(cookbook_path, 'Gemfile'), "gem '#{name}', '#{version}'"
|
37
|
+
append_file(File.join(cookbook_path, 'Gemfile'), "gem '#{name}', '#{version}'")
|
37
38
|
else
|
38
|
-
append_file(File.join(cookbook_path, 'Gemfile'), "gem '#{name}'"
|
39
|
+
append_file(File.join(cookbook_path, 'Gemfile'), "gem '#{name}'")
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
@@ -65,16 +66,9 @@ class Meez
|
|
65
66
|
puts '* Initializing GIT repo'
|
66
67
|
path = File.join(options[:path], cookbook_name)
|
67
68
|
require 'git'
|
68
|
-
Git.init(
|
69
|
+
Git.init(path, repository: path)
|
69
70
|
end
|
70
71
|
|
71
|
-
# Every Vagrant virtual environment requires a box to build off of.
|
72
|
-
#config.vm.box = "<%= berkshelf_config.vagrant.vm.box %>"
|
73
|
-
|
74
|
-
# The url from where the 'config.vm.box' box will be fetched if it
|
75
|
-
# doesn't already exist on the user's system.
|
76
|
-
#config.vm.box_url = "<%= berkshelf_config.vagrant.vm.box_url %>"
|
77
|
-
|
78
72
|
def self.init_berkshelf(cookbook_name, options)
|
79
73
|
puts '* Initializing Berkshelf'
|
80
74
|
path = File.join(options[:path], cookbook_name)
|
@@ -84,12 +78,10 @@ class Meez
|
|
84
78
|
require 'berkshelf/init_generator'
|
85
79
|
Berkshelf::InitGenerator.new(
|
86
80
|
[path],
|
87
|
-
|
88
|
-
|
89
|
-
skip_vagrant: true
|
90
|
-
}
|
81
|
+
skip_test_kitchen: true,
|
82
|
+
skip_vagrant: true
|
91
83
|
).invoke_all
|
92
|
-
append_file(File.join(path, 'Berksfile'),
|
84
|
+
append_file(File.join(path, 'Berksfile'), 'metadata')
|
93
85
|
end
|
94
86
|
|
95
87
|
def self.init_kitchenci(cookbook_name, options)
|
@@ -98,13 +90,13 @@ class Meez
|
|
98
90
|
require 'kitchen'
|
99
91
|
require 'kitchen/generator/init'
|
100
92
|
Kitchen::Generator::Init.new([], {}, destination_root: path).invoke_all
|
101
|
-
write_template('.kitchen.yml.erb', path, cookbook_name, options)
|
93
|
+
write_template('.kitchen.yml.erb', path, cookbook_name, options)
|
102
94
|
end
|
103
95
|
|
104
96
|
def self.init_vagrant(cookbook_name, options)
|
105
97
|
puts '* Initializing Vagranfile'
|
106
98
|
path = File.join(options[:path], cookbook_name)
|
107
|
-
write_template('Vagrantfile.erb', path, cookbook_name, options)
|
99
|
+
write_template('Vagrantfile.erb', path, cookbook_name, options)
|
108
100
|
end
|
109
101
|
|
110
102
|
def self.init_chefspec(cookbook_name, options)
|
@@ -153,12 +145,25 @@ class Meez
|
|
153
145
|
add_gem(path, 'serverspec', '~> 0.14')
|
154
146
|
end
|
155
147
|
|
148
|
+
def self.init_guard(cookbook_name, options)
|
149
|
+
puts '* Initializing Guard'
|
150
|
+
path = File.join(options[:path], cookbook_name)
|
151
|
+
write_template('Guardfile.erb', path, cookbook_name, options)
|
152
|
+
add_gem(path, 'guard', '~> 1.8')
|
153
|
+
add_gem(path, 'guard-rubocop', '~> 0.2')
|
154
|
+
end
|
155
|
+
|
156
|
+
def self.init_drone(cookbook_name, options)
|
157
|
+
puts '* Initializing Drone'
|
158
|
+
path = File.join(options[:path], cookbook_name)
|
159
|
+
write_template('.drone.yml.erb', path, cookbook_name, options)
|
160
|
+
end
|
161
|
+
|
156
162
|
def self.bundle_install(cookbook_name, options)
|
157
163
|
require 'bundler'
|
158
164
|
puts '* Running bundle install'
|
159
165
|
path = File.join(options[:path], cookbook_name)
|
160
166
|
puts "\t append .gitignore"
|
161
|
-
Bundler.with_clean_env { exec({ 'BUNDLE_GEMFILE' =>
|
167
|
+
Bundler.with_clean_env { exec({ 'BUNDLE_GEMFILE' => "#{path}/Gemfile" }, 'bundle install') }
|
162
168
|
end
|
163
|
-
|
164
169
|
end
|
data/meez.gemspec
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meez
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Paul Czarkowski
|
@@ -14,7 +13,6 @@ dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: chef
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: test-kitchen
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: bundler
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: berkshelf
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -84,14 +75,19 @@ executables:
|
|
84
75
|
extensions: []
|
85
76
|
extra_rdoc_files: []
|
86
77
|
files:
|
78
|
+
- .drone.yml
|
87
79
|
- .gitignore
|
80
|
+
- .rubocop.yml
|
88
81
|
- Dockerfile
|
89
82
|
- Gemfile
|
83
|
+
- Guardfile
|
90
84
|
- README.md
|
91
85
|
- bin/meez
|
92
86
|
- lib/meez/meez.rb
|
93
87
|
- meez.gemspec
|
88
|
+
- templates/.drone.yml.erb
|
94
89
|
- templates/.kitchen.yml.erb
|
90
|
+
- templates/Guardfile.erb
|
95
91
|
- templates/Rakefile.erb
|
96
92
|
- templates/Vagrantfile.erb
|
97
93
|
- templates/chefspec/default_spec.rb.erb
|
@@ -101,26 +97,25 @@ files:
|
|
101
97
|
homepage: http://github.com/paulczar/meez
|
102
98
|
licenses:
|
103
99
|
- apache2
|
100
|
+
metadata: {}
|
104
101
|
post_install_message:
|
105
102
|
rdoc_options: []
|
106
103
|
require_paths:
|
107
104
|
- lib
|
108
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
106
|
requirements:
|
111
107
|
- - ! '>='
|
112
108
|
- !ruby/object:Gem::Version
|
113
109
|
version: '0'
|
114
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
111
|
requirements:
|
117
112
|
- - ! '>='
|
118
113
|
- !ruby/object:Gem::Version
|
119
114
|
version: '0'
|
120
115
|
requirements: []
|
121
116
|
rubyforge_project:
|
122
|
-
rubygems_version: 1.
|
117
|
+
rubygems_version: 2.1.10
|
123
118
|
signing_key:
|
124
|
-
specification_version:
|
119
|
+
specification_version: 4
|
125
120
|
summary: Initializes a chef cookbook with TDD framework
|
126
121
|
test_files: []
|