meez 0.2.1 → 0.2.2

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: 7bae2bec54a38c8539faba2af497a841272e4223
4
- data.tar.gz: 9bb2b713aff4a05b24ad8b1541ea3b37f26dbb48
3
+ metadata.gz: eed4eadadf458139cb58348c38d6e1c3941346f4
4
+ data.tar.gz: d98de31bf5e31588930aec3e25986d98c1a37d2e
5
5
  SHA512:
6
- metadata.gz: 0ec14ae6daca9f8037aabdea62726bc7943e0af0e9ca2a16a4af1a9de6589364d6796045cf166b3d94a6a81b3452c9af284862f39177b46b702b41328dbc85c0
7
- data.tar.gz: a37b8ae24d11592934e42cd278e351e130cf750bf617d8f422734452bdd9576bffcec98b93db2fab4f1ad31ab42a009fb5bbd853234e09965102474f16d9db74
6
+ metadata.gz: e9a22334b3dcf1e97262742f3311668f5c59c8a20cc98dee79ef650c808dd1613899ae6156c0d81305e48d360b74151f3421aa72feb9c1fc2ebc2b256e7006b7
7
+ data.tar.gz: a28520be8d01c9495bef683266cf653046792db79a149f9d97bc4f840605ad89497be5bc8433b12684808725a000b2c3f8c0d8efeb1fc4ee4b676aa93e103025
data/.drone.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  image: paulczar/meez
2
2
  env:
3
3
  - CI=drone
4
+ - USE_SYSTEM_GECODE=1
4
5
  script:
5
6
  - bundle install
6
7
  - bundle exec berks install
data/Dockerfile CHANGED
@@ -1,13 +1,18 @@
1
1
  FROM racker/precise-with-updates
2
2
 
3
- RUN apt-get -yqq update && apt-get -yqq install ruby1.9.1-dev build-essential libxml2-dev libxslt-dev git curl wget
3
+ RUN apt-get -yqq update && apt-get -yqq install curl build-essential libxml2-dev libxslt-dev git autoconf wget
4
4
 
5
- RUN gem install bundler
5
+ RUN wget -q -O /tmp/chefdk.deb https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.1.0-1_amd64.deb \
6
+ && dpkg -i /tmp/chefdk.deb \
7
+ && rm /tmp/chefdk.deb
6
8
 
7
9
  RUN wget -q -O /tmp/vagrant.deb http://files.vagrantup.com/packages/a40522f5fabccb9ddabad03d836e120ff5d14093/vagrant_1.3.5_x86_64.deb \
8
10
  && dpkg -i /tmp/vagrant.deb \
9
11
  && rm /tmp/vagrant.deb
10
12
 
11
- #ADD Gemfile /source/Gemfile
13
+ ENV PATH /opt/chefdk/embedded/bin:/root/.chefdk/gem/ruby/2.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
14
+ ENV USE_SYSTEM_GECODE 1
12
15
 
13
- #RUN cd /source && bundle install
16
+ ADD Gemfile /tmp/Gemfile
17
+
18
+ RUN cd /tmp && bundle install && rm Gemfile*
data/Gemfile CHANGED
@@ -1,25 +1,18 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'chef', '> 11.8'
4
- gem 'rubocop', '~> 0.21'
5
-
6
- group :withoutchefdk do
7
- gem 'chefspec', '~> 3.4'
8
- gem 'foodcritic', '~> 3.0'
9
- gem 'berkshelf', '~> 3.1'
10
- gem 'test-kitchen', '~> 1.2'
11
- gem 'serverspec', '~> 1.6'
12
- gem 'rake', '~> 10.2'
13
- end
14
-
15
- group :development do
16
- gem 'guard', '~> 2.6'
17
- gem 'guard-rubocop', '~> 1.1'
18
- end
19
-
20
- group :docker do
21
- gem "kitchen-docker"
22
- end
3
+ gem 'berkshelf', '> 3'
4
+ gem 'chef', '>= 11.8'
5
+ gem 'rake', '>= 10.2'
6
+ gem 'rubocop', '>= 0.21'
7
+ gem 'foodcritic', '>= 3.0'
8
+ gem 'chefspec', '>= 3.4'
9
+ gem 'serverspec', '>= 1.6'
10
+ gem 'guard', '>= 2.6'
11
+ gem 'guard-rubocop', '>= 1.1'
12
+ gem 'guard-foodcritic', '>= 1.0.2'
13
+ gem 'test-kitchen'
14
+ gem 'kitchen-vagrant'
15
+ gem 'kitchen-docker'
23
16
 
24
17
  #group :infinite_loop_solver do
25
18
  # gem 'celluloid', '~> 0.14'
data/README.md CHANGED
@@ -13,19 +13,21 @@ About
13
13
  Install
14
14
  =======
15
15
 
16
+ Setting the environment variable `USE_SYSTEM_GECODE=1` will help speed up builds by using the system `gecode` rather than compiling it from scratch.
17
+
16
18
  Official
17
19
  ----------
18
20
 
19
21
  as of version `0.2.0` this is offered as a `chefdk` plugin.
20
22
 
21
- `knife gem install meez`
23
+ `chef gem install meez`
22
24
 
23
25
  Unofficial
24
26
  -------------
