Update poise-javascript and poise-ruby cookbooks

This commit is contained in:
Greg Karékinian 2018-04-17 12:21:48 +02:00
parent d3aa94aab5
commit 90bb872305
10 changed files with 26 additions and 86 deletions

View File

@ -14,18 +14,15 @@ cookbook 'redis',
cookbook 'postfix', '= 5.0.2' cookbook 'postfix', '= 5.0.2'
cookbook 'php-fpm', '= 0.7.9' cookbook 'php-fpm', '= 0.7.9'
cookbook 'php', '= 4.2.0' cookbook 'php', '= 4.2.0'
cookbook 'poise-ruby-build', '= 1.1.0' cookbook 'poise-ruby-build', '~> 1.1.0'
cookbook 'application', '= 5.2.0' cookbook 'application', '~> 5.2.0'
cookbook 'application_javascript', '= 1.0.0' cookbook 'application_javascript', '~> 1.0.0'
cookbook 'application_ruby', '= 4.1.0' cookbook 'application_ruby', '~> 4.1.0'
cookbook 'application_git', '= 1.1.0' # 1.2.0 doesn't work with knife-solo cookbook 'application_git', '= 1.1.0' # 1.2.0 doesn't work with knife-solo
cookbook 'poise', '= 2.8.1' cookbook 'poise', '~> 2.8.1'
cookbook 'poise-languages', '= 2.1.1' cookbook 'poise-languages', '~> 2.1.1'
cookbook 'poise-ruby', '= 2.3.0' cookbook 'poise-ruby', '~> 2.4.0'
# cookbook 'poise-javascript', '~> 1.2.0' cookbook 'poise-javascript', '~> 1.2.0'
cookbook 'poise-javascript',
git: 'https://github.com/tulip/poise-javascript.git',
ref: 'built'
cookbook 'poise-archive', '= 1.4.0' cookbook 'poise-archive', '= 1.4.0'
cookbook 'poise-service', '= 1.4.2' cookbook 'poise-service', '= 1.4.2'
cookbook 'users', '= 5.1.0' cookbook 'users', '= 5.1.0'

View File

@ -36,12 +36,9 @@ DEPENDENCIES
php-fpm (= 0.7.9) php-fpm (= 0.7.9)
poise (= 2.8.1) poise (= 2.8.1)
poise-archive (= 1.4.0) poise-archive (= 1.4.0)
poise-javascript poise-javascript (~> 1.2.0)
git: https://github.com/tulip/poise-javascript.git
revision: 7e9ea94c0159e0980b3676a0a2a692af3569f681
ref: built
poise-languages (= 2.1.1) poise-languages (= 2.1.1)
poise-ruby (= 2.3.0) poise-ruby (~> 2.4.0)
poise-ruby-build (= 1.1.0) poise-ruby-build (= 1.1.0)
poise-service (= 1.4.2) poise-service (= 1.4.2)
postfix (= 5.0.2) postfix (= 5.0.2)
@ -161,13 +158,13 @@ GRAPH
poise-git (1.0.0) poise-git (1.0.0)
poise (~> 2.6) poise (~> 2.6)
poise-languages (~> 2.1) poise-languages (~> 2.1)
poise-javascript (1.2.1) poise-javascript (1.2.0)
poise (~> 2.0) poise (~> 2.0)
poise-languages (~> 2.0) poise-languages (~> 2.0)
poise-languages (2.1.1) poise-languages (2.1.1)
poise (~> 2.5) poise (~> 2.5)
poise-archive (~> 1.0) poise-archive (~> 1.0)
poise-ruby (2.3.0) poise-ruby (2.4.0)
poise (~> 2.0) poise (~> 2.0)
poise-languages (~> 2.0) poise-languages (~> 2.0)
poise-ruby-build (1.1.0) poise-ruby-build (1.1.0)

View File

@ -27,7 +27,7 @@ module PoiseJavascript
provides(:nodejs) provides(:nodejs)
include PoiseLanguages::Static( include PoiseLanguages::Static(
# 4.x is still first here because that is what NodeJS recommends. # 4.x is still first here because that is what NodeJS recommends.
versions: %w{6.10.3 7.10.0 7.9.0 7.8.0 7.7.4 7.6.0 7.5.0 7.4.0 7.3.0 7.2.1 7.1.0 7.0.0 6.9.5 6.8.1 6.7.0 6.6.0 6.5.0 6.4.0 6.3.1 6.2.2 6.1.0 6.0.0 5.12.0 5.11.1 5.10.1 5.9.1 5.8.0 5.7.1 5.6.0 5.5.0 5.4.1 5.3.0 5.2.0 5.1.1 5.0.0 4.8.3 4.7.3 4.6.2 4.5.0 4.4.7 4.3.2 4.2.6 4.1.2 4.0.0 0.12.18 0.11.16 0.10.48 0.9.12 0.8.28 0.7.12 0.6.21 0.5.10 0.4.12 0.3.8 0.2.6 0.1.104}, versions: %w{6.10.2 7.9.0 7.8.0 7.7.4 7.6.0 7.5.0 7.4.0 7.3.0 7.2.1 7.1.0 7.0.0 6.9.5 6.8.1 6.7.0 6.6.0 6.5.0 6.4.0 6.3.1 6.2.2 6.0.0 5.12.0 5.11.1 5.10.1 5.9.1 5.8.0 5.7.1 5.6.0 5.5.0 5.4.1 5.3.0 5.2.0 5.0.0 4.8.2 4.7.3 4.6.2 4.5.0 4.4.7 4.3.2 4.2.6 4.1.2 4.0.0 0.12.18 0.11.16 0.10.48 0.9.12 0.8.28 0.7.12 0.6.21 0.5.10 0.4.12 0.3.8 0.2.6},
machines: %w{linux-i686 linux-x86_64 linux-armv6l linux-armv7l linux-arm64 darwin-x86_64}, machines: %w{linux-i686 linux-x86_64 linux-armv6l linux-armv7l linux-arm64 darwin-x86_64},
url: 'https://nodejs.org/dist/v%{version}/node-v%{version}-%{kernel}-%{machine}.tar.gz', url: 'https://nodejs.org/dist/v%{version}/node-v%{version}-%{kernel}-%{machine}.tar.gz',
) )

