Skip to content

Commit 3ab9b3a

Browse files
committed
Move Pathname to core from stdlib
1 parent 031f319 commit 3ab9b3a

File tree

19 files changed

+43
-57
lines changed

19 files changed

+43
-57
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ require "rbs"
141141
loader = RBS::EnvironmentLoader.new()
142142

143143
# loader.add(path: Pathname("sig")) # Load .rbs files from `sig` directory
144-
# loader.add(library: "pathname") # Load pathname library
144+
# loader.add(library: "logger") # Load logger library
145145

146146
environment = RBS::Environment.from_loader(loader).resolve_type_names
147147

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ namespace :generate do
331331
class <%= target %>SingletonTest < Test::Unit::TestCase
332332
include TestHelper
333333
334-
# library "pathname", "securerandom" # Declare library signatures to load
334+
# library "logger", "securerandom" # Declare library signatures to load
335335
testing "singleton(::<%= target %>)"
336336
337337
<%- class_methods.each do |method_name, definition| -%>
@@ -350,7 +350,7 @@ namespace :generate do
350350
class <%= target %>Test < Test::Unit::TestCase
351351
include TestHelper
352352
353-
# library "pathname", "securerandom" # Declare library signatures to load
353+
# library "logger", "securerandom" # Declare library signatures to load
354354
testing "::<%= target %>"
355355
356356
<%- instance_methods.each do |method_name, definition| -%>

Steepfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target :lib do
88
# "lib/rbs/test.rb"
99
)
1010

11-
library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'prettyprint', 'yaml', "psych", "securerandom"
11+
library "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'prettyprint', 'yaml', "psych", "securerandom"
1212
library "prism"
1313
signature "stdlib/strscan/0/"
1414
signature "stdlib/optparse/0/"
File renamed without changes.

docs/collection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ For example:
159159
# manifest.yaml
160160
161161
dependencies:
162-
# If your gem depends on pathname but the gemspec doesn't include pathname,
162+
# If your gem depends on logger but the gemspec doesn't include logger,
163163
# you need to write the following.
164-
- name: pathname
164+
- name: logger
165165
```
166166

167167
If the gem's RBS is managed with [ruby/gem_rbs_collection](https://github.com/ruby/gem_rbs_collection), put it as `gems/GEM_NAME/VERSION/manifest.yaml`. For example, `gems/activesupport/6.0/manifest.yaml`.

docs/gem.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ dependencies:
3434
- name: json
3535
- name: logger
3636
- name: optparse
37-
- name: pathname
3837
- name: rdoc
3938
- name: tsort
4039
```

docs/sigs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ You may need to specify `-r` or `-I` to load signatures.
131131
The default is `-I sig`.
132132

133133
```shell
134-
RBS_TEST_OPT='-r pathname -I sig'
134+
RBS_TEST_OPT='-r logger -I sig'
135135
```
136136

137-
Replacing `pathname` with the `stdlib` you want to include. For example, if you need to load `Set` and `BigDecimal` in `stdlib`, you would need to have `RBS_TEST_OPT='-r set -r bigdecimal -I sig'`
137+
Replacing `logger` with the `stdlib` you want to include. For example, if you need to load `Set` and `BigDecimal` in `stdlib`, you would need to have `RBS_TEST_OPT='-r set -r bigdecimal -I sig'`
138138

139139
`RBS_TEST_LOGLEVEL` can be used to configure log level. Defaults to `info`.
140140

@@ -148,7 +148,7 @@ So, a typical command line to start the test would look like the following:
148148
$ RBS_TEST_LOGLEVEL=error \
149149
RBS_TEST_TARGET='Kaigi::*' \
150150
RBS_TEST_SKIP='Kaigi::MonkeyPatch' \
151-
RBS_TEST_OPT='-rset -rpathname -Isig -Iprivate' \
151+
RBS_TEST_OPT='-rlogger -Isig -Iprivate' \
152152
RBS_TEST_RAISE=true \
153153
RUBYOPT='-rbundler/setup -rrbs/test/setup' \
154154
bundle exec rake test

lib/rbs/cli.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ def run_annotate(args, options)
972972
973973
Examples:
974974
975-
$ rbs annotate stdlib/pathname/**/*.rbs
975+
$ rbs annotate stdlib/logger/**/*.rbs
976976
977977
Options:
978978
EOB

lib/rbs/environment_loader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def add(path: nil, library: nil, version: nil, resolve_dependencies: true)
5151
dirs << path
5252
when library
5353
case library
54-
when 'rubygems', 'set'
54+
when 'pathname'
5555
RBS.logger.warn "`#{library}` has been moved to core library, so it is always loaded. Remove explicit loading `#{library}`"
5656
return
5757
end

sig/manifest.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
dependencies:
22
- name: logger
3-
- name: pathname
43
- name: json
54
- name: optparse
65
- name: tsort

0 commit comments

Comments
 (0)