Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Added jetbrains toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianschwarz committed Jun 28, 2020
1 parent bcf1bbf commit ac1418b
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 1 deletion.
1 change: 1 addition & 0 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ suites:
run_list:
- recipe[codenamephp_workstation_php::php]
- recipe[codenamephp_workstation_php::apache2]
- recipe[codenamephp_workstation_php::jetbrains_toolbox]
verifier:
inspec_tests:
- test/integration/default
Expand Down
1 change: 1 addition & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
supports 'debian'

depends 'codenamephp_apache2', '~> 2.0'
depends 'codenamephp_dev', '~> 2.4'
depends 'codenamephp_docker', '~> 2.0'
depends 'codenamephp_mysql', '~> 2.0'
depends 'codenamephp_php', '~> 3.3'
4 changes: 3 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

#
# Cookbook:: codenamephp_workstation_php
# Recipe:: default
Expand All @@ -19,4 +20,5 @@

include_recipe '::php'
include_recipe '::apache2'
include_recipe '::phpmyadmin'
include_recipe '::phpmyadmin'
include_recipe '::jetbrains_toolbox'
21 changes: 21 additions & 0 deletions recipes/jetbrains_toolbox.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

#
# Cookbook:: codenamephp_workstation_php
# Recipe:: jetbrains_toolbox
#
# Copyright:: 2020, CodenamePHP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

codenamephp_dev_jetbrains_toolbox 'install jetbrains-toolbox'
1 change: 1 addition & 0 deletions spec/unit/recipes/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
expect(chef_run).to include_recipe('codenamephp_workstation_php::php')
expect(chef_run).to include_recipe('codenamephp_workstation_php::apache2')
expect(chef_run).to include_recipe('codenamephp_workstation_php::phpmyadmin')
expect(chef_run).to include_recipe('codenamephp_workstation_php::jetbrains_toolbox')
end
end
end
33 changes: 33 additions & 0 deletions spec/unit/recipes/jetbrains_toolbox_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# frozen_string_literal: true

#
# Cookbook:: codenamephp_workstation_php
# Spec:: jetbrains_toolbox
#
# Copyright:: 2020, CodenamePHP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'spec_helper'

describe 'codenamephp_workstation_php::jetbrains_toolbox' do
context 'When all attributes are default' do
it 'converges successfully' do
expect { chef_run }.to_not raise_error
end

it 'installs toolbox with resource' do
expect(chef_run).to install_codenamephp_dev_jetbrains_toolbox('install jetbrains-toolbox')
end
end
end
10 changes: 10 additions & 0 deletions test/integration/default/jetbrains_toolbox_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

# InSpec test for recipe chef.workstation.php::jetbrains_toolbox

# The InSpec reference, with examples and extensive documentation, can be
# found at https://www.inspec.io/docs/reference/resources/

describe file('/usr/share/jetbrains-toolbox/app') do
it { should exist }
end

0 comments on commit ac1418b

Please sign in to comment.