telegram-bot 0.15.2 → 0.15.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81fae472dfd6080e48c0b3329cc7b5e8748aa89040162a089480bf0082a72477
4
- data.tar.gz: a3620f420bcd83f58a70aa093ca8becf748156a88000f663d5b0ba5a4fb59f77
3
+ metadata.gz: 7cb3d6a6238c7d07cf8b6f33743dc5bc5a5442b9695f716cd22098b9dae341a6
4
+ data.tar.gz: 3d0d9ff96175d7e63041d2f76048f158f75fcc19bd059270e479e4034a21db3f
5
5
  SHA512:
6
- metadata.gz: 0ccbbc372a75c5861ec8751f912282227e06850ca84d23617ddda126b0ab2eaa592d4f005b976d451c87c80f9bb59d27a13d58e752d6290dc27500d9c4252b97
7
- data.tar.gz: 69553e905b7b8c7d31e8006e592ccfc824459c14dcc15f696e94866bd7a20f604dcf52a40622152602f44ec997628646a98fa75f2b766221c7cef2815c5271a1
6
+ metadata.gz: d406dace6502e17764530733200f9f1d5a14d496087b35449a086675e1c15cd3cdcc71119e744422338f5367f75fffb82abc793dcc17f08c30b76565d487fd52
7
+ data.tar.gz: 97e4323e43fee40885628fadeb179edeff9d3d73da12e8803dfbf2ce36e2ec5ac94b7499da14721e4cedee44ca38dc9d1d36a5cf21b2c4918bb8f48230e2a794
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # 0.15.3
4
+
5
+ - Ruby 3.0 support: fix translation helpers.
6
+
3
7
  # 0.15.2
4
8
 
5
9
  - Ruby 3.0 support. Drop support for Ruby < 2.4.
@@ -12,15 +12,15 @@ module Telegram
12
12
 
13
13
  module ClassMethods
14
14
  # Class-level helper for lazy translations.
15
- def translate(key, options = {})
15
+ def translate(key, **options)
16
16
  key = "#{controller_path.tr('/', '.')}#{key}" if key.to_s.start_with?('.')
17
- I18n.translate(key, options)
17
+ I18n.translate(key, **options)
18
18
  end
19
19
  alias :t :translate
20
20
  end
21
21
 
22
22
  # See toplevel description.
23
- def translate(key, options = {})
23
+ def translate(key, **options)
24
24
  if key.to_s.start_with?('.')
25
25
  path = controller_path.tr('/', '.')
26
26
  defaults = [:"#{path}#{key}"]
@@ -28,7 +28,7 @@ module Telegram
28
28
  options[:default] = defaults.flatten
29
29
  key = "#{path}.#{action_name_i18n_key}#{key}"
30
30
  end
31
- I18n.translate(key, options)
31
+ I18n.translate(key, **options)
32
32
  end
33
33
  alias :t :translate
34
34
 
@@ -1,6 +1,6 @@
1
1
  module Telegram
2
2
  module Bot
3
- VERSION = '0.15.2'.freeze
3
+ VERSION = '0.15.3'.freeze
4
4
 
5
5
  def self.gem_version
6
6
  Gem::Version.new VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Melentiev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-26 00:00:00.000000000 Z
11
+ date: 2021-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack