File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77group :development , :test do
88 gem "rake" , "~> 13.0"
9+ gem "rbs" , "~> 3.0"
910 gem "rspec" , "~> 3.0"
1011 gem "rspec_junit_formatter" , "~> 0.6.0"
1112 gem "rubocop" , require : false
Original file line number Diff line number Diff line change 1818 listen (3.9.0 )
1919 rb-fsevent (~> 0.10 , >= 0.10.3 )
2020 rb-inotify (~> 0.9 , >= 0.9.10 )
21+ logger (1.7.0 )
2122 parallel (1.27.0 )
2223 parser (3.3.10.0 )
2324 ast (~> 2.4.1 )
2930 rb-fsevent (0.11.2 )
3031 rb-inotify (0.11.1 )
3132 ffi (~> 1.0 )
33+ rbs (3.10.0 )
34+ logger
3235 regexp_parser (2.11.3 )
3336 rspec (3.13.2 )
3437 rspec-core (~> 3.13.0 )
@@ -77,6 +80,7 @@ PLATFORMS
7780
7881DEPENDENCIES
7982 rake (~> 13.0 )
83+ rbs (~> 3.0 )
8084 rspec (~> 3.0 )
8185 rspec_junit_formatter (~> 0.6.0 )
8286 rubocop
Original file line number Diff line number Diff line change @@ -248,17 +248,21 @@ def find_source_files_by_extension(ext)
248248 files = [ ]
249249
250250 # Always search in source_include directories only
251- source_dirs = if @paths == [ File . expand_path ( "." ) ]
252- @config . source_include . map { |dir | File . expand_path ( dir ) }
253- else
254- @paths . map { |path | File . expand_path ( path ) }
255- end
256-
257- source_dirs . each do |dir |
258- next unless Dir . exist? ( dir )
259-
260- Dir . glob ( File . join ( dir , "**" , "*#{ ext } " ) ) . each do |file |
261- files << file unless @config . excluded? ( file )
251+ source_paths = if @paths == [ File . expand_path ( "." ) ]
252+ @config . source_include . map { |dir | File . expand_path ( dir ) }
253+ else
254+ @paths . map { |path | File . expand_path ( path ) }
255+ end
256+
257+ source_paths . each do |path |
258+ if File . file? ( path )
259+ # Handle single file path
260+ files << path if path . end_with? ( ext ) && !@config . excluded? ( path )
261+ elsif Dir . exist? ( path )
262+ # Handle directory path
263+ Dir . glob ( File . join ( path , "**" , "*#{ ext } " ) ) . each do |file |
264+ files << file unless @config . excluded? ( file )
265+ end
262266 end
263267 end
264268
Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ def greet(name: String): String
360360
361361 output = generator . generate ( program )
362362
363- expect ( output ) . to include ( "def greet: (String name) -> String" )
363+ expect ( output ) . to include ( "def greet: (name: String ) -> String" )
364364 end
365365 end
366366
You can’t perform that action at this time.
0 commit comments