File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed
Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ source 'https://rubygems.org'
66gemspec
77
88gem 'rake' , '~> 13'
9+ gem 'rbs' , require : false
910gem 'rspec' , '~> 3'
1011gem 'rubocop' , '~> 1'
1112gem 'rubocop-performance' , '~> 1.26'
Original file line number Diff line number Diff line change 22
33require 'bundler/gem_tasks'
44require 'rspec/core/rake_task'
5-
6- RSpec ::Core ::RakeTask . new ( :spec )
7-
85require 'rubocop/rake_task'
96
7+ RSpec ::Core ::RakeTask . new ( :spec )
108RuboCop ::RakeTask . new
119
12- task default : %i[ rubocop spec ]
10+ desc 'Validate RBS files'
11+ task :rbs_validate do
12+ sh 'bundle exec rbs -I sig -r json -r strscan validate'
13+ end
14+
15+ task default : %i[ rbs_validate rubocop spec ]
Original file line number Diff line number Diff line change 11module JsonMend
22 VERSION: String
33
4- type _JSONValue = String | Integer | Float | bool | nil | Array[_JSONValue ] | Hash[String, _JSONValue ]
4+ type json_value = String | Integer | Float | bool | nil | Array[json_value ] | Hash[String, json_value ]
55
6- def self.repair : (String, ?return_objects: bool ) -> String | _JSONValue | nil
6+ def self.repair : (String, ?return_objects: bool ) -> ( String | json_value | nil )
77end
Original file line number Diff line number Diff line change 1+ dependencies :
2+ - name : json
3+ - name : strscan
You can’t perform that action at this time.
0 commit comments