telegram-bot 0.11.1 → 0.11.2

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
  SHA1:
3
- metadata.gz: d594181f45263c89878672c38ab96ca93f94d438
4
- data.tar.gz: da24b6e674c33166608c756731775a7f38ad57cb
3
+ metadata.gz: 1b1a9ad5b4560e3ceca2b84972df6fe746b6d0dc
4
+ data.tar.gz: 2ead2110a93d7538b893d6a8a9465e249b677159
5
5
  SHA512:
6
- metadata.gz: 575c620d5ce534969b8f23b1c44bcfab81fc36d99e3804216b4ad7ad4438fe2c92116159dcc76bdab152fbc4db66ae69a8bb3e3205ebe7b038255711d69627ad
7
- data.tar.gz: b8a73a25b7d49b60ad64a6d1cb19c9a4fe1e896f47a394d5175e7a374f0b79488f16410f2c68240ed8a7a08ade6c25a5c672b82e142d7cdddf3f7cb0abf90dbc
6
+ metadata.gz: 61ebb27e2675d6edb6a2d621050076fb4b1e70d9907d0ed3911c7f3cc9b3243f424d956283d1177ebb436885d9b88ff23cd5e7d2c2a9ba2e217a6c37be10f1b3
7
+ data.tar.gz: 2127f81bbbce52de542ea2103dd7b00e05feca40b23c502662bbdfdb6e199d32786a496149d7839a0f5a9af131ed52fdc953cabf5b675e823835ed098a61dbcf
data/.rubocop.yml CHANGED
@@ -15,6 +15,7 @@ Style/DotPosition: {EnforcedStyle: trailing}
15
15
  Style/FirstParameterIndentation: {EnforcedStyle: consistent}
16
16
  Style/IfUnlessModifier: {Enabled: false}
17
17
  Style/ModuleFunction: {Enabled: false}
18
+ Style/MultilineMethodCallIndentation: {EnforcedStyle: indented}
18
19
  Style/MultilineOperationIndentation: {EnforcedStyle: indented}
19
20
  Style/NestedParenthesizedCalls: {Enabled: false}
20
21
  Style/PredicateName: {Enabled: false}
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
+ # 0.11.2
2
+
3
+ - Rails 5.1 deep symbolized secrets support.
4
+
1
5
  # 0.11.1
2
6
 
3
- # Fixed poller for typed response.
7
+ - Fixed poller for typed response.
4
8
 
5
9
  # 0.11.0
6
10
 
data/README.md CHANGED
@@ -43,6 +43,12 @@ Or install it yourself as:
43
43
 
44
44
  $ gem install telegram-bot
45
45
 
46
+ Require if necessary:
47
+
48
+ ```ruby
49
+ require 'telegram/bot'
50
+ ```
51
+
46
52
  ## Usage
47
53
 
48
54
  ### Configuration
@@ -1,5 +1,6 @@
1
1
  require 'active_support/core_ext/hash/keys'
2
2
  require 'active_support/core_ext/hash/transform_values'
3
+ require 'active_support/core_ext/hash/indifferent_access'
3
4
 
4
5
  module Telegram
5
6
  module Bot
@@ -48,9 +49,10 @@ module Telegram
48
49
  def bots_config
49
50
  @bots_config ||=
50
51
  if defined?(Rails.application)
51
- telegram_config = Rails.application.secrets[:telegram] || {}
52
- (telegram_config['bots'] || {}).symbolize_keys.tap do |config|
53
- default = telegram_config['bot']
52
+ secrets = Rails.application.secrets.
53
+ fetch(:telegram, {}).with_indifferent_access
54
+ secrets.fetch(:bots, {}).symbolize_keys.tap do |config|
55
+ default = secrets[:bot]
54
56
  config[:default] = default if default
55
57
  end
56
58
  else
@@ -1,6 +1,6 @@
1
1
  module Telegram
2
2
  module Bot
3
- VERSION = '0.11.1'.freeze
3
+ VERSION = '0.11.2'.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.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Melentiev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-05 00:00:00.000000000 Z
11
+ date: 2017-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport