poise-build-essential 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.kitchen.yml +3 -0
  4. data/.travis.yml +60 -0
  5. data/.yardopts +7 -0
  6. data/CHANGELOG.md +5 -0
  7. data/Gemfile +35 -0
  8. data/LICENSE +201 -0
  9. data/README.md +85 -0
  10. data/Rakefile +17 -0
  11. data/chef/attributes/default.rb +21 -0
  12. data/chef/recipes/default.rb +19 -0
  13. data/lib/poise_build_essential.rb +22 -0
  14. data/lib/poise_build_essential/build_essential_providers.rb +49 -0
  15. data/lib/poise_build_essential/build_essential_providers/base.rb +103 -0
  16. data/lib/poise_build_essential/build_essential_providers/debian.rb +41 -0
  17. data/lib/poise_build_essential/build_essential_providers/freebsd.rb +46 -0
  18. data/lib/poise_build_essential/build_essential_providers/mac_os_x.rb +66 -0
  19. data/lib/poise_build_essential/build_essential_providers/omnios.rb +46 -0
  20. data/lib/poise_build_essential/build_essential_providers/rhel.rb +46 -0
  21. data/lib/poise_build_essential/build_essential_providers/smartos.rb +39 -0
  22. data/lib/poise_build_essential/build_essential_providers/solaris.rb +47 -0
  23. data/lib/poise_build_essential/build_essential_providers/suse.rb +43 -0
  24. data/lib/poise_build_essential/build_essential_providers/windows.rb +68 -0
  25. data/lib/poise_build_essential/cheftie.rb +18 -0
  26. data/lib/poise_build_essential/resources.rb +26 -0
  27. data/lib/poise_build_essential/resources/poise_build_essential.rb +48 -0
  28. data/lib/poise_build_essential/version.rb +20 -0
  29. data/poise-build-essential.gemspec +42 -0
  30. data/test/cookbook/attributes/default.rb +17 -0
  31. data/test/cookbook/metadata.rb +18 -0
  32. data/test/cookbook/recipes/default.rb +37 -0
  33. data/test/gemfiles/chef-12.1.gemfile +23 -0
  34. data/test/gemfiles/chef-12.10.gemfile +23 -0
  35. data/test/gemfiles/chef-12.11.gemfile +23 -0
  36. data/test/gemfiles/chef-12.12.gemfile +22 -0
  37. data/test/gemfiles/chef-12.13.gemfile +22 -0
  38. data/test/gemfiles/chef-12.14.gemfile +19 -0
  39. data/test/gemfiles/chef-12.15.gemfile +19 -0
  40. data/test/gemfiles/chef-12.16.gemfile +19 -0
  41. data/test/gemfiles/chef-12.17.gemfile +19 -0
  42. data/test/gemfiles/chef-12.18.gemfile +19 -0
  43. data/test/gemfiles/chef-12.19.gemfile +19 -0
  44. data/test/gemfiles/chef-12.2.gemfile +23 -0
  45. data/test/gemfiles/chef-12.3.gemfile +23 -0
  46. data/test/gemfiles/chef-12.4.gemfile +24 -0
  47. data/test/gemfiles/chef-12.5.gemfile +23 -0
  48. data/test/gemfiles/chef-12.6.gemfile +23 -0
  49. data/test/gemfiles/chef-12.7.gemfile +23 -0
  50. data/test/gemfiles/chef-12.8.gemfile +23 -0
  51. data/test/gemfiles/chef-12.9.gemfile +23 -0
  52. data/test/gemfiles/chef-12.gemfile +19 -0
  53. data/test/gemfiles/master.gemfile +26 -0
  54. data/test/integration/default/serverspec/default_spec.rb +27 -0
  55. data/test/spec/build_essential_providers/debian_spec.rb +49 -0
  56. data/test/spec/build_essential_providers/freebsd_spec.rb +68 -0
  57. data/test/spec/build_essential_providers/mac_os_x_spec.rb +52 -0
  58. data/test/spec/build_essential_providers/omnios_spec.rb +67 -0
  59. data/test/spec/build_essential_providers/rhel_spec.rb +54 -0
  60. data/test/spec/build_essential_providers/smartos_spec.rb +64 -0
  61. data/test/spec/build_essential_providers/solaris_spec.rb +108 -0
  62. data/test/spec/build_essential_providers/suse_spec.rb +54 -0
  63. data/test/spec/recipe_spec.rb +35 -0
  64. data/test/spec/resources/poise_build_essential_spec.rb +49 -0
  65. data/test/spec/spec_helper.rb +19 -0
  66. metadata +210 -0
