sord 5.1.0 → 6.0.0

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: f101fdc3b63cf69bc59fd766ced5222c3e6b02f70f913fcc39085459e32c89de
4
- data.tar.gz: ea8df6949fdef290b13cf082c364138a17224deb127e069fd8a55d8e86de29c4
3
+ metadata.gz: 54bd59da2188e5392c6946e2cbd77ce55e1113abc40a2cf880671afe3c22efac
4
+ data.tar.gz: 9671e16277cba3b800d8dc4dcae525384064efd1138575eef441719624ebf45d
5
5
  SHA512:
6
- metadata.gz: 9bed3f4e28d753ccf493a63d552f0560267d5a4841ca6208691e557fa84ba719e1c906be765c4ba45d62ad84cbe167766b8b286202727400bcf62bf8e0748a84
7
- data.tar.gz: c51d9041a3de3dd66faf35173c38ce74e89e5dc4054e9cc675c54a871dc35c84a33139e1a18674265d951f759365a66f272badca1306d89c3b7fa7997f87bb3e
6
+ metadata.gz: f9c0ca7bc3d427367fe069cc415e37a0250ad7c3010ebbfa119dbdd97f98b474da0a7092277f2f45810d376654545b930b3c59a7a537f4132a23ad68352f913d
7
+ data.tar.gz: 8b6ced8d20985ee9faaae5b672ebd90bd4ef00d396938e7db1e6fecf350d817b143db55eca1231782bf2c0bd5605394eac825d8fa612ff7e093fc0f3ce27e14c
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
5
 
6
+ ## [6.0.0] - 2023-05-02
7
+ ### Changed
8
+ - **Breaking change**: Now targets RBS 3.0
9
+
6
10
  ## [5.1.0] - 2023-05-22
7
11
  ### Added
8
12
  - Add support for a single `@overload` tag, typically used to describe methods defined outside of
data/lib/sord/resolver.rb CHANGED
@@ -22,13 +22,13 @@ module Sord
22
22
  end
23
23
 
24
24
  def self.load_gem_objects(hash)
25
- all_decls = []
25
+ env = RBS::Environment.new
26
26
  begin
27
- RBS::CLI::LibraryOptions.new.loader.load(env: all_decls)
27
+ RBS::CLI::LibraryOptions.new.loader.load(env: env)
28
28
  rescue RBS::Collection::Config::CollectionNotAvailable
29
29
  Sord::Logging.warn("Could not load RBS collection - run rbs collection install for dependencies")
30
30
  end
31
- add_rbs_objects_to_paths(all_decls, hash)
31
+ add_rbs_objects_to_paths(env, hash)
32
32
 
33
33
  gem_paths = Bundler.load.specs.map(&:full_gem_path)
34
34
  gem_paths.each do |path|
@@ -41,13 +41,22 @@ module Sord
41
41
  end
42
42
  end
43
43
 
44
- def self.add_rbs_objects_to_paths(all_decls, names_to_paths, path=[])
44
+ def self.add_rbs_objects_to_paths(env, names_to_paths, path=[])
45
+ case env
46
+ when RBS::Environment
47
+ declarations = env.declarations
48
+ when Array
49
+ declarations = env
50
+ else
51
+ raise TypeError, "env"
52
+ end
53
+
45
54
  klasses = [
46
55
  RBS::AST::Declarations::Module,
47
56
  RBS::AST::Declarations::Class,
48
57
  RBS::AST::Declarations::Constant
49
58
  ]
50
- all_decls.each do |decl|
59
+ declarations.each do |decl|
51
60
  next unless klasses.include?(decl.class)
52
61
  name = decl.name.to_s
53
62
  new_path = path + [name]
data/lib/sord/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # typed: strong
2
2
  module Sord
3
- VERSION = '5.1.0'
3
+ VERSION = '6.0.0'
4
4
  end
data/sord.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'sorbet-runtime'
27
27
  spec.add_dependency 'commander', '~> 4.5'
28
28
  spec.add_dependency 'parlour', '~> 5.0'
29
- spec.add_dependency 'rbs', '~> 2.0'
29
+ spec.add_dependency 'rbs', '~> 3.0'
30
30
 
31
31
  spec.add_development_dependency "bundler", "~> 2.0"
32
32
  spec.add_development_dependency "rake", "~> 13.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sord
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Christiansen
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '2.0'
75
+ version: '3.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '2.0'
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement