Skip to content

Commit 73452a0

Browse files
committed
Removed unused ext module.
1 parent 1075841 commit 73452a0

File tree

4 files changed

+12
-32
lines changed

4 files changed

+12
-32
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [#157](https://github.com/slack-ruby/slack-ruby-bot-server/pull/157): Added test env setup guide for linux users - [@crazyoptimist](https://github.com/crazyoptimist).
1010
* [#158](https://github.com/slack-ruby/slack-ruby-bot-server/pull/158): Replace `cursor_pagination` with `pagy_cursor` - [@crazyoptimist](https://github.com/crazyoptimist).
1111
* [#160](https://github.com/slack-ruby/slack-ruby-bot-server/pull/160): Document upgrading to 2.0.0 - [@crazyoptimist](https://github.com/crazyoptimist).
12+
* [#161](https://github.com/slack-ruby/slack-ruby-bot-server/pull/161): Removed unused `ext` module - [@dblock](https://github.com/dblock).
1213
* Your contribution here.
1314

1415
#### 1.2.1 (2022/03/06)

lib/slack-ruby-bot-server/ext.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
%w[bson/object_id grape/sort_extension].each do |ext|
2-
require_relative "ext/#{ext}"
3-
end
1+
require_relative 'ext/bson/object_id'
2+
require_relative 'ext/grape/sort_extension'
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# see https://groups.google.com/forum/#!msg/mongoid/MaXFVw7D_4s/T3sl6Flg428J
2-
module BSON
3-
class ObjectId
4-
def as_json(_options = {})
5-
to_s
6-
end
2+
if defined?(:BSON)
3+
module BSON
4+
class ObjectId
5+
def as_json(_options = {})
6+
to_s
7+
end
78

8-
def to_bson_key(encoded = ''.force_encoding(BINARY))
9-
to_s.to_bson_key(encoded)
9+
def to_bson_key(encoded = ''.force_encoding(BINARY))
10+
to_s.to_bson_key(encoded)
11+
end
1012
end
1113
end
1214
end

lib/slack-ruby-bot-server/ext/mongoid/slack-ruby-bot/commands/base.rb

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)