You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

concurrent-ruby

Package Overview
Dependencies
Maintainers
3
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

concurrent-ruby - rubygems Package Compare versions

Comparing version
1.3.1
to
1.3.2
+11
-1
CHANGELOG.md
## Current
## Release v1.3.2, edge v0.7.1 (29 May 2024)
concurrent-ruby:
* (#1051) Remove dependency on `win32ole`.
concurrent-ruby-edge:
* (#1052) Fix dependency on `concurrent-ruby` to allow the latest release.
## Release v1.3.1 (29 May 2024)

@@ -10,3 +20,3 @@

* (#1042) Align Java Executor Service behavior for `shuttingdown?`, `shutdown?`
* (#1038) Add `Concurrent.usable_processor_count` that is cgroups aware.
* (#1038) Add `Concurrent.available_processor_count` that is cgroups aware.

@@ -13,0 +23,0 @@ ## Release v1.2.3 (16 Jan 2024)

@@ -71,6 +71,16 @@ require 'etc'

when /mswin|mingw/
require 'win32ole'
result_set = WIN32OLE.connect("winmgmts://").ExecQuery(
"select NumberOfCores from Win32_Processor")
result_set.to_enum.collect(&:NumberOfCores).reduce(:+)
# Get-CimInstance introduced in PowerShell 3 or earlier: https://learn.microsoft.com/en-us/previous-versions/powershell/module/cimcmdlets/get-ciminstance?view=powershell-3.0
result = run('powershell -command "Get-CimInstance -ClassName Win32_Processor | Select-Object -Property NumberOfCores"')
if !result || $?.exitstatus != 0
# fallback to deprecated wmic for older systems
result = run("wmic cpu get NumberOfCores")
end
if !result || $?.exitstatus != 0
# Bail out if both commands returned something unexpected
processor_count
else
# powershell: "\nNumberOfCores\n-------------\n 4\n\n\n"
# wmic: "NumberOfCores \n\n4 \n\n\n\n"
result.scan(/\d+/).map(&:to_i).reduce(:+)
end
else

@@ -85,2 +95,7 @@ processor_count

def run(command)
IO.popen(command, &:read)
rescue Errno::ENOENT
end
def compute_cpu_quota

@@ -87,0 +102,0 @@ if RbConfig::CONFIG["target_os"].include?("linux")

+1
-1
module Concurrent
VERSION = '1.3.1'
VERSION = '1.3.2'
end

@@ -31,2 +31,6 @@ require_relative 'lib/concurrent-ruby/concurrent/version'

def which?(executable)
!`which #{executable} 2>/dev/null`.empty?
end
require 'rake_compiler_dock'

@@ -46,2 +50,10 @@ namespace :repackage do

# build all gem files
rack_compiler_dock_kwargs = {}
if which?('podman') and (!which?('docker') || `docker --version`.include?('podman'))
# podman and only podman available, so RakeCompilerDock will use podman, otherwise it uses docker
rack_compiler_dock_kwargs = {
options: ['--privileged'], # otherwise the directory in the image is empty
runas: false
}
end
%w[x86-mingw32 x64-mingw32].each do |plat|

@@ -51,4 +63,3 @@ RakeCompilerDock.sh(

platform: plat,
options: ['--privileged'], # otherwise the directory in the image is empty
runas: false)
**rack_compiler_dock_kwargs)
end

@@ -262,6 +273,8 @@ end

sh 'ruby -v'
sh 'bundle install'
sh 'bundle exec rake spec:installed'
env = { "PATH" => "#{ENV['CONCURRENT_JRUBY_HOME']}/bin:#{ENV['PATH']}" }
env = { "PATH" => "#{ENV.fetch('CONCURRENT_JRUBY_HOME')}/bin:#{ENV['PATH']}" }
sh env, 'ruby -v'
sh env, 'bundle install'
sh env, 'bundle exec rake spec:installed'

@@ -278,4 +291,4 @@ end

namespace :publish do
publish_base = true
publish_edge = false
publish_base = nil
publish_edge = nil

@@ -288,6 +301,13 @@ task :ask do

exit 1 if input == 'n'
begin
STDOUT.puts 'It will publish `concurrent-ruby`. Do you want to publish `concurrent-ruby-edge`? (y/n)'
STDOUT.puts 'Do you want to publish `concurrent-ruby`? (y/n)'
input = STDIN.gets.strip.downcase
end until %w(y n).include?(input)
publish_base = input == 'y'
begin
STDOUT.puts 'Do you want to publish `concurrent-ruby-edge`? (y/n)'
input = STDIN.gets.strip.downcase
end until %w(y n).include?(input)
publish_edge = input == 'y'

@@ -294,0 +314,0 @@ end

Sorry, the diff of this file is not supported yet