steep 1.4.0.dev.4 → 1.4.0.dev.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c5431b7816a655799dcfc5ab49aff4d630062176b52b14f377b4d6ca754674f
4
- data.tar.gz: ea016b12eac32d93fffcbb315009aeb143626fd831669b36ade6c7d01b55a475
3
+ metadata.gz: d7c16469878ea17544f2d704d822cd5c3dbd708f80038a807a9104d0d06dd391
4
+ data.tar.gz: e1afe2645bf6e640ef22744f6263f61e00c401f82f9628ba3e1c418c93bfa38e
5
5
  SHA512:
6
- metadata.gz: a6e97f6c64d6e5dfc86a0d28e6129b1fe66aa75e1b28290092c47b12dda165fc9ce87187f8f27358cef169d2a3a2b3eb4eae42aa4702dd11d9586aad8d7733e2
7
- data.tar.gz: 94f611f5db76c09c853af7f5a333d43a0650e21fadde356990acb447231a86eb18bc3b63aa1ed1ead1c6d39066427eedf14f7379932dc077a1b4f9446184e749
6
+ metadata.gz: 772c359b95c1bbf823ed356825ec1e45fb33f0ee0d5d88491b8a2c762263732ec1001f9217b9aaa1a3d87c6e3e94b3b6cab906f0936b634dc15c854097c65ca0
7
+ data.tar.gz: 6fb78d79be35325b617b852e2dc2c42c6abeb2f7b48e9ed83386fb0f95b65750d0454f0266d2b43135f5d8d7a044bd4d25443a1d5f25f6a37e5122dafbb58b03
data/Gemfile.lock CHANGED
@@ -1,15 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- steep (1.4.0.dev.4)
4
+ steep (1.4.0.dev.5)
5
5
  activesupport (>= 5.1)
6
+ concurrent-ruby (>= 1.2.2)
6
7
  csv (>= 3.0.9)
7
8
  fileutils (>= 1.1.0)
8
9
  json (>= 2.1.0)
9
10
  language_server-protocol (>= 3.15, < 4.0)
10
11
  listen (~> 3.0)
11
12
  logger (>= 1.3.0)
12
- parallel (>= 1.0.0)
13
13
  parser (>= 3.1)
14
14
  rainbow (>= 2.2.2, < 4.0)
15
15
  rbs (>= 2.8.0)
@@ -46,7 +46,6 @@ GEM
46
46
  minitest (> 5.3)
47
47
  minitest-slow_test (0.2.0)
48
48
  minitest (>= 5.0)
49
- parallel (1.23.0)
50
49
  parser (3.2.2.0)
51
50
  ast (~> 2.4.1)
52
51
  rainbow (3.1.1)
data/lib/steep/cli.rb CHANGED
@@ -8,8 +8,6 @@ module Steep
8
8
  attr_reader :stderr
9
9
  attr_reader :command
10
10
 
11
- include Parallel::ProcessorCount
12
-
13
11
  def initialize(stdout:, stdin:, stderr:, argv:)
14
12
  @stdout = stdout
15
13
  @stdin = stdin
@@ -4,14 +4,12 @@ module Steep
4
4
  class JobsOption
5
5
  attr_accessor :jobs_count, :steep_command, :jobs_count_modifier
6
6
 
7
- include Parallel::ProcessorCount
8
-
9
7
  def initialize(jobs_count_modifier: 0)
10
8
  @jobs_count_modifier = jobs_count_modifier
11
9
  end
12
10
 
13
11
  def default_jobs_count
14
- physical_processor_count + jobs_count_modifier
12
+ Concurrent.physical_processor_count + jobs_count_modifier
15
13
  end
16
14
 
17
15
  def jobs_count_value
data/lib/steep/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Steep
2
- VERSION = "1.4.0.dev.4"
2
+ VERSION = "1.4.0.dev.5"
3
3
  end
data/lib/steep.rb CHANGED
@@ -16,7 +16,7 @@ require 'uri'
16
16
  require "yaml"
17
17
  require "securerandom"
18
18
 
19
- require "parallel/processor_count"
19
+ require "concurrent/utility/processor_counter"
20
20
  require "terminal-table"
21
21
 
22
22
  require "rbs"
