Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit 515f6b7

Browse files
committed
Fix ActiveRecord and Mongoid sample apps and configuration.
1 parent 1edfdcb commit 515f6b7

File tree

16 files changed

+65
-49
lines changed

16 files changed

+65
-49
lines changed

.github/workflows/test-mongodb.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
name: test
2+
name: test-mongodb
33
on: [push, pull_request]
44
jobs:
55
test:
66
runs-on: ubuntu-latest
77
name: test
88
env:
99
DATABASE_ADAPTER: mongoid
10-
BUNDLE_GEMFILE: Gemfile
1110
steps:
1211
- uses: actions/checkout@v2
1312
- uses: ruby/setup-ruby@v1

.github/workflows/test-postgresql.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: test
2+
name: test-postgresql
33
on: [push, pull_request]
44
jobs:
55
test:
@@ -18,7 +18,6 @@ jobs:
1818
env:
1919
DATABASE_ADAPTER: activerecord
2020
DATABASE_URL: postgres://test:password@localhost/slack_ruby_bot_server_slack_test
21-
BUNDLE_GEMFILE: Gemfile
2221
RACK_ENV: test
2322
steps:
2423
- uses: actions/checkout@v2

.rubocop_todo.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-09-29 12:37:09 UTC using RuboCop version 1.81.1.
3+
# on 2025-09-29 13:15:53 UTC using RuboCop version 1.81.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -102,3 +102,18 @@ RSpec/SpecFilePathFormat:
102102
RSpec/SubjectStub:
103103
Exclude:
104104
- 'spec/slack-ruby-bot-server-rtm/server_spec.rb'
105+
106+
# Offense count: 1
107+
# This cop supports unsafe autocorrection (--autocorrect-all).
108+
# Configuration parameters: EnforcedStyle.
109+
# SupportedStyles: always, always_true, never
110+
Style/FrozenStringLiteralComment:
111+
Exclude:
112+
- '**/*.arb'
113+
- 'sample_apps/sample_app_activerecord/db/schema.rb'
114+
115+
# Offense count: 1
116+
# This cop supports unsafe autocorrection (--autocorrect-all).
117+
Style/GlobalStdStream:
118+
Exclude:
119+
- 'spec/database_adapters/activerecord/activerecord.rb'

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
### Changelog
22

3-
#### 0.2.1 (Next)
3+
#### 0.3.0 (Next)
44

5+
* [#2](https://github.com/slack-ruby/slack-ruby-bot-server-rtm/pull/2): Replace Travis-CI with GHA - [@dblock](https://github.com/dblock).
56
* Your contribution here.
67

78
#### 0.2.0 (2020/11/27)

Gemfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ when 'mongoid'
88
gem 'mongoid'
99
gem 'mongoid-scroll'
1010
when 'activerecord'
11-
gem 'activerecord', '~> 5.0.0'
12-
gem 'otr-activerecord', '~> 1.2.1'
13-
gem 'virtus'
14-
gem 'cursor_pagination' # rubocop:disable Bundler/OrderedGems
11+
gem 'activerecord'
12+
gem 'mutex_m'
13+
gem 'otr-activerecord'
14+
gem 'pagy_cursor'
1515
gem 'pg'
16+
gem 'virtus'
1617
when nil
1718
warn "Missing ENV['DATABASE_ADAPTER']."
1819
else

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ Slack Ruby Bot Server RealTime (RTM) Extension
22
==============================================
33

44
[![Gem Version](https://badge.fury.io/rb/slack-ruby-bot-server-rtm.svg)](https://badge.fury.io/rb/slack-ruby-bot-server-rtm)
5-
[![Build Status](https://travis-ci.org/slack-ruby/slack-ruby-bot-server-rtm.svg?branch=main)](https://travis-ci.org/slack-ruby/slack-ruby-bot-server-rtm)
5+
[![test-postgresql](https://github.com/slack-ruby/slack-ruby-bot-server-rtm/actions/workflows/test-postgresql.yml/badge.svg)](https://github.com/slack-ruby/slack-ruby-bot-server-rtm/actions/workflows/test-postgresql.yml)
6+
[![test-mongodb](https://github.com/slack-ruby/slack-ruby-bot-server-rtm/actions/workflows/test-mongodb.yml/badge.svg)](https://github.com/slack-ruby/slack-ruby-bot-server-rtm/actions/workflows/test-mongodb.yml)
67

78
# Table of Contents
89

lib/slack-ruby-bot-server-rtm/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module SlackRubyBotServer
44
module RealTime
5-
VERSION = '0.2.1'
5+
VERSION = '0.3.0'
66
end
77
end

sample_apps/sample_app_activerecord/Gemfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22

33
source 'https://rubygems.org'
44

5-
gem 'activerecord', '~> 5.0.0', require: 'active_record'
5+
gem 'activerecord'
6+
gem 'mutex_m'
67
gem 'newrelic-slack-ruby-bot'
7-
gem 'otr-activerecord', '~> 1.2.1'
8+
gem 'otr-activerecord'
9+
gem 'pagy_cursor'
810
gem 'pg'
911
gem 'rack-server-pages'
1012
gem 'rack-test'
1113
gem 'slack-ruby-bot-server-rtm', path: '../../'
1214
gem 'unicorn'
1315

1416
group :development, :test do
15-
gem 'standalone_migrations', '~> 5.2'
17+
gem 'standalone_migrations'
1618
end
1719

1820
group :test do

sample_apps/sample_app_activerecord/config.ru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ActiveRecord::Base.establish_connection(
1212
YAML.safe_load(
1313
ERB.new(
1414
File.read('config/postgresql.yml')
15-
).result, [], [], true
15+
).result, aliases: true
1616
)[ENV.fetch('RACK_ENV', nil)]
1717
)
1818

sample_apps/sample_app_activerecord/config/postgresql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ development:
1111
test:
1212
<<: *default
1313
database: slack_ruby_bot_server_test
14+
url: <%= ENV["DATABASE_URL"] || 'postgres://localhost/slack_ruby_bot_server_test' %>
1415

1516
production:
1617
<<: *default

0 commit comments

Comments
 (0)