active_cached_resource 0.0.1.pre → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -1
- data/Rakefile +22 -14
- data/lib/active_cached_resource/version.rb +3 -3
- data/lib/activeresource/examples/performance.rb +1 -1
- data/lib/activeresource/lib/active_resource/collection.rb +14 -1
- data/lib/activeresource/lib/active_resource/railtie.rb +2 -2
- data/lib/activeresource/lib/active_resource.rb +1 -1
- data/lib/activeresource/test/abstract_unit.rb +2 -1
- data/lib/activeresource/test/cases/active_job_serializer_test.rb +1 -1
- data/lib/activeresource/test/cases/collection_test.rb +24 -0
- data/lib/activeresource/test/cases/log_subscriber_test.rb +2 -1
- data/lib/activeresource/test/fixtures/fixtures.rbi +46 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/gems/{actioncable@8.0.0.rbi → actioncable@8.0.1.rbi} +51 -51
- data/sorbet/rbi/gems/{actionpack@8.0.0.rbi → actionpack@8.0.1.rbi} +548 -346
- data/sorbet/rbi/gems/{actionview@8.0.0.rbi → actionview@8.0.1.rbi} +465 -263
- data/sorbet/rbi/gems/activejob@8.0.1.rbi +90 -0
- data/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi +4 -4
- data/sorbet/rbi/gems/{activemodel@8.0.0.rbi → activemodel@8.0.1.rbi} +11 -3
- data/sorbet/rbi/gems/{activerecord@8.0.0.rbi → activerecord@8.0.1.rbi} +957 -576
- data/sorbet/rbi/gems/{activesupport@8.0.0.rbi → activesupport@8.0.1.rbi} +287 -112
- data/sorbet/rbi/gems/{json@2.8.2.rbi → json@2.9.0.rbi} +107 -64
- data/sorbet/rbi/gems/{logger@1.6.1.rbi → logger@1.6.3.rbi} +31 -11
- data/sorbet/rbi/gems/mocha@2.7.1.rbi +12 -0
- data/sorbet/rbi/gems/msgpack@1.7.5.rbi +320 -0
- data/sorbet/rbi/gems/{nokogiri@1.16.7.rbi → nokogiri@1.17.2.rbi} +1692 -802
- data/sorbet/rbi/gems/{psych@5.2.0.rbi → psych@5.2.1.rbi} +47 -47
- data/sorbet/rbi/gems/rack@3.1.8.rbi +1 -1
- data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +22 -22
- data/sorbet/rbi/gems/{rails-html-sanitizer@1.6.0.rbi → rails-html-sanitizer@1.6.2.rbi} +100 -100
- data/sorbet/rbi/gems/{railties@8.0.0.rbi → railties@8.0.1.rbi} +186 -126
- data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -63
- data/sorbet/rbi/gems/{rdoc@6.8.1.rbi → rdoc@6.9.1.rbi} +160 -139
- data/sorbet/rbi/gems/{regexp_parser@2.9.2.rbi → regexp_parser@2.9.3.rbi} +35 -35
- data/sorbet/rbi/gems/{reline@0.5.12.rbi → reline@0.6.0.rbi} +473 -435
- data/sorbet/rbi/gems/{rexml@3.3.9.rbi → rexml@3.4.0.rbi} +87 -74
- data/sorbet/rbi/gems/rspec-core@3.13.2.rbi +3 -6
- data/sorbet/rbi/gems/{rubocop-ast@1.36.1.rbi → rubocop-ast@1.37.0.rbi} +514 -104
- data/sorbet/rbi/gems/rubocop-md@1.2.4.rbi +123 -0
- data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +2613 -0
- data/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi +388 -0
- data/sorbet/rbi/gems/rubocop-rails@2.27.0.rbi +9535 -0
- data/sorbet/rbi/gems/{rubocop@1.65.1.rbi → rubocop@1.69.2.rbi} +4058 -2628
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
- data/sorbet/rbi/gems/securerandom@0.4.1.rbi +78 -0
- data/sorbet/rbi/gems/sqlite3@2.3.1.rbi +1824 -0
- data/sorbet/rbi/gems/{standard@1.40.0.rbi → standard@1.43.0.rbi} +61 -64
- data/sorbet/rbi/gems/unicode-display_width@3.1.2.rbi +130 -0
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
- data/sorbet/tapioca/require.rb +2 -1
- metadata +49 -139
- data/sorbet/rbi/gems/activejob@8.0.0.rbi +0 -9
- data/sorbet/rbi/gems/activeresource@6.1.4.rbi +0 -3944
- data/sorbet/rbi/gems/securerandom@0.3.2.rbi +0 -395
- data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +0 -66
- /data/sorbet/rbi/gems/{actionmailbox@8.0.0.rbi → actionmailbox@8.0.1.rbi} +0 -0
- /data/sorbet/rbi/gems/{actionmailer@8.0.0.rbi → actionmailer@8.0.1.rbi} +0 -0
- /data/sorbet/rbi/gems/{actiontext@8.0.0.rbi → actiontext@8.0.1.rbi} +0 -0
- /data/sorbet/rbi/gems/{activestorage@8.0.0.rbi → activestorage@8.0.1.rbi} +0 -0
- /data/sorbet/rbi/gems/{date@3.4.0.rbi → date@3.4.1.rbi} +0 -0
- /data/sorbet/rbi/gems/{io-console@0.7.2.rbi → io-console@0.8.0.rbi} +0 -0
- /data/sorbet/rbi/gems/{minitest@5.25.2.rbi → minitest@5.25.4.rbi} +0 -0
- /data/sorbet/rbi/gems/{net-imap@0.5.1.rbi → net-imap@0.5.2.rbi} +0 -0
- /data/sorbet/rbi/gems/{rails@8.0.0.rbi → rails@8.0.1.rbi} +0 -0
- /data/sorbet/rbi/gems/{rspec-support@3.13.1.rbi → rspec-support@3.13.2.rbi} +0 -0
- /data/sorbet/rbi/gems/{rubocop-performance@1.21.1.rbi → rubocop-performance@1.23.0.rbi} +0 -0
- /data/sorbet/rbi/gems/{standard-performance@1.4.0.rbi → standard-performance@1.6.0.rbi} +0 -0
- /data/sorbet/rbi/gems/{useragent@0.16.10.rbi → useragent@0.16.11.rbi} +0 -0
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
# Extends any Class to include _json_creatable?_ method.
|
9
9
|
#
|
10
|
-
# source://json//lib/json/common.rb#
|
10
|
+
# source://json//lib/json/common.rb#888
|
11
11
|
class Class < ::Module
|
12
12
|
# Returns true if this class can be used to create an instance
|
13
13
|
# from a serialised JSON string. The class has to implement a class
|
@@ -16,7 +16,7 @@ class Class < ::Module
|
|
16
16
|
#
|
17
17
|
# @return [Boolean]
|
18
18
|
#
|
19
|
-
# source://json//lib/json/common.rb#
|
19
|
+
# source://json//lib/json/common.rb#893
|
20
20
|
def json_creatable?; end
|
21
21
|
end
|
22
22
|
|
@@ -631,7 +631,7 @@ module JSON
|
|
631
631
|
# Output:
|
632
632
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
633
633
|
#
|
634
|
-
# source://json//lib/json/common.rb#
|
634
|
+
# source://json//lib/json/common.rb#795
|
635
635
|
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end
|
636
636
|
|
637
637
|
# :call-seq:
|
@@ -648,13 +648,13 @@ module JSON
|
|
648
648
|
# # Raises SystemStackError (stack level too deep):
|
649
649
|
# JSON.fast_generate(a)
|
650
650
|
#
|
651
|
-
# source://json//lib/json/common.rb#
|
651
|
+
# source://json//lib/json/common.rb#329
|
652
652
|
def fast_generate(obj, opts = T.unsafe(nil)); end
|
653
653
|
|
654
654
|
# :stopdoc:
|
655
655
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
656
656
|
#
|
657
|
-
# source://json//lib/json/common.rb#
|
657
|
+
# source://json//lib/json/common.rb#329
|
658
658
|
def fast_unparse(obj, opts = T.unsafe(nil)); end
|
659
659
|
|
660
660
|
# :call-seq:
|
@@ -693,7 +693,7 @@ module JSON
|
|
693
693
|
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
694
694
|
# JSON.generate(a)
|
695
695
|
#
|
696
|
-
# source://json//lib/json/common.rb#
|
696
|
+
# source://json//lib/json/common.rb#301
|
697
697
|
def generate(obj, opts = T.unsafe(nil)); end
|
698
698
|
|
699
699
|
# :call-seq:
|
@@ -701,6 +701,16 @@ module JSON
|
|
701
701
|
#
|
702
702
|
# Returns the Ruby objects created by parsing the given +source+.
|
703
703
|
#
|
704
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
705
|
+
# like from your own database server or clients under your control, it could
|
706
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
707
|
+
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
708
|
+
#
|
709
|
+
# Since JSON version 2.8.0, `load` emits a deprecation warning when a
|
710
|
+
# non native type is deserialized, without `create_additions` being explicitly
|
711
|
+
# enabled, and in JSON version 3.0, `load` will have `create_additions` disabled
|
712
|
+
# by default.
|
713
|
+
#
|
704
714
|
# - Argument +source+ must be, or be convertible to, a \String:
|
705
715
|
# - If +source+ responds to instance method +to_str+,
|
706
716
|
# <tt>source.to_str</tt> becomes the source.
|
@@ -715,10 +725,6 @@ module JSON
|
|
715
725
|
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
716
726
|
# It will be called recursively with each result (depth-first order).
|
717
727
|
# See details below.
|
718
|
-
# BEWARE: This method is meant to serialise data from trusted user input,
|
719
|
-
# like from your own database server or clients under your control, it could
|
720
|
-
# be dangerous to allow untrusted users to pass JSON sources into it.
|
721
|
-
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
722
728
|
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
723
729
|
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
724
730
|
# The default options can be changed via method JSON.load_default_options=.
|
@@ -825,7 +831,7 @@ module JSON
|
|
825
831
|
# #<Admin:0x00000000064c41f8
|
826
832
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
827
833
|
#
|
828
|
-
# source://json//lib/json/common.rb#
|
834
|
+
# source://json//lib/json/common.rb#714
|
829
835
|
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
830
836
|
|
831
837
|
# :call-seq:
|
@@ -836,7 +842,7 @@ module JSON
|
|
836
842
|
#
|
837
843
|
# See method #parse.
|
838
844
|
#
|
839
|
-
# source://json//lib/json/common.rb#
|
845
|
+
# source://json//lib/json/common.rb#250
|
840
846
|
def load_file(filespec, opts = T.unsafe(nil)); end
|
841
847
|
|
842
848
|
# :call-seq:
|
@@ -847,10 +853,10 @@ module JSON
|
|
847
853
|
#
|
848
854
|
# See method #parse!
|
849
855
|
#
|
850
|
-
# source://json//lib/json/common.rb#
|
856
|
+
# source://json//lib/json/common.rb#261
|
851
857
|
def load_file!(filespec, opts = T.unsafe(nil)); end
|
852
858
|
|
853
|
-
# source://json//lib/json/common.rb#
|
859
|
+
# source://json//lib/json/common.rb#836
|
854
860
|
def merge_dump_options(opts, strict: T.unsafe(nil)); end
|
855
861
|
|
856
862
|
# :call-seq:
|
@@ -901,7 +907,7 @@ module JSON
|
|
901
907
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
902
908
|
# JSON.parse('')
|
903
909
|
#
|
904
|
-
# source://json//lib/json/common.rb#
|
910
|
+
# source://json//lib/json/common.rb#220
|
905
911
|
def parse(source, opts = T.unsafe(nil)); end
|
906
912
|
|
907
913
|
# :call-seq:
|
@@ -916,7 +922,7 @@ module JSON
|
|
916
922
|
# which disables checking for nesting depth.
|
917
923
|
# - Option +allow_nan+, if not provided, defaults to +true+.
|
918
924
|
#
|
919
|
-
# source://json//lib/json/common.rb#
|
925
|
+
# source://json//lib/json/common.rb#235
|
920
926
|
def parse!(source, opts = T.unsafe(nil)); end
|
921
927
|
|
922
928
|
# :call-seq:
|
@@ -949,28 +955,28 @@ module JSON
|
|
949
955
|
# }
|
950
956
|
# }
|
951
957
|
#
|
952
|
-
# source://json//lib/json/common.rb#
|
958
|
+
# source://json//lib/json/common.rb#374
|
953
959
|
def pretty_generate(obj, opts = T.unsafe(nil)); end
|
954
960
|
|
955
961
|
# :stopdoc:
|
956
962
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
957
963
|
#
|
958
|
-
# source://json//lib/json/common.rb#
|
964
|
+
# source://json//lib/json/common.rb#374
|
959
965
|
def pretty_unparse(obj, opts = T.unsafe(nil)); end
|
960
966
|
|
961
967
|
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
962
968
|
#
|
963
|
-
# source://json//lib/json/common.rb#
|
969
|
+
# source://json//lib/json/common.rb#740
|
964
970
|
def recurse_proc(result, &proc); end
|
965
971
|
|
966
|
-
# source://json//lib/json/common.rb#
|
972
|
+
# source://json//lib/json/common.rb#714
|
967
973
|
def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
968
974
|
|
969
975
|
# :stopdoc:
|
970
976
|
# I want to deprecate these later, so I'll first be silent about them, and
|
971
977
|
# later delete them.
|
972
978
|
#
|
973
|
-
# source://json//lib/json/common.rb#
|
979
|
+
# source://json//lib/json/common.rb#301
|
974
980
|
def unparse(obj, opts = T.unsafe(nil)); end
|
975
981
|
|
976
982
|
# :call-seq:
|
@@ -978,6 +984,10 @@ module JSON
|
|
978
984
|
#
|
979
985
|
# Returns the Ruby objects created by parsing the given +source+.
|
980
986
|
#
|
987
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
988
|
+
# like from your own database server or clients under your control, it could
|
989
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
990
|
+
#
|
981
991
|
# - Argument +source+ must be, or be convertible to, a \String:
|
982
992
|
# - If +source+ responds to instance method +to_str+,
|
983
993
|
# <tt>source.to_str</tt> becomes the source.
|
@@ -992,9 +1002,6 @@ module JSON
|
|
992
1002
|
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
993
1003
|
# It will be called recursively with each result (depth-first order).
|
994
1004
|
# See details below.
|
995
|
-
# BEWARE: This method is meant to serialise data from trusted user input,
|
996
|
-
# like from your own database server or clients under your control, it could
|
997
|
-
# be dangerous to allow untrusted users to pass JSON sources into it.
|
998
1005
|
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
999
1006
|
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
1000
1007
|
# The default options can be changed via method JSON.unsafe_load_default_options=.
|
@@ -1101,7 +1108,7 @@ module JSON
|
|
1101
1108
|
# #<Admin:0x00000000064c41f8
|
1102
1109
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
1103
1110
|
#
|
1104
|
-
# source://json//lib/json/common.rb#
|
1111
|
+
# source://json//lib/json/common.rb#554
|
1105
1112
|
def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1106
1113
|
|
1107
1114
|
class << self
|
@@ -1175,7 +1182,7 @@ module JSON
|
|
1175
1182
|
# Output:
|
1176
1183
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
1177
1184
|
#
|
1178
|
-
# source://json//lib/json/common.rb#
|
1185
|
+
# source://json//lib/json/common.rb#795
|
1179
1186
|
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end
|
1180
1187
|
|
1181
1188
|
# Sets or returns the default options for the JSON.dump method.
|
@@ -1183,7 +1190,7 @@ module JSON
|
|
1183
1190
|
# opts = JSON.dump_default_options
|
1184
1191
|
# opts # => {:max_nesting=>false, :allow_nan=>true}
|
1185
1192
|
#
|
1186
|
-
# source://json//lib/json/common.rb#
|
1193
|
+
# source://json//lib/json/common.rb#761
|
1187
1194
|
def dump_default_options; end
|
1188
1195
|
|
1189
1196
|
# Sets or returns the default options for the JSON.dump method.
|
@@ -1191,7 +1198,7 @@ module JSON
|
|
1191
1198
|
# opts = JSON.dump_default_options
|
1192
1199
|
# opts # => {:max_nesting=>false, :allow_nan=>true}
|
1193
1200
|
#
|
1194
|
-
# source://json//lib/json/common.rb#
|
1201
|
+
# source://json//lib/json/common.rb#761
|
1195
1202
|
def dump_default_options=(_arg0); end
|
1196
1203
|
|
1197
1204
|
# :call-seq:
|
@@ -1208,13 +1215,13 @@ module JSON
|
|
1208
1215
|
# # Raises SystemStackError (stack level too deep):
|
1209
1216
|
# JSON.fast_generate(a)
|
1210
1217
|
#
|
1211
|
-
# source://json//lib/json/common.rb#
|
1218
|
+
# source://json//lib/json/common.rb#329
|
1212
1219
|
def fast_generate(obj, opts = T.unsafe(nil)); end
|
1213
1220
|
|
1214
1221
|
# :stopdoc:
|
1215
1222
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
1216
1223
|
#
|
1217
|
-
# source://json//lib/json/common.rb#
|
1224
|
+
# source://json//lib/json/common.rb#329
|
1218
1225
|
def fast_unparse(obj, opts = T.unsafe(nil)); end
|
1219
1226
|
|
1220
1227
|
# :call-seq:
|
@@ -1253,7 +1260,7 @@ module JSON
|
|
1253
1260
|
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
1254
1261
|
# JSON.generate(a)
|
1255
1262
|
#
|
1256
|
-
# source://json//lib/json/common.rb#
|
1263
|
+
# source://json//lib/json/common.rb#301
|
1257
1264
|
def generate(obj, opts = T.unsafe(nil)); end
|
1258
1265
|
|
1259
1266
|
# Returns the JSON generator module that is used by JSON.
|
@@ -1268,7 +1275,7 @@ module JSON
|
|
1268
1275
|
|
1269
1276
|
# Encodes string using String.encode.
|
1270
1277
|
#
|
1271
|
-
# source://json//lib/json/common.rb#
|
1278
|
+
# source://json//lib/json/common.rb#832
|
1272
1279
|
def iconv(to, from, string); end
|
1273
1280
|
|
1274
1281
|
# :call-seq:
|
@@ -1276,6 +1283,16 @@ module JSON
|
|
1276
1283
|
#
|
1277
1284
|
# Returns the Ruby objects created by parsing the given +source+.
|
1278
1285
|
#
|
1286
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
1287
|
+
# like from your own database server or clients under your control, it could
|
1288
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
1289
|
+
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
1290
|
+
#
|
1291
|
+
# Since JSON version 2.8.0, `load` emits a deprecation warning when a
|
1292
|
+
# non native type is deserialized, without `create_additions` being explicitly
|
1293
|
+
# enabled, and in JSON version 3.0, `load` will have `create_additions` disabled
|
1294
|
+
# by default.
|
1295
|
+
#
|
1279
1296
|
# - Argument +source+ must be, or be convertible to, a \String:
|
1280
1297
|
# - If +source+ responds to instance method +to_str+,
|
1281
1298
|
# <tt>source.to_str</tt> becomes the source.
|
@@ -1290,10 +1307,6 @@ module JSON
|
|
1290
1307
|
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
1291
1308
|
# It will be called recursively with each result (depth-first order).
|
1292
1309
|
# See details below.
|
1293
|
-
# BEWARE: This method is meant to serialise data from trusted user input,
|
1294
|
-
# like from your own database server or clients under your control, it could
|
1295
|
-
# be dangerous to allow untrusted users to pass JSON sources into it.
|
1296
|
-
# If you must use it, use JSON.unsafe_load instead to make it clear.
|
1297
1310
|
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
1298
1311
|
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
1299
1312
|
# The default options can be changed via method JSON.load_default_options=.
|
@@ -1400,7 +1413,7 @@ module JSON
|
|
1400
1413
|
# #<Admin:0x00000000064c41f8
|
1401
1414
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
1402
1415
|
#
|
1403
|
-
# source://json//lib/json/common.rb#
|
1416
|
+
# source://json//lib/json/common.rb#714
|
1404
1417
|
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1405
1418
|
|
1406
1419
|
# Sets or returns default options for the JSON.load method.
|
@@ -1408,7 +1421,7 @@ module JSON
|
|
1408
1421
|
# opts = JSON.load_default_options
|
1409
1422
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1410
1423
|
#
|
1411
|
-
# source://json//lib/json/common.rb#
|
1424
|
+
# source://json//lib/json/common.rb#418
|
1412
1425
|
def load_default_options; end
|
1413
1426
|
|
1414
1427
|
# Sets or returns default options for the JSON.load method.
|
@@ -1416,7 +1429,7 @@ module JSON
|
|
1416
1429
|
# opts = JSON.load_default_options
|
1417
1430
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1418
1431
|
#
|
1419
|
-
# source://json//lib/json/common.rb#
|
1432
|
+
# source://json//lib/json/common.rb#418
|
1420
1433
|
def load_default_options=(_arg0); end
|
1421
1434
|
|
1422
1435
|
# :call-seq:
|
@@ -1427,7 +1440,7 @@ module JSON
|
|
1427
1440
|
#
|
1428
1441
|
# See method #parse.
|
1429
1442
|
#
|
1430
|
-
# source://json//lib/json/common.rb#
|
1443
|
+
# source://json//lib/json/common.rb#250
|
1431
1444
|
def load_file(filespec, opts = T.unsafe(nil)); end
|
1432
1445
|
|
1433
1446
|
# :call-seq:
|
@@ -1438,7 +1451,7 @@ module JSON
|
|
1438
1451
|
#
|
1439
1452
|
# See method #parse!
|
1440
1453
|
#
|
1441
|
-
# source://json//lib/json/common.rb#
|
1454
|
+
# source://json//lib/json/common.rb#261
|
1442
1455
|
def load_file!(filespec, opts = T.unsafe(nil)); end
|
1443
1456
|
|
1444
1457
|
# :call-seq:
|
@@ -1489,7 +1502,7 @@ module JSON
|
|
1489
1502
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
1490
1503
|
# JSON.parse('')
|
1491
1504
|
#
|
1492
|
-
# source://json//lib/json/common.rb#
|
1505
|
+
# source://json//lib/json/common.rb#220
|
1493
1506
|
def parse(source, opts = T.unsafe(nil)); end
|
1494
1507
|
|
1495
1508
|
# :call-seq:
|
@@ -1504,7 +1517,7 @@ module JSON
|
|
1504
1517
|
# which disables checking for nesting depth.
|
1505
1518
|
# - Option +allow_nan+, if not provided, defaults to +true+.
|
1506
1519
|
#
|
1507
|
-
# source://json//lib/json/common.rb#
|
1520
|
+
# source://json//lib/json/common.rb#235
|
1508
1521
|
def parse!(source, opts = T.unsafe(nil)); end
|
1509
1522
|
|
1510
1523
|
# Returns the JSON parser class that is used by JSON.
|
@@ -1547,21 +1560,21 @@ module JSON
|
|
1547
1560
|
# }
|
1548
1561
|
# }
|
1549
1562
|
#
|
1550
|
-
# source://json//lib/json/common.rb#
|
1563
|
+
# source://json//lib/json/common.rb#374
|
1551
1564
|
def pretty_generate(obj, opts = T.unsafe(nil)); end
|
1552
1565
|
|
1553
1566
|
# :stopdoc:
|
1554
1567
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
1555
1568
|
#
|
1556
|
-
# source://json//lib/json/common.rb#
|
1569
|
+
# source://json//lib/json/common.rb#374
|
1557
1570
|
def pretty_unparse(obj, opts = T.unsafe(nil)); end
|
1558
1571
|
|
1559
1572
|
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
1560
1573
|
#
|
1561
|
-
# source://json//lib/json/common.rb#
|
1574
|
+
# source://json//lib/json/common.rb#740
|
1562
1575
|
def recurse_proc(result, &proc); end
|
1563
1576
|
|
1564
|
-
# source://json//lib/json/common.rb#
|
1577
|
+
# source://json//lib/json/common.rb#714
|
1565
1578
|
def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1566
1579
|
|
1567
1580
|
# Sets or Returns the JSON generator state class that is used by JSON.
|
@@ -1578,7 +1591,7 @@ module JSON
|
|
1578
1591
|
# I want to deprecate these later, so I'll first be silent about them, and
|
1579
1592
|
# later delete them.
|
1580
1593
|
#
|
1581
|
-
# source://json//lib/json/common.rb#
|
1594
|
+
# source://json//lib/json/common.rb#301
|
1582
1595
|
def unparse(obj, opts = T.unsafe(nil)); end
|
1583
1596
|
|
1584
1597
|
# :call-seq:
|
@@ -1586,6 +1599,10 @@ module JSON
|
|
1586
1599
|
#
|
1587
1600
|
# Returns the Ruby objects created by parsing the given +source+.
|
1588
1601
|
#
|
1602
|
+
# BEWARE: This method is meant to serialise data from trusted user input,
|
1603
|
+
# like from your own database server or clients under your control, it could
|
1604
|
+
# be dangerous to allow untrusted users to pass JSON sources into it.
|
1605
|
+
#
|
1589
1606
|
# - Argument +source+ must be, or be convertible to, a \String:
|
1590
1607
|
# - If +source+ responds to instance method +to_str+,
|
1591
1608
|
# <tt>source.to_str</tt> becomes the source.
|
@@ -1600,9 +1617,6 @@ module JSON
|
|
1600
1617
|
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
|
1601
1618
|
# It will be called recursively with each result (depth-first order).
|
1602
1619
|
# See details below.
|
1603
|
-
# BEWARE: This method is meant to serialise data from trusted user input,
|
1604
|
-
# like from your own database server or clients under your control, it could
|
1605
|
-
# be dangerous to allow untrusted users to pass JSON sources into it.
|
1606
1620
|
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
|
1607
1621
|
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
|
1608
1622
|
# The default options can be changed via method JSON.unsafe_load_default_options=.
|
@@ -1709,7 +1723,7 @@ module JSON
|
|
1709
1723
|
# #<Admin:0x00000000064c41f8
|
1710
1724
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
1711
1725
|
#
|
1712
|
-
# source://json//lib/json/common.rb#
|
1726
|
+
# source://json//lib/json/common.rb#554
|
1713
1727
|
def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1714
1728
|
|
1715
1729
|
# Sets or returns default options for the JSON.unsafe_load method.
|
@@ -1717,7 +1731,7 @@ module JSON
|
|
1717
1731
|
# opts = JSON.load_default_options
|
1718
1732
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1719
1733
|
#
|
1720
|
-
# source://json//lib/json/common.rb#
|
1734
|
+
# source://json//lib/json/common.rb#404
|
1721
1735
|
def unsafe_load_default_options; end
|
1722
1736
|
|
1723
1737
|
# Sets or returns default options for the JSON.unsafe_load method.
|
@@ -1725,12 +1739,12 @@ module JSON
|
|
1725
1739
|
# opts = JSON.load_default_options
|
1726
1740
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1727
1741
|
#
|
1728
|
-
# source://json//lib/json/common.rb#
|
1742
|
+
# source://json//lib/json/common.rb#404
|
1729
1743
|
def unsafe_load_default_options=(_arg0); end
|
1730
1744
|
|
1731
1745
|
private
|
1732
1746
|
|
1733
|
-
# source://json//lib/json/common.rb#
|
1747
|
+
# source://json//lib/json/common.rb#836
|
1734
1748
|
def merge_dump_options(opts, strict: T.unsafe(nil)); end
|
1735
1749
|
end
|
1736
1750
|
end
|
@@ -1765,14 +1779,14 @@ class JSON::Ext::Generator::State
|
|
1765
1779
|
#
|
1766
1780
|
# Returns the value returned by method +name+.
|
1767
1781
|
#
|
1768
|
-
# source://json//lib/json/ext/generator/state.rb#
|
1782
|
+
# source://json//lib/json/ext/generator/state.rb#94
|
1769
1783
|
def [](name); end
|
1770
1784
|
|
1771
1785
|
# call-seq: []=(name, value)
|
1772
1786
|
#
|
1773
1787
|
# Sets the attribute name to value.
|
1774
1788
|
#
|
1775
|
-
# source://json//lib/json/ext/generator/state.rb#
|
1789
|
+
# source://json//lib/json/ext/generator/state.rb#106
|
1776
1790
|
def []=(name, value); end
|
1777
1791
|
|
1778
1792
|
# call-seq: configure(opts)
|
@@ -1783,6 +1797,17 @@ class JSON::Ext::Generator::State
|
|
1783
1797
|
# source://json//lib/json/ext/generator/state.rb#35
|
1784
1798
|
def configure(opts); end
|
1785
1799
|
|
1800
|
+
# call-seq:
|
1801
|
+
# generate(obj) -> String
|
1802
|
+
# generate(obj, anIO) -> anIO
|
1803
|
+
#
|
1804
|
+
# Generates a valid JSON document from object +obj+ and returns the
|
1805
|
+
# result. If no valid JSON document can be created this method raises a
|
1806
|
+
# GeneratorError exception.
|
1807
|
+
#
|
1808
|
+
# source://json//lib/json/ext/generator/state.rb#57
|
1809
|
+
def generate(obj, io = T.unsafe(nil)); end
|
1810
|
+
|
1786
1811
|
# call-seq: configure(opts)
|
1787
1812
|
#
|
1788
1813
|
# Configure this State instance with the Hash _opts_, and return
|
@@ -1796,7 +1821,7 @@ class JSON::Ext::Generator::State
|
|
1796
1821
|
# Returns the configuration instance variables as a hash, that can be
|
1797
1822
|
# passed to the configure method.
|
1798
1823
|
#
|
1799
|
-
# source://json//lib/json/ext/generator/state.rb#
|
1824
|
+
# source://json//lib/json/ext/generator/state.rb#65
|
1800
1825
|
def to_h; end
|
1801
1826
|
|
1802
1827
|
# call-seq: to_h
|
@@ -1804,10 +1829,28 @@ class JSON::Ext::Generator::State
|
|
1804
1829
|
# Returns the configuration instance variables as a hash, that can be
|
1805
1830
|
# passed to the configure method.
|
1806
1831
|
#
|
1807
|
-
# source://json//lib/json/ext/generator/state.rb#
|
1832
|
+
# source://json//lib/json/ext/generator/state.rb#65
|
1808
1833
|
def to_hash; end
|
1809
1834
|
end
|
1810
1835
|
|
1836
|
+
# This exception is raised if a generator or unparser error occurs.
|
1837
|
+
#
|
1838
|
+
# source://json//lib/json/common.rb#146
|
1839
|
+
class JSON::GeneratorError < ::JSON::JSONError
|
1840
|
+
# @return [GeneratorError] a new instance of GeneratorError
|
1841
|
+
#
|
1842
|
+
# source://json//lib/json/common.rb#149
|
1843
|
+
def initialize(message, invalid_object = T.unsafe(nil)); end
|
1844
|
+
|
1845
|
+
# source://json//lib/json/common.rb#154
|
1846
|
+
def detailed_message(*_arg0, **_arg1, &_arg2); end
|
1847
|
+
|
1848
|
+
# Returns the value of attribute invalid_object.
|
1849
|
+
#
|
1850
|
+
# source://json//lib/json/common.rb#147
|
1851
|
+
def invalid_object; end
|
1852
|
+
end
|
1853
|
+
|
1811
1854
|
# source://json//lib/json/generic_object.rb#9
|
1812
1855
|
class JSON::GenericObject < ::OpenStruct
|
1813
1856
|
# source://json//lib/json/generic_object.rb#67
|
@@ -1870,10 +1913,10 @@ JSON::State = JSON::Ext::Generator::State
|
|
1870
1913
|
|
1871
1914
|
# For backwards compatibility
|
1872
1915
|
#
|
1873
|
-
# source://json//lib/json/common.rb#
|
1916
|
+
# source://json//lib/json/common.rb#164
|
1874
1917
|
JSON::UnparserError = JSON::GeneratorError
|
1875
1918
|
|
1876
|
-
# source://json//lib/json/common.rb#
|
1919
|
+
# source://json//lib/json/common.rb#846
|
1877
1920
|
module Kernel
|
1878
1921
|
private
|
1879
1922
|
|
@@ -1884,18 +1927,18 @@ module Kernel
|
|
1884
1927
|
# The _opts_ argument is passed through to generate/parse respectively. See
|
1885
1928
|
# generate and parse for their documentation.
|
1886
1929
|
#
|
1887
|
-
# source://json//lib/json/common.rb#
|
1930
|
+
# source://json//lib/json/common.rb#873
|
1888
1931
|
def JSON(object, *args); end
|
1889
1932
|
|
1890
1933
|
# Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in
|
1891
1934
|
# one line.
|
1892
1935
|
#
|
1893
|
-
# source://json//lib/json/common.rb#
|
1936
|
+
# source://json//lib/json/common.rb#851
|
1894
1937
|
def j(*objs); end
|
1895
1938
|
|
1896
1939
|
# Outputs _objs_ to STDOUT as JSON strings in a pretty format, with
|
1897
1940
|
# indentation and over many lines.
|
1898
1941
|
#
|
1899
|
-
# source://json//lib/json/common.rb#
|
1942
|
+
# source://json//lib/json/common.rb#860
|
1900
1943
|
def jj(*objs); end
|
1901
1944
|
end
|
@@ -770,12 +770,15 @@ class Logger
|
|
770
770
|
|
771
771
|
private
|
772
772
|
|
773
|
-
# source://logger//lib/logger.rb#
|
773
|
+
# source://logger//lib/logger.rb#758
|
774
774
|
def format_message(severity, datetime, progname, msg); end
|
775
775
|
|
776
776
|
# source://logger//lib/logger.rb#745
|
777
777
|
def format_severity(severity); end
|
778
778
|
|
779
|
+
# source://logger//lib/logger.rb#754
|
780
|
+
def level_key; end
|
781
|
+
|
779
782
|
# Guarantee the existence of this ivar even when subclasses don't call the superclass constructor.
|
780
783
|
#
|
781
784
|
# source://logger//lib/logger.rb#750
|
@@ -833,7 +836,7 @@ class Logger::LogDevice
|
|
833
836
|
# source://logger//lib/logger/log_device.rb#14
|
834
837
|
def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end
|
835
838
|
|
836
|
-
# source://logger//lib/logger/log_device.rb#
|
839
|
+
# source://logger//lib/logger/log_device.rb#43
|
837
840
|
def close; end
|
838
841
|
|
839
842
|
# Returns the value of attribute dev.
|
@@ -846,7 +849,7 @@ class Logger::LogDevice
|
|
846
849
|
# source://logger//lib/logger/log_device.rb#11
|
847
850
|
def filename; end
|
848
851
|
|
849
|
-
# source://logger//lib/logger/log_device.rb#
|
852
|
+
# source://logger//lib/logger/log_device.rb#53
|
850
853
|
def reopen(log = T.unsafe(nil)); end
|
851
854
|
|
852
855
|
# source://logger//lib/logger/log_device.rb#32
|
@@ -854,31 +857,48 @@ class Logger::LogDevice
|
|
854
857
|
|
855
858
|
private
|
856
859
|
|
857
|
-
# source://logger//lib/logger/log_device.rb#
|
860
|
+
# source://logger//lib/logger/log_device.rb#143
|
858
861
|
def add_log_header(file); end
|
859
862
|
|
860
|
-
# source://logger//lib/logger/log_device.rb#
|
863
|
+
# source://logger//lib/logger/log_device.rb#149
|
861
864
|
def check_shift_log; end
|
862
865
|
|
863
|
-
# source://logger//lib/logger/log_device.rb#
|
866
|
+
# source://logger//lib/logger/log_device.rb#119
|
864
867
|
def create_logfile(filename); end
|
865
868
|
|
866
|
-
# source://logger//lib/logger/log_device.rb#
|
869
|
+
# source://logger//lib/logger/log_device.rb#91
|
870
|
+
def fixup_mode(dev, filename); end
|
871
|
+
|
872
|
+
# source://logger//lib/logger/log_device.rb#135
|
873
|
+
def handle_write_errors(mesg); end
|
874
|
+
|
875
|
+
# source://logger//lib/logger/log_device.rb#164
|
867
876
|
def lock_shift_log; end
|
868
877
|
|
869
|
-
# source://logger//lib/logger/log_device.rb#
|
878
|
+
# source://logger//lib/logger/log_device.rb#106
|
870
879
|
def open_logfile(filename); end
|
871
880
|
|
872
|
-
# source://logger//lib/logger/log_device.rb#
|
881
|
+
# source://logger//lib/logger/log_device.rb#76
|
873
882
|
def set_dev(log); end
|
874
883
|
|
875
|
-
# source://logger//lib/logger/log_device.rb#
|
884
|
+
# source://logger//lib/logger/log_device.rb#193
|
876
885
|
def shift_log_age; end
|
877
886
|
|
878
|
-
# source://logger//lib/logger/log_device.rb#
|
887
|
+
# source://logger//lib/logger/log_device.rb#205
|
879
888
|
def shift_log_period(period_end); end
|
880
889
|
end
|
881
890
|
|
891
|
+
# :stopdoc:
|
892
|
+
#
|
893
|
+
# source://logger//lib/logger/log_device.rb#72
|
894
|
+
Logger::LogDevice::MODE = T.let(T.unsafe(nil), Integer)
|
895
|
+
|
896
|
+
# source://logger//lib/logger/log_device.rb#74
|
897
|
+
Logger::LogDevice::MODE_TO_CREATE = T.let(T.unsafe(nil), Integer)
|
898
|
+
|
899
|
+
# source://logger//lib/logger/log_device.rb#73
|
900
|
+
Logger::LogDevice::MODE_TO_OPEN = T.let(T.unsafe(nil), Integer)
|
901
|
+
|
882
902
|
# source://logger//lib/logger/period.rb#4
|
883
903
|
module Logger::Period
|
884
904
|
private
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `mocha` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem mocha`.
|
6
|
+
|
7
|
+
|
8
|
+
# source://mocha//lib/mocha/version.rb#1
|
9
|
+
module Mocha; end
|
10
|
+
|
11
|
+
# source://mocha//lib/mocha/version.rb#2
|
12
|
+
Mocha::VERSION = T.let(T.unsafe(nil), String)
|