25
27
 
26
28
  Your results may vary using it outside of `chefdk`
27
29
 
28
- `knife gem install meez`
30
+ `gem install meez`
29
31
 
30
32
 
31
33
  Usage
@@ -90,10 +92,12 @@ You must run `bundle install' to fetch any new gems.
90
92
  Cookbook test created successfully
91
93
  Next steps...
92
94
  $ cd /tmp/test
95
+ $ export USE_SYSTEM_GECODE=1
93
96
  $ bundle install
94
97
  $ bundle exec berks install
95
98
 
96
99
  $ cd /tmp/test
100
+ $ export USE_SYSTEM_GECODE=1
97
101
  $ bundle install
98
102
  Fetching gem metadata from https://rubygems.org/
99
103
  Fetching additional metadata from https://rubygems.org/
data/bin/meez CHANGED
@@ -33,18 +33,23 @@ opt_parser = OptionParser.new do |opt|
33
33
  options[:help] = true
34
34
  puts opt_parser
35
35
  end
36
+ opt.on('-v', '--version', 'version') do
37
+ options[:version] = true
38
+ puts 'meez version 0.2.2'
39
+ end
36
40
  end
37
41
 
38
42
  opt_parser.parse!
39
43
 
40
44
  cookbook_name = ARGV.pop
41
45
 
42
- unless options[:help]
46
+ unless options[:help] || options[:version]
43
47
  if cookbook_name
44
48
  Meez.init(cookbook_name, options)
45
49
  puts "Cookbook #{cookbook_name} created successfully"
46
50
  puts 'Next steps...'
47
51
  puts " $ cd #{File.join(options[:path], cookbook_name)}"
52
+ puts ' $ export USE_SYSTEM_GECODE=1'
48
53
  puts ' $ bundle install'
49
54
  puts ' $ bundle exec berks install'
50
55
  puts ' $ bundle exec rake'
@@ -16,6 +16,7 @@ class Meez
16
16
  init_kitchenci(cookbook_name, options)
17
17
  init_guard(cookbook_name, options)
18
18
  init_drone(cookbook_name, options)
19
+ init_docker(cookbook_name, options)
19
20
  end
20
21
 
21
22
  def self.write_template(name, path, cookbook_name, options)
@@ -164,6 +165,12 @@ class Meez
164
165
  write_template('.drone.yml.erb', path, cookbook_name, options)
165
166
  end
166
167
 
168
+ def self.init_docker(cookbook_name, options)
169
+ puts '* Initializing Docker'
170
+ path = File.join(options[:path], cookbook_name)
171
+ write_template('Dockerfile.erb', path, cookbook_name, options)
172
+ end
173
+
167
174
  def self.bundle_install(cookbook_name, options)
168
175
  require 'bundler'
169
176
  puts '* Running bundle install'
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{meez}
3
- s.version = '0.2.1'
3
+ s.version = '0.2.2'
4
4
  s.date = %q{2014-01-08}
5
5
  s.summary = 'Initializes a chef cookbook with TDD framework'
6
6
  s.description = <<EOF
@@ -16,7 +16,7 @@ EOF
16
16
  s.homepage = 'http://github.com/paulczar/meez'
17
17
  s.license = 'apache2'
18
18
  s.require_paths = ['lib']
19
- s.add_dependency 'chef', '> 11.8'
19
+ s.add_dependency 'chef', '~> 11.8'
20
20
  s.add_dependency 'test-kitchen', '~> 1.2'
21
21
  s.add_dependency 'bundler', '~> 1.5'
22
22
  s.add_dependency 'berkshelf', '~> 3.1'
@@ -1,6 +1,7 @@
1
1
  image: paulczar/meez
2
2
  env:
3
3
  - CI=drone
4
+ - USE_SYSTEM_GECODE=1
4
5
  script:
5
6
  - bundle install
6
7
  - bundle exec berks install
@@ -0,0 +1,10 @@
1
+ # builds docker container to be used with CI
2
+
3
+ FROM paulczar/meez
4
+
5
+ ADD Gemfile /tmp/Gemfile
6
+
7
+ ENV PATH /opt/chefdk/embedded/bin:/root/.chefdk/gem/ruby/2.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
8
+ ENV USE_SYSTEM_GECODE 1
9
+
10
+ RUN cd /tmp && bundle install
@@ -31,3 +31,10 @@ end
31
31
 
32
32
  # The default rake task should just run it all
33
33
  task default: ['style', 'spec', 'integration']
34
+
35
+ begin
36
+ require 'kitchen/rake_tasks'
37
+ Kitchen::RakeTasks.new
38
+ rescue LoadError
39
+ puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
40
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meez
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Czarkowski
@@ -14,14 +14,14 @@ dependencies:
14
14
  name: chef
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">"
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '11.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">"
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '11.8'
27
27
  - !ruby/object:Gem::Dependency
@@ -89,6 +89,7 @@ files:
89
89
  - templates/.drone.yml.erb
90
90
  - templates/.kitchen.yml.erb
91
91
  - templates/.rubocop.yml.erb
92
+ - templates/Dockerfile.erb
92
93
  - templates/Guardfile.erb
93
94
  - templates/Rakefile.erb
94
95
  - templates/Vagrantfile.erb