Skip to content

Commit bd70d33

Browse files
committed
Cookbook renamed to filesystem_resize
1 parent 5bba15f commit bd70d33

File tree

17 files changed

+66
-66
lines changed

17 files changed

+66
-66
lines changed

.kitchen.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ platforms:
1515
suites:
1616
- name: default
1717
run_list:
18-
- recipe[fs_resize-test::default]
18+
- recipe[filesystem_resize-test::default]
1919
attributes:

Berksfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
site :opscode
22

33
metadata
4-
cookbook 'fs_resize-test', path: './test/kitchen/cookbooks/fs_resize-test'
4+
cookbook 'filesystem_resize-test', path: './test/kitchen/cookbooks/filesystem_resize-test'

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
fs_resize CHANGELOG
1+
filesystem_resize CHANGELOG
22
==========================
33

4-
This file is used to list changes made in each version of the fs_resize cookbook.
4+
This file is used to list changes made in each version of the filesystem_resize cookbook.
55

66
0.1.0
77
-----
8-
- [your_name] - Initial release of fs_resize
8+
- [your_name] - Initial release of filesystem_resize
99

1010
- - -
1111
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Contributing
55
2. Create a named feature branch (`$ git checkout -b my-new-feature`).
66
3. Write your change.
77
4. Write tests for your change (if applicable).
8-
5. [Run the tests](https://github.com/onddo/fs_resize-cookbook/blob/master/TESTING.md), ensuring they all pass (`$ bundle exec rake`).
8+
5. [Run the tests](https://github.com/onddo/filesystem_resize-cookbook/blob/master/TESTING.md), ensuring they all pass (`$ bundle exec rake`).
99
6. Commit your change (`$ git commit -am 'Add some feature'`).
1010
7. Push to the branch (`$ git push origin my-new-feature`).
1111
8. [Submit a Pull Request using Github](https://help.github.com/articles/creating-a-pull-request).
1212

13-
Please do not hesitate to [open an issue](https://github.com/onddo/fs_resize-cookbook/issues/new) with any questions or problems.
13+
Please do not hesitate to [open an issue](https://github.com/onddo/filesystem_resize-cookbook/issues/new) with any questions or problems.

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Description
22
===========
3-
[![Cookbook Version](https://img.shields.io/cookbook/v/fs_resize.svg?style=flat)](https://supermarket.getchef.com/cookbooks/fs_resize)
4-
[![Dependency Status](http://img.shields.io/gemnasium/onddo/fs_resize-cookbook.svg?style=flat)](https://gemnasium.com/onddo/fs_resize-cookbook)
5-
[![Code Climate](http://img.shields.io/codeclimate/github/onddo/fs_resize-cookbook.svg?style=flat)](https://codeclimate.com/github/onddo/fs_resize-cookbook)
6-
[![Build Status](http://img.shields.io/travis/onddo/fs_resize-cookbook.svg?style=flat)](https://travis-ci.org/onddo/fs_resize-cookbook)
3+
[![Cookbook Version](https://img.shields.io/cookbook/v/filesystem_resize.svg?style=flat)](https://supermarket.getchef.com/cookbooks/filesystem_resize)
4+
[![Dependency Status](http://img.shields.io/gemnasium/onddo/filesystem_resize-cookbook.svg?style=flat)](https://gemnasium.com/onddo/filesystem_resize-cookbook)
5+
[![Code Climate](http://img.shields.io/codeclimate/github/onddo/filesystem_resize-cookbook.svg?style=flat)](https://codeclimate.com/github/onddo/filesystem_resize-cookbook)
6+
[![Build Status](http://img.shields.io/travis/onddo/filesystem_resize-cookbook.svg?style=flat)](https://travis-ci.org/onddo/filesystem_resize-cookbook)
77

88
This Chef cookbook resizes the file system automatically when the underlying partition or disk increases its size.
99

@@ -23,7 +23,7 @@ This cookbook has been tested on the following platforms:
2323
* RedHat
2424
* Ubuntu (>= 12.04)
2525

26-
Please, [let us know](https://github.com/onddo/fs_resize-cookbook/issues/new?title=I%20have%20used%20it%20successfully%20on%20...) if you use it successfully on any other platform.
26+
Please, [let us know](https://github.com/onddo/filesystem_resize-cookbook/issues/new?title=I%20have%20used%20it%20successfully%20on%20...) if you use it successfully on any other platform.
2727

2828
## Application Requirements
2929

@@ -46,7 +46,7 @@ Attributes
4646
<th>Default</th>
4747
</tr>
4848
<tr>
49-
<td><code>node['fs_resize']['compiletime']</code></td>
49+
<td><code>node['filesystem_resize']['compiletime']</code></td>
5050
<td>Resize the file systems at compile time.</td>
5151
<td><code>false</code></td>
5252
</tr>
@@ -55,7 +55,7 @@ Attributes
5555
Recipes
5656
=======
5757

58-
## fs_resize::default
58+
## filesystem_resize::default
5959

6060
Resize mounted file systems.
6161

@@ -68,14 +68,14 @@ You can simply include it in a recipe:
6868

6969
```ruby
7070
# in your recipe
71-
include_recipe 'fs_resize'
71+
include_recipe 'filesystem_resize'
7272
```
7373

74-
Don't forget to include the `fs_resize` cookbook as a dependency in the metadata:
74+
Don't forget to include the `filesystem_resize` cookbook as a dependency in the metadata:
7575

7676
```ruby
7777
# metadata.rb
78-
depends 'fs_resize'
78+
depends 'filesystem_resize'
7979
```
8080

8181
## Including in the Run List
@@ -88,27 +88,27 @@ Another alternative is to include it in your Run List:
8888
[...]
8989
"run_list": [
9090
[...]
91-
"recipe[fs_resize]"
91+
"recipe[filesystem_resize]"
9292
]
9393
}
9494
```
9595

9696
Testing
9797
=======
9898

99-
See [TESTING.md](https://github.com/onddo/fs_resize-cookbook/blob/master/TESTING.md).
99+
See [TESTING.md](https://github.com/onddo/filesystem_resize-cookbook/blob/master/TESTING.md).
100100

101101
Contributing
102102
============
103103

104-
Please do not hesitate to [open an issue](https://github.com/onddo/fs_resize-cookbook/issues/new) with any questions or problems.
104+
Please do not hesitate to [open an issue](https://github.com/onddo/filesystem_resize-cookbook/issues/new) with any questions or problems.
105105

106-
See [CONTRIBUTING.md](https://github.com/onddo/fs_resize-cookbook/blob/master/CONTRIBUTING.md).
106+
See [CONTRIBUTING.md](https://github.com/onddo/filesystem_resize-cookbook/blob/master/CONTRIBUTING.md).
107107

108108
TODO
109109
====
110110

111-
See [TODO.md](https://github.com/onddo/fs_resize-cookbook/blob/master/TODO.md).
111+
See [TODO.md](https://github.com/onddo/filesystem_resize-cookbook/blob/master/TODO.md).
112112

113113
License and Author
114114
==================

attributes/default.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# encoding: UTF-8
22

3-
default['fs_resize']['compiletime'] = false
3+
default['filesystem_resize']['compiletime'] = false

libraries/filesystem.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def xfs_size
4646
end
4747
end
4848

49-
def xfs_resize
49+
def xfilesystem_resize
5050
if command_running?('xfs_growfs')
5151
Chef::Log.warn("#{self.class}: xfs_growfs already running, skipping")
5252
return false
@@ -103,7 +103,7 @@ def resize
103103
Chef::Log.debug("#{self} type: #{type}")
104104
case type
105105
when /^ext[0-9]+$/ then ext_resize
106-
when 'xfs' then xfs_resize
106+
when 'xfs' then xfilesystem_resize
107107
else
108108
Chef::Log.warn("#{self.class}: unknown fs type: #{type}")
109109
return false

metadata.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# encoding: UTF-8
22

3-
name 'fs_resize'
3+
name 'filesystem_resize'
44
maintainer 'Onddo Labs, Sl.'
55
maintainer_email '[email protected]'
66
license 'Apache 2.0'
@@ -18,9 +18,9 @@
1818
supports 'redhat'
1919
supports 'ubuntu', '>= 12.04'
2020

21-
recipe 'fs_resize::default', 'Resize mounted file systems.'
21+
recipe 'filesystem_resize::default', 'Resize mounted file systems.'
2222

23-
attribute 'fs_resize/compiletime',
23+
attribute 'filesystem_resize/compiletime',
2424
display_name: 'fs resize at compile time',
2525
description: 'Resize the file sistems at compile time.',
2626
choice: %w(true false),

recipes/default.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# encoding: UTF-8
22
#
3-
# Cookbook Name:: fs_resize
3+
# Cookbook Name:: filesystem_resize
44
# Recipe:: default
55
#
66
# Copyright 2014, Onddo Labs, Sl.
@@ -18,10 +18,10 @@
1818
# limitations under the License.
1919
#
2020

21-
r = ruby_block 'fs_resize' do
21+
r = ruby_block 'filesystem_resize' do
2222
block do
2323
Chef::Recipe.send(:include, FilesystemResize)
2424
Filesystems.resize_all
2525
end
2626
end
27-
r.run_action(:run) if node['fs_resize']['compiletime']
27+
r.run_action(:run) if node['filesystem_resize']['compiletime']

spec/recipes/default_spec.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@
1919

2020
require 'spec_helper'
2121

22-
describe 'fs_resize::default' do
22+
describe 'filesystem_resize::default' do
2323

2424
context 'compiletime false' do
2525
let(:chef_run) do
2626
chef_runner = ChefSpec::Runner.new do |node|
27-
node.set['fs_resize']['compiletime'] = false
27+
node.set['filesystem_resize']['compiletime'] = false
2828
end
2929
chef_runner.converge(described_recipe)
3030
end
3131

3232
it 'should run fs resize at converge time' do
33-
expect(chef_run).to run_ruby_block('fs_resize')
33+
expect(chef_run).to run_ruby_block('filesystem_resize')
3434
end
3535

3636
end
3737

3838
context 'compiletime true' do
3939
let(:chef_run) do
4040
chef_runner = ChefSpec::Runner.new do |node|
41-
node.set['fs_resize']['compiletime'] = true
41+
node.set['filesystem_resize']['compiletime'] = true
4242
end
4343
chef_runner.converge(described_recipe)
4444
end
4545

4646
it 'should run fs resize at converge time' do
47-
expect(chef_run).to run_ruby_block('fs_resize').at_compile_time
47+
expect(chef_run).to run_ruby_block('filesystem_resize').at_compile_time
4848
end
4949

5050
end

test/kitchen/cookbooks/fs_resize-test/CHANGELOG.md renamed to test/kitchen/cookbooks/filesystem_resize-test/CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
fs_resize-test CHANGELOG
1+
filesystem_resize-test CHANGELOG
22
===============================
33

4-
This file is used to list changes made in each version of the fs_resize-test cookbook.
4+
This file is used to list changes made in each version of the filesystem_resize-test cookbook.
55

66
0.1.0
77
-----
8-
- [your_name] - Initial release of fs_resize-test
8+
- [your_name] - Initial release of filesystem_resize-test
99

1010
- - -
1111
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.

test/kitchen/cookbooks/fs_resize-test/README.md renamed to test/kitchen/cookbooks/filesystem_resize-test/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
fs_resize-test Cookbook
1+
filesystem_resize-test Cookbook
22
==============================
33
TODO: Enter the cookbook description here.
44

@@ -11,14 +11,14 @@ TODO: List your cookbook requirements. Be sure to include any requirements this
1111

1212
e.g.
1313
#### packages
14-
- `toaster` - fs_resize-test needs toaster to brown your bagel.
14+
- `toaster` - filesystem_resize-test needs toaster to brown your bagel.
1515

1616
Attributes
1717
----------
1818
TODO: List your cookbook attributes here.
1919

2020
e.g.
21-
#### fs_resize-test::default
21+
#### filesystem_resize-test::default
2222
<table>
2323
<tr>
2424
<th>Key</th>
@@ -27,7 +27,7 @@ e.g.
2727
<th>Default</th>
2828
</tr>
2929
<tr>
30-
<td><tt>['fs_resize-test']['bacon']</tt></td>
30+
<td><tt>['filesystem_resize-test']['bacon']</tt></td>
3131
<td>Boolean</td>
3232
<td>whether to include bacon</td>
3333
<td><tt>true</tt></td>
@@ -36,17 +36,17 @@ e.g.
3636

3737
Usage
3838
-----
39-
#### fs_resize-test::default
39+
#### filesystem_resize-test::default
4040
TODO: Write usage instructions for each cookbook.
4141

4242
e.g.
43-
Just include `fs_resize-test` in your node's `run_list`:
43+
Just include `filesystem_resize-test` in your node's `run_list`:
4444

4545
```json
4646
{
4747
"name":"my_node",
4848
"run_list": [
49-
"recipe[fs_resize-test]"
49+
"recipe[filesystem_resize-test]"
5050
]
5151
}
5252
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# encoding: UTF-8
2+
3+
default['filesystem_resize-test']['packages']['xfs'] = %w(xfsprogs)
4+
5+
default['filesystem_resize-test']['directory'] = '/root'
6+
if node['platform'] == 'centos' && node['platform_version'].to_i == 5
7+
default['filesystem_resize-test']['types_to_test'] = %w(ext3 xfs)
8+
else
9+
default['filesystem_resize-test']['types_to_test'] = %w(ext3 ext4 xfs)
10+
end
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# encoding: UTF-8
22

3-
name 'fs_resize-test'
3+
name 'filesystem_resize-test'
44
maintainer 'Onddo Labs, Sl.'
55
maintainer_email '[email protected]'
66
license 'Apache 2.0'
7-
description 'Installs/Configures fs_resize-test'
7+
description 'Installs/Configures filesystem_resize-test'
88
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
99
version '0.1.0'
1010

11-
depends 'fs_resize'
11+
depends 'filesystem_resize'

test/kitchen/cookbooks/fs_resize-test/recipes/default.rb renamed to test/kitchen/cookbooks/filesystem_resize-test/recipes/default.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# encoding: UTF-8
22
#
3-
# Cookbook Name:: fs_resize-test
3+
# Cookbook Name:: filesystem_resize-test
44
# Recipe:: default
55
#
66
# Copyright 2014, Onddo Labs, Sl.
@@ -18,7 +18,7 @@
1818
# limitations under the License.
1919
#
2020

21-
node['fs_resize-test']['packages']['xfs'].each do |pkg|
21+
node['filesystem_resize-test']['packages']['xfs'].each do |pkg|
2222
(package pkg).run_action(:install)
2323
end
2424

@@ -27,19 +27,19 @@
2727

2828
def block_device_path(type)
2929
::File.join(
30-
node['fs_resize-test']['directory'],
30+
node['filesystem_resize-test']['directory'],
3131
"#{type}_disk.img"
3232
)
3333
end
3434

3535
def mount_point_path(type)
3636
::File.join(
37-
node['fs_resize-test']['directory'],
37+
node['filesystem_resize-test']['directory'],
3838
"#{type}_disk"
3939
)
4040
end
4141

42-
node['fs_resize-test']['types_to_test'].each do |type|
42+
node['filesystem_resize-test']['types_to_test'].each do |type|
4343
block_device = block_device_path(type)
4444
mount_point = mount_point_path(type)
4545
size = 100 # MB
@@ -82,9 +82,9 @@ def mount_point_path(type)
8282
end
8383
end
8484

85-
include_recipe 'fs_resize'
85+
include_recipe 'filesystem_resize'
8686

87-
node['fs_resize-test']['types_to_test'].each do |type|
87+
node['filesystem_resize-test']['types_to_test'].each do |type|
8888
block_device = block_device_path(type)
8989
mount_point = mount_point_path(type)
9090

test/kitchen/cookbooks/fs_resize-test/attributes/default.rb

-10
This file was deleted.

0 commit comments

Comments
 (0)