View File

@ -125,7 +125,7 @@ module PoiseJavascript
# here so you get slow behavior, sorry. # here so you get slow behavior, sorry.
requested_packages = Set.new(Array(resource.package_name)) requested_packages = Set.new(Array(resource.package_name))
if npm_version?('>= 1.3.16') && version_data.any? {|pkg_name, _pkg_vers| requested_packages.include?(pkg_name) } if npm_version?('>= 1.3.16') && version_data.any? {|pkg_name, _pkg_vers| requested_packages.include?(pkg_name) }
outdated = npm_shell_out!('outdated', shellout_options: { returns: [0, 1] }) || {} outdated = npm_shell_out!('outdated') || {}
version_data.each do |pkg_name, pkg_vers| version_data.each do |pkg_name, pkg_vers|
pkg_vers[:candidate] = if outdated.include?(pkg_name) pkg_vers[:candidate] = if outdated.include?(pkg_name)
outdated[pkg_name]['wanted'] outdated[pkg_name]['wanted']
@ -201,7 +201,7 @@ module PoiseJavascript
# @param args [Array<String>] Command arguments. # @param args [Array<String>] Command arguments.
# @param parse_json [Boolean] Parse the JSON on stdout. # @param parse_json [Boolean] Parse the JSON on stdout.
# @return [Hash] # @return [Hash]
def npm_shell_out!(subcmd, args=[], parse_json: true, shellout_options: {}) def npm_shell_out!(subcmd, args=[], parse_json: true)
cmd = [new_resource.npm_binary, subcmd, '--json'] cmd = [new_resource.npm_binary, subcmd, '--json']
# If path is nil, we are in global mode. # If path is nil, we are in global mode.
cmd << '--global' unless new_resource.path cmd << '--global' unless new_resource.path
@ -210,7 +210,7 @@ module PoiseJavascript
# If we are in global mode, cwd will be nil so probably just fine. Add # If we are in global mode, cwd will be nil so probably just fine. Add
# the directory for the node binary to $PATH for post-install stuffs. # the directory for the node binary to $PATH for post-install stuffs.
new_path = [::File.dirname(new_resource.javascript), ENV['PATH'].to_s].join(::File::PATH_SEPARATOR) new_path = [::File.dirname(new_resource.javascript), ENV['PATH'].to_s].join(::File::PATH_SEPARATOR)
out = javascript_shell_out!(cmd, cwd: new_resource.path, group: new_resource.group, user: new_resource.user, environment: {'PATH' => new_path}, **shellout_options) out = javascript_shell_out!(cmd, cwd: new_resource.path, group: new_resource.group, user: new_resource.user, environment: {'PATH' => new_path})
if parse_json if parse_json
# Parse the JSON. # Parse the JSON.
if out.stdout.strip.empty? if out.stdout.strip.empty?

View File

@ -16,5 +16,5 @@
module PoiseJavascript module PoiseJavascript
VERSION = '1.2.1.pre' VERSION = '1.2.0'
end end

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## v2.4.0
* Add support for the rh-ruby24 SCL package.
## v2.3.0 ## v2.3.0
* Chef 13 support. * Chef 13 support.

View File

@ -25,7 +25,8 @@ module PoiseRuby
class Scl < Base class Scl < Base
include PoiseLanguages::Scl::Mixin include PoiseLanguages::Scl::Mixin
provides(:scl) provides(:scl)
scl_package('2.3.0', 'rh-ruby23', 'rh-ruby23-ruby-devel', '>= 7.0') scl_package('2.4.0', 'rh-ruby24', 'rh-ruby24-ruby-devel')
scl_package('2.3.1', 'rh-ruby23', 'rh-ruby23-ruby-devel')
scl_package('2.2.2', 'rh-ruby22', 'rh-ruby22-ruby-devel') scl_package('2.2.2', 'rh-ruby22', 'rh-ruby22-ruby-devel')
# On EL7, the system package is Ruby 2.0.0 and is newer than the SCL build. # On EL7, the system package is Ruby 2.0.0 and is newer than the SCL build.
scl_package('2.0.0', 'ruby200', 'ruby200-ruby-devel', '~> 6.0') scl_package('2.0.0', 'ruby200', 'ruby200-ruby-devel', '~> 6.0')

View File

@ -16,5 +16,5 @@
module PoiseRuby module PoiseRuby
VERSION = '2.3.0' VERSION = '2.4.0'
end end

File diff suppressed because one or more lines are too long