@@ -0,0 +1,54 @@
1
+ #
2
+ # Copyright 2017, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ require 'spec_helper'
18
+
19
+ describe PoiseBuildEssential::BuildEssentialProviders::SUSE do
20
+ let(:chefspec_options) { {platform: 'suse', version: '12.2'} }
21
+ step_into(:poise_build_essential)
22
+
23
+ describe 'action :install' do
24
+ recipe do
25
+ poise_build_essential 'build_essential' do
26
+ action :install
27
+ end
28
+ end
29
+ it { is_expected.to install_package(%w{autoconf bison flex gcc gcc-c++ kernel-default-devel make m4}) }
30
+
31
+ context 'on SUSE 11.4' do
32
+ let(:chefspec_options) { {platform: 'suse', version: '11.4'} }
33
+ it { is_expected.to install_package(%w{autoconf bison flex gcc gcc-c++ kernel-default-devel make m4 gcc48 gcc48-c++}) }
34
+ end # /context on SUSE 11.4
35
+ end # /describe action :install
36
+
37
+ describe 'action :upgrade' do
38
+ recipe do
39
+ poise_build_essential 'build_essential' do
40
+ action :upgrade
41
+ end
42
+ end
43
+ it { is_expected.to upgrade_package(%w{autoconf bison flex gcc gcc-c++ kernel-default-devel make m4}) }
44
+ end # /describe action :upgrade
45
+
46
+ describe 'action :remove' do
47
+ recipe do
48
+ poise_build_essential 'build_essential' do
49
+ action :remove
50
+ end
51
+ end
52
+ it { is_expected.to remove_package(%w{autoconf bison flex gcc gcc-c++ kernel-default-devel make m4}) }
53
+ end # /describe action :remove
54
+ end
@@ -0,0 +1,35 @@
1
+ #
2
+ # Copyright 2017, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ require 'spec_helper'
18
+
19
+ describe 'poise-build-essential::default' do
20
+ recipe { include_recipe 'poise-build-essential' }
21
+
22
+ context 'with defaults' do
23
+ it { is_expected.to install_poise_build_essential('build_essential').with(allow_unsupported_platform: false) }
24
+ end # /context with defaults
25
+
26
+ context 'with attributes' do
27
+ before do
28
+ override_attributes['poise-build-essential'] = {}
29
+ override_attributes['poise-build-essential']['action'] = 'upgrade'
30
+ override_attributes['poise-build-essential']['allow_unsupported_platform'] = true
31
+ end
32
+
33
+ it { is_expected.to upgrade_poise_build_essential('build_essential').with(allow_unsupported_platform: true) }
34
+ end # /context with attributes
35
+ end
@@ -0,0 +1,49 @@
1
+ #
2
+ # Copyright 2017, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ require 'spec_helper'
18
+
19
+ describe PoiseBuildEssential::Resources::PoiseBuildEssential do
20
+ step_into(:poise_build_essential)
21
+ recipe do
22
+ poise_build_essential 'build_essential'
23
+ end
24
+
25
+ context 'with defaults' do
26
+ it { is_expected.to install_poise_build_essential('build_essential').with(allow_unsupported_platform: false) }
27
+ end # /context with defaults
28
+
29
+ context 'with an unsupported platform' do
30
+ let(:chefspec_options) { {platform: 'aix', version: '7.1'} }
31
+
32
+ it { expect { subject }.to raise_error RuntimeError }
33
+
34
+ context 'with allow_unsupported_platform' do
35
+ recipe do
36
+ poise_build_essential 'build_essential' do
37
+ allow_unsupported_platform true
38
+ end
39
+ end
40
+ before do
41
+ expect(Chef::Log).to receive(:warn)
42
+ end
43
+
44
+ it { is_expected.to install_poise_build_essential('build_essential').with(allow_unsupported_platform: true) }
45
+ # Confirm that no packages or anything else got installed.
46
+ it { expect(chef_run.run_context.resource_collection.map(&:to_s)).to eq %w{poise_build_essential[build_essential]} }
47
+ end # /context with allow_unsupported_platform
48
+ end # /context with an unsupported platform
49
+ end
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright 2015-2017, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ require 'poise_boiler/spec_helper'
18
+ require 'poise_build_essential'
19
+ require 'poise_build_essential/cheftie'
metadata ADDED
@@ -0,0 +1,210 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: poise-build-essential
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Noah Kantrowitz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-04-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: chef
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '12.1'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '14'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '12.1'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '14'
33
+ - !ruby/object:Gem::Dependency
34
+ name: halite
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.1'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.1'
47
+ - !ruby/object:Gem::Dependency
48
+ name: poise
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '2.6'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '2.6'
61
+ - !ruby/object:Gem::Dependency
62
+ name: poise-boiler
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.6'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.6'
75
+ description: A Chef cookbook to install a C compiler and build tools.
76
+ email:
77
+ - noah@coderanger.net
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - ".gitignore"
83
+ - ".kitchen.yml"
84
+ - ".travis.yml"
85
+ - ".yardopts"
86
+ - CHANGELOG.md
87
+ - Gemfile
88
+ - LICENSE
89
+ - README.md
90
+ - Rakefile
91
+ - chef/attributes/default.rb
92
+ - chef/recipes/default.rb
93
+ - lib/poise_build_essential.rb
94
+ - lib/poise_build_essential/build_essential_providers.rb
95
+ - lib/poise_build_essential/build_essential_providers/base.rb
96
+ - lib/poise_build_essential/build_essential_providers/debian.rb
97
+ - lib/poise_build_essential/build_essential_providers/freebsd.rb
98
+ - lib/poise_build_essential/build_essential_providers/mac_os_x.rb
99
+ - lib/poise_build_essential/build_essential_providers/omnios.rb
100
+ - lib/poise_build_essential/build_essential_providers/rhel.rb
101
+ - lib/poise_build_essential/build_essential_providers/smartos.rb
102
+ - lib/poise_build_essential/build_essential_providers/solaris.rb
103
+ - lib/poise_build_essential/build_essential_providers/suse.rb
104
+ - lib/poise_build_essential/build_essential_providers/windows.rb
105
+ - lib/poise_build_essential/cheftie.rb
106
+ - lib/poise_build_essential/resources.rb
107
+ - lib/poise_build_essential/resources/poise_build_essential.rb
108
+ - lib/poise_build_essential/version.rb
109
+ - poise-build-essential.gemspec
110
+ - test/cookbook/attributes/default.rb
111
+ - test/cookbook/metadata.rb
112
+ - test/cookbook/recipes/default.rb
113
+ - test/docker/docker.ca
114
+ - test/docker/docker.pem
115
+ - test/gemfiles/chef-12.1.gemfile
116
+ - test/gemfiles/chef-12.10.gemfile
117
+ - test/gemfiles/chef-12.11.gemfile
118
+ - test/gemfiles/chef-12.12.gemfile
119
+ - test/gemfiles/chef-12.13.gemfile
120
+ - test/gemfiles/chef-12.14.gemfile
121
+ - test/gemfiles/chef-12.15.gemfile
122
+ - test/gemfiles/chef-12.16.gemfile
123
+ - test/gemfiles/chef-12.17.gemfile
124
+ - test/gemfiles/chef-12.18.gemfile
125
+ - test/gemfiles/chef-12.19.gemfile
126
+ - test/gemfiles/chef-12.2.gemfile
127
+ - test/gemfiles/chef-12.3.gemfile
128
+ - test/gemfiles/chef-12.4.gemfile
129
+ - test/gemfiles/chef-12.5.gemfile
130
+ - test/gemfiles/chef-12.6.gemfile
131
+ - test/gemfiles/chef-12.7.gemfile
132
+ - test/gemfiles/chef-12.8.gemfile
133
+ - test/gemfiles/chef-12.9.gemfile
134
+ - test/gemfiles/chef-12.gemfile
135
+ - test/gemfiles/master.gemfile
136
+ - test/integration/default/serverspec/default_spec.rb
137
+ - test/spec/build_essential_providers/debian_spec.rb
138
+ - test/spec/build_essential_providers/freebsd_spec.rb
139
+ - test/spec/build_essential_providers/mac_os_x_spec.rb
140
+ - test/spec/build_essential_providers/omnios_spec.rb
141
+ - test/spec/build_essential_providers/rhel_spec.rb
142
+ - test/spec/build_essential_providers/smartos_spec.rb
143
+ - test/spec/build_essential_providers/solaris_spec.rb
144
+ - test/spec/build_essential_providers/suse_spec.rb
145
+ - test/spec/recipe_spec.rb
146
+ - test/spec/resources/poise_build_essential_spec.rb
147
+ - test/spec/spec_helper.rb
148
+ homepage: https://github.com/poise/poise-build-essential
149
+ licenses:
150
+ - Apache 2.0
151
+ metadata: {}
152
+ post_install_message:
153
+ rdoc_options: []
154
+ require_paths:
155
+ - lib
156
+ required_ruby_version: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ required_rubygems_version: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ requirements: []
167
+ rubyforge_project:
168
+ rubygems_version: 2.6.11
169
+ signing_key:
170
+ specification_version: 4
171
+ summary: A Chef cookbook to install a C compiler and build tools.
172
+ test_files:
173
+ - test/cookbook/attributes/default.rb
174
+ - test/cookbook/metadata.rb
175
+ - test/cookbook/recipes/default.rb
176
+ - test/docker/docker.ca
177
+ - test/docker/docker.pem
178
+ - test/gemfiles/chef-12.1.gemfile
179
+ - test/gemfiles/chef-12.10.gemfile
180
+ - test/gemfiles/chef-12.11.gemfile
181
+ - test/gemfiles/chef-12.12.gemfile
182
+ - test/gemfiles/chef-12.13.gemfile
183
+ - test/gemfiles/chef-12.14.gemfile
184
+ - test/gemfiles/chef-12.15.gemfile
185
+ - test/gemfiles/chef-12.16.gemfile
186
+ - test/gemfiles/chef-12.17.gemfile
187
+ - test/gemfiles/chef-12.18.gemfile
188
+ - test/gemfiles/chef-12.19.gemfile
189
+ - test/gemfiles/chef-12.2.gemfile
190
+ - test/gemfiles/chef-12.3.gemfile
191
+ - test/gemfiles/chef-12.4.gemfile
192
+ - test/gemfiles/chef-12.5.gemfile
193
+ - test/gemfiles/chef-12.6.gemfile
194
+ - test/gemfiles/chef-12.7.gemfile
195
+ - test/gemfiles/chef-12.8.gemfile
196
+ - test/gemfiles/chef-12.9.gemfile
197
+ - test/gemfiles/chef-12.gemfile
198
+ - test/gemfiles/master.gemfile
199
+ - test/integration/default/serverspec/default_spec.rb
200
+ - test/spec/build_essential_providers/debian_spec.rb
201
+ - test/spec/build_essential_providers/freebsd_spec.rb
202
+ - test/spec/build_essential_providers/mac_os_x_spec.rb
203
+ - test/spec/build_essential_providers/omnios_spec.rb
204
+ - test/spec/build_essential_providers/rhel_spec.rb
205
+ - test/spec/build_essential_providers/smartos_spec.rb
206
+ - test/spec/build_essential_providers/solaris_spec.rb
207
+ - test/spec/build_essential_providers/suse_spec.rb
208
+ - test/spec/recipe_spec.rb
209
+ - test/spec/resources/poise_build_essential_spec.rb
210
+ - test/spec/spec_helper.rb