@@ -0,0 +1,39 @@
1
+ module Concurrent
2
+ # Number of physical processor cores on the current system. For performance
3
+ # reasons the calculated value will be memoized on the first call.
4
+ #
5
+ # On Windows the Win32 API will be queried for the `NumberOfCores from
6
+ # Win32_Processor`. This will return the total number "of cores for the
7
+ # current instance of the processor." On Unix-like operating systems either
8
+ # the `hwprefs` or `sysctl` utility will be called in a subshell and the
9
+ # returned value will be used. In the rare case where none of these methods
10
+ # work or an exception is raised the function will simply return 1.
11
+ #
12
+ # @return [Integer] number physical processor cores on the current system
13
+ #
14
+ # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb
15
+ #
16
+ # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx
17
+ # @see http://www.unix.com/man-page/osx/1/HWPREFS/
18
+ # @see http://linux.die.net/man/8/sysctl
19
+ def self.physical_processor_count: () -> Integer
20
+
21
+ # Number of processors seen by the OS and used for process scheduling. For
22
+ # performance reasons the calculated value will be memoized on the first
23
+ # call.
24
+ #
25
+ # When running under JRuby the Java runtime call
26
+ # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According
27
+ # to the Java documentation this "value may change during a particular
28
+ # invocation of the virtual machine... [applications] should therefore
29
+ # occasionally poll this property." Subsequently the result will NOT be
30
+ # memoized under JRuby.
31
+ #
32
+ # Otherwise Ruby's Etc.nprocessors will be used.
33
+ #
34
+ # @return [Integer] number of processors seen by the OS or Java runtime
35
+ #
36
+ # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors()
37
+ #
38
+ def self.processor_count: () -> Integer
39
+ end
data/sig/steep/cli.rbs CHANGED
@@ -10,8 +10,6 @@ module Steep
10
10
 
11
11
  attr_reader command: Symbol
12
12
 
13
- include Parallel::ProcessorCount
14
-
15
13
  def initialize: (stdout: IO, stdin: IO, stderr: IO, argv: Array[String]) -> void
16
14
 
17
15
  def self.available_commands: () -> ::Array[Symbol]
@@ -8,8 +8,6 @@ module Steep
8
8
 
9
9
  attr_reader jobs_count_modifier: Integer
10
10
 
11
- include Parallel::ProcessorCount
12
-
13
11
  def initialize: (?jobs_count_modifier: Integer) -> void
14
12
 
15
13
  def default_jobs_count: () -> Integer
data/steep.gemspec CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_runtime_dependency "listen", "~> 3.0"
35
35
  spec.add_runtime_dependency "language_server-protocol", ">= 3.15", "< 4.0"
36
36
  spec.add_runtime_dependency "rbs", ">= 2.8.0"
37
- spec.add_runtime_dependency "parallel", ">= 1.0.0"
37
+ spec.add_runtime_dependency "concurrent-ruby", ">= 1.2.2"
38
38
  spec.add_runtime_dependency "terminal-table", ">= 2", "< 4"
39
39
  spec.add_runtime_dependency "securerandom", ">= 0.1"
40
40
  spec.add_runtime_dependency "json", ">= 2.1.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steep
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.dev.4
4
+ version: 1.4.0.dev.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
@@ -107,19 +107,19 @@ dependencies:
107
107
  - !ruby/object:Gem::Version
108
108
  version: 2.8.0
109
109
  - !ruby/object:Gem::Dependency
110
- name: parallel
110
+ name: concurrent-ruby
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - ">="
114
114
  - !ruby/object:Gem::Version
115
- version: 1.0.0
115
+ version: 1.2.2
116
116
  type: :runtime
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 1.0.0
122
+ version: 1.2.2
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: terminal-table
125
125
  requirement: !ruby/object:Gem::Requirement
@@ -380,9 +380,9 @@ files:
380
380
  - sample/lib/length.rb
381
381
  - sample/sig/conference.rbs
382
382
  - sample/sig/length.rbs
383
+ - sig/shims/concurrent-ruby.rbs
383
384
  - sig/shims/exception.rbs
384
385
  - sig/shims/language-server_protocol.rbs
385
- - sig/shims/parallel.rbs
386
386
  - sig/shims/parser.rbs
387
387
  - sig/shims/parser/comment.rbs
388
388
  - sig/shims/parser/nodes.rbs
@@ -1,5 +0,0 @@
1
- module Parallel
2
- module ProcessorCount
3
- def physical_processor_count: () -> Integer
4
- end
5
- end