rubydium 0.4.1 → 0.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9550a176613e73a419e3b8844028e6c01b1e32440025a387a058e8032ee5ee4
4
- data.tar.gz: 963c0a9d0bd7095b7ebe36ebdecb8114c3886ff2a3a2fd8abe1be8894287113b
3
+ metadata.gz: 6c1427ca9d17164a93ec242c30d21dcf6466ee5281e0ae5e3051b1870a649392
4
+ data.tar.gz: '049b14d607f9e8e899af406321e5c6bef2cc65720eda7bfd048f0eecb2de6a15'
5
5
  SHA512:
6
- metadata.gz: 4c91cf1a165ac133b27d5e8a73d04e8cef603f13eb3322876fbae006257fd795054c385fd874c001f520c117291c2255964246a12a4c27b71db3604d66bf6be7
7
- data.tar.gz: 74ea953f0de92b66f7346d865d3879c34145ed5f6183f095f2d3b30d97ae658f2130389c2e45277a4abebfa848d7d117ef1b327801bf474537bc686f83918240
6
+ metadata.gz: 165a40f2b32eb13ac2c3d393e57f8158d0d4b8c80760fa0956c3c77a600b8b7f372fa9109326d903230f89930b825b9214375a1ddee09ae0acc1b3060406ec1c
7
+ data.tar.gz: 96d436a66ccedfbff6e32c1c5a1806fde6e6b2b7468a11ef460a2ade3f818837c655686fdd1cde6c3e2b4f29214219b2c47b66ece052607a2890861c31004693
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3.3.2
data/Gemfile.lock CHANGED
@@ -2,16 +2,19 @@ GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
4
  ast (2.4.2)
5
- async (2.3.1)
6
- console (~> 1.10)
7
- io-event (~> 1.1)
5
+ async (2.11.0)
6
+ console (~> 1.25, >= 1.25.2)
7
+ fiber-annotation
8
+ io-event (~> 1.5, >= 1.5.1)
8
9
  timers (~> 4.1)
9
- base64 (0.1.1)
10
+ bigdecimal (3.1.8)
10
11
  coderay (1.1.3)
11
- concurrent-ruby (1.2.2)
12
- console (1.16.2)
13
- fiber-local
14
- diff-lcs (1.5.0)
12
+ concurrent-ruby (1.3.1)
13
+ console (1.25.2)
14
+ fiber-annotation
15
+ fiber-local (~> 1.1)
16
+ json
17
+ diff-lcs (1.5.1)
15
18
  dry-core (1.0.1)
16
19
  concurrent-ruby (~> 1.0)
17
20
  zeitwerk (~> 2.6)
@@ -25,73 +28,94 @@ GEM
25
28
  dry-types (>= 1.7, < 2)
26
29
  ice_nine (~> 0.11)
27
30
  zeitwerk (~> 2.6)
28
- dry-types (1.7.1)
31
+ dry-types (1.7.2)
32
+ bigdecimal (~> 3.0)
29
33
  concurrent-ruby (~> 1.0)
30
34
  dry-core (~> 1.0)
31
35
  dry-inflector (~> 1.0)
32
36
  dry-logic (~> 1.4)
33
37
  zeitwerk (~> 2.6)
34
- faraday (2.7.11)
35
- base64
36
- faraday-net_http (>= 2.0, < 3.1)
37
- ruby2_keywords (>= 0.0.4)
38
+ faraday (2.9.0)
39
+ faraday-net_http (>= 2.0, < 3.2)
38
40
  faraday-multipart (1.0.4)
39
41
  multipart-post (~> 2)
40
- faraday-net_http (3.0.2)
41
- fiber-local (1.0.0)
42
+ faraday-net_http (3.1.0)
43
+ net-http
44
+ fiber-annotation (0.2.0)
45
+ fiber-local (1.1.0)
46
+ fiber-storage
47
+ fiber-storage (0.1.1)
42
48
  ice_nine (0.11.2)
