Skip to content
This repository was archived by the owner on Aug 21, 2021. It is now read-only.

Commit

Permalink
Changes for compatibility with Chef 12.14.
Browse files Browse the repository at this point in the history
+ changes from @reidab PR connecting with mysql migration from recipes to resources
  • Loading branch information
Denis-Mak committed Apr 14, 2017
1 parent f4f70db commit 3cdfdc1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
default[:sphinx][:source][:base_url] = "http://sphinxsearch.com/files"
default[:sphinx][:source][:stemmer_url] = "http://snowball.tartarus.org/dist/libstemmer_c.tgz"
default[:sphinx][:source][:install_path] = "/usr/local"
default[:sphinx][:source][:binary_path] = "#{sphinx[:source][:install_path]}/bin"
default[:sphinx][:source][:binary_path] = "#{node[:sphinx][:source][:install_path]}/bin"
default[:sphinx][:source][:configure_flags] = []
default[:sphinx][:source][:extra_configure_flags] = []
default[:sphinx][:source][:branch] = 'trunk'
Expand Down
4 changes: 2 additions & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
maintainer_email "[email protected]"
license "Apache 2.0"
description "Installs/Configures sphinx search engine."
version "1.1.0"
version "1.1.1"

recipe "sphinx", "Installs sphinx"
recipe "sphinx::package", "Installs sphinx from a package"
Expand All @@ -16,7 +16,7 @@
provides "sphinx::rpm"

depends "build-essential", ">= 1.1.2"
depends "mysql"
depends "mysql", ">= 6.0.0"
depends "percona"
depends "postgresql", ">= 1.0.0"
depends "yum"
Expand Down
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mysql_client "default" if node[:sphinx][:use_mysql]
include_recipe "percona::client" if node[:sphinx][:use_percona]
include_recipe "mysql::client" if node[:sphinx][:use_mysql]
include_recipe "postgresql::client" if node[:sphinx][:use_postgres]
include_recipe "sphinx::#{node[:sphinx][:install_method]}"
2 changes: 1 addition & 1 deletion resources/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
attribute :name, :kind_of => String, :name_attribute => true, :required => true

attribute :source, :kind_of => String
attribute :params, :kind_of => Hash, :required => true, :default => {}
attribute :attrs, :kind_of => Hash, :required => true, :default => {}

attribute :rotate, :kind_of => [TrueClass, FalseClass], :default => false
2 changes: 1 addition & 1 deletion resources/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
attribute :name, :kind_of => String, :name_attribute => true, :required => true

attribute :type, :kind_of => String, :required => true
attribute :params, :kind_of => Hash, :required => true, :default => {}
attribute :attrs, :kind_of => Hash, :required => true, :default => {}
2 changes: 1 addition & 1 deletion templates/default/index.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
index <%= @new_resource.name %> {
source = <%= @new_resource.source %>
path = <%= @data_path %>
<% @new_resource.params.each do |k, v| %>
<% @new_resource.attrs.each do |k, v| %>
<%= k %> = <%= v %>
<% end %>
}
2 changes: 1 addition & 1 deletion templates/default/source.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source <%= @new_resource.name %> {
type = <%= @new_resource.type %>
<% @new_resource.params.each do |k, v| %>
<% @new_resource.attrs.each do |k, v| %>
<% if v.respond_to?("each") %>
<% v.each do |sub_v| %>
<%= k %> = <%= sub_v %>
Expand Down

0 comments on commit 3cdfdc1

Please sign in to comment.