Skip to content

Commit

Permalink
[MERGE] Fix merge conflict with next
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Grewe committed Apr 29, 2015
2 parents ab42671 + 016b0a5 commit 8b6259d
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 16 deletions.
1 change: 1 addition & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ provisioner:
name: chef_zero

platforms:
- name: centos-7.0
- name: centos-6.5
- name: centos-5.10
- name: ubuntu-12.04
Expand Down
2 changes: 1 addition & 1 deletion Berksfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# vi: set ft=ruby :
source 'https://api.berkshelf.com'
source 'https://supermarket.getchef.com'

metadata

Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
0.1.0 (Mar 5 2013)
0.2.1 (Apr 29th 2013)
---------------------

* Saver service definition, enable and start after template is written

0.1.0 (Mar 05th 2013)
------------------

* First committed version
7 changes: 3 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ task 'foodcritic' do
end

desc 'Run ChefSpec examples'
task 'chefspec' => 'setup_cookbooks' do
sh 'rspec', '--color', '--format', 'documentation',
File.join(COOKBOOKS_PATH, COOKBOOK_NAME, 'spec')
task 'chefspec' do
sh 'rspec', '--color', '--format', 'documentation'
end

desc 'Run Rubocop'
task :rubocop do
sh 'rubocop', '-fs'
sh 'rubocop', '-fs', File.join(COOKBOOKS_PATH, COOKBOOK_NAME)
end

desc 'Run all tests'
Expand Down
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@
}

# Addresses a compatibility breaking upgrade, might be better to set to NO explicitly but for testing purposes it's enabled
if node['platform'] == 'ubuntu' && node['platform_version'] == '14.04'
if (node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 14.04) || (node['platform'] == 'centos' && node['platform_version'].to_f >= 7.0)
default['vsftpd']['config']['allow_writeable_chroot'] = 'YES'
end
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs/configures vsftpd'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
version '0.2.1'
recipe 'vsftpd::default', 'Installs/configures vsftpd'

supports 'ubuntu'
Expand Down
1 change: 0 additions & 1 deletion recipes/_configure.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# encoding: utf-8

directory node['vsftpd']['etcdir'] do
action :create
user 'root'
Expand Down
10 changes: 6 additions & 4 deletions recipes/_define_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
if node['vsftpd']['enabled']
service 'vsftpd' do
provider Chef::Provider::Service::Upstart if node['platform'] == 'ubuntu' &&
node['platform_version'] == '14.04'
action %w( enable start )
node['platform_version'].to_f >= 14.04
action [:enable, :start]
supports :restart => true
end
else
service 'vsftpd' do
provider Chef::Provider::Service::Upstart if node['platform'] == 'ubuntu' &&
node['platform_version'] == '14.04'
action %w( disable stop )
node['platform_version'].to_f >= 14.04
action [:disable, :stop]
supports :restart => true
end
end
6 changes: 3 additions & 3 deletions spec/default_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: utf-8

require 'chefspec'
require 'spec_helper'

describe 'vsftpd::default' do
{ 'redhat' => '6.5', 'debian' => '7.5' }.each do |platform_family, platform_version|
Expand All @@ -17,8 +17,8 @@
expect(@chef_run).to install_package('vsftpd')
end

it 'should create configuration directory /etc/vsftpd' do
expect(@chef_run).to create_directory('/etc/vsftpd')
it 'should create configuration directory /etc/vsftpd/users.d'do
expect(@chef_run).to create_directory('/etc/vsftpd/users.d')
end if platform_family == 'debian'

platform_family == 'debian' ? config = '/etc/vsftpd.conf' : config = '/etc/vsftpd/vsftpd.conf'
Expand Down
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require 'chefspec'
require 'chefspec/berkshelf'
ChefSpec::Coverage.start!

0 comments on commit 8b6259d

Please sign in to comment.