lunchmoney 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.simplecov +1 -2
- data/Gemfile +2 -3
- data/Gemfile.lock +66 -68
- data/lib/lunchmoney/objects/transaction.rb +9 -1
- data/lib/lunchmoney/version.rb +1 -1
- data/sorbet/rbi/annotations/activesupport.rbi +31 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/gems/{activesupport@7.1.3.2.rbi → activesupport@7.2.1.rbi} +1345 -1253
- data/sorbet/rbi/gems/{addressable@2.8.6.rbi → addressable@2.8.7.rbi} +2 -1
- data/sorbet/rbi/gems/{bigdecimal@3.1.7.rbi → bigdecimal@3.1.8.rbi} +1 -0
- data/sorbet/rbi/gems/{chef-utils@18.4.2.rbi → chef-utils@18.5.0.rbi} +1 -0
- data/sorbet/rbi/gems/{concurrent-ruby@1.2.3.rbi → concurrent-ruby@1.3.4.rbi} +64 -9
- data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +1 -0
- data/sorbet/rbi/gems/{erubi@1.12.0.rbi → erubi@1.13.0.rbi} +20 -15
- data/sorbet/rbi/gems/{faraday-net_http@3.1.0.rbi → faraday-net_http@3.1.1.rbi} +36 -35
- data/sorbet/rbi/gems/{faraday@2.9.0.rbi → faraday@2.10.1.rbi} +79 -33
- data/sorbet/rbi/gems/{hashdiff@1.1.0.rbi → hashdiff@1.1.1.rbi} +3 -2
- data/sorbet/rbi/gems/{i18n@1.14.4.rbi → i18n@1.14.5.rbi} +43 -14
- data/sorbet/rbi/gems/logger@1.6.0.rbi +903 -0
- data/sorbet/rbi/gems/{minitest@5.22.3.rbi → minitest@5.25.1.rbi} +245 -235
- data/sorbet/rbi/gems/{mixlib-shellout@3.2.7.rbi → mixlib-shellout@3.2.8.rbi} +1 -0
- data/sorbet/rbi/gems/{mocha@2.2.0.rbi → mocha@2.4.5.rbi} +36 -47
- data/sorbet/rbi/gems/{parallel@1.24.0.rbi → parallel@1.26.3.rbi} +32 -21
- data/sorbet/rbi/gems/{parser@3.3.1.0.rbi → parser@3.3.4.2.rbi} +233 -186
- data/sorbet/rbi/gems/{prism@0.29.0.rbi → prism@0.30.0.rbi} +5670 -4445
- data/sorbet/rbi/gems/{public_suffix@5.0.4.rbi → public_suffix@6.0.1.rbi} +1 -0
- data/sorbet/rbi/gems/{racc@1.7.3.rbi → racc@1.8.1.rbi} +34 -33
- data/sorbet/rbi/gems/{rack@3.0.10.rbi → rack@3.1.7.rbi} +694 -987
- data/sorbet/rbi/gems/{rake@13.1.0.rbi → rake@13.2.1.rbi} +56 -55
- data/sorbet/rbi/gems/{rbi@0.1.13.rbi → rbi@0.1.14.rbi} +865 -638
- data/sorbet/rbi/gems/{regexp_parser@2.9.1.rbi → regexp_parser@2.9.2.rbi} +2 -2
- data/sorbet/rbi/gems/{rexml@3.2.6.rbi → rexml@3.3.6.rbi} +383 -245
- data/sorbet/rbi/gems/{rubocop-ast@1.31.3.rbi → rubocop-ast@1.32.1.rbi} +383 -337
- data/sorbet/rbi/gems/{rubocop-minitest@0.35.0.rbi → rubocop-minitest@0.35.1.rbi} +11 -8
- data/sorbet/rbi/gems/{rubocop-rails@2.24.1.rbi → rubocop-rails@2.26.0.rbi} +604 -275
- data/sorbet/rbi/gems/{rubocop-sorbet@0.8.3.rbi → rubocop-sorbet@0.8.5.rbi} +125 -67
- data/sorbet/rbi/gems/{rubocop@1.63.5.rbi → rubocop@1.65.1.rbi} +1722 -1408
- data/sorbet/rbi/gems/securerandom@0.3.1.rbi +73 -0
- data/sorbet/rbi/gems/{spoom@1.3.2.rbi → spoom@1.4.2.rbi} +2377 -1866
- data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
- data/sorbet/rbi/gems/{tapioca@0.14.1.rbi → tapioca@0.16.1.rbi} +274 -253
- data/sorbet/rbi/gems/{toys-core@0.15.5.rbi → toys-core@0.15.6.rbi} +1 -0
- data/sorbet/rbi/gems/{toys@0.15.5.rbi → toys@0.15.6.rbi} +4 -3
- data/sorbet/rbi/gems/{vcr@6.2.0.rbi → vcr@6.3.1.rbi} +72 -68
- data/sorbet/rbi/gems/{webmock@3.23.0.rbi → webmock@3.23.1.rbi} +1 -0
- data/sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi → yard-sorbet@0.9.0.rbi} +36 -29
- metadata +43 -44
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3426
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +0 -93
- data/sorbet/rbi/gems/pry-sorbet@0.2.1.rbi +0 -966
- data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10077
@@ -4,6 +4,7 @@
|
|
4
4
|
# This is an autogenerated file for types exported from the `faraday` gem.
|
5
5
|
# Please instead update this file by running `bin/tapioca gem faraday`.
|
6
6
|
|
7
|
+
|
7
8
|
# conn.get '/'
|
8
9
|
#
|
9
10
|
# source://faraday//lib/faraday/version.rb#3
|
@@ -92,13 +93,13 @@ module Faraday
|
|
92
93
|
# @example With an URL argument
|
93
94
|
# Faraday.new 'http://faraday.com'
|
94
95
|
# # => Faraday::Connection to http://faraday.com
|
95
|
-
# @example With an URL argument and an options hash
|
96
|
-
# Faraday.new 'http://faraday.com', params: { page: 1 }
|
97
|
-
# # => Faraday::Connection to http://faraday.com?page=1
|
98
96
|
# @example With everything in an options hash
|
99
97
|
# Faraday.new url: 'http://faraday.com',
|
100
98
|
# params: { page: 1 }
|
101
99
|
# # => Faraday::Connection to http://faraday.com?page=1
|
100
|
+
# @example With an URL argument and an options hash
|
101
|
+
# Faraday.new 'http://faraday.com', params: { page: 1 }
|
102
|
+
# # => Faraday::Connection to http://faraday.com?page=1
|
102
103
|
# @option options
|
103
104
|
# @option options
|
104
105
|
# @option options
|
@@ -652,10 +653,10 @@ class Faraday::Connection
|
|
652
653
|
# @api private
|
653
654
|
# @return [Faraday::Connection]
|
654
655
|
#
|
655
|
-
# source://faraday//lib/faraday/connection.rb#
|
656
|
+
# source://faraday//lib/faraday/connection.rb#491
|
656
657
|
def dup; end
|
657
658
|
|
658
|
-
# source://faraday//lib/faraday/connection.rb#
|
659
|
+
# source://faraday//lib/faraday/connection.rb#534
|
659
660
|
def find_default_proxy; end
|
660
661
|
|
661
662
|
# source://faraday//lib/faraday/connection.rb#199
|
@@ -765,10 +766,10 @@ class Faraday::Connection
|
|
765
766
|
# source://faraday//lib/faraday/connection.rb#333
|
766
767
|
def proxy=(new_value); end
|
767
768
|
|
768
|
-
# source://faraday//lib/faraday/connection.rb#
|
769
|
+
# source://faraday//lib/faraday/connection.rb#542
|
769
770
|
def proxy_for_request(url); end
|
770
771
|
|
771
|
-
# source://faraday//lib/faraday/connection.rb#
|
772
|
+
# source://faraday//lib/faraday/connection.rb#514
|
772
773
|
def proxy_from_env(url); end
|
773
774
|
|
774
775
|
# source://faraday//lib/faraday/connection.rb#279
|
@@ -784,8 +785,8 @@ class Faraday::Connection
|
|
784
785
|
#
|
785
786
|
# @param method [Symbol] HTTP method.
|
786
787
|
# @param url [String, URI, nil] String or URI to access.
|
787
|
-
# @param body [String, nil] The request body that will eventually be converted to
|
788
|
-
# a string.
|
788
|
+
# @param body [String, Hash, Array, nil] The request body that will eventually be converted to
|
789
|
+
# a string; middlewares can be used to support more complex types.
|
789
790
|
# @param headers [Hash, nil] unencoded HTTP header key/value pairs.
|
790
791
|
# @return [Faraday::Response]
|
791
792
|
#
|
@@ -808,7 +809,7 @@ class Faraday::Connection
|
|
808
809
|
|
809
810
|
# @return [Boolean]
|
810
811
|
#
|
811
|
-
# source://faraday//lib/faraday/connection.rb#
|
812
|
+
# source://faraday//lib/faraday/connection.rb#552
|
812
813
|
def support_parallel?(adapter); end
|
813
814
|
|
814
815
|
# source://faraday//lib/faraday/connection.rb#199
|
@@ -850,7 +851,7 @@ class Faraday::Connection
|
|
850
851
|
# @yieldparam username [String] any username from URI
|
851
852
|
# @yieldparam password [String] any password from URI
|
852
853
|
#
|
853
|
-
# source://faraday//lib/faraday/connection.rb#
|
854
|
+
# source://faraday//lib/faraday/connection.rb#508
|
854
855
|
def with_uri_credentials(uri); end
|
855
856
|
end
|
856
857
|
|
@@ -1289,6 +1290,11 @@ end
|
|
1289
1290
|
# source://faraday//lib/faraday/error.rb#104
|
1290
1291
|
class Faraday::ForbiddenError < ::Faraday::ClientError; end
|
1291
1292
|
|
1293
|
+
# Raised by Faraday::Middleware and subclasses when invalid default_options are used
|
1294
|
+
#
|
1295
|
+
# source://faraday//lib/faraday/error.rb#163
|
1296
|
+
class Faraday::InitializationError < ::Faraday::Error; end
|
1297
|
+
|
1292
1298
|
# source://faraday//lib/faraday/logging/formatter.rb#6
|
1293
1299
|
module Faraday::Logging; end
|
1294
1300
|
|
@@ -1380,32 +1386,66 @@ Faraday::METHODS_WITH_QUERY = T.let(T.unsafe(nil), Array)
|
|
1380
1386
|
|
1381
1387
|
# Middleware is the basic base class of any Faraday middleware.
|
1382
1388
|
#
|
1383
|
-
# source://faraday//lib/faraday/middleware.rb#
|
1389
|
+
# source://faraday//lib/faraday/middleware.rb#7
|
1384
1390
|
class Faraday::Middleware
|
1385
1391
|
extend ::Faraday::MiddlewareRegistry
|
1386
1392
|
|
1387
1393
|
# @return [Middleware] a new instance of Middleware
|
1388
1394
|
#
|
1389
|
-
# source://faraday//lib/faraday/middleware.rb#
|
1395
|
+
# source://faraday//lib/faraday/middleware.rb#15
|
1390
1396
|
def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end
|
1391
1397
|
|
1392
1398
|
# Returns the value of attribute app.
|
1393
1399
|
#
|
1394
|
-
# source://faraday//lib/faraday/middleware.rb#
|
1400
|
+
# source://faraday//lib/faraday/middleware.rb#10
|
1395
1401
|
def app; end
|
1396
1402
|
|
1397
|
-
# source://faraday//lib/faraday/middleware.rb#
|
1403
|
+
# source://faraday//lib/faraday/middleware.rb#54
|
1398
1404
|
def call(env); end
|
1399
1405
|
|
1400
|
-
# source://faraday//lib/faraday/middleware.rb#
|
1406
|
+
# source://faraday//lib/faraday/middleware.rb#64
|
1401
1407
|
def close; end
|
1402
1408
|
|
1403
1409
|
# Returns the value of attribute options.
|
1404
1410
|
#
|
1405
|
-
# source://faraday//lib/faraday/middleware.rb#
|
1411
|
+
# source://faraday//lib/faraday/middleware.rb#10
|
1406
1412
|
def options; end
|
1413
|
+
|
1414
|
+
class << self
|
1415
|
+
# default_options attr_reader that initializes class instance variable
|
1416
|
+
# with the values of any Faraday::Middleware defaults, and merges with
|
1417
|
+
# subclass defaults
|
1418
|
+
#
|
1419
|
+
# source://faraday//lib/faraday/middleware.rb#39
|
1420
|
+
def default_options; end
|
1421
|
+
|
1422
|
+
# Faraday::Middleware::default_options= allows user to set default options at the Faraday::Middleware
|
1423
|
+
# class level.
|
1424
|
+
#
|
1425
|
+
# my_app/config/initializers/my_faraday_middleware.rb
|
1426
|
+
#
|
1427
|
+
# Faraday::Response::RaiseError.default_options = { include_request: false }
|
1428
|
+
#
|
1429
|
+
# @example Set the Faraday::Response::RaiseError option, `include_request` to `false`
|
1430
|
+
#
|
1431
|
+
# source://faraday//lib/faraday/middleware.rb#29
|
1432
|
+
def default_options=(options = T.unsafe(nil)); end
|
1433
|
+
|
1434
|
+
private
|
1435
|
+
|
1436
|
+
# @raise [Faraday::InitializationError]
|
1437
|
+
#
|
1438
|
+
# source://faraday//lib/faraday/middleware.rb#45
|
1439
|
+
def validate_default_options(options); end
|
1440
|
+
end
|
1407
1441
|
end
|
1408
1442
|
|
1443
|
+
# source://faraday//lib/faraday/middleware.rb#12
|
1444
|
+
Faraday::Middleware::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
1445
|
+
|
1446
|
+
# source://faraday//lib/faraday/middleware.rb#13
|
1447
|
+
Faraday::Middleware::LOCK = T.let(T.unsafe(nil), Thread::Mutex)
|
1448
|
+
|
1409
1449
|
# Adds the ability for other modules to register and lookup
|
1410
1450
|
# middleware classes.
|
1411
1451
|
#
|
@@ -2429,10 +2469,10 @@ end
|
|
2429
2469
|
#
|
2430
2470
|
# source://faraday//lib/faraday/response/raise_error.rb#7
|
2431
2471
|
class Faraday::Response::RaiseError < ::Faraday::Middleware
|
2432
|
-
# source://faraday//lib/faraday/response/raise_error.rb#
|
2472
|
+
# source://faraday//lib/faraday/response/raise_error.rb#15
|
2433
2473
|
def on_complete(env); end
|
2434
2474
|
|
2435
|
-
# source://faraday//lib/faraday/response/raise_error.rb#
|
2475
|
+
# source://faraday//lib/faraday/response/raise_error.rb#77
|
2436
2476
|
def query_params(env); end
|
2437
2477
|
|
2438
2478
|
# Returns a hash of response data with the following keys:
|
@@ -2444,13 +2484,16 @@ class Faraday::Response::RaiseError < ::Faraday::Middleware
|
|
2444
2484
|
# The `request` key is omitted when the middleware is explicitly
|
2445
2485
|
# configured with the option `include_request: false`.
|
2446
2486
|
#
|
2447
|
-
# source://faraday//lib/faraday/response/raise_error.rb#
|
2487
|
+
# source://faraday//lib/faraday/response/raise_error.rb#54
|
2448
2488
|
def response_values(env); end
|
2449
2489
|
end
|
2450
2490
|
|
2451
2491
|
# source://faraday//lib/faraday/response/raise_error.rb#9
|
2452
2492
|
Faraday::Response::RaiseError::ClientErrorStatuses = T.let(T.unsafe(nil), Range)
|
2453
2493
|
|
2494
|
+
# source://faraday//lib/faraday/response/raise_error.rb#13
|
2495
|
+
Faraday::Response::RaiseError::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
|
2496
|
+
|
2454
2497
|
# source://faraday//lib/faraday/response/raise_error.rb#10
|
2455
2498
|
Faraday::Response::RaiseError::ServerErrorStatuses = T.let(T.unsafe(nil), Range)
|
2456
2499
|
|
@@ -2773,17 +2816,20 @@ class Faraday::Utils::Headers < ::Hash
|
|
2773
2816
|
# source://faraday//lib/faraday/utils/headers.rb#71
|
2774
2817
|
def delete(key); end
|
2775
2818
|
|
2819
|
+
# source://faraday//lib/faraday/utils/headers.rb#80
|
2820
|
+
def dig(key, *rest); end
|
2821
|
+
|
2776
2822
|
# source://faraday//lib/faraday/utils/headers.rb#65
|
2777
|
-
def fetch(key, *
|
2823
|
+
def fetch(key, *_arg1, **_arg2, &_arg3); end
|
2778
2824
|
|
2779
2825
|
# @return [Boolean]
|
2780
2826
|
#
|
2781
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2827
|
+
# source://faraday//lib/faraday/utils/headers.rb#86
|
2782
2828
|
def has_key?(key); end
|
2783
2829
|
|
2784
2830
|
# @return [Boolean]
|
2785
2831
|
#
|
2786
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2832
|
+
# source://faraday//lib/faraday/utils/headers.rb#86
|
2787
2833
|
def include?(key); end
|
2788
2834
|
|
2789
2835
|
# source://faraday//lib/faraday/utils/headers.rb#26
|
@@ -2791,44 +2837,44 @@ class Faraday::Utils::Headers < ::Hash
|
|
2791
2837
|
|
2792
2838
|
# @return [Boolean]
|
2793
2839
|
#
|
2794
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2840
|
+
# source://faraday//lib/faraday/utils/headers.rb#86
|
2795
2841
|
def key?(key); end
|
2796
2842
|
|
2797
2843
|
# @return [Boolean]
|
2798
2844
|
#
|
2799
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2845
|
+
# source://faraday//lib/faraday/utils/headers.rb#86
|
2800
2846
|
def member?(key); end
|
2801
2847
|
|
2802
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2848
|
+
# source://faraday//lib/faraday/utils/headers.rb#101
|
2803
2849
|
def merge(other); end
|
2804
2850
|
|
2805
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2851
|
+
# source://faraday//lib/faraday/utils/headers.rb#94
|
2806
2852
|
def merge!(other); end
|
2807
2853
|
|
2808
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2854
|
+
# source://faraday//lib/faraday/utils/headers.rb#117
|
2809
2855
|
def parse(header_string); end
|
2810
2856
|
|
2811
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2857
|
+
# source://faraday//lib/faraday/utils/headers.rb#106
|
2812
2858
|
def replace(other); end
|
2813
2859
|
|
2814
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2860
|
+
# source://faraday//lib/faraday/utils/headers.rb#113
|
2815
2861
|
def to_hash; end
|
2816
2862
|
|
2817
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2863
|
+
# source://faraday//lib/faraday/utils/headers.rb#94
|
2818
2864
|
def update(other); end
|
2819
2865
|
|
2820
2866
|
protected
|
2821
2867
|
|
2822
2868
|
# Returns the value of attribute names.
|
2823
2869
|
#
|
2824
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2870
|
+
# source://faraday//lib/faraday/utils/headers.rb#135
|
2825
2871
|
def names; end
|
2826
2872
|
|
2827
2873
|
private
|
2828
2874
|
|
2829
2875
|
# Join multiple values with a comma.
|
2830
2876
|
#
|
2831
|
-
# source://faraday//lib/faraday/utils/headers.rb#
|
2877
|
+
# source://faraday//lib/faraday/utils/headers.rb#140
|
2832
2878
|
def add_parsed(key, value); end
|
2833
2879
|
|
2834
2880
|
# on dup/clone, we need to duplicate @names hash
|
@@ -4,6 +4,7 @@
|
|
4
4
|
# This is an autogenerated file for types exported from the `hashdiff` gem.
|
5
5
|
# Please instead update this file by running `bin/tapioca gem hashdiff`.
|
6
6
|
|
7
|
+
|
7
8
|
# This module provides methods to diff two hash, patch and unpatch hash
|
8
9
|
#
|
9
10
|
# source://hashdiff//lib/hashdiff/util.rb#3
|
@@ -22,7 +23,7 @@ module Hashdiff
|
|
22
23
|
# @param obj2 [Array, Hash]
|
23
24
|
# @param options [Hash] the options to use when comparing
|
24
25
|
# * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
|
25
|
-
# * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s)
|
26
|
+
# * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s) in either hash
|
26
27
|
# * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
|
27
28
|
# * :delimiter (String) ['.'] the delimiter used when returning nested key references
|
28
29
|
# * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
|
@@ -95,7 +96,7 @@ module Hashdiff
|
|
95
96
|
# @param obj2 [Array, Hash]
|
96
97
|
# @param options [Hash] the options to use when comparing
|
97
98
|
# * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
|
98
|
-
# * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s)
|
99
|
+
# * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s) in either hash
|
99
100
|
# * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
|
100
101
|
# * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}.
|
101
102
|
# * :delimiter (String) ['.'] the delimiter used when returning nested key references
|
@@ -4,6 +4,7 @@
|
|
4
4
|
# This is an autogenerated file for types exported from the `i18n` gem.
|
5
5
|
# Please instead update this file by running `bin/tapioca gem i18n`.
|
6
6
|
|
7
|
+
|
7
8
|
# source://i18n//lib/i18n/gettext/po_parser.rb#15
|
8
9
|
module GetText; end
|
9
10
|
|
@@ -198,8 +199,8 @@ module I18n::Backend::Base
|
|
198
199
|
#
|
199
200
|
# if the given subject is an array then:
|
200
201
|
# each element of the array is recursively interpolated (until it finds a string)
|
201
|
-
# method interpolates ["yes, %{user}", ["maybe no, %{user}, "no, %{user}"]], :user => "bartuz"
|
202
|
-
# # =>
|
202
|
+
# method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz"
|
203
|
+
# # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]]
|
203
204
|
#
|
204
205
|
# source://i18n//lib/i18n/backend/base.rb#193
|
205
206
|
def interpolate(locale, subject, values = T.unsafe(nil)); end
|
@@ -1202,7 +1203,7 @@ module I18n::Base
|
|
1202
1203
|
|
1203
1204
|
# @return [Boolean]
|
1204
1205
|
#
|
1205
|
-
# source://i18n//lib/i18n.rb#
|
1206
|
+
# source://i18n//lib/i18n.rb#384
|
1206
1207
|
def available_locales_initialized?; end
|
1207
1208
|
|
1208
1209
|
# source://i18n//lib/i18n.rb#69
|
@@ -1245,7 +1246,7 @@ module I18n::Base
|
|
1245
1246
|
|
1246
1247
|
# Raises an InvalidLocale exception when the passed locale is not available.
|
1247
1248
|
#
|
1248
|
-
# source://i18n//lib/i18n.rb#
|
1249
|
+
# source://i18n//lib/i18n.rb#378
|
1249
1250
|
def enforce_available_locales!(locale); end
|
1250
1251
|
|
1251
1252
|
# source://i18n//lib/i18n.rb#73
|
@@ -1262,14 +1263,39 @@ module I18n::Base
|
|
1262
1263
|
# @raise [Disabled]
|
1263
1264
|
# @return [Boolean]
|
1264
1265
|
#
|
1265
|
-
# source://i18n//lib/i18n.rb#
|
1266
|
+
# source://i18n//lib/i18n.rb#264
|
1266
1267
|
def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end
|
1267
1268
|
|
1269
|
+
# Returns an array of interpolation keys for the given translation key
|
1270
|
+
#
|
1271
|
+
# *Examples*
|
1272
|
+
#
|
1273
|
+
# Suppose we have the following:
|
1274
|
+
# I18n.t 'example.zero' == 'Zero interpolations'
|
1275
|
+
# I18n.t 'example.one' == 'One interpolation %{foo}'
|
1276
|
+
# I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}'
|
1277
|
+
# I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}']
|
1278
|
+
# I18n.t 'example.one', locale: :other == 'One interpolation %{baz}'
|
1279
|
+
#
|
1280
|
+
# Then we can expect the following results:
|
1281
|
+
# I18n.interpolation_keys('example.zero') #=> []
|
1282
|
+
# I18n.interpolation_keys('example.one') #=> ['foo']
|
1283
|
+
# I18n.interpolation_keys('example.two') #=> ['foo', 'bar']
|
1284
|
+
# I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz']
|
1285
|
+
# I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz']
|
1286
|
+
# I18n.interpolation_keys('does-not-exist') #=> []
|
1287
|
+
# I18n.interpolation_keys('example') #=> []
|
1288
|
+
#
|
1289
|
+
# @raise [I18n::ArgumentError]
|
1290
|
+
#
|
1291
|
+
# source://i18n//lib/i18n.rb#253
|
1292
|
+
def interpolation_keys(key, **options); end
|
1293
|
+
|
1268
1294
|
# Localizes certain objects, such as dates and numbers to local formatting.
|
1269
1295
|
#
|
1270
1296
|
# @raise [Disabled]
|
1271
1297
|
#
|
1272
|
-
# source://i18n//lib/i18n.rb#
|
1298
|
+
# source://i18n//lib/i18n.rb#333
|
1273
1299
|
def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
|
1274
1300
|
|
1275
1301
|
# source://i18n//lib/i18n.rb#69
|
@@ -1289,21 +1315,21 @@ module I18n::Base
|
|
1289
1315
|
#
|
1290
1316
|
# @return [Boolean]
|
1291
1317
|
#
|
1292
|
-
# source://i18n//lib/i18n.rb#
|
1318
|
+
# source://i18n//lib/i18n.rb#373
|
1293
1319
|
def locale_available?(locale); end
|
1294
1320
|
|
1295
1321
|
# Localizes certain objects, such as dates and numbers to local formatting.
|
1296
1322
|
#
|
1297
1323
|
# @raise [Disabled]
|
1298
1324
|
#
|
1299
|
-
# source://i18n//lib/i18n.rb#
|
1325
|
+
# source://i18n//lib/i18n.rb#333
|
1300
1326
|
def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
|
1301
1327
|
|
1302
1328
|
# Merges the given locale, key and scope into a single array of keys.
|
1303
1329
|
# Splits keys that contain dots into multiple keys. Makes sure all
|
1304
1330
|
# keys are Symbols.
|
1305
1331
|
#
|
1306
|
-
# source://i18n//lib/i18n.rb#
|
1332
|
+
# source://i18n//lib/i18n.rb#361
|
1307
1333
|
def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end
|
1308
1334
|
|
1309
1335
|
# Tells the backend to reload translations. Used in situations like the
|
@@ -1619,12 +1645,12 @@ module I18n::Base
|
|
1619
1645
|
# I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen"
|
1620
1646
|
# I18n.transliterate("Jürgen", :locale => :de) # => "Juergen"
|
1621
1647
|
#
|
1622
|
-
# source://i18n//lib/i18n.rb#
|
1648
|
+
# source://i18n//lib/i18n.rb#322
|
1623
1649
|
def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end
|
1624
1650
|
|
1625
1651
|
# Executes block with given I18n.locale set.
|
1626
1652
|
#
|
1627
|
-
# source://i18n//lib/i18n.rb#
|
1653
|
+
# source://i18n//lib/i18n.rb#344
|
1628
1654
|
def with_locale(tmp_locale = T.unsafe(nil)); end
|
1629
1655
|
|
1630
1656
|
private
|
@@ -1648,13 +1674,16 @@ module I18n::Base
|
|
1648
1674
|
# I18n.exception_handler = I18nExceptionHandler.new # an object
|
1649
1675
|
# I18n.exception_handler.call(exception, locale, key, options) # will be called like this
|
1650
1676
|
#
|
1651
|
-
# source://i18n//lib/i18n.rb#
|
1677
|
+
# source://i18n//lib/i18n.rb#420
|
1652
1678
|
def handle_exception(handling, exception, locale, key, options); end
|
1653
1679
|
|
1654
|
-
# source://i18n//lib/i18n.rb#
|
1680
|
+
# source://i18n//lib/i18n.rb#462
|
1681
|
+
def interpolation_keys_from_translation(translation); end
|
1682
|
+
|
1683
|
+
# source://i18n//lib/i18n.rb#438
|
1655
1684
|
def normalize_key(key, separator); end
|
1656
1685
|
|
1657
|
-
# source://i18n//lib/i18n.rb#
|
1686
|
+
# source://i18n//lib/i18n.rb#390
|
1658
1687
|
def translate_key(key, throw, raise, locale, backend, options); end
|
1659
1688
|
end
|
1660
1689
|
|