Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified mode #133

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Require Chef 15.3+
- Require unified_mode is always enabled for Chef 17 support
- Remove the homebrew resource

## 2.3.4 - *2023-02-13*

## 2.3.3 - *2023-02-13*
Expand Down
5 changes: 3 additions & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
description 'Manages the ruby-build framework and its installed rubies. A LWRP is also defined.'
source_url 'https://github.com/sous-chefs/ruby_build'
issues_url 'https://github.com/sous-chefs/ruby_build/issues'
chef_version '>= 15.0'

chef_version '>= 15.3'
version '2.3.4'

supports 'ubuntu'
Expand All @@ -22,4 +23,4 @@
supports 'mac_os_x'

depends 'yum-epel'
depends 'homebrew'
depends 'yum-centos'
7 changes: 2 additions & 5 deletions resources/definition.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
include Chef::Rbenv::MacOs
unified_mode true

# for compatibility with earlier incarnations
# of this resource
#
provides :ruby_build_ruby
provides :ruby_build_definition

property :definition, String,
name_property: true,
Expand Down Expand Up @@ -38,8 +37,6 @@
property :group, String,
description: 'Group to install as'

unified_mode true if respond_to? :unified_mode

action :install do
Chef::Log.fatal('JRuby is not a supported definition') \
if new_resource.definition.include? 'jruby'
Expand Down
77 changes: 0 additions & 77 deletions resources/homebrew_update.rb

This file was deleted.

4 changes: 2 additions & 2 deletions resources/install.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
unified_mode true

property :name, String, default: ''

property :git_ref, String,
default: 'master',
description: 'Git reference to download, set to a tag to get a specific version'

unified_mode true if respond_to? :unified_mode

action :install do
src_path = "#{Chef::Config['file_cache_path']}/ruby-build"

Expand Down