43
- io-event (1.1.5)
44
- json (2.6.3)
45
- method_source (1.0.0)
46
- multipart-post (2.3.0)
47
- parallel (1.22.1)
48
- parser (3.1.3.0)
49
+ io-event (1.6.0)
50
+ json (2.7.2)
51
+ language_server-protocol (3.17.0.3)
52
+ method_source (1.1.0)
53
+ multipart-post (2.4.1)
54
+ net-http (0.4.1)
55
+ uri
56
+ parallel (1.24.0)
57
+ parser (3.3.2.0)
49
58
  ast (~> 2.4.1)
50
- pry (0.14.1)
59
+ racc
60
+ pry (0.14.2)
51
61
  coderay (~> 1.1)
52
62
  method_source (~> 1.0)
63
+ racc (1.8.0)
53
64
  rainbow (3.1.1)
54
- regexp_parser (2.6.1)
55
- rexml (3.2.5)
56
- rspec (3.12.0)
57
- rspec-core (~> 3.12.0)
58
- rspec-expectations (~> 3.12.0)
59
- rspec-mocks (~> 3.12.0)
60
- rspec-core (3.12.0)
61
- rspec-support (~> 3.12.0)
62
- rspec-expectations (3.12.1)
65
+ regexp_parser (2.9.2)
66
+ rexml (3.2.8)
67
+ strscan (>= 3.0.9)
68
+ rspec (3.13.0)
69
+ rspec-core (~> 3.13.0)
70
+ rspec-expectations (~> 3.13.0)
71
+ rspec-mocks (~> 3.13.0)
72
+ rspec-core (3.13.0)
73
+ rspec-support (~> 3.13.0)
74
+ rspec-expectations (3.13.0)
63
75
  diff-lcs (>= 1.2.0, < 2.0)
64
- rspec-support (~> 3.12.0)
65
- rspec-mocks (3.12.1)
76
+ rspec-support (~> 3.13.0)
77
+ rspec-mocks (3.13.1)
66
78
  diff-lcs (>= 1.2.0, < 2.0)
67
- rspec-support (~> 3.12.0)
68
- rspec-support (3.12.0)
69
- rubocop (1.41.1)
79
+ rspec-support (~> 3.13.0)
80
+ rspec-support (3.13.1)
81
+ rubocop (1.64.1)
70
82
  json (~> 2.3)
83
+ language_server-protocol (>= 3.17.0)
71
84
  parallel (~> 1.10)
72
- parser (>= 3.1.2.1)
85
+ parser (>= 3.3.0.2)
73
86
  rainbow (>= 2.2.2, < 4.0)
74
87
  regexp_parser (>= 1.8, < 3.0)
75
88
  rexml (>= 3.2.5, < 4.0)
76
- rubocop-ast (>= 1.23.0, < 2.0)
89
+ rubocop-ast (>= 1.31.1, < 2.0)
77
90
  ruby-progressbar (~> 1.7)
78
- unicode-display_width (>= 1.4.0, < 3.0)
79
- rubocop-ast (1.24.0)
80
- parser (>= 3.1.1.0)
81
- rubocop-rspec (2.16.0)
82
- rubocop (~> 1.33)
83
- ruby-progressbar (1.11.0)
84
- ruby2_keywords (0.0.5)
91
+ unicode-display_width (>= 2.4.0, < 3.0)
92
+ rubocop-ast (1.31.3)
93
+ parser (>= 3.3.1.0)
94
+ rubocop-capybara (2.20.0)
95
+ rubocop (~> 1.41)
96
+ rubocop-factory_bot (2.25.1)
97
+ rubocop (~> 1.41)
98
+ rubocop-rspec (2.30.0)
99
+ rubocop (~> 1.40)
100
+ rubocop-capybara (~> 2.17)
101
+ rubocop-factory_bot (~> 2.22)
102
+ rubocop-rspec_rails (~> 2.28)
103
+ rubocop-rspec_rails (2.28.3)
104
+ rubocop (~> 1.40)
105
+ ruby-progressbar (1.13.0)
106
+ strscan (3.1.0)
85
107
  telegram-bot-ruby (1.0.0)
86
108
  dry-struct (~> 1.6)
87
109
  faraday (~> 2.0)
