Skip to content

Commit

Permalink
Update definitions for rails7
Browse files Browse the repository at this point in the history
  • Loading branch information
alisnic committed Mar 14, 2022
1 parent a7ac1b7 commit 63d0cfc
Show file tree
Hide file tree
Showing 17 changed files with 11,637 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ spec/rails5/log/
spec/rails5/tmp/
spec/rails6/log/
spec/rails6/tmp/
spec/rails7/log/
spec/rails7/tmp/
.projections.json
.byebug_history

Expand Down
55 changes: 31 additions & 24 deletions script/generate_definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,36 @@ def core_ext_report(klass, test = klass.new)
File.write('routes.yml', report.deep_stringify_keys.to_yaml)
end

# [Array, String, Time, Date, Class, DateTime, File, Hash, Integer, Kernel].each do |klass|
# test = case klass
# when Time
# Time.now
# when Date
# Date.today
# when File
# false
# else
# klass.new rescue false
# end
#
# report = core_ext_report(klass, test=test)
# File.write("#{klass.to_s}.yml", report.deep_stringify_keys.to_yaml)
# end

# binding.pry
[
Array,
String,
Time,
Date,
Class,
DateTime,
File,
Hash,
Integer,
Kernel
].each do |klass|
test =
case klass
when Time
Time.now
when Date
Date.today
when File
false
else
begin
klass.new
rescue StandardError
false
end
end

# File.write("activerecord.yml", result.deep_stringify_keys.to_yaml)
report = core_ext_report(klass, test = test)
File.write("#{klass.to_s}.yml", report.deep_stringify_keys.to_yaml)
end

# report = build_report(
# ActionController::Base,
# own_class_methods(ActionController::Base),
# own_instance_methods(ActionController::Base)
# )
# File.write("actioncontroller.yml", report.deep_stringify_keys.to_yaml)
# binding.pry
Loading

0 comments on commit 63d0cfc

Please sign in to comment.