packwerk 3.2.0 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/packwerk/association_inspector.rb +17 -4
- data/lib/packwerk/checker.rb +3 -3
- data/lib/packwerk/configuration.rb +4 -0
- data/lib/packwerk/const_node_inspector.rb +2 -2
- data/lib/packwerk/constant_name_inspector.rb +2 -2
- data/lib/packwerk/offenses_formatter.rb +3 -3
- data/lib/packwerk/package.rb +1 -1
- data/lib/packwerk/package_todo.rb +1 -4
- data/lib/packwerk/parsers/factory.rb +3 -3
- data/lib/packwerk/parsers/ruby.rb +7 -0
- data/lib/packwerk/reference_extractor.rb +29 -1
- data/lib/packwerk/reference_offense.rb +1 -1
- data/lib/packwerk/run_context.rb +15 -4
- data/lib/packwerk/validator.rb +3 -3
- data/lib/packwerk/version.rb +1 -1
- data/lib/packwerk.rb +1 -0
- data/sorbet/config +1 -0
- data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +3280 -3450
- data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +2322 -1782
- data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +2654 -3268
- data/sorbet/rbi/gems/ast@2.4.2.rbi +535 -6
- data/sorbet/rbi/gems/better_html@2.0.1.rbi +529 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +4 -4
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +32 -4
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +1750 -1840
- data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +15 -15
- data/sorbet/rbi/gems/crass@1.0.6.rbi +489 -5
- data/sorbet/rbi/gems/erubi@1.11.0.rbi +24 -21
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +395 -395
- data/sorbet/rbi/gems/json@2.6.2.rbi +70 -77
- data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +1 -1
- data/sorbet/rbi/gems/loofah@2.18.0.rbi +134 -134
- data/sorbet/rbi/gems/m@1.6.0.rbi +60 -60
- data/sorbet/rbi/gems/method_source@1.1.0.rbi +303 -0
- data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +22 -28
- data/sorbet/rbi/gems/minitest@5.16.2.rbi +384 -396
- data/sorbet/rbi/gems/mocha@1.14.0.rbi +589 -589
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +37 -32
- data/sorbet/rbi/gems/nokogiri@1.15.3.rbi +962 -946
- data/sorbet/rbi/gems/{parallel@1.22.1.rbi → parallel@1.24.0.rbi} +85 -82
- data/sorbet/rbi/gems/{parser@3.2.2.0.rbi → parser@3.3.1.0.rbi} +1679 -1609
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +1 -1
- data/sorbet/rbi/gems/{prism@0.24.0.rbi → prism@0.27.0.rbi} +13473 -6472
- data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.7.1.rbi} +42 -33
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +148 -338
- data/sorbet/rbi/gems/rack@2.2.4.rbi +1079 -1130
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +354 -22
- data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +113 -259
- data/sorbet/rbi/gems/railties@7.0.3.1.rbi +642 -638
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +109 -99
- data/sorbet/rbi/gems/rake@13.0.6.rbi +714 -599
- data/sorbet/rbi/gems/{rbi@0.0.15.rbi → rbi@0.1.12.rbi} +865 -801
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +853 -870
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +480 -477
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +1621 -1622
- data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +507 -526
- data/sorbet/rbi/gems/rubocop-shopify@2.9.0.rbi +1 -1
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +186 -203
- data/sorbet/rbi/gems/rubocop@1.34.1.rbi +8126 -8367
- data/sorbet/rbi/gems/{ruby-lsp@0.2.1.rbi → ruby-lsp@0.2.3.rbi} +2 -2
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1235 -4
- data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +90 -90
- data/sorbet/rbi/gems/spoom@1.3.2.rbi +4420 -0
- data/sorbet/rbi/gems/spring@4.0.0.rbi +104 -104
- data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +1 -1
- data/sorbet/rbi/gems/{tapioca@0.9.2.rbi → tapioca@0.13.3.rbi} +1596 -1253
- data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.3.1.rbi} +1047 -652
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +531 -513
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +13 -13
- data/sorbet/rbi/gems/{yard-sorbet@0.6.1.rbi → yard-sorbet@0.8.1.rbi} +132 -92
- data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.36.rbi} +3158 -3067
- data/sorbet/rbi/gems/zeitwerk@2.6.4.rbi +149 -145
- metadata +22 -94
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -27
- data/.github/pull_request_template.md +0 -28
- data/.github/workflows/ci.yml +0 -93
- data/.github/workflows/cla.yml +0 -22
- data/.gitignore +0 -13
- data/.rubocop.yml +0 -75
- data/.ruby-version +0 -1
- data/CODEOWNERS +0 -1
- data/CODE_OF_CONDUCT.md +0 -76
- data/CONTRIBUTING.md +0 -17
- data/Gemfile +0 -27
- data/Gemfile.lock +0 -206
- data/RESOLVING_VIOLATIONS.md +0 -76
- data/Rakefile +0 -22
- data/TROUBLESHOOT.md +0 -44
- data/UPGRADING.md +0 -66
- data/USAGE.md +0 -364
- data/bin/console +0 -15
- data/bin/m +0 -29
- data/bin/rake +0 -29
- data/bin/rubocop +0 -29
- data/bin/setup +0 -8
- data/bin/srb +0 -29
- data/bin/tapioca +0 -29
- data/dev.yml +0 -32
- data/docs/cohesion.png +0 -0
- data/gemfiles/Gemfile-rails-6-0 +0 -22
- data/gemfiles/Gemfile-rails-6-1 +0 -22
- data/packwerk.gemspec +0 -59
- data/shipit.rubygems.yml +0 -5
- data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +0 -2754
- data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +0 -1496
- data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +0 -2362
- data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +0 -1569
- data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +0 -2553
- data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +0 -5999
- data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +0 -37832
- data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +0 -2321
- data/sorbet/rbi/gems/better_html@1.0.16.rbi +0 -317
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1079
- data/sorbet/rbi/gems/digest@3.1.0.rbi +0 -189
- data/sorbet/rbi/gems/globalid@1.0.0.rbi +0 -572
- data/sorbet/rbi/gems/mail@2.7.1.rbi +0 -2490
- data/sorbet/rbi/gems/marcel@1.0.2.rbi +0 -220
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -76
- data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +0 -170
- data/sorbet/rbi/gems/net-imap@0.2.3.rbi +0 -2147
- data/sorbet/rbi/gems/net-pop@0.1.1.rbi +0 -926
- data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +0 -11
- data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +0 -1108
- data/sorbet/rbi/gems/nio4r@2.5.8.rbi +0 -292
- data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
- data/sorbet/rbi/gems/rails@7.0.3.1.rbi +0 -8
- data/sorbet/rbi/gems/spoom@1.1.11.rbi +0 -2181
- data/sorbet/rbi/gems/strscan@3.0.4.rbi +0 -8
- data/sorbet/rbi/gems/timeout@0.3.0.rbi +0 -142
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2582
- data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +0 -993
- data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -71
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
# Extends any Class to include _json_creatable?_ method.
|
8
8
|
#
|
9
|
-
# source://json
|
9
|
+
# source://json//lib/json/common.rb#695
|
10
10
|
class Class < ::Module
|
11
11
|
# Returns true if this class can be used to create an instance
|
12
12
|
# from a serialised JSON string. The class has to implement a class
|
@@ -15,7 +15,7 @@ class Class < ::Module
|
|
15
15
|
#
|
16
16
|
# @return [Boolean]
|
17
17
|
#
|
18
|
-
# source://json
|
18
|
+
# source://json//lib/json/common.rb#700
|
19
19
|
def json_creatable?; end
|
20
20
|
end
|
21
21
|
|
@@ -589,7 +589,7 @@ end
|
|
589
589
|
# Without custom addition: "#<Foo:0x0000000006534e80>" (String)
|
590
590
|
# With custom addition: #<Foo:0x0000000006473bb8 @bar=0, @baz=1> (Foo)
|
591
591
|
#
|
592
|
-
# source://json
|
592
|
+
# source://json//lib/json/version.rb#2
|
593
593
|
module JSON
|
594
594
|
private
|
595
595
|
|
@@ -621,7 +621,7 @@ module JSON
|
|
621
621
|
# Output:
|
622
622
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
623
623
|
#
|
624
|
-
# source://json
|
624
|
+
# source://json//lib/json/common.rb#631
|
625
625
|
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end
|
626
626
|
|
627
627
|
# :call-seq:
|
@@ -638,13 +638,13 @@ module JSON
|
|
638
638
|
# # Raises SystemStackError (stack level too deep):
|
639
639
|
# JSON.fast_generate(a)
|
640
640
|
#
|
641
|
-
# source://json
|
641
|
+
# source://json//lib/json/common.rb#335
|
642
642
|
def fast_generate(obj, opts = T.unsafe(nil)); end
|
643
643
|
|
644
644
|
# :stopdoc:
|
645
645
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
646
646
|
#
|
647
|
-
# source://json
|
647
|
+
# source://json//lib/json/common.rb#335
|
648
648
|
def fast_unparse(obj, opts = T.unsafe(nil)); end
|
649
649
|
|
650
650
|
# :call-seq:
|
@@ -683,7 +683,7 @@ module JSON
|
|
683
683
|
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
684
684
|
# JSON.generate(a)
|
685
685
|
#
|
686
|
-
# source://json
|
686
|
+
# source://json//lib/json/common.rb#296
|
687
687
|
def generate(obj, opts = T.unsafe(nil)); end
|
688
688
|
|
689
689
|
# :call-seq:
|
@@ -814,7 +814,7 @@ module JSON
|
|
814
814
|
# #<Admin:0x00000000064c41f8
|
815
815
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
816
816
|
#
|
817
|
-
# source://json
|
817
|
+
# source://json//lib/json/common.rb#557
|
818
818
|
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
819
819
|
|
820
820
|
# :call-seq:
|
@@ -825,7 +825,7 @@ module JSON
|
|
825
825
|
#
|
826
826
|
# See method #parse.
|
827
827
|
#
|
828
|
-
# source://json
|
828
|
+
# source://json//lib/json/common.rb#245
|
829
829
|
def load_file(filespec, opts = T.unsafe(nil)); end
|
830
830
|
|
831
831
|
# :call-seq:
|
@@ -836,7 +836,7 @@ module JSON
|
|
836
836
|
#
|
837
837
|
# See method #parse!
|
838
838
|
#
|
839
|
-
# source://json
|
839
|
+
# source://json//lib/json/common.rb#256
|
840
840
|
def load_file!(filespec, opts = T.unsafe(nil)); end
|
841
841
|
|
842
842
|
# :call-seq:
|
@@ -887,7 +887,7 @@ module JSON
|
|
887
887
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
888
888
|
# JSON.parse('')
|
889
889
|
#
|
890
|
-
# source://json
|
890
|
+
# source://json//lib/json/common.rb#215
|
891
891
|
def parse(source, opts = T.unsafe(nil)); end
|
892
892
|
|
893
893
|
# :call-seq:
|
@@ -902,7 +902,7 @@ module JSON
|
|
902
902
|
# which disables checking for nesting depth.
|
903
903
|
# - Option +allow_nan+, if not provided, defaults to +true+.
|
904
904
|
#
|
905
|
-
# source://json
|
905
|
+
# source://json//lib/json/common.rb#230
|
906
906
|
def parse!(source, opts = T.unsafe(nil)); end
|
907
907
|
|
908
908
|
# :call-seq:
|
@@ -935,28 +935,28 @@ module JSON
|
|
935
935
|
# }
|
936
936
|
# }
|
937
937
|
#
|
938
|
-
# source://json
|
938
|
+
# source://json//lib/json/common.rb#390
|
939
939
|
def pretty_generate(obj, opts = T.unsafe(nil)); end
|
940
940
|
|
941
941
|
# :stopdoc:
|
942
942
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
943
943
|
#
|
944
|
-
# source://json
|
944
|
+
# source://json//lib/json/common.rb#390
|
945
945
|
def pretty_unparse(obj, opts = T.unsafe(nil)); end
|
946
946
|
|
947
947
|
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
948
948
|
#
|
949
|
-
# source://json
|
949
|
+
# source://json//lib/json/common.rb#575
|
950
950
|
def recurse_proc(result, &proc); end
|
951
951
|
|
952
|
-
# source://json
|
952
|
+
# source://json//lib/json/common.rb#557
|
953
953
|
def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
954
954
|
|
955
955
|
# :stopdoc:
|
956
956
|
# I want to deprecate these later, so I'll first be silent about them, and
|
957
957
|
# later delete them.
|
958
958
|
#
|
959
|
-
# source://json
|
959
|
+
# source://json//lib/json/common.rb#296
|
960
960
|
def unparse(obj, opts = T.unsafe(nil)); end
|
961
961
|
|
962
962
|
class << self
|
@@ -972,26 +972,26 @@ module JSON
|
|
972
972
|
# ruby = [0, 1, nil]
|
973
973
|
# JSON[ruby] # => '[0,1,null]'
|
974
974
|
#
|
975
|
-
# source://json
|
975
|
+
# source://json//lib/json/common.rb#18
|
976
976
|
def [](object, opts = T.unsafe(nil)); end
|
977
977
|
|
978
|
-
# source://json
|
978
|
+
# source://json//lib/json/common.rb#81
|
979
979
|
def create_fast_state; end
|
980
980
|
|
981
981
|
# Returns the current create identifier.
|
982
982
|
# See also JSON.create_id=.
|
983
983
|
#
|
984
|
-
# source://json
|
984
|
+
# source://json//lib/json/common.rb#126
|
985
985
|
def create_id; end
|
986
986
|
|
987
987
|
# Sets create identifier, which is used to decide if the _json_create_
|
988
988
|
# hook of a class should be called; initial value is +json_class+:
|
989
989
|
# JSON.create_id # => 'json_class'
|
990
990
|
#
|
991
|
-
# source://json
|
991
|
+
# source://json//lib/json/common.rb#120
|
992
992
|
def create_id=(new_value); end
|
993
993
|
|
994
|
-
# source://json
|
994
|
+
# source://json//lib/json/common.rb#91
|
995
995
|
def create_pretty_state; end
|
996
996
|
|
997
997
|
# Return the constant located at _path_. The format of _path_ has to be
|
@@ -999,7 +999,7 @@ module JSON
|
|
999
999
|
# level (absolute namespace path?). If there doesn't exist a constant at
|
1000
1000
|
# the given path, an ArgumentError is raised.
|
1001
1001
|
#
|
1002
|
-
# source://json
|
1002
|
+
# source://json//lib/json/common.rb#42
|
1003
1003
|
def deep_const_get(path); end
|
1004
1004
|
|
1005
1005
|
# :call-seq:
|
@@ -1030,7 +1030,7 @@ module JSON
|
|
1030
1030
|
# Output:
|
1031
1031
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
1032
1032
|
#
|
1033
|
-
# source://json
|
1033
|
+
# source://json//lib/json/common.rb#631
|
1034
1034
|
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end
|
1035
1035
|
|
1036
1036
|
# Sets or returns the default options for the JSON.dump method.
|
@@ -1038,7 +1038,7 @@ module JSON
|
|
1038
1038
|
# opts = JSON.dump_default_options
|
1039
1039
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false}
|
1040
1040
|
#
|
1041
|
-
# source://json
|
1041
|
+
# source://json//lib/json/common.rb#596
|
1042
1042
|
def dump_default_options; end
|
1043
1043
|
|
1044
1044
|
# Sets or returns the default options for the JSON.dump method.
|
@@ -1046,7 +1046,7 @@ module JSON
|
|
1046
1046
|
# opts = JSON.dump_default_options
|
1047
1047
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false}
|
1048
1048
|
#
|
1049
|
-
# source://json
|
1049
|
+
# source://json//lib/json/common.rb#596
|
1050
1050
|
def dump_default_options=(_arg0); end
|
1051
1051
|
|
1052
1052
|
# :call-seq:
|
@@ -1063,13 +1063,13 @@ module JSON
|
|
1063
1063
|
# # Raises SystemStackError (stack level too deep):
|
1064
1064
|
# JSON.fast_generate(a)
|
1065
1065
|
#
|
1066
|
-
# source://json
|
1066
|
+
# source://json//lib/json/common.rb#335
|
1067
1067
|
def fast_generate(obj, opts = T.unsafe(nil)); end
|
1068
1068
|
|
1069
1069
|
# :stopdoc:
|
1070
1070
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
1071
1071
|
#
|
1072
|
-
# source://json
|
1072
|
+
# source://json//lib/json/common.rb#335
|
1073
1073
|
def fast_unparse(obj, opts = T.unsafe(nil)); end
|
1074
1074
|
|
1075
1075
|
# :call-seq:
|
@@ -1108,24 +1108,24 @@ module JSON
|
|
1108
1108
|
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
1109
1109
|
# JSON.generate(a)
|
1110
1110
|
#
|
1111
|
-
# source://json
|
1111
|
+
# source://json//lib/json/common.rb#296
|
1112
1112
|
def generate(obj, opts = T.unsafe(nil)); end
|
1113
1113
|
|
1114
1114
|
# Returns the JSON generator module that is used by JSON. This is
|
1115
1115
|
# either JSON::Ext::Generator or JSON::Pure::Generator:
|
1116
1116
|
# JSON.generator # => JSON::Ext::Generator
|
1117
1117
|
#
|
1118
|
-
# source://json
|
1118
|
+
# source://json//lib/json/common.rb#103
|
1119
1119
|
def generator; end
|
1120
1120
|
|
1121
1121
|
# Set the module _generator_ to be used by JSON.
|
1122
1122
|
#
|
1123
|
-
# source://json
|
1123
|
+
# source://json//lib/json/common.rb#58
|
1124
1124
|
def generator=(generator); end
|
1125
1125
|
|
1126
1126
|
# Encodes string using String.encode.
|
1127
1127
|
#
|
1128
|
-
# source://json
|
1128
|
+
# source://json//lib/json/common.rb#653
|
1129
1129
|
def iconv(to, from, string); end
|
1130
1130
|
|
1131
1131
|
# :call-seq:
|
@@ -1256,7 +1256,7 @@ module JSON
|
|
1256
1256
|
# #<Admin:0x00000000064c41f8
|
1257
1257
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
1258
1258
|
#
|
1259
|
-
# source://json
|
1259
|
+
# source://json//lib/json/common.rb#557
|
1260
1260
|
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1261
1261
|
|
1262
1262
|
# Sets or returns default options for the JSON.load method.
|
@@ -1264,7 +1264,7 @@ module JSON
|
|
1264
1264
|
# opts = JSON.load_default_options
|
1265
1265
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1266
1266
|
#
|
1267
|
-
# source://json
|
1267
|
+
# source://json//lib/json/common.rb#420
|
1268
1268
|
def load_default_options; end
|
1269
1269
|
|
1270
1270
|
# Sets or returns default options for the JSON.load method.
|
@@ -1272,7 +1272,7 @@ module JSON
|
|
1272
1272
|
# opts = JSON.load_default_options
|
1273
1273
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1274
1274
|
#
|
1275
|
-
# source://json
|
1275
|
+
# source://json//lib/json/common.rb#420
|
1276
1276
|
def load_default_options=(_arg0); end
|
1277
1277
|
|
1278
1278
|
# :call-seq:
|
@@ -1283,7 +1283,7 @@ module JSON
|
|
1283
1283
|
#
|
1284
1284
|
# See method #parse.
|
1285
1285
|
#
|
1286
|
-
# source://json
|
1286
|
+
# source://json//lib/json/common.rb#245
|
1287
1287
|
def load_file(filespec, opts = T.unsafe(nil)); end
|
1288
1288
|
|
1289
1289
|
# :call-seq:
|
@@ -1294,7 +1294,7 @@ module JSON
|
|
1294
1294
|
#
|
1295
1295
|
# See method #parse!
|
1296
1296
|
#
|
1297
|
-
# source://json
|
1297
|
+
# source://json//lib/json/common.rb#256
|
1298
1298
|
def load_file!(filespec, opts = T.unsafe(nil)); end
|
1299
1299
|
|
1300
1300
|
# :call-seq:
|
@@ -1345,7 +1345,7 @@ module JSON
|
|
1345
1345
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
1346
1346
|
# JSON.parse('')
|
1347
1347
|
#
|
1348
|
-
# source://json
|
1348
|
+
# source://json//lib/json/common.rb#215
|
1349
1349
|
def parse(source, opts = T.unsafe(nil)); end
|
1350
1350
|
|
1351
1351
|
# :call-seq:
|
@@ -1360,19 +1360,19 @@ module JSON
|
|
1360
1360
|
# which disables checking for nesting depth.
|
1361
1361
|
# - Option +allow_nan+, if not provided, defaults to +true+.
|
1362
1362
|
#
|
1363
|
-
# source://json
|
1363
|
+
# source://json//lib/json/common.rb#230
|
1364
1364
|
def parse!(source, opts = T.unsafe(nil)); end
|
1365
1365
|
|
1366
1366
|
# Returns the JSON parser class that is used by JSON. This is either
|
1367
1367
|
# JSON::Ext::Parser or JSON::Pure::Parser:
|
1368
1368
|
# JSON.parser # => JSON::Ext::Parser
|
1369
1369
|
#
|
1370
|
-
# source://json
|
1370
|
+
# source://json//lib/json/common.rb#29
|
1371
1371
|
def parser; end
|
1372
1372
|
|
1373
1373
|
# Set the JSON parser class _parser_ to be used by JSON.
|
1374
1374
|
#
|
1375
|
-
# source://json
|
1375
|
+
# source://json//lib/json/common.rb#32
|
1376
1376
|
def parser=(parser); end
|
1377
1377
|
|
1378
1378
|
# :call-seq:
|
@@ -1405,115 +1405,115 @@ module JSON
|
|
1405
1405
|
# }
|
1406
1406
|
# }
|
1407
1407
|
#
|
1408
|
-
# source://json
|
1408
|
+
# source://json//lib/json/common.rb#390
|
1409
1409
|
def pretty_generate(obj, opts = T.unsafe(nil)); end
|
1410
1410
|
|
1411
1411
|
# :stopdoc:
|
1412
1412
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
1413
1413
|
#
|
1414
|
-
# source://json
|
1414
|
+
# source://json//lib/json/common.rb#390
|
1415
1415
|
def pretty_unparse(obj, opts = T.unsafe(nil)); end
|
1416
1416
|
|
1417
1417
|
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
1418
1418
|
#
|
1419
|
-
# source://json
|
1419
|
+
# source://json//lib/json/common.rb#575
|
1420
1420
|
def recurse_proc(result, &proc); end
|
1421
1421
|
|
1422
|
-
# source://json
|
1422
|
+
# source://json//lib/json/common.rb#557
|
1423
1423
|
def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1424
1424
|
|
1425
1425
|
# Sets or Returns the JSON generator state class that is used by JSON. This is
|
1426
1426
|
# either JSON::Ext::Generator::State or JSON::Pure::Generator::State:
|
1427
1427
|
# JSON.state # => JSON::Ext::Generator::State
|
1428
1428
|
#
|
1429
|
-
# source://json
|
1429
|
+
# source://json//lib/json/common.rb#108
|
1430
1430
|
def state; end
|
1431
1431
|
|
1432
1432
|
# Sets or Returns the JSON generator state class that is used by JSON. This is
|
1433
1433
|
# either JSON::Ext::Generator::State or JSON::Pure::Generator::State:
|
1434
1434
|
# JSON.state # => JSON::Ext::Generator::State
|
1435
1435
|
#
|
1436
|
-
# source://json
|
1436
|
+
# source://json//lib/json/common.rb#108
|
1437
1437
|
def state=(_arg0); end
|
1438
1438
|
|
1439
1439
|
# :stopdoc:
|
1440
1440
|
# I want to deprecate these later, so I'll first be silent about them, and
|
1441
1441
|
# later delete them.
|
1442
1442
|
#
|
1443
|
-
# source://json
|
1443
|
+
# source://json//lib/json/common.rb#296
|
1444
1444
|
def unparse(obj, opts = T.unsafe(nil)); end
|
1445
1445
|
end
|
1446
1446
|
end
|
1447
1447
|
|
1448
|
-
# source://json
|
1448
|
+
# source://json//lib/json/common.rb#114
|
1449
1449
|
JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String)
|
1450
1450
|
|
1451
|
-
# source://json
|
1451
|
+
# source://json//lib/json/common.rb#111
|
1452
1452
|
JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String)
|
1453
1453
|
|
1454
|
-
# source://json
|
1454
|
+
# source://json//lib/json/generic_object.rb#5
|
1455
1455
|
class JSON::GenericObject < ::OpenStruct
|
1456
|
-
# source://json
|
1456
|
+
# source://json//lib/json/generic_object.rb#63
|
1457
1457
|
def as_json(*_arg0); end
|
1458
1458
|
|
1459
|
-
# source://json
|
1459
|
+
# source://json//lib/json/generic_object.rb#47
|
1460
1460
|
def to_hash; end
|
1461
1461
|
|
1462
|
-
# source://json
|
1462
|
+
# source://json//lib/json/generic_object.rb#67
|
1463
1463
|
def to_json(*a); end
|
1464
1464
|
|
1465
|
-
# source://json
|
1465
|
+
# source://json//lib/json/generic_object.rb#59
|
1466
1466
|
def |(other); end
|
1467
1467
|
|
1468
1468
|
class << self
|
1469
|
-
# source://json
|
1469
|
+
# source://json//lib/json/generic_object.rb#41
|
1470
1470
|
def dump(obj, *args); end
|
1471
1471
|
|
1472
|
-
# source://json
|
1472
|
+
# source://json//lib/json/generic_object.rb#21
|
1473
1473
|
def from_hash(object); end
|
1474
1474
|
|
1475
1475
|
# Sets the attribute json_creatable
|
1476
1476
|
#
|
1477
1477
|
# @param value the value to set the attribute json_creatable to.
|
1478
1478
|
#
|
1479
|
-
# source://json
|
1479
|
+
# source://json//lib/json/generic_object.rb#13
|
1480
1480
|
def json_creatable=(_arg0); end
|
1481
1481
|
|
1482
1482
|
# @return [Boolean]
|
1483
1483
|
#
|
1484
|
-
# source://json
|
1484
|
+
# source://json//lib/json/generic_object.rb#9
|
1485
1485
|
def json_creatable?; end
|
1486
1486
|
|
1487
|
-
# source://json
|
1487
|
+
# source://json//lib/json/generic_object.rb#15
|
1488
1488
|
def json_create(data); end
|
1489
1489
|
|
1490
|
-
# source://json
|
1490
|
+
# source://json//lib/json/generic_object.rb#36
|
1491
1491
|
def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1492
1492
|
end
|
1493
1493
|
end
|
1494
1494
|
|
1495
1495
|
# The base exception for JSON errors.
|
1496
1496
|
#
|
1497
|
-
# source://json
|
1497
|
+
# source://json//lib/json/common.rb#137
|
1498
1498
|
class JSON::JSONError < ::StandardError
|
1499
1499
|
class << self
|
1500
|
-
# source://json
|
1500
|
+
# source://json//lib/json/common.rb#138
|
1501
1501
|
def wrap(exception); end
|
1502
1502
|
end
|
1503
1503
|
end
|
1504
1504
|
|
1505
|
-
# source://json
|
1505
|
+
# source://json//lib/json/common.rb#35
|
1506
1506
|
JSON::Parser = JSON::Ext::Parser
|
1507
1507
|
|
1508
|
-
# source://json
|
1508
|
+
# source://json//lib/json/common.rb#73
|
1509
1509
|
JSON::State = JSON::Ext::Generator::State
|
1510
1510
|
|
1511
1511
|
# For backwards compatibility
|
1512
1512
|
#
|
1513
|
-
# source://json
|
1513
|
+
# source://json//lib/json/common.rb#159
|
1514
1514
|
JSON::UnparserError = JSON::GeneratorError
|
1515
1515
|
|
1516
|
-
# source://json
|
1516
|
+
# source://json//lib/json/common.rb#658
|
1517
1517
|
module Kernel
|
1518
1518
|
private
|
1519
1519
|
|
@@ -1524,25 +1524,18 @@ module Kernel
|
|
1524
1524
|
# The _opts_ argument is passed through to generate/parse respectively. See
|
1525
1525
|
# generate and parse for their documentation.
|
1526
1526
|
#
|
1527
|
-
# source://json
|
1527
|
+
# source://json//lib/json/common.rb#685
|
1528
1528
|
def JSON(object, *args); end
|
1529
1529
|
|
1530
1530
|
# Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in
|
1531
1531
|
# one line.
|
1532
1532
|
#
|
1533
|
-
# source://json
|
1533
|
+
# source://json//lib/json/common.rb#663
|
1534
1534
|
def j(*objs); end
|
1535
1535
|
|
1536
1536
|
# Outputs _objs_ to STDOUT as JSON strings in a pretty format, with
|
1537
1537
|
# indentation and over many lines.
|
1538
1538
|
#
|
1539
|
-
# source://json
|
1539
|
+
# source://json//lib/json/common.rb#672
|
1540
1540
|
def jj(*objs); end
|
1541
1541
|
end
|
1542
|
-
|
1543
|
-
class Set
|
1544
|
-
include ::Enumerable
|
1545
|
-
end
|
1546
|
-
|
1547
|
-
# source://RUBY_ROOT/set.rb:618
|
1548
|
-
Set::InspectKey = T.let(T.unsafe(nil), Symbol)
|