88
110
  faraday-multipart (~> 1.0)
89
111
  zeitwerk (~> 2.6)
90
112
  timers (4.3.5)
91
- unicode-display_width (2.3.0)
92
- zeitwerk (2.6.11)
113
+ unicode-display_width (2.5.0)
114
+ uri (0.13.0)
115
+ zeitwerk (2.6.15)
93
116
 
94
117
  PLATFORMS
118
+ ruby
95
119
  x86_64-linux
96
120
 
97
121
  DEPENDENCIES
@@ -103,4 +127,4 @@ DEPENDENCIES
103
127
  telegram-bot-ruby (~> 1.0.0)
104
128
 
105
129
  BUNDLED WITH
106
- 2.3.26
130
+ 2.5.3
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # require "rubydium"
4
- require_relative "../lib/rubydium"
3
+ require "rubydium"
5
4
  require "pry"
6
5
 
7
6
  # Your actual logic of handling the updates goes here.
@@ -29,13 +28,12 @@ class ExampleBot < Rubydium::Bot
29
28
  end
30
29
 
31
30
  ExampleBot.configure do |config|
32
- config.token = "1043894792:AAGC_oA2Ztvo5bBZBPxX5_oUxFX-L_obZJI" # "1234567890:long_alphanumeric_string_goes_here"
33
- config.bot_username = "bulgakkebot" # "ends_with_bot"
34
- config.owner_username = "bulgakke" # "thats_you"
35
- config.privileged_usernames = []
36
- # %w[
37
- # your_friend your_chat_moderator
38
- # ]
31
+ config.token = "1234567890:long_alphanumeric_string_goes_here"
32
+ config.bot_username = "ends_with_bot"
33
+ config.owner_username = "thats_you"
34
+ config.privileged_usernames = %w[
35
+ your_friend your_chat_moderator
36
+ ]
39
37
  end
40
38
 
41
39
  ExampleBot.run
data/lib/rubydium/bot.rb CHANGED
@@ -45,7 +45,7 @@ module Rubydium
45
45
  @topic_id = @msg.message_thread_id if @chat.is_forum
46
46
  @replies_to = @msg.reply_to_message unless @msg.reply_to_message&.message_id == @topic_id
47
47
  @target = @replies_to&.from
48
- @text = @msg.text.to_s
48
+ @text = (@msg.text || @msg.caption).to_s
49
49
  @message_id = @msg.message_id
50
50
  @command = get_command(@msg.text || @msg.caption)
51
51
  @text_without_command = @text.gsub(@command.to_s, "").gsub(/@#{config.bot_username}\b/,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubydium
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
5
5
  end
data/rubydium.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.name = "rubydium"
7
7
  spec.version = Rubydium::VERSION
8
8
  spec.authors = ["bulgakke"]
9
- spec.email = ["vvp835@yandex.ru"]
9
+ spec.email = ["be.evgeniy.bulavin@gmail.com"]
10
10
 
11
11
  spec.summary = "An OO framework for building Telegram bots. That's the plan, at least."
12
12
  # spec.description = "TODO: Write a longer description or delete this line."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubydium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bulgakke
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-09 00:00:00.000000000 Z
11
+ date: 2024-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: telegram-bot-ruby
@@ -38,9 +38,9 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.3'
41
- description:
41
+ description:
42
42
  email:
43
- - vvp835@yandex.ru
43
+ - be.evgeniy.bulavin@gmail.com
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
@@ -79,7 +79,7 @@ metadata:
79
79
  homepage_uri: https://github.com/bulgakke/rubydium
80
80
  source_code_uri: https://github.com/bulgakke/rubydium
81
81
  rubygems_mfa_required: 'true'
82
- post_install_message:
82
+ post_install_message:
83
83
  rdoc_options: []
84
84
  require_paths:
85
85
  - lib
@@ -94,8 +94,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubygems_version: 3.4.10
98
- signing_key:
97
+ rubygems_version: 3.5.9
98
+ signing_key:
99
99
  specification_version: 4
100
100
  summary: An OO framework for building Telegram bots. That's the plan, at least.
101
101
  test_files: []