sorbet 0.5.5325 → 0.5.5357

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
  SHA1:
3
- metadata.gz: c0a2d577754dee04afaa29856615dc0a779fe328
4
- data.tar.gz: 5d85c711edbccad3f295c0bd58fd6dfc0a129b4d
3
+ metadata.gz: d574df107887ee5eec1bf4decc471255c9322a2b
4
+ data.tar.gz: 263bae74add374b9b8cd85ad21e2da7a9e461bb2
5
5
  SHA512:
6
- metadata.gz: 0aac0124b3ba5eea84ea2d6a8216a73df0a612041d733afefbe2a58a2f58b2a8231ad434d703142a0d74906dcf0f943e7322728d95de551fc71784a4d564d800
7
- data.tar.gz: ffeaddd6388d6ef318d7e49c2f839c58ee70df3e06a820cf273ac4e7089de005355b7fe840d31510ac3d0bcac65842683e346d2eff4ddcc8f3df799eab9bc2d5
6
+ metadata.gz: 021bcca572027bb03947f0373ea416b3981df7d9c8da8d57a00707b3dd7277d2b193333a4db2d852ca7d657067287f64cc7b85548b3403388842e92b877b51cc
7
+ data.tar.gz: 2aea458abc24570e09c85a3dd08c5d6b59ed733eea22ab435679c28bcab43a0a9cf2cd30e563015b276b336f0218f6af38dedb226f78182e5f601c95afa38e71
@@ -218,7 +218,7 @@ module Sorbet::Private
218
218
  location&.match(/^.*\/(ruby)\/([\d.]+)\//) || # ruby stdlib
219
219
  location&.match(/^.*\/(j?ruby)-([\d.]+)\//) || # jvm ruby stdlib
220
220
  location&.match(/^.*\/(site_ruby)\/([\d.]+)\//) || # rubygems
221
- location&.match(/^.*\/gems\/(?:j?ruby-)?[\d.]+(?:@[^\/]+)?(?:\/bundler)?\/gems\/([^\/]+)-([^-\/]+)\//i) # gem
221
+ location&.match(/^.*\/gems\/(?:(?:j?ruby-)?[\d.]+(?:@[^\/]+)?(?:\/bundler)?\/)?gems\/([^\/]+)-([^-\/]+)\//i) # gem
222
222
  if match.nil?
223
223
  # uncomment to generate files for methods outside of gems
224
224
  # {
data/lib/gem_loader.rb CHANGED
@@ -538,6 +538,60 @@ class Sorbet::Private::GemLoader
538
538
  my_require 'simplecov'
539
539
  my_require 'codecov'
540
540
  end,
541
+ 'sparql' => proc do
542
+ my_require 'sparql'
543
+ [
544
+ SPARQL::Algebra,
545
+ SPARQL::Algebra::Aggregate,
546
+ SPARQL::Algebra::Evaluatable,
547
+ SPARQL::Algebra::Expression,
548
+ SPARQL::Algebra::Operator,
549
+ SPARQL::Algebra::Query,
550
+ SPARQL::Algebra::Update,
551
+ SPARQL::Client,
552
+ SPARQL::Grammar,
553
+ SPARQL::Grammar::Parser,
554
+ SPARQL::Grammar::Terminals,
555
+ SPARQL::Results,
556
+ SPARQL::VERSION,
557
+ ]
558
+ end,
559
+ 'selenium-webdriver' => proc do
560
+ my_require 'selenium/webdriver'
561
+ [
562
+ Selenium::WebDriver::Chrome,
563
+ Selenium::WebDriver::Chrome::Bridge,
564
+ Selenium::WebDriver::Chrome::Driver,
565
+ Selenium::WebDriver::Chrome::Profile,
566
+ Selenium::WebDriver::Chrome::Options,
567
+ Selenium::WebDriver::Chrome::Service,
568
+ Selenium::WebDriver::Edge,
569
+ Selenium::WebDriver::Firefox,
570
+ Selenium::WebDriver::Firefox::Extension,
571
+ Selenium::WebDriver::Firefox::ProfilesIni,
572
+ Selenium::WebDriver::Firefox::Profile,
573
+ Selenium::WebDriver::Firefox::Driver,
574
+ Selenium::WebDriver::Firefox::Options,
575
+ Selenium::WebDriver::Firefox::Service,
576
+ Selenium::WebDriver::IE,
577
+ Selenium::WebDriver::IE::Driver,
578
+ Selenium::WebDriver::IE::Options,
579
+ Selenium::WebDriver::IE::Service,
580
+ Selenium::WebDriver::Remote,
581
+ Selenium::WebDriver::Remote::Bridge,
582
+ Selenium::WebDriver::Remote::Driver,
583
+ Selenium::WebDriver::Remote::Response,
584
+ Selenium::WebDriver::Remote::Capabilities,
585
+ Selenium::WebDriver::Remote::Http::Common,
586
+ Selenium::WebDriver::Remote::Http::Default,
587
+ Selenium::WebDriver::Safari,
588
+ Selenium::WebDriver::Safari::Bridge,
589
+ Selenium::WebDriver::Safari::Driver,
590
+ Selenium::WebDriver::Safari::Options,
591
+ Selenium::WebDriver::Safari::Service,
592
+ Selenium::WebDriver::Support,
593
+ ]
594
+ end,
541
595
  }
542
596
 
543
597
  # This is so that the autoloader doesn't treat these as manditory requires
@@ -327,7 +327,13 @@ class Sorbet::Private::HiddenMethodFinder
327
327
  next
328
328
  end
329
329
  next if Sorbet::Private::RealStdlib.real_is_a?(my_value, Class) || Sorbet::Private::RealStdlib.real_is_a?(my_value, Module)
330
- ret << " #{name} = ::T.let(nil, ::T.untyped)"
330
+ if defined?(T::Types) && Sorbet::Private::RealStdlib.real_is_a?(my_value, T::Types::TypeMember)
331
+ ret << my_value.variance == :invariant ? " #{name} = type_member" : " #{name} = type_member(#{my_value.variance})"
332
+ elsif defined?(T::Types) && Sorbet::Private::RealStdlib.real_is_a?(my_value, T::Types::TypeTemplate)
333
+ ret << my_value.variance == :invariant ? " #{name} = type_template" : " #{name} = type_template(#{my_value.variance})"
334
+ else
335
+ ret << " #{name} = ::T.let(nil, ::T.untyped)"
336
+ end
331
337
  end
332
338
  ret
333
339
  end
data/lib/serialize.rb CHANGED
@@ -220,17 +220,16 @@ class Sorbet::Private::Serialize
220
220
  end
221
221
 
222
222
  def constant(const, value)
223
- #if Sorbet::Private::RealStdlib.real_is_a?(value, T::Types::TypeTemplate)
224
- #" #{const} = type_template"
225
- #elsif Sorbet::Private::RealStdlib.real_is_a?(value, T::Types::TypeMember)
226
- #" #{const} = type_member"
227
- #else
228
- #" #{const} = ::T.let(nil, ::T.untyped)"
229
- #end
230
223
  if KEYWORDS.include?(const.to_sym)
231
224
  return "# Illegal constant name: #{const}"
232
225
  end
233
- " #{const} = ::T.let(nil, ::T.untyped)"
226
+ if defined?(T::Types) && Sorbet::Private::RealStdlib.real_is_a?(value, T::Types::TypeMember)
227
+ value.variance == :invariant ? " #{const} = type_member" : " #{const} = type_member(#{value.variance})"
228
+ elsif defined?(T::Types) && Sorbet::Private::RealStdlib.real_is_a?(value, T::Types::TypeTemplate)
229
+ value.variance == :invariant ? " #{const} = type_template" : " #{const} = type_template(#{value.variance})"
230
+ else
231
+ " #{const} = ::T.let(nil, ::T.untyped)"
232
+ end
234
233
  end
235
234
 
236
235
  def serialize_method(method, static=false, with_sig: true)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5325
4
+ version: 0.5.5357
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-01 00:00:00.000000000 Z
11
+ date: 2020-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-static
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.5325
19
+ version: 0.5.5357
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.5.5325
26
+ version: 0.5